import { type IReplicaAttachmentDriver } from "https://deno.land/x/earthstar@v10.2.0/src/entries/npm.ts";
An attachment driver provides low-level access to a replica's attachments. ReplicaAttachmentDrivers are not meant to be used directly by users; let the Replica talk to it for you.
Methods
Returns an attachment for a given format and hash.
Upserts the attachment to a staging area, and returns an object used to assess whether it is what we're expecting.
Erases an attachment for a given format and hash.
Delete all stored attachments not included in the provided list of hashes and their formats.
Close the replica Driver. The replica will call this. You cannot call close() if the replica is already closed (it will throw a ReplicaIsClosedError). If erase, actually delete and forget data locally. Erase defaults to false if not provided.