Documentation
    Preparing search index...

    Interface OriginRegistry

    Bidirectional registry mapping Window references to windowId strings. Optionally stores NIP-5D identity metadata (dTag and aggregateHash) per window.

    import { originRegistry } from '@kehto/shell';

    originRegistry.register(iframe.contentWindow, 'napp-1');
    const id = originRegistry.getWindowId(iframe.contentWindow); // 'napp-1'
    interface OriginRegistry {
        clear(): void;
        getAllWindowIds(): string[];
        getEnvironment(win: Window): ShellEnvironment | undefined;
        getIdentity(win: Window): OriginIdentity | undefined;
        getIframeWindow(windowId: string): Window | null;
        getRegistrationId(win: Window): number | undefined;
        getWindowId(win: Window): string | undefined;
        register(win: Window, windowId: string, identity?: OriginIdentity): void;
        setEnvironment(win: Window, environment: ShellEnvironment): void;
        unregister(windowId: string): void;
    }
    Index

    Methods