kernl API
    Preparing search index...

    Function decodePointer

    • Decode what a user typed or clicked into the event to fetch.

      Accepts naddr1…, nevent1…, note1…, a bare 64-hex event id, any of those behind a nostr: prefix, and plain coordinates in either <pubkey>:<kind>:<identifier> or NIP-01 <kind>:<pubkey>:<identifier> order. The result says which event to fetch and nothing more; trust comes from verifying that event, never from the pointer.

      Parameters

      • input: string

        The address text.

      Returns AppletPointer

      The decoded pointer.

      invalid:pointer for anything else.

      decodePointer('nostr:naddr1…').kind; // 'address'
      decodePointer(`${pubkey}:35129:chat`); // { kind: 'address', pubkey, identifier: 'chat', eventKind: 35129, relays: [] }