Documentation
    Preparing search index...

    Type Alias Nip44Decryptor

    Nip44Decryptor: (
        content: string,
        authorPubkey: string,
    ) => string | Promise<string>

    A NIP-44 decryptor: takes the event's content and the author pubkey and returns the plaintext (a JSON array of tags). Inject your signer's nip44.decrypt (e.g. a NIP-07 window.nostr.nip44, a bunker, or nostr-tools/nip44) so this package carries no crypto dependency.

    Type Declaration

      • (content: string, authorPubkey: string): string | Promise<string>
      • Parameters

        • content: string
        • authorPubkey: string

        Returns string | Promise<string>

    const decrypt: Nip44Decryptor = (content, author) =>
    window.nostr!.nip44!.decrypt(author, content);