Skip to main content
The Deno 2 Release Candidate is here
Learn more
Module

x/earthstar/src/peer/peer.ts>Peer#sync

Earthstar is a tool for private, undiscoverable, offline-first networks.
Go to Latest
method Peer.prototype.sync
import { Peer } from "https://deno.land/x/earthstar@v10.0.0-beta.6/src/peer/peer.ts";

Begin synchronising with a remote or local peer.

Parameters

target: IPeer | string
  • A HTTP URL or Peer instance.
optional
continuous = [UNSUPPORTED]
  • Whether the connection should be kept open for newly written docs, or stop after an initial sync.
optional
formats: FormatsArg<F>
  • Optional. Which document formats to sync. Defaults to es.5.

Returns

Syncer<undefined, F>