Interface Libp2pInit

For Libp2p configurations and modules details read the Configuration Document.

Hierarchy

  • Libp2pInit

Properties

Addresses for transport listening and to advertise to the network

connectionEncryption?: ((components: Components) => ConnectionEncrypter<unknown>)[]
connectionGater: Partial<ConnectionGater>

A connection gater can deny new connections based on user criteria

connectionManager: ConnectionManagerConfig

libp2p Connection Manager configuration

connectionProtector?: ((components: Components) => ConnectionProtector)

Type declaration

contentRouters?: ((components: Components) => ContentRouting)[]
datastore: Datastore

An optional datastore to persist peer information, DHT records, etc.

An in-memory datastore will be used if one is not provided.

dht?: ((components: Components) => DualDHT)

Type declaration

libp2p fetch protocol options

libp2p identify protocol options

keychain: KeyChainInit

keychain configuration

metrics?: ((components: Components) => Metrics)

Type declaration

The NAT manager controls uPNP hole punching

peerDiscovery?: ((components: Components) => PeerDiscovery)[]
peerId: PeerId

peerId instance (it will be created if not provided)

peerRouters?: ((components: Components) => PeerRouting)[]
peerRouting: PeerRoutingInit

libp2p Peer routing service configuration

peerStore: PeerStoreInit

libp2p PeerStore configuration

libp2p ping protocol options

pubsub?: ((components: Components) => PubSub<PubSubEvents>)

Type declaration

If configured as a relay this node will relay certain types of traffic for other peers

streamMuxers?: ((components: Components) => StreamMuxerFactory)[]
transportManager: TransportManagerInit

libp2p transport manager configuration

transports: ((components: Components) => Transport)[]

An array that must include at least 1 compliant transport