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.
Parameters
Section titled “Parameters”bootstrapConfig
Section titled “bootstrapConfig”BootstrapInit
Bootstrap peer list to seed peer discovery.
webrtcIceServers?
Section titled “webrtcIceServers?”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.
options?
Section titled “options?”DefaultConfigOptions = {}
Dial policy options.