import { PayloadDriverIndexedDb } from "https://deno.land/x/willow@0.2.1/mod.browser.ts";
Stores and retrieves payloads from IndexedDB.
Constructors
new
PayloadDriverIndexedDb(payloadScheme: PayloadScheme<PayloadDigest>)Methods
private
getKey(payloadHash: PayloadDigest)private
getPayload(key: Uint8Array): Payloaderase(digest: PayloadDigest): Promise<true | ValidationError>
get(payloadHash: PayloadDigest): Promise<Payload | undefined>
length(payloadHash: PayloadDigest): Promise<bigint>
receive(opts: { payload: Uint8Array | AsyncIterable<Uint8Array>; offset: number; knownLength: bigint; knownDigest: PayloadDigest; }): Promise<{ digest: PayloadDigest; length: bigint; }>
set(payload: Uint8Array | AsyncIterable<Uint8Array>): Promise<{ digest: PayloadDigest; length: bigint; payload: Payload; }>