BootstrapOptions | js-waku
Options
All
  • Public
  • Public/Protected
  • All
Menu

Interface BootstrapOptions

Setup discovery method used to bootstrap.

Only one method is used. default, peers, getPeers and enrUrl options are mutually exclusive.

Hierarchy

  • BootstrapOptions

Index

Properties

default?: boolean

Use the default discovery method. Overrides all other options but maxPeers

The default discovery method is likely to change overtime as new discovery methods are implemented.

default

false

enrUrl?: string

An EIP-1459 ENR Tree URL. For example: "enrtree://[email protected].vac.dev"

wantedNodeCapabilityCount MUST be passed when using this option.

maxPeers?: number

The maximum of peers to connect to as part of the bootstrap process. This only applies if peers or getPeers is used.

default

Bootstrap.DefaultMaxPeers

peers?: Multiaddr[] | string[]

Multiaddrs of peers to connect to.

wantedNodeCapabilityCount?: Partial<NodeCapabilityCount>

Specifies what node capabilities (protocol) must be returned. This only applies when enrUrl is passed (EIP-1459 DNS Discovery).

Methods

  • getPeers(): Promise<Multiaddr[] | string[]>
  • Getter that retrieve multiaddrs of peers to connect to.

    Returns Promise<Multiaddr[] | string[]>

Generated using