Documentation
    Preparing search index...

    Interface ManifestCache

    Cache for verified napplet manifest entries. Used to detect napplet updates (aggregateHash changes) across sessions.

    const cache = createManifestCache(persistence);
    cache.load();
    cache.set({ pubkey: 'abc...', dTag: 'chat', aggregateHash: 'dead', verifiedAt: Date.now() });
    interface ManifestCache {
        clear(): void;
        clearVerifications(): void;
        get(pubkey: string, dTag: string): ManifestCacheEntry | undefined;
        getRequires(pubkey: string, dTag: string): string[];
        getVerification(eventId: string): VerificationCacheEntry | undefined;
        has(pubkey: string, dTag: string, hash: string): boolean;
        hasVerification(eventId: string): boolean;
        load(): void;
        persist(): void;
        remove(pubkey: string, dTag: string): void;
        set(entry: ManifestCacheEntry): void;
        setVerification(eventId: string, result: VerificationCacheEntry): void;
    }
    Index

    Methods

    • Get the requires list for a cached manifest, or empty array if not found.

      Parameters

      • pubkey: string
      • dTag: string

      Returns string[]

    • Check if a specific hash is cached for a pubkey/dTag combination.

      Parameters

      • pubkey: string
      • dTag: string
      • hash: string

      Returns boolean