Skip to main content
Module

x/earthstar/src/entries/npm.ts>Replica

Storage for private, distributed, offline-first applications.
Go to Latest
class Replica
extends MultiformatReplica
Re-export
import { Replica } from "https://deno.land/x/earthstar@v10.0.2/src/entries/npm.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
});

Constructors

new
Replica(opts: ReplicaOpts)