Skip to main content
Deno 2 is finally here 🎉️
Learn more
Module

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

Storage for private, distributed, offline-first applications.
Go to Latest
class Replica
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
});

Constructors

new
Replica(opts: ReplicaOpts)