import { type IPeer } from "https://deno.land/x/earthstar@v9.3.3/mod.browser.ts";
Holds many shares' replicas and manages their synchronisation with other peers. Recommended as the point of contact between your application and Earthstar shares.
Properties
peerId: PeerId
Methods
replicas(): IReplica[]
getReplica(share: ShareAddress): IReplica | undefined
addReplica(replica: IReplica): Promise<void>
removeReplica(replica: IReplica): Promise<void>
sync(target: IPeer | string): () => void
syncUntilCaughtUp(targets: (IPeer | string)[]): Promise<Record<string, Record<ShareAddress, SyncSessionStatus>>>