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

x/earthstar/src/entries/npm.ts>AttachmentDriverIndexedDB

Storage for private, distributed, offline-first applications.
Go to Latest
class AttachmentDriverIndexedDB
import { AttachmentDriverIndexedDB } from "https://deno.land/x/earthstar@v10.2.0/src/entries/npm.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>