nip60/nip61: update to latest nip changes.

(a single default wallet, always default to sats, no names etc)
This commit is contained in:
fiatjaf
2025-02-03 16:40:42 -03:00
parent 8446557788
commit 3c0f4a723a
11 changed files with 494 additions and 740 deletions

View File

@@ -26,7 +26,7 @@ func (t Token) ID() string {
return "<not-published>"
}
func (t Token) toEvent(ctx context.Context, kr nostr.Keyer, walletId string, evt *nostr.Event) error {
func (t Token) toEvent(ctx context.Context, kr nostr.Keyer, evt *nostr.Event) error {
pk, err := kr.GetPublicKey(ctx)
if err != nil {
return err
@@ -34,7 +34,7 @@ func (t Token) toEvent(ctx context.Context, kr nostr.Keyer, walletId string, evt
evt.CreatedAt = t.mintedAt
evt.Kind = 7375
evt.Tags = nostr.Tags{{"a", fmt.Sprintf("37375:%s:%s", pk, walletId)}}
evt.Tags = nostr.Tags{}
content, _ := json.Marshal(t)
evt.Content, err = kr.Encrypt(