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

x/earthstar/mod.ts>SharedSettings#getPeer

Storage for private, distributed, offline-first applications.
Go to Latest
method SharedSettings.prototype.getPeer
import { SharedSettings } from "https://deno.land/x/earthstar@v10.0.1/mod.ts";

Get a new Peer preconfigured with shares, secrets, and syncers derived from these settings.

When settings are updated, the peer's replicas and syncers will be updated too.

Parameters

unnamed 0: { sync: "once" | "continuous" | false; onCreateReplica: (addr: ShareAddress, secret?: string) => Replica; }

Returns

{ peer: Peer; unsubscribeFromSettings: () => void; }