Skip to main content
Module

x/earthstar/src/entries/universal.ts>Peer#discover

Storage for private, distributed, offline-first applications.
Go to Latest
method Peer.prototype.discover
Re-export
import { Peer } from "https://deno.land/x/earthstar@v10.2.2/src/entries/universal.ts";

Discover other Earthstar peers using a discovery service, for example other peers on the local network.

Returns an asynchronous iterable of DiscoveryEvent, which describe finding a Peer, another peer initiating sync with you, etc. Some of these events have callbacks which let you initiate sync with the discovered peer.

Returns

AsyncIterable<DiscoveryEvent>