Documentation
    Preparing search index...

    Interface MockConnectGate

    Shell-side NAP-CONNECT gate: validates manifest origins, persists grants on (dTag, aggregateHash), models the consent prompt, and emits CSP + meta.

    const gate = createMockConnectGate();
    gate.approveNext(false);
    gate.serve({ dTag: 'news', connectOrigins: ['wss://events.example.org'] }).granted === false;
    interface MockConnectGate {
        approveNext(approved: boolean): void;
        grants(): ReadonlyMap<string, boolean>;
        reset(): void;
        revoke(dTag: string, aggregateHash: string): boolean;
        serve(manifest: ConnectManifest): ConnectServeResult;
        supports(capability: string): boolean;
    }
    Index

    Methods

    • Revoke a persisted grant; takes effect at next serve. Returns whether one existed.

      Parameters

      • dTag: string
      • aggregateHash: string

      Returns boolean