Documentation
    Preparing search index...

    Interface SessionRegistry

    Bidirectional registry mapping windowIds to verified napplet pubkeys. Maintained by the runtime after successful AUTH handshakes.

    const registry = createSessionRegistry();
    registry.register('win-1', entry);
    const pubkey = registry.getPubkey('win-1');
    interface SessionRegistry {
        clear(): void;
        clearPendingUpdate(windowId: string): void;
        getAllEntries(): SessionEntry[];
        getEntry(pubkey: string): SessionEntry | undefined;
        getEntryByWindowId(windowId: string): SessionEntry | undefined;
        getInstanceId(windowId: string): string | undefined;
        getPendingUpdate(windowId: string): PendingUpdate | undefined;
        getPubkey(windowId: string): string | undefined;
        getWindowId(pubkey: string): string | undefined;
        isRegistered(windowId: string): boolean;
        register(windowId: string, entry: SessionEntry): void;
        setPendingUpdate(windowId: string, update: PendingUpdate): void;
        unregister(windowId: string): void;
    }
    Index

    Methods

    • Get the full entry for a napplet by windowId directly. NIP-5D: Required for sessions where pubkey is '' (identity established via originRegistry). Unlike getEntry(pubkey), this works when pubkey is empty.

      Parameters

      • windowId: string

      Returns SessionEntry | undefined