Until more clients standardize around proper error handling, safest path = return undefined; and log the rejection internally. I'll stop there for now.

Reply to this note

Please Login to reply.

Discussion

async window.nostr.getPublicKey(): string // returns a public key as hex

async window.nostr.signEvent(event: { created_at: number, kind: number, tags: string[][], content: string }): Event // takes an event object, adds `id`, `pubkey` and `sig` and returns it

From the nip07, and I assume many clients blindly expect string 😂🤣😭