Documentation
    Preparing search index...

    Type Alias SendToNapplet

    SendToNapplet: (windowId: string, msg: unknown[] | NappletMessage) => void

    Abstract message sender — the runtime calls this to send messages back to a specific napplet. The transport layer (postMessage, WebSocket, host bridge channel, etc.) is the implementor's concern.

    Accepts both NIP-01 array format (legacy) and NIP-5D NappletMessage envelope format.

    Type Declaration

      • (windowId: string, msg: unknown[] | NappletMessage): void
      • Parameters

        • windowId: string

          Target napplet's identifier

        • msg: unknown[] | NappletMessage

          NIP-01 message array (e.g., ['EVENT', subId, event]) or NIP-5D envelope

        Returns void