implemented event and req

This commit is contained in:
2025-09-02 20:32:53 +01:00
parent 76b251dea9
commit 51f04f5f60
104 changed files with 6368 additions and 125 deletions

View File

@@ -59,11 +59,11 @@ func (k *K) ToU64() uint64 {
func (k *K) Name() string { return GetString(k.K) }
// Equal checks if
func (k *K) Equal(k2 *K) bool {
if k == nil || k2 == nil {
func (k *K) Equal(k2 uint16) bool {
if k == nil {
return false
}
return k.K == k2.K
return k.K == k2
}
var Privileged = []*K{
@@ -80,7 +80,7 @@ var Privileged = []*K{
// the pubkeys in the event and p tags of the event are party to.
func (k *K) IsPrivileged() (is bool) {
for i := range Privileged {
if k.Equal(Privileged[i]) {
if k.Equal(Privileged[i].K) {
return true
}
}

View File

@@ -67,7 +67,7 @@ func (k *S) Clone() (c *S) {
// Even if a custom number is found, this codebase does not have the logic to
// deal with the kind so such a search is pointless and for which reason static
// typing always wins. No mistakes possible with known quantities.
func (k *S) Contains(s *K) bool {
func (k *S) Contains(s uint16) bool {
for i := range k.K {
if k.K[i].Equal(s) {
return true