import { type ISyncPartner } from "https://deno.land/x/earthstar@v10.0.0-alpha.3/mod.ts";
Provides a syncer with the means to connect the peer being synced with (the partner).
Methods
getDownload(opts: GetTransferOpts): Promise<ReadableStream<Uint8Array> | undefined>
Attempt to download an attachment directly from the partner.
handleUploadRequest(opts: GetTransferOpts): Promise<WritableStream<Uint8Array> | undefined>
Handles (usually in-band) request from the other peer to upload an attachment.
handleTransferRequest(source: IncomingAttachmentSourceType, kind: "upload" | "download"): Promise<ReadableStream<Uint8Array> | WritableStream<Uint8Array> | undefined>
Handles an out-of-band request from the other peer to start a transfer.