Skip to content

defaultConfig

defaultConfig(bootstrapConfig, webrtcIceServers?, options?): PeerborneConfig

Defined in: packages/core/src/peerborne-config.ts:221

Default peerborne config to use if none is provided.

Browser only: it stores blocks and data in IndexedDB, so initialize() rejects with indexedDB is not defined under Node.js. Use defaultNodeConfig from @peerborne/core/node in Node.js.

Note: This is a browser-compatible default. It does not include mDNS (which requires the Node-only dgram module). Without bootstrap nodes this node will be in a swarm of one; use peerborne.connect() or pass bootstrap addresses to join peers.

Dials keep libp2p’s browser connection gater, which refuses private and loopback addresses and insecure /ws WebSockets, unless DefaultConfigOptions.allowLocalNetworkDials is set.

BootstrapInit

Bootstrap peer list to seed peer discovery.

readonly Readonly<IceServer>[]

Optional override for the WebRTC ICE server list. When undefined, DEFAULT_WEBRTC_ICE_SERVERS is used so peers can discover their public address mappings via STUN without relying on relay infrastructure for data plane forwarding.

DefaultConfigOptions = {}

Dial policy options.

PeerborneConfig