class Replica
extends MultiformatReplica
Re-export
import { Replica } from "https://deno.land/x/earthstar@v10.2.0/src/entries/universal.ts";
A replica holding a share's data, used to read, write, and synchronise data to.
Should be closed using the close
method when no longer being used.
const gardeningKeypair = await Crypto.generateShareKeypair("gardening");
const myReplica = new Replica({
driver: new ReplicaDriverMemory(gardeningKeypair.shareAddress),
shareSecret: gardeningKeypair.secret
});