Skip to main content
Deno 2 is finally here 🎉️
Learn more
Module

x/earthstar/src/replica/attachment_drivers/indexeddb.ts>AttachmentDriverIndexedDB

Earthstar is a tool for private, undiscoverable, offline-first networks.
Go to Latest
class AttachmentDriverIndexedDB
implements IReplicaAttachmentDriver
import { AttachmentDriverIndexedDB } from "https://deno.land/x/earthstar@v10.0.0-alpha.3/src/replica/attachment_drivers/indexeddb.ts";

Constructors

new
AttachmentDriverIndexedDB(share: ShareAddress, namespace?: string)

Properties

private
closed: boolean
private
db
private
share: ShareAddress

Methods

private
getIndexKey(formatName: string, attachmentHash: string)
clearStaging(): Promise<void>
close(erase: boolean)
erase(formatName: string, attachmentHash: string): Promise<true | ValidationError>
filter(attachments: Record<string, Set<string>>): Promise<{ format: string; hash: string; }[]>
getAttachment(formatName: string, attachmentHash: string): Promise<DocAttachment | undefined>
isClosed(): boolean
stage(formatName: string, attachment: Uint8Array | ReadableStream<Uint8Array>): Promise<{ hash: string; size: number; commit: () => Promise<void>; reject: () => Promise<void>; } | ValidationError>
wipe(): Promise<void>