Dex TypeScript SDK 1.29.0
    Preparing search index...

    Interface BlobCache

    Provides concurrent, bounded storage for content-addressed Dex blobs.

    interface BlobCache {
        config: BlobCacheConfig;
        close(): void;
        delete(blobId: string): void;
        deleteAll(): void;
        get(blobId: string): Uint8Array<ArrayBufferLike> | undefined;
        put(blobId: string, payload: Uint8Array): boolean;
    }
    Index

    Properties

    Methods

    Properties

    Effective configuration used by this cache.

    Methods

    • Flushes metadata and releases native resources; repeated calls are safe.

      Returns void

    • Deletes one cached payload when present.

      Parameters

      • blobId: string

        Opaque identifier to remove.

      Returns void

    • Deletes every payload while keeping the cache open.

      Returns void

    • Reads a cached payload without contacting Dex.

      Parameters

      • blobId: string

        Opaque server-assigned blob identifier.

      Returns Uint8Array<ArrayBufferLike> | undefined

      A copied payload, or undefined when absent.

    • Offers a payload to the bounded cache.

      Parameters

      • blobId: string

        Opaque server-assigned blob identifier.

      • payload: Uint8Array

        Bytes copied into native storage.

      Returns boolean

      true when admitted or false when rejected by policy.