Skip to main content
Using Deno in production at your company? Earn free Deno merch.
Give us feedback
Module

x/earthstar/src/util/client_settings.ts>ClientSettings#getPeer

Earthstar is a tool for private, undiscoverable, offline-first networks.
Go to Latest
method ClientSettings.prototype.getPeer
import { ClientSettings } from "https://deno.land/x/earthstar@v10.0.0-beta.6/src/util/client_settings.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; }