Skip to main content
The Deno 2 Release Candidate is here
Learn more
Module

x/willow/src/store/storage/payload_drivers/indexeddb.ts>PayloadDriverIndexedDb

Exploring Willow in the most efficient and sound programming language
Go to Latest
class PayloadDriverIndexedDb
import { PayloadDriverIndexedDb } from "https://deno.land/x/willow@0.2.1/src/store/storage/payload_drivers/indexeddb.ts";

Stores and retrieves payloads from IndexedDB.

Constructors

new
PayloadDriverIndexedDb(payloadScheme: PayloadScheme<PayloadDigest>)

Type Parameters

PayloadDigest

Properties

private
db

Methods

private
getKey(payloadHash: PayloadDigest)
private
getPayload(key: Uint8Array): Payload
erase(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; }>