import { type IPeer } from "https://deno.land/x/earthstar@v10.0.0-alpha.2/mod.ts";
Holds many shares' replicas and manages their synchronisation with other peers. Recommended as the point of contact between your application and Earthstar shares.
Methods
replicas(): Replica[]
getReplica(share: ShareAddress): Replica | undefined
addReplica(replica: Replica): Promise<void>
removeReplica(replica: Replica): Promise<void>
sync<F>(): Syncer<undefined, F>
onReplicasChange(callback: (map: Map<ShareAddress, Replica>) => void | Promise<void>): () => void