diff --git a/classes/_libp2p_floodsub.FloodSub.html b/classes/_libp2p_floodsub.FloodSub.html index 0cc7805772..02a80eccf2 100644 --- a/classes/_libp2p_floodsub.FloodSub.html +++ b/classes/_libp2p_floodsub.FloodSub.html @@ -1,7 +1,7 @@ FloodSub | libp2p

FloodSub (aka dumbsub is an implementation of pubsub focused on delivering an API for Publish/Subscribe, but with no CastTree Forming (it just floods the network).

-

Hierarchy

Constructors

Hierarchy

Constructors

Properties

Constructors

Properties

#private: any
canRelayMessage: boolean

If router can relay received messages, even if not subscribed

-
components: PubSubComponents
emitSelf: boolean

if publish should emit to self, if subscribed

-
enabled: boolean
globalSignaturePolicy: "StrictSign" | "StrictNoSign"

The signature policy to follow by default

-
log: Logger
multicodecs: string[]

A list of multicodecs that contain the pubsub protocol name.

-

Map of peer streams

-
seenCache: SimpleTimeCache<boolean>
started: boolean
subscriptions: Set<string>

List of our subscriptions

-
topicValidators: Map<string, TopicValidatorFn>

Topic validator map

+

Constructors

Properties

#private: any
canRelayMessage: boolean

If router can relay received messages, even if not subscribed

+
components: PubSubComponents
emitSelf: boolean

if publish should emit to self, if subscribed

+
enabled: boolean
globalSignaturePolicy: "StrictSign" | "StrictNoSign"

The signature policy to follow by default

+
log: Logger
multicodecs: string[]

A list of multicodecs that contain the pubsub protocol name.

+

Map of peer streams

+
seenCache: SimpleTimeCache<boolean>
started: boolean
subscriptions: Set<string>

List of our subscriptions

+
topicValidators: Map<string, TopicValidatorFn>

Topic validator map

Keyed by topic Topic validators are functions with the following input:

-
topics: Map<string, PeerSet>

Map of topics to which peers are subscribed to

-

Methods

topics: Map<string, PeerSet>

Map of topics to which peers are subscribed to

+

Methods

  • Whether to accept a message from a peer Override to create a graylist

    -

    Parameters

    Returns boolean

  • Normalizes the message and signs it, if signing is enabled. Should be used by the routers to create the message to send.

    -

    Parameters

    • message: {
          data: Uint8Array;
          from: PeerId;
          sequenceNumber: bigint;
          topic: string;
      }

    Returns Promise<Message>

  • Dispatches a synthetic event event to target and returns true if either event's cancelable attribute value is false or its preventDefault() method was not invoked, and false otherwise.

    +

    Parameters

    • message: {
          data: Uint8Array;
          from: PeerId;
          sequenceNumber: bigint;
          topic: string;
      }

    Returns Promise<Message>

  • Dispatches a synthetic event event to target and returns true if either event's cancelable attribute value is false or its preventDefault() method was not invoked, and false otherwise.

    MDN Reference

    Parameters

    Returns boolean

  • Get a list of the peer-ids that are subscribed to one topic.

    -

    Parameters

    • topic: string

    Returns PeerId[]

  • Get the list of topics which the peer is subscribed to.

    -

    Returns string[]

  • Get a list of the peer-ids that are subscribed to one topic.

    +

    Parameters

    • topic: string

    Returns PeerId[]

  • Get the list of topics which the peer is subscribed to.

    +

    Returns string[]

  • Type Parameters

    • Detail

    Parameters

    Returns boolean

  • Send an rpc object to a peer

    -

    Parameters

    • peer: PeerId
    • data: {
          messages?: Message[];
          subscribe?: boolean;
          subscriptions?: string[];
      }
      • Optional messages?: Message[]
      • Optional subscribe?: boolean
      • Optional subscriptions?: string[]

    Returns void

  • Unregister the pubsub protocol and the streams with other peers will be closed.

    -

    Returns Promise<void>

  • Subscribes to a given topic.

    -

    Parameters

    • topic: string

    Returns void

  • Unsubscribe from the given topic

    -

    Parameters

    • topic: string

    Returns void

  • Type Parameters

    • Detail

    Parameters

    Returns boolean

  • Send an rpc object to a peer

    +

    Parameters

    • peer: PeerId
    • data: {
          messages?: Message[];
          subscribe?: boolean;
          subscriptions?: string[];
      }
      • Optional messages?: Message[]
      • Optional subscribe?: boolean
      • Optional subscriptions?: string[]

    Returns void

  • Unregister the pubsub protocol and the streams with other peers will be closed.

    +

    Returns Promise<void>

  • Subscribes to a given topic.

    +

    Parameters

    • topic: string

    Returns void

  • Unsubscribe from the given topic

    +

    Parameters

    • topic: string

    Returns void

  • Validates the given message. The signature will be checked for authenticity. Throws an error on invalid messages

    -

    Parameters

    Returns Promise<void>

Generated using TypeDoc

\ No newline at end of file +

Parameters

Returns Promise<void>

Generated using TypeDoc

\ No newline at end of file diff --git a/classes/_libp2p_interface.errors.AbortError.html b/classes/_libp2p_interface.errors.AbortError.html index 6796c592d0..3621ebd4c3 100644 --- a/classes/_libp2p_interface.errors.AbortError.html +++ b/classes/_libp2p_interface.errors.AbortError.html @@ -1,7 +1,7 @@ AbortError | libp2p

When this error is thrown it means an operation was aborted, usually in response to the abort event being emitted by an AbortSignal.

-

Hierarchy

Constructors

Hierarchy

Constructors

Properties

Methods

Constructors

Properties

cause?: unknown
code: string
message: string
name: string
stack?: string
type: string
code: "ABORT_ERR" = 'ABORT_ERR'
prepareStackTrace?: ((err, stackTraces) => any)

Type declaration

    • (err, stackTraces): any
    • Optional override for formatting stack traces

      +

Constructors

Properties

cause?: unknown
code: string
message: string
name: string
stack?: string
type: string
code: "ABORT_ERR" = 'ABORT_ERR'
prepareStackTrace?: ((err, stackTraces) => any)

Type declaration

stackTraceLimit: number
type: "aborted" = 'aborted'

Methods

  • Create .stack property on a target object

    +
stackTraceLimit: number
type: "aborted" = 'aborted'

Methods

  • Create .stack property on a target object

    Parameters

    • targetObject: object
    • Optional constructorOpt: Function

    Returns void

Generated using TypeDoc

\ No newline at end of file diff --git a/classes/_libp2p_interface.errors.CodeError.html b/classes/_libp2p_interface.errors.CodeError.html index 15058a6d88..1cb69faced 100644 --- a/classes/_libp2p_interface.errors.CodeError.html +++ b/classes/_libp2p_interface.errors.CodeError.html @@ -1,4 +1,4 @@ -CodeError | libp2p

Type Parameters

Hierarchy

Constructors

constructor +CodeError | libp2p

Type Parameters

Hierarchy

Constructors

Properties

Methods

Constructors

Properties

cause?: unknown
code: string
message: string
name: string
props: T
stack?: string
prepareStackTrace?: ((err, stackTraces) => any)

Type declaration

    • (err, stackTraces): any
    • Optional override for formatting stack traces

      +

Constructors

Properties

cause?: unknown
code: string
message: string
name: string
props: T
stack?: string
prepareStackTrace?: ((err, stackTraces) => any)

Type declaration

stackTraceLimit: number

Methods

  • Create .stack property on a target object

    Parameters

    • targetObject: object
    • Optional constructorOpt: Function

    Returns void

Generated using TypeDoc

\ No newline at end of file diff --git a/classes/_libp2p_interface.errors.InvalidCryptoExchangeError.html b/classes/_libp2p_interface.errors.InvalidCryptoExchangeError.html index f3d60d087a..8efbd0546c 100644 --- a/classes/_libp2p_interface.errors.InvalidCryptoExchangeError.html +++ b/classes/_libp2p_interface.errors.InvalidCryptoExchangeError.html @@ -1,4 +1,4 @@ -InvalidCryptoExchangeError | libp2p

Hierarchy

  • Error
    • InvalidCryptoExchangeError

Constructors

constructor +InvalidCryptoExchangeError | libp2p

Hierarchy

  • Error
    • InvalidCryptoExchangeError

Constructors

Properties

Methods

Constructors

Properties

cause?: unknown
code: string
message: string
name: string
stack?: string
code: "ERR_INVALID_CRYPTO_EXCHANGE" = 'ERR_INVALID_CRYPTO_EXCHANGE'
prepareStackTrace?: ((err, stackTraces) => any)

Type declaration

    • (err, stackTraces): any
    • Optional override for formatting stack traces

      +

Constructors

Properties

cause?: unknown
code: string
message: string
name: string
stack?: string
code: "ERR_INVALID_CRYPTO_EXCHANGE" = 'ERR_INVALID_CRYPTO_EXCHANGE'
prepareStackTrace?: ((err, stackTraces) => any)

Type declaration

stackTraceLimit: number

Methods

  • Create .stack property on a target object

    Parameters

    • targetObject: object
    • Optional constructorOpt: Function

    Returns void

Generated using TypeDoc

\ No newline at end of file diff --git a/classes/_libp2p_interface.errors.InvalidCryptoTransmissionError.html b/classes/_libp2p_interface.errors.InvalidCryptoTransmissionError.html index 7ce59a1a68..4078aa076d 100644 --- a/classes/_libp2p_interface.errors.InvalidCryptoTransmissionError.html +++ b/classes/_libp2p_interface.errors.InvalidCryptoTransmissionError.html @@ -1,4 +1,4 @@ -InvalidCryptoTransmissionError | libp2p

Hierarchy

  • Error
    • InvalidCryptoTransmissionError

Constructors

constructor +InvalidCryptoTransmissionError | libp2p

Hierarchy

  • Error
    • InvalidCryptoTransmissionError

Constructors

Properties

Methods

Constructors

Properties

cause?: unknown
code: string
message: string
name: string
stack?: string
code: "ERR_INVALID_CRYPTO_TRANSMISSION" = 'ERR_INVALID_CRYPTO_TRANSMISSION'
prepareStackTrace?: ((err, stackTraces) => any)

Type declaration

    • (err, stackTraces): any
    • Optional override for formatting stack traces

      +

Constructors

Properties

cause?: unknown
code: string
message: string
name: string
stack?: string
code: "ERR_INVALID_CRYPTO_TRANSMISSION" = 'ERR_INVALID_CRYPTO_TRANSMISSION'
prepareStackTrace?: ((err, stackTraces) => any)

Type declaration

stackTraceLimit: number

Methods

  • Create .stack property on a target object

    Parameters

    • targetObject: object
    • Optional constructorOpt: Function

    Returns void

Generated using TypeDoc

\ No newline at end of file diff --git a/classes/_libp2p_interface.errors.UnexpectedPeerError.html b/classes/_libp2p_interface.errors.UnexpectedPeerError.html index 7fb3585de2..7000c6451a 100644 --- a/classes/_libp2p_interface.errors.UnexpectedPeerError.html +++ b/classes/_libp2p_interface.errors.UnexpectedPeerError.html @@ -1,4 +1,4 @@ -UnexpectedPeerError | libp2p

Hierarchy

Constructors

constructor +UnexpectedPeerError | libp2p

Hierarchy

Constructors

Properties

Methods

Constructors

Properties

cause?: unknown
code: string
message: string
name: string
stack?: string
code: "ERR_UNEXPECTED_PEER" = 'ERR_UNEXPECTED_PEER'
prepareStackTrace?: ((err, stackTraces) => any)

Type declaration

    • (err, stackTraces): any
    • Optional override for formatting stack traces

      +

Constructors

Properties

cause?: unknown
code: string
message: string
name: string
stack?: string
code: "ERR_UNEXPECTED_PEER" = 'ERR_UNEXPECTED_PEER'
prepareStackTrace?: ((err, stackTraces) => any)

Type declaration

stackTraceLimit: number

Methods

  • Create .stack property on a target object

    Parameters

    • targetObject: object
    • Optional constructorOpt: Function

    Returns void

Generated using TypeDoc

\ No newline at end of file diff --git a/classes/_libp2p_interface.events.TypedEventEmitter.html b/classes/_libp2p_interface.events.TypedEventEmitter.html index a76d244c6a..f2a22da0f5 100644 --- a/classes/_libp2p_interface.events.TypedEventEmitter.html +++ b/classes/_libp2p_interface.events.TypedEventEmitter.html @@ -1,12 +1,12 @@ TypedEventEmitter | libp2p

Class TypedEventEmitter<EventMap>

An implementation of a typed event target etc

-

Type Parameters

  • EventMap extends Record<string, any>

Hierarchy

Implements

Constructors

Type Parameters

  • EventMap extends Record<string, any>

Hierarchy

Implements

Constructors

  • Type Parameters

    • EventMap extends Record<string, any>

    Returns TypedEventEmitter<EventMap>

Properties

#listeners: Map<any, Listener[]> = ...

Methods

  • Dispatches a synthetic event event to target and returns true if either event's cancelable attribute value is false or its preventDefault() method was not invoked, and false otherwise.

    +

Constructors

  • Type Parameters

    • EventMap extends Record<string, any>

    Returns TypedEventEmitter<EventMap>

Properties

#listeners: Map<any, Listener[]> = ...

Methods

Generated using TypeDoc

\ No newline at end of file +

Parameters

Returns boolean

Generated using TypeDoc

\ No newline at end of file diff --git a/classes/_libp2p_kad_dht.Record.html b/classes/_libp2p_kad_dht.Record.html index f67dd7143e..1515e98d9e 100644 --- a/classes/_libp2p_kad_dht.Record.html +++ b/classes/_libp2p_kad_dht.Record.html @@ -1,4 +1,4 @@ -Record | libp2p

Constructors

constructor +Record | libp2p

Constructors

Properties

Constructors

Properties

timeReceived: Date
value: Uint8Array

Methods

Generated using TypeDoc

\ No newline at end of file +

Constructors

Properties

timeReceived: Date
value: Uint8Array

Methods

Generated using TypeDoc

\ No newline at end of file diff --git a/classes/_libp2p_peer_collections.PeerList.html b/classes/_libp2p_peer_collections.PeerList.html index aa7a8196e3..eb442f7179 100644 --- a/classes/_libp2p_peer_collections.PeerList.html +++ b/classes/_libp2p_peer_collections.PeerList.html @@ -5,7 +5,7 @@ should be a cheap operation.

Example

import { peerList } from '@libp2p/peer-collections'

const list = peerList()
list.push(peerId)
-

Constructors

Constructors

Properties

Accessors

Methods

[iterator] @@ -22,4 +22,4 @@ push shift unshift -

Constructors

Properties

list: string[]

Accessors

  • get length(): number
  • Returns number

Methods

  • Parameters

    • predicate: ((peerId, index, arr) => boolean)
        • (peerId, index, arr): boolean
        • Parameters

          Returns boolean

    Returns boolean

  • Parameters

    • predicate: ((peerId, index, arr) => boolean)
        • (peerId, index, arr): boolean
        • Parameters

          Returns boolean

    Returns PeerList

  • Parameters

    • predicate: ((peerId, index, arr) => boolean)
        • (peerId, index, arr): boolean
        • Parameters

          Returns boolean

    Returns undefined | PeerId

  • Parameters

    • predicate: ((peerId, index, arr) => boolean)
        • (peerId, index, arr): boolean
        • Parameters

          Returns boolean

    Returns number

  • Parameters

    • predicate: ((peerId, index, arr) => void)
        • (peerId, index, arr): void
        • Parameters

          Returns void

    Returns void

  • Parameters

    Returns boolean

  • Parameters

    Returns void

  • Parameters

    Returns number

Generated using TypeDoc

\ No newline at end of file +

Constructors

Properties

list: string[]

Accessors

Methods

Generated using TypeDoc

\ No newline at end of file diff --git a/classes/_libp2p_peer_collections.PeerMap.html b/classes/_libp2p_peer_collections.PeerMap.html index b560807c83..fdcf452ca5 100644 --- a/classes/_libp2p_peer_collections.PeerMap.html +++ b/classes/_libp2p_peer_collections.PeerMap.html @@ -5,7 +5,7 @@ should be a cheap operation.

Example

import { peerMap } from '@libp2p/peer-collections'

const map = peerMap<string>()
map.set(peerId, 'value')
-

Type Parameters

Constructors

Type Parameters

  • T

Constructors

Properties

Accessors

Methods

[iterator] @@ -18,4 +18,4 @@ keys set values -

Constructors

Properties

map: Map<string, T>

Accessors

  • get size(): number
  • Returns number

Methods

  • Returns void

  • Parameters

    • fn: ((value, key, map) => void)
        • (value, key, map): void
        • Parameters

          Returns void

    Returns void

  • Parameters

    Returns undefined | T

  • Parameters

    Returns boolean

  • Parameters

    Returns void

  • Returns IterableIterator<T>

Generated using TypeDoc

\ No newline at end of file +

Constructors

Properties

map: Map<string, T>

Accessors

Methods

Generated using TypeDoc

\ No newline at end of file diff --git a/classes/_libp2p_peer_collections.PeerSet.html b/classes/_libp2p_peer_collections.PeerSet.html index aa7db62745..873ea30b29 100644 --- a/classes/_libp2p_peer_collections.PeerSet.html +++ b/classes/_libp2p_peer_collections.PeerSet.html @@ -5,7 +5,7 @@ should be a cheap operation.

Example

import { peerSet } from '@libp2p/peer-collections'

const set = peerSet()
set.add(peerId)
-

Constructors

Constructors

Properties

Accessors

Methods

[iterator] @@ -19,4 +19,4 @@ intersection union values -

Constructors

Properties

set: Set<string>

Accessors

  • get size(): number
  • Returns number

Methods

  • Returns void

  • Parameters

    • predicate: ((peerId, index, set) => void)

    Returns void

  • Parameters

    Returns boolean

Generated using TypeDoc

\ No newline at end of file +

Constructors

Properties

set: Set<string>

Accessors

Methods

Generated using TypeDoc

\ No newline at end of file diff --git a/classes/_libp2p_peer_record.PeerRecord.html b/classes/_libp2p_peer_record.PeerRecord.html index fd934eea63..82bb3f8433 100644 --- a/classes/_libp2p_peer_record.PeerRecord.html +++ b/classes/_libp2p_peer_record.PeerRecord.html @@ -1,6 +1,6 @@ PeerRecord | libp2p

The PeerRecord is used for distributing peer routing records across the network. It contains the peer's reachable listen addresses.

-

Constructors

Constructors

Properties

codec domain marshaled? @@ -12,7 +12,7 @@

Methods

Constructors

Properties

codec: Uint8Array = PeerRecord.CODEC
domain: string = PeerRecord.DOMAIN
marshaled?: Uint8Array
multiaddrs: Multiaddr[]
peerId: PeerId
seqNumber: bigint
CODEC: Uint8Array = ENVELOPE_PAYLOAD_TYPE_PEER_RECORD
DOMAIN: string = ENVELOPE_DOMAIN_PEER_RECORD

Methods

  • Returns true if this record equals the other

    -

    Parameters

    • other: unknown

    Returns boolean

Generated using TypeDoc

\ No newline at end of file +

Constructors

Properties

codec: Uint8Array = PeerRecord.CODEC
domain: string = PeerRecord.DOMAIN
marshaled?: Uint8Array
multiaddrs: Multiaddr[]
peerId: PeerId
seqNumber: bigint
CODEC: Uint8Array = ENVELOPE_PAYLOAD_TYPE_PEER_RECORD
DOMAIN: string = ENVELOPE_DOMAIN_PEER_RECORD

Methods

Generated using TypeDoc

\ No newline at end of file diff --git a/classes/_libp2p_peer_record.RecordEnvelope.html b/classes/_libp2p_peer_record.RecordEnvelope.html index 811f78ba8d..c22b901aef 100644 --- a/classes/_libp2p_peer_record.RecordEnvelope.html +++ b/classes/_libp2p_peer_record.RecordEnvelope.html @@ -1,4 +1,4 @@ -RecordEnvelope | libp2p

Implements

Constructors

constructor +RecordEnvelope | libp2p

Implements

Constructors

Properties

marshaled? payload payloadType @@ -12,12 +12,12 @@ seal

Constructors

Properties

marshaled?: Uint8Array
payload: Uint8Array
payloadType: Uint8Array
peerId: PeerId
signature: Uint8Array

Methods

Properties

marshaled?: Uint8Array
payload: Uint8Array
payloadType: Uint8Array
peerId: PeerId
signature: Uint8Array

Methods

Generated using TypeDoc

\ No newline at end of file +

Parameters

Returns Promise<RecordEnvelope>

Generated using TypeDoc

\ No newline at end of file diff --git a/classes/_libp2p_peer_store.PersistentPeerStore.html b/classes/_libp2p_peer_store.PersistentPeerStore.html index 55d45ca387..e0b361a6c1 100644 --- a/classes/_libp2p_peer_store.PersistentPeerStore.html +++ b/classes/_libp2p_peer_store.PersistentPeerStore.html @@ -1,5 +1,5 @@ PersistentPeerStore | libp2p

An implementation of PeerStore that stores data in a Datastore

-

Implements

Constructors

Implements

Constructors

Properties

events log peerId @@ -14,38 +14,38 @@ merge patch save -

Constructors

Properties

log: Logger
peerId: PeerId

Methods

  • Returns all peers in the peer store.

    +

Constructors

Properties

log: Logger
peerId: PeerId

Methods

  • Unmarshal and verify a signed peer record, extract the multiaddrs and +

  • Unmarshal and verify a signed peer record, extract the multiaddrs and overwrite the stored addresses for the peer.

    Optionally pass an expected PeerId to verify that the peer record was signed by that peer.

    Parameters

    Returns Promise<boolean>

    Example

    await peerStore.consumePeerRecord(buf, expectedPeer)
     
    -
  • Delete all data stored for the passed peer

    Parameters

    Returns Promise<void>

    Example

    await peerStore.addressBook.set(peerId, multiaddrs)
    await peerStore.addressBook.get(peerId)
    // multiaddrs[]

    await peerStore.delete(peerId)

    await peerStore.addressBook.get(peerId)
    // []
    -
  • Loop over every peer - the looping is async because we read from a datastore but the peer operation is sync, this is to prevent long-lived peer operations causing deadlocks over the datastore which can happen if they try to access the peer store during the loop

    Parameters

    • fn: ((peer) => void)
        • (peer): void
        • Parameters

          Returns void

    • Optional query: PeerQuery

    Returns Promise<void>

    Example

    await peerStore.forEach(peer => {
    // ...
    })
    -
  • Returns true if the passed PeerId is in the peer store

    Parameters

    Returns Promise<boolean>

    Example

    await peerStore.has(peerId)
    // false
    await peerStore.addressBook.add(peerId, multiaddrs)
    await peerStore.has(peerId)
    // true
    -

Generated using TypeDoc

\ No newline at end of file +

Generated using TypeDoc

\ No newline at end of file diff --git a/classes/_libp2p_pubsub.index.PubSubBaseProtocol.html b/classes/_libp2p_pubsub.index.PubSubBaseProtocol.html index eb5f3ab8cd..897e999aa2 100644 --- a/classes/_libp2p_pubsub.index.PubSubBaseProtocol.html +++ b/classes/_libp2p_pubsub.index.PubSubBaseProtocol.html @@ -1,6 +1,6 @@ PubSubBaseProtocol | libp2p

Class PubSubBaseProtocol<Events>Abstract

PubSubBaseProtocol handles the peers and connections logic for pubsub routers and specifies the API that pubsub routers should have.

-

Type Parameters

Hierarchy

Implements

Constructors

Type Parameters

Hierarchy

Implements

Constructors

Properties

#private: any
_registrarTopologyIds: undefined | string[]
canRelayMessage: boolean

If router can relay received messages, even if not subscribed

-
components: PubSubComponents
emitSelf: boolean

if publish should emit to self, if subscribed

-
enabled: boolean
globalSignaturePolicy: "StrictSign" | "StrictNoSign"

The signature policy to follow by default

-
log: Logger
maxInboundStreams: number
maxOutboundStreams: number
multicodecs: string[]

A list of multicodecs that contain the pubsub protocol name.

-

Map of peer streams

-
started: boolean
subscriptions: Set<string>

List of our subscriptions

-
topicValidators: Map<string, TopicValidatorFn>

Topic validator map

+

Constructors

Properties

#private: any
_registrarTopologyIds: undefined | string[]
canRelayMessage: boolean

If router can relay received messages, even if not subscribed

+
components: PubSubComponents
emitSelf: boolean

if publish should emit to self, if subscribed

+
enabled: boolean
globalSignaturePolicy: "StrictSign" | "StrictNoSign"

The signature policy to follow by default

+
log: Logger
maxInboundStreams: number
maxOutboundStreams: number
multicodecs: string[]

A list of multicodecs that contain the pubsub protocol name.

+

Map of peer streams

+
started: boolean
subscriptions: Set<string>

List of our subscriptions

+
topicValidators: Map<string, TopicValidatorFn>

Topic validator map

Keyed by topic Topic validators are functions with the following input:

-
topics: Map<string, PeerSet>

Map of topics to which peers are subscribed to

-

Methods

  • Registrar notifies a closing connection with pubsub protocol

    -

    Parameters

    Returns void

topics: Map<string, PeerSet>

Map of topics to which peers are subscribed to

+

Methods

  • Registrar notifies a closing connection with pubsub protocol

    +

    Parameters

    Returns void

  • Whether to accept a message from a peer Override to create a graylist

    -

    Parameters

    Returns boolean

  • Type Parameters

    • K extends string | number | symbol

    Parameters

    • type: K
    • listener: null | EventHandler<Events[K]>
    • Optional options: boolean | AddEventListenerOptions

    Returns void

  • Type Parameters

    • K extends string | number | symbol

    Parameters

    • type: K
    • listener: null | EventHandler<Events[K]>
    • Optional options: boolean | AddEventListenerOptions

    Returns void

  • Dispatches a synthetic event event to target and returns true if either event's cancelable attribute value is false or its preventDefault() method was not invoked, and false otherwise.

    +

    Parameters

    Returns PubSubRPC

  • Dispatches a synthetic event event to target and returns true if either event's cancelable attribute value is false or its preventDefault() method was not invoked, and false otherwise.

    MDN Reference

    Parameters

    Returns boolean

  • Overriding the implementation of publish should handle the appropriate algorithms for the publish/subscriber implementation. For example, a Floodsub implementation might simply publish each message to each topic for every peer.

    sender might be this peer, or we might be forwarding a message on behalf of another peer, in which case sender is the peer we received the message from, which may not be the peer the message was created by.

    -

    Parameters

    Returns Promise<PublishResult>

  • Type Parameters

    • K extends string | number | symbol

    Parameters

    • type: K
    • Optional listener: null | EventHandler<Events[K]>
    • Optional options: boolean | EventListenerOptions

    Returns void

  • Send an rpc object to a peer

    -

    Parameters

    • peer: PeerId
    • data: {
          messages?: Message[];
          subscribe?: boolean;
          subscriptions?: string[];
      }
      • Optional messages?: Message[]
      • Optional subscribe?: boolean
      • Optional subscriptions?: string[]

    Returns void

  • Type Parameters

    • K extends string | number | symbol

    Parameters

    • type: K
    • Optional listener: null | EventHandler<Events[K]>
    • Optional options: boolean | EventListenerOptions

    Returns void

  • Send an rpc object to a peer

    +

    Parameters

    • peer: PeerId
    • data: {
          messages?: Message[];
          subscribe?: boolean;
          subscriptions?: string[];
      }
      • Optional messages?: Message[]
      • Optional subscribe?: boolean
      • Optional subscriptions?: string[]

    Returns void

Generated using TypeDoc

\ No newline at end of file +

Parameters

Returns Promise<void>

Generated using TypeDoc

\ No newline at end of file diff --git a/classes/_libp2p_pubsub.peer_streams.PeerStreams.html b/classes/_libp2p_pubsub.peer_streams.PeerStreams.html index f2eedb90f5..10248f54ec 100644 --- a/classes/_libp2p_pubsub.peer_streams.PeerStreams.html +++ b/classes/_libp2p_pubsub.peer_streams.PeerStreams.html @@ -1,5 +1,5 @@ PeerStreams | libp2p

Thin wrapper around a peer's inbound / outbound pubsub streams

-

Hierarchy

Constructors

Hierarchy

Constructors

Properties

#private: any
_inboundAbortController: AbortController

An AbortController for controlled shutdown of the inbound stream

-
_rawInboundStream?: Stream

The raw inbound stream, as retrieved from the callback from libp2p.handle

-
_rawOutboundStream?: Stream

The raw outbound stream, as retrieved from conn.newStream

-
closed: boolean
id: PeerId
inboundStream?: AsyncIterable<Uint8ArrayList>

Read stream

-
log: Logger
outboundStream?: Pushable<Uint8ArrayList, void, unknown>

Write stream - it's preferable to use the write method

-
protocol: string

Accessors

Methods

  • Dispatches a synthetic event event to target and returns true if either event's cancelable attribute value is false or its preventDefault() method was not invoked, and false otherwise.

    +

Constructors

Properties

#private: any
_inboundAbortController: AbortController

An AbortController for controlled shutdown of the inbound stream

+
_rawInboundStream?: Stream

The raw inbound stream, as retrieved from the callback from libp2p.handle

+
_rawOutboundStream?: Stream

The raw outbound stream, as retrieved from conn.newStream

+
closed: boolean
id: PeerId
inboundStream?: AsyncIterable<Uint8ArrayList>

Read stream

+
log: Logger
outboundStream?: Pushable<Uint8ArrayList, void, unknown>

Write stream - it's preferable to use the write method

+
protocol: string

Accessors

Methods

  • Dispatches a synthetic event event to target and returns true if either event's cancelable attribute value is false or its preventDefault() method was not invoked, and false otherwise.

    MDN Reference

    Parameters

    Returns boolean

  • Parameters

    • type: string

    Returns number

Generated using TypeDoc

\ No newline at end of file +

Parameters

Returns void

Generated using TypeDoc

\ No newline at end of file diff --git a/classes/_libp2p_utils.abstract_stream.AbstractStream.html b/classes/_libp2p_utils.abstract_stream.AbstractStream.html index 67d1686ebc..e6a64c24ec 100644 --- a/classes/_libp2p_utils.abstract_stream.AbstractStream.html +++ b/classes/_libp2p_utils.abstract_stream.AbstractStream.html @@ -2,7 +2,7 @@ can be written to and read from at both ends.

It may be encrypted and multiplexed depending on the configuration of the nodes.

-

Implements

Constructors

Implements

Constructors

Properties

Constructors

Properties

closed: DeferredPromise<void>
direction: Direction

Outbound streams are opened by the local node, inbound streams are opened by the remote

-
endErr: undefined | Error
id: string

Unique identifier for a stream. Identifiers are not unique across muxers.

-
log: Logger

The stream logger

-
metadata: Record<string, unknown>

User defined stream metadata

-
onAbort?: ((err) => void)

Type declaration

    • (err): void
    • Parameters

      Returns void

onCloseRead?: (() => void)

Type declaration

    • (): void
    • Returns void

onCloseWrite?: (() => void)

Type declaration

    • (): void
    • Returns void

onEnd?: ((err?) => void)

Type declaration

    • (err?): void
    • Parameters

      Returns void

onReset?: (() => void)

Type declaration

    • (): void
    • Returns void

protocol?: string

The protocol negotiated for this stream

-
readStatus: ReadStatus

The current status of the readable end of the stream

-
sendCloseWriteTimeout: number
sinkController: AbortController
sinkEnd: DeferredPromise<void>
source: AsyncGenerator<Uint8ArrayList, void, unknown>
status: StreamStatus

The current status of the stream

-
streamSource: Pushable<Uint8ArrayList, void, unknown>
timeline: StreamTimeline

Lifecycle times for the stream

-
writeStatus: WriteStatus

The current status of the writable end of the stream

-

Methods

  • Close immediately for reading and writing and send a reset message (local +

Constructors

Properties

closed: DeferredPromise<void>
direction: Direction

Outbound streams are opened by the local node, inbound streams are opened by the remote

+
endErr: undefined | Error
id: string

Unique identifier for a stream. Identifiers are not unique across muxers.

+
log: Logger

The stream logger

+
metadata: Record<string, unknown>

User defined stream metadata

+
onAbort?: ((err) => void)

Type declaration

    • (err): void
    • Parameters

      Returns void

onCloseRead?: (() => void)

Type declaration

    • (): void
    • Returns void

onCloseWrite?: (() => void)

Type declaration

    • (): void
    • Returns void

onEnd?: ((err?) => void)

Type declaration

    • (err?): void
    • Parameters

      Returns void

onReset?: (() => void)

Type declaration

    • (): void
    • Returns void

protocol?: string

The protocol negotiated for this stream

+
readStatus: ReadStatus

The current status of the readable end of the stream

+
sendCloseWriteTimeout: number
sinkController: AbortController
sinkEnd: DeferredPromise<void>
source: AsyncGenerator<Uint8ArrayList, void, unknown>
status: StreamStatus

The current status of the stream

+
streamSource: Pushable<Uint8ArrayList, void, unknown>
timeline: StreamTimeline

Lifecycle times for the stream

+
writeStatus: WriteStatus

The current status of the writable end of the stream

+

Methods

Generated using TypeDoc

\ No newline at end of file +

Returns number

Generated using TypeDoc

\ No newline at end of file diff --git a/classes/_libp2p_utils.peer_job_queue.PeerJobQueue.html b/classes/_libp2p_utils.peer_job_queue.PeerJobQueue.html index b8dd70cbfd..a07af9c5f1 100644 --- a/classes/_libp2p_utils.peer_job_queue.PeerJobQueue.html +++ b/classes/_libp2p_utils.peer_job_queue.PeerJobQueue.html @@ -1,5 +1,5 @@ PeerJobQueue | libp2p

Extends PQueue to add support for querying queued jobs by peer id

-

Hierarchy

Constructors

Hierarchy

Constructors

Properties

Constructors

Properties

#private: any
timeout?: number

Per-operation timeout in milliseconds. Operations fulfill once timeout elapses if they haven't already.

+

Constructors

Properties

#private: any
timeout?: number

Per-operation timeout in milliseconds. Operations fulfill once timeout elapses if they haven't already.

Applies to each future operation.

prefixed: string | boolean

Accessors

  • get concurrency(): number
  • Returns number

  • set concurrency(newConcurrency): void
  • Parameters

    • newConcurrency: number

    Returns void

  • get isPaused(): boolean
  • Whether the queue is currently paused.

    Returns boolean

  • get pending(): number
  • Number of running items (no longer in the queue).

    @@ -41,7 +41,7 @@ listeners.

    Returns EventName[]

  • Return the number of listeners listening to a given event.

    Parameters

    Returns number

  • Return the listeners registered for a given event.

    Type Parameters

    Parameters

    • event: T

    Returns ((...args) => void)[]

  • Type Parameters

    Parameters

    • event: T
    • Optional fn: ((...args) => void)
        • (...args): void
        • Parameters

          • Rest ...args: any[]

          Returns void

    • Optional context: any
    • Optional once: boolean

    Returns PeerJobQueue

  • Add a listener for a given event.

    Type Parameters

    Parameters

    • event: T
    • fn: ((...args) => void)
        • (...args): void
        • Parameters

          • Rest ...args: any[]

          Returns void

    • Optional context: any

    Returns PeerJobQueue

NO_FATAL: 1

should be used for not failing when not listening

+

Generated using TypeDoc

\ No newline at end of file diff --git a/enums/_libp2p_kad_dht.EventTypes.html b/enums/_libp2p_kad_dht.EventTypes.html index 0d027bb468..8908d8372c 100644 --- a/enums/_libp2p_kad_dht.EventTypes.html +++ b/enums/_libp2p_kad_dht.EventTypes.html @@ -1,5 +1,5 @@ EventTypes | libp2p

Enumeration EventTypes

The types of events emitted during DHT queries

-

Enumeration Members

Enumeration Members

ADD_PEER: 6
DIAL_PEER: 7
FINAL_PEER: 2
PEER_RESPONSE: 1
PROVIDER: 4
QUERY_ERROR: 3
SEND_QUERY: 0
VALUE: 5

Generated using TypeDoc

\ No newline at end of file +

Enumeration Members

ADD_PEER: 6
DIAL_PEER: 7
FINAL_PEER: 2
PEER_RESPONSE: 1
PROVIDER: 4
QUERY_ERROR: 3
SEND_QUERY: 0
VALUE: 5

Generated using TypeDoc

\ No newline at end of file diff --git a/enums/_libp2p_kad_dht.MessageType.html b/enums/_libp2p_kad_dht.MessageType.html index a5861c2564..1dd26e2244 100644 --- a/enums/_libp2p_kad_dht.MessageType.html +++ b/enums/_libp2p_kad_dht.MessageType.html @@ -1,8 +1,8 @@ MessageType | libp2p

Enumeration MessageType

The types of messages sent to peers during DHT queries

-

Enumeration Members

Enumeration Members

ADD_PROVIDER: 2
FIND_NODE: 4
GET_PROVIDERS: 3
GET_VALUE: 1
PING: 5
PUT_VALUE: 0

Generated using TypeDoc

\ No newline at end of file +

Enumeration Members

ADD_PROVIDER: 2
FIND_NODE: 4
GET_PROVIDERS: 3
GET_VALUE: 1
PING: 5
PUT_VALUE: 0

Generated using TypeDoc

\ No newline at end of file diff --git a/functions/_libp2p_autonat.autoNAT.html b/functions/_libp2p_autonat.autoNAT.html index 200ee3ba69..ed732757fd 100644 --- a/functions/_libp2p_autonat.autoNAT.html +++ b/functions/_libp2p_autonat.autoNAT.html @@ -1 +1 @@ -autoNAT | libp2p

Generated using TypeDoc

\ No newline at end of file +autoNAT | libp2p

Generated using TypeDoc

\ No newline at end of file diff --git a/functions/_libp2p_bootstrap.bootstrap.html b/functions/_libp2p_bootstrap.bootstrap.html index d8460c96bd..2685ed73b3 100644 --- a/functions/_libp2p_bootstrap.bootstrap.html +++ b/functions/_libp2p_bootstrap.bootstrap.html @@ -1 +1 @@ -bootstrap | libp2p

Generated using TypeDoc

\ No newline at end of file +bootstrap | libp2p

Generated using TypeDoc

\ No newline at end of file diff --git a/functions/_libp2p_circuit_relay_v2.circuitRelayServer.html b/functions/_libp2p_circuit_relay_v2.circuitRelayServer.html index f67dbd328b..f293999da9 100644 --- a/functions/_libp2p_circuit_relay_v2.circuitRelayServer.html +++ b/functions/_libp2p_circuit_relay_v2.circuitRelayServer.html @@ -1 +1 @@ -circuitRelayServer | libp2p

Generated using TypeDoc

\ No newline at end of file +circuitRelayServer | libp2p

Generated using TypeDoc

\ No newline at end of file diff --git a/functions/_libp2p_circuit_relay_v2.circuitRelayTransport.html b/functions/_libp2p_circuit_relay_v2.circuitRelayTransport.html index 0c8aafbbae..3060244906 100644 --- a/functions/_libp2p_circuit_relay_v2.circuitRelayTransport.html +++ b/functions/_libp2p_circuit_relay_v2.circuitRelayTransport.html @@ -1 +1 @@ -circuitRelayTransport | libp2p

Generated using TypeDoc

\ No newline at end of file +circuitRelayTransport | libp2p

Generated using TypeDoc

\ No newline at end of file diff --git a/functions/_libp2p_crypto.aes.create.html b/functions/_libp2p_crypto.aes.create.html index 359a74ca93..92dc5a6b57 100644 --- a/functions/_libp2p_crypto.aes.create.html +++ b/functions/_libp2p_crypto.aes.create.html @@ -1,3 +1,3 @@ create | libp2p

Generated using TypeDoc

\ No newline at end of file +

Returns AESCipher

Generated using TypeDoc

\ No newline at end of file diff --git a/functions/_libp2p_crypto.hmac.create.html b/functions/_libp2p_crypto.hmac.create.html index 5c92fa1f4c..0aeccb8ae0 100644 --- a/functions/_libp2p_crypto.hmac.create.html +++ b/functions/_libp2p_crypto.hmac.create.html @@ -1 +1 @@ -create | libp2p

Generated using TypeDoc

\ No newline at end of file +create | libp2p

Generated using TypeDoc

\ No newline at end of file diff --git a/functions/_libp2p_crypto.index.pbkdf2.html b/functions/_libp2p_crypto.index.pbkdf2.html index 77abaee4e1..eb1ad0d307 100644 --- a/functions/_libp2p_crypto.index.pbkdf2.html +++ b/functions/_libp2p_crypto.index.pbkdf2.html @@ -1,2 +1,2 @@ pbkdf2 | libp2p
  • Computes the Password-Based Key Derivation Function 2.

    -

    Parameters

    • password: string
    • salt: string
    • iterations: number
    • keySize: number
    • hash: string

    Returns string

Generated using TypeDoc

\ No newline at end of file +

Parameters

Returns string

Generated using TypeDoc

\ No newline at end of file diff --git a/functions/_libp2p_crypto.index.randomBytes.html b/functions/_libp2p_crypto.index.randomBytes.html index 9b6a79de19..6dd2b8bcec 100644 --- a/functions/_libp2p_crypto.index.randomBytes.html +++ b/functions/_libp2p_crypto.index.randomBytes.html @@ -1,2 +1,2 @@ randomBytes | libp2p

Generated using TypeDoc

\ No newline at end of file +

Parameters

Returns Uint8Array

Generated using TypeDoc

\ No newline at end of file diff --git a/functions/_libp2p_crypto.keys.generateEphemeralKeyPair.html b/functions/_libp2p_crypto.keys.generateEphemeralKeyPair.html index bcb8171fcc..26e62ba2e2 100644 --- a/functions/_libp2p_crypto.keys.generateEphemeralKeyPair.html +++ b/functions/_libp2p_crypto.keys.generateEphemeralKeyPair.html @@ -1,3 +1,3 @@ generateEphemeralKeyPair | libp2p

Function generateEphemeralKeyPair

  • Generates an ephemeral public key and returns a function that will compute the shared secret key.

    Focuses only on ECDH now, but can be made more general in the future.

    -

    Parameters

    • curve: string

    Returns Promise<ECDHKey>

Generated using TypeDoc

\ No newline at end of file +

Parameters

Returns Promise<ECDHKey>

Generated using TypeDoc

\ No newline at end of file diff --git a/functions/_libp2p_crypto.keys.generateKeyPair.html b/functions/_libp2p_crypto.keys.generateKeyPair.html index 9eb90d0f6e..b9dd6fb87f 100644 --- a/functions/_libp2p_crypto.keys.generateKeyPair.html +++ b/functions/_libp2p_crypto.keys.generateKeyPair.html @@ -1,3 +1,3 @@ generateKeyPair | libp2p

Generated using TypeDoc

\ No newline at end of file +

Returns Promise<PrivateKey>

Generated using TypeDoc

\ No newline at end of file diff --git a/functions/_libp2p_crypto.keys.generateKeyPairFromSeed.html b/functions/_libp2p_crypto.keys.generateKeyPairFromSeed.html index a8f2d748ee..f1bbda548d 100644 --- a/functions/_libp2p_crypto.keys.generateKeyPairFromSeed.html +++ b/functions/_libp2p_crypto.keys.generateKeyPairFromSeed.html @@ -1,3 +1,3 @@ generateKeyPairFromSeed | libp2p

Function generateKeyPairFromSeed

Generated using TypeDoc

\ No newline at end of file +

Parameters

Returns Promise<PrivateKey>

Generated using TypeDoc

\ No newline at end of file diff --git a/functions/_libp2p_crypto.keys.importKey.html b/functions/_libp2p_crypto.keys.importKey.html index 407e2be2e8..cc53be271e 100644 --- a/functions/_libp2p_crypto.keys.importKey.html +++ b/functions/_libp2p_crypto.keys.importKey.html @@ -1,3 +1,3 @@ importKey | libp2p
  • Converts an exported private key into its representative object.

    Supported formats are 'pem' (RSA only) and 'libp2p-key'.

    -

    Parameters

    • encryptedKey: string
    • password: string

    Returns Promise<PrivateKey>

Generated using TypeDoc

\ No newline at end of file +

Parameters

Returns Promise<PrivateKey>

Generated using TypeDoc

\ No newline at end of file diff --git a/functions/_libp2p_crypto.keys.keyStretcher.html b/functions/_libp2p_crypto.keys.keyStretcher.html index 66d9ec2755..d19744add9 100644 --- a/functions/_libp2p_crypto.keys.keyStretcher.html +++ b/functions/_libp2p_crypto.keys.keyStretcher.html @@ -1,3 +1,3 @@ keyStretcher | libp2p

Generated using TypeDoc

\ No newline at end of file +

Parameters

Returns Promise<EnhancedKeyPair>

Generated using TypeDoc

\ No newline at end of file diff --git a/functions/_libp2p_crypto.keys.keysPBM.KeyType.codec.html b/functions/_libp2p_crypto.keys.keysPBM.KeyType.codec.html index e0195136c7..bb78fe411c 100644 --- a/functions/_libp2p_crypto.keys.keysPBM.KeyType.codec.html +++ b/functions/_libp2p_crypto.keys.keysPBM.KeyType.codec.html @@ -1 +1 @@ -codec | libp2p

Generated using TypeDoc

\ No newline at end of file +codec | libp2p

Generated using TypeDoc

\ No newline at end of file diff --git a/functions/_libp2p_crypto.keys.keysPBM.PrivateKey.codec.html b/functions/_libp2p_crypto.keys.keysPBM.PrivateKey.codec.html index 5a6a094832..e684e19bd7 100644 --- a/functions/_libp2p_crypto.keys.keysPBM.PrivateKey.codec.html +++ b/functions/_libp2p_crypto.keys.keysPBM.PrivateKey.codec.html @@ -1 +1 @@ -codec | libp2p

Generated using TypeDoc

\ No newline at end of file +codec | libp2p

Generated using TypeDoc

\ No newline at end of file diff --git a/functions/_libp2p_crypto.keys.keysPBM.PrivateKey.decode.html b/functions/_libp2p_crypto.keys.keysPBM.PrivateKey.decode.html index 672f732a9d..73862a7588 100644 --- a/functions/_libp2p_crypto.keys.keysPBM.PrivateKey.decode.html +++ b/functions/_libp2p_crypto.keys.keysPBM.PrivateKey.decode.html @@ -1 +1 @@ -decode | libp2p

Generated using TypeDoc

\ No newline at end of file +decode | libp2p

Generated using TypeDoc

\ No newline at end of file diff --git a/functions/_libp2p_crypto.keys.keysPBM.PrivateKey.encode.html b/functions/_libp2p_crypto.keys.keysPBM.PrivateKey.encode.html index cd5b92ffcc..7dc80c7e46 100644 --- a/functions/_libp2p_crypto.keys.keysPBM.PrivateKey.encode.html +++ b/functions/_libp2p_crypto.keys.keysPBM.PrivateKey.encode.html @@ -1 +1 @@ -encode | libp2p

Generated using TypeDoc

\ No newline at end of file +encode | libp2p

Generated using TypeDoc

\ No newline at end of file diff --git a/functions/_libp2p_crypto.keys.keysPBM.PublicKey.codec.html b/functions/_libp2p_crypto.keys.keysPBM.PublicKey.codec.html index 63861ccbb9..04d84605c6 100644 --- a/functions/_libp2p_crypto.keys.keysPBM.PublicKey.codec.html +++ b/functions/_libp2p_crypto.keys.keysPBM.PublicKey.codec.html @@ -1 +1 @@ -codec | libp2p

Generated using TypeDoc

\ No newline at end of file +codec | libp2p

Generated using TypeDoc

\ No newline at end of file diff --git a/functions/_libp2p_crypto.keys.keysPBM.PublicKey.decode.html b/functions/_libp2p_crypto.keys.keysPBM.PublicKey.decode.html index 0b129c4ef3..71388a189d 100644 --- a/functions/_libp2p_crypto.keys.keysPBM.PublicKey.decode.html +++ b/functions/_libp2p_crypto.keys.keysPBM.PublicKey.decode.html @@ -1 +1 @@ -decode | libp2p

Generated using TypeDoc

\ No newline at end of file +decode | libp2p

Generated using TypeDoc

\ No newline at end of file diff --git a/functions/_libp2p_crypto.keys.keysPBM.PublicKey.encode.html b/functions/_libp2p_crypto.keys.keysPBM.PublicKey.encode.html index d5ee69eec2..78b441676a 100644 --- a/functions/_libp2p_crypto.keys.keysPBM.PublicKey.encode.html +++ b/functions/_libp2p_crypto.keys.keysPBM.PublicKey.encode.html @@ -1 +1 @@ -encode | libp2p

Generated using TypeDoc

\ No newline at end of file +encode | libp2p

Generated using TypeDoc

\ No newline at end of file diff --git a/functions/_libp2p_crypto.keys.marshalPrivateKey.html b/functions/_libp2p_crypto.keys.marshalPrivateKey.html index 6e33ae826b..84ae9d24f6 100644 --- a/functions/_libp2p_crypto.keys.marshalPrivateKey.html +++ b/functions/_libp2p_crypto.keys.marshalPrivateKey.html @@ -1,2 +1,2 @@ marshalPrivateKey | libp2p

Generated using TypeDoc

\ No newline at end of file +

Parameters

Returns Uint8Array

Generated using TypeDoc

\ No newline at end of file diff --git a/functions/_libp2p_crypto.keys.marshalPublicKey.html b/functions/_libp2p_crypto.keys.marshalPublicKey.html index 73d46ad491..3c5fe0d105 100644 --- a/functions/_libp2p_crypto.keys.marshalPublicKey.html +++ b/functions/_libp2p_crypto.keys.marshalPublicKey.html @@ -1,2 +1,2 @@ marshalPublicKey | libp2p

Generated using TypeDoc

\ No newline at end of file +

Parameters

Returns Uint8Array

Generated using TypeDoc

\ No newline at end of file diff --git a/functions/_libp2p_crypto.keys.unmarshalPrivateKey.html b/functions/_libp2p_crypto.keys.unmarshalPrivateKey.html index 612984c3e0..7b5e439434 100644 --- a/functions/_libp2p_crypto.keys.unmarshalPrivateKey.html +++ b/functions/_libp2p_crypto.keys.unmarshalPrivateKey.html @@ -1,2 +1,2 @@ unmarshalPrivateKey | libp2p

Generated using TypeDoc

\ No newline at end of file +

Parameters

Returns Promise<PrivateKey>

Generated using TypeDoc

\ No newline at end of file diff --git a/functions/_libp2p_crypto.keys.unmarshalPublicKey.html b/functions/_libp2p_crypto.keys.unmarshalPublicKey.html index 5662e754ed..6bf3a52c63 100644 --- a/functions/_libp2p_crypto.keys.unmarshalPublicKey.html +++ b/functions/_libp2p_crypto.keys.unmarshalPublicKey.html @@ -1,2 +1,2 @@ unmarshalPublicKey | libp2p

Generated using TypeDoc

\ No newline at end of file +

Parameters

Returns PublicKey

Generated using TypeDoc

\ No newline at end of file diff --git a/functions/_libp2p_dcutr.dcutr.html b/functions/_libp2p_dcutr.dcutr.html index 9fd4d5d2c4..a5e6f7a86d 100644 --- a/functions/_libp2p_dcutr.dcutr.html +++ b/functions/_libp2p_dcutr.dcutr.html @@ -1 +1 @@ -dcutr | libp2p

Generated using TypeDoc

\ No newline at end of file +dcutr | libp2p

Generated using TypeDoc

\ No newline at end of file diff --git a/functions/_libp2p_fetch.fetch-1.html b/functions/_libp2p_fetch.fetch-1.html index c424f258a5..59962cdbef 100644 --- a/functions/_libp2p_fetch.fetch-1.html +++ b/functions/_libp2p_fetch.fetch-1.html @@ -1 +1 @@ -fetch | libp2p

Generated using TypeDoc

\ No newline at end of file +fetch | libp2p

Generated using TypeDoc

\ No newline at end of file diff --git a/functions/_libp2p_floodsub.floodsub-1.html b/functions/_libp2p_floodsub.floodsub-1.html index 0724addaf1..afd4f3a984 100644 --- a/functions/_libp2p_floodsub.floodsub-1.html +++ b/functions/_libp2p_floodsub.floodsub-1.html @@ -1 +1 @@ -floodsub | libp2p

Generated using TypeDoc

\ No newline at end of file +floodsub | libp2p

Generated using TypeDoc

\ No newline at end of file diff --git a/functions/_libp2p_identify.identify-1.html b/functions/_libp2p_identify.identify-1.html index ce22bbcd48..55870f7649 100644 --- a/functions/_libp2p_identify.identify-1.html +++ b/functions/_libp2p_identify.identify-1.html @@ -1 +1 @@ -identify | libp2p

Generated using TypeDoc

\ No newline at end of file +identify | libp2p

Generated using TypeDoc

\ No newline at end of file diff --git a/functions/_libp2p_interface.connection.isConnection.html b/functions/_libp2p_interface.connection.isConnection.html index 03171f8daf..16bde1ff92 100644 --- a/functions/_libp2p_interface.connection.isConnection.html +++ b/functions/_libp2p_interface.connection.isConnection.html @@ -1 +1 @@ -isConnection | libp2p

Generated using TypeDoc

\ No newline at end of file +isConnection | libp2p

Generated using TypeDoc

\ No newline at end of file diff --git a/functions/_libp2p_interface.peer_id.isPeerId.html b/functions/_libp2p_interface.peer_id.isPeerId.html index 8379e68e8e..7baf9de2d2 100644 --- a/functions/_libp2p_interface.peer_id.isPeerId.html +++ b/functions/_libp2p_interface.peer_id.isPeerId.html @@ -1 +1 @@ -isPeerId | libp2p

Generated using TypeDoc

\ No newline at end of file +isPeerId | libp2p

Generated using TypeDoc

\ No newline at end of file diff --git a/functions/_libp2p_interface.startable.isStartable.html b/functions/_libp2p_interface.startable.isStartable.html index c972d65e33..4ac6fcb882 100644 --- a/functions/_libp2p_interface.startable.isStartable.html +++ b/functions/_libp2p_interface.startable.isStartable.html @@ -1 +1 @@ -isStartable | libp2p

Generated using TypeDoc

\ No newline at end of file +isStartable | libp2p

Generated using TypeDoc

\ No newline at end of file diff --git a/functions/_libp2p_interface.startable.start.html b/functions/_libp2p_interface.startable.start.html index 01d91a78f8..c2c0b33c18 100644 --- a/functions/_libp2p_interface.startable.start.html +++ b/functions/_libp2p_interface.startable.start.html @@ -1 +1 @@ -start | libp2p

Generated using TypeDoc

\ No newline at end of file +start | libp2p

Generated using TypeDoc

\ No newline at end of file diff --git a/functions/_libp2p_interface.startable.stop.html b/functions/_libp2p_interface.startable.stop.html index a5008a82d2..75761f229b 100644 --- a/functions/_libp2p_interface.startable.stop.html +++ b/functions/_libp2p_interface.startable.stop.html @@ -1 +1 @@ -stop | libp2p

Generated using TypeDoc

\ No newline at end of file +stop | libp2p

Generated using TypeDoc

\ No newline at end of file diff --git a/functions/_libp2p_interface.transport.isTransport.html b/functions/_libp2p_interface.transport.isTransport.html index f4aecb8a27..4bf5ac9b77 100644 --- a/functions/_libp2p_interface.transport.isTransport.html +++ b/functions/_libp2p_interface.transport.isTransport.html @@ -1 +1 @@ -isTransport | libp2p

Generated using TypeDoc

\ No newline at end of file +isTransport | libp2p

Generated using TypeDoc

\ No newline at end of file diff --git a/functions/_libp2p_interface_compliance_tests.connection.default.html b/functions/_libp2p_interface_compliance_tests.connection.default.html index 29a4bf704d..8acea87aa5 100644 --- a/functions/_libp2p_interface_compliance_tests.connection.default.html +++ b/functions/_libp2p_interface_compliance_tests.connection.default.html @@ -1 +1 @@ -default | libp2p

Generated using TypeDoc

\ No newline at end of file +default | libp2p

Generated using TypeDoc

\ No newline at end of file diff --git a/functions/_libp2p_interface_compliance_tests.connection_encryption.default.html b/functions/_libp2p_interface_compliance_tests.connection_encryption.default.html index 5fffcf7a14..8442c67e05 100644 --- a/functions/_libp2p_interface_compliance_tests.connection_encryption.default.html +++ b/functions/_libp2p_interface_compliance_tests.connection_encryption.default.html @@ -1 +1 @@ -default | libp2p

Generated using TypeDoc

\ No newline at end of file +default | libp2p

Generated using TypeDoc

\ No newline at end of file diff --git a/functions/_libp2p_interface_compliance_tests.is_valid_tick.isValidTick.html b/functions/_libp2p_interface_compliance_tests.is_valid_tick.isValidTick.html index cb3fc26cd6..a739030c22 100644 --- a/functions/_libp2p_interface_compliance_tests.is_valid_tick.isValidTick.html +++ b/functions/_libp2p_interface_compliance_tests.is_valid_tick.isValidTick.html @@ -1,3 +1,3 @@ isValidTick | libp2p
  • A tick is considered valid if it happened between now and ms milliseconds ago

    -

    Parameters

    • Optional date: number
    • ms: number = 5000

    Returns boolean

Generated using TypeDoc

\ No newline at end of file +

Parameters

Returns boolean

Generated using TypeDoc

\ No newline at end of file diff --git a/functions/_libp2p_interface_compliance_tests.mocks.connectionPair.html b/functions/_libp2p_interface_compliance_tests.mocks.connectionPair.html index 5e084c59e7..5becec2024 100644 --- a/functions/_libp2p_interface_compliance_tests.mocks.connectionPair.html +++ b/functions/_libp2p_interface_compliance_tests.mocks.connectionPair.html @@ -1 +1 @@ -connectionPair | libp2p

Generated using TypeDoc

\ No newline at end of file +connectionPair | libp2p

Generated using TypeDoc

\ No newline at end of file diff --git a/functions/_libp2p_interface_compliance_tests.mocks.mockConnection.html b/functions/_libp2p_interface_compliance_tests.mocks.mockConnection.html index e6ffa31fc4..ba79168957 100644 --- a/functions/_libp2p_interface_compliance_tests.mocks.mockConnection.html +++ b/functions/_libp2p_interface_compliance_tests.mocks.mockConnection.html @@ -1 +1 @@ -mockConnection | libp2p

Generated using TypeDoc

\ No newline at end of file +mockConnection | libp2p

Generated using TypeDoc

\ No newline at end of file diff --git a/functions/_libp2p_interface_compliance_tests.mocks.mockConnectionGater.html b/functions/_libp2p_interface_compliance_tests.mocks.mockConnectionGater.html index 7f11163c86..0ce9f3c1ba 100644 --- a/functions/_libp2p_interface_compliance_tests.mocks.mockConnectionGater.html +++ b/functions/_libp2p_interface_compliance_tests.mocks.mockConnectionGater.html @@ -1 +1 @@ -mockConnectionGater | libp2p

Generated using TypeDoc

\ No newline at end of file +mockConnectionGater | libp2p

Generated using TypeDoc

\ No newline at end of file diff --git a/functions/_libp2p_interface_compliance_tests.mocks.mockConnectionManager.html b/functions/_libp2p_interface_compliance_tests.mocks.mockConnectionManager.html index cc85e99037..30f202d9ca 100644 --- a/functions/_libp2p_interface_compliance_tests.mocks.mockConnectionManager.html +++ b/functions/_libp2p_interface_compliance_tests.mocks.mockConnectionManager.html @@ -1 +1 @@ -mockConnectionManager | libp2p

Generated using TypeDoc

\ No newline at end of file +mockConnectionManager | libp2p

Generated using TypeDoc

\ No newline at end of file diff --git a/functions/_libp2p_interface_compliance_tests.mocks.mockDuplex.html b/functions/_libp2p_interface_compliance_tests.mocks.mockDuplex.html index 0a1f390736..bec58ead87 100644 --- a/functions/_libp2p_interface_compliance_tests.mocks.mockDuplex.html +++ b/functions/_libp2p_interface_compliance_tests.mocks.mockDuplex.html @@ -1 +1 @@ -mockDuplex | libp2p

Generated using TypeDoc

\ No newline at end of file +mockDuplex | libp2p

Generated using TypeDoc

\ No newline at end of file diff --git a/functions/_libp2p_interface_compliance_tests.mocks.mockMetrics.html b/functions/_libp2p_interface_compliance_tests.mocks.mockMetrics.html index f7a4631fe0..c570b661d2 100644 --- a/functions/_libp2p_interface_compliance_tests.mocks.mockMetrics.html +++ b/functions/_libp2p_interface_compliance_tests.mocks.mockMetrics.html @@ -1 +1 @@ -mockMetrics | libp2p

Generated using TypeDoc

\ No newline at end of file +mockMetrics | libp2p

Generated using TypeDoc

\ No newline at end of file diff --git a/functions/_libp2p_interface_compliance_tests.mocks.mockMultiaddrConnPair.html b/functions/_libp2p_interface_compliance_tests.mocks.mockMultiaddrConnPair.html index e87d4db1c6..d9344263df 100644 --- a/functions/_libp2p_interface_compliance_tests.mocks.mockMultiaddrConnPair.html +++ b/functions/_libp2p_interface_compliance_tests.mocks.mockMultiaddrConnPair.html @@ -1,2 +1,2 @@ mockMultiaddrConnPair | libp2p

Generated using TypeDoc

\ No newline at end of file +

Parameters

Returns {
    inbound: MultiaddrConnection;
    outbound: MultiaddrConnection;
}

Generated using TypeDoc

\ No newline at end of file diff --git a/functions/_libp2p_interface_compliance_tests.mocks.mockMultiaddrConnection.html b/functions/_libp2p_interface_compliance_tests.mocks.mockMultiaddrConnection.html index ecf1fd9c43..3fedfe674b 100644 --- a/functions/_libp2p_interface_compliance_tests.mocks.mockMultiaddrConnection.html +++ b/functions/_libp2p_interface_compliance_tests.mocks.mockMultiaddrConnection.html @@ -1 +1 @@ -mockMultiaddrConnection | libp2p

Generated using TypeDoc

\ No newline at end of file +mockMultiaddrConnection | libp2p

Generated using TypeDoc

\ No newline at end of file diff --git a/functions/_libp2p_interface_compliance_tests.mocks.mockMuxer.html b/functions/_libp2p_interface_compliance_tests.mocks.mockMuxer.html index c792ff4f2f..ff3cd6fe48 100644 --- a/functions/_libp2p_interface_compliance_tests.mocks.mockMuxer.html +++ b/functions/_libp2p_interface_compliance_tests.mocks.mockMuxer.html @@ -1 +1 @@ -mockMuxer | libp2p

Generated using TypeDoc

\ No newline at end of file +mockMuxer | libp2p

Generated using TypeDoc

\ No newline at end of file diff --git a/functions/_libp2p_interface_compliance_tests.mocks.mockRegistrar.html b/functions/_libp2p_interface_compliance_tests.mocks.mockRegistrar.html index f8ca321dc5..ff7ce639bf 100644 --- a/functions/_libp2p_interface_compliance_tests.mocks.mockRegistrar.html +++ b/functions/_libp2p_interface_compliance_tests.mocks.mockRegistrar.html @@ -1 +1 @@ -mockRegistrar | libp2p

Generated using TypeDoc

\ No newline at end of file +mockRegistrar | libp2p

Generated using TypeDoc

\ No newline at end of file diff --git a/functions/_libp2p_interface_compliance_tests.mocks.mockStream.html b/functions/_libp2p_interface_compliance_tests.mocks.mockStream.html index 4818fe1db9..e2d1af1c88 100644 --- a/functions/_libp2p_interface_compliance_tests.mocks.mockStream.html +++ b/functions/_libp2p_interface_compliance_tests.mocks.mockStream.html @@ -1 +1 @@ -mockStream | libp2p

Generated using TypeDoc

\ No newline at end of file +mockStream | libp2p

Generated using TypeDoc

\ No newline at end of file diff --git a/functions/_libp2p_interface_compliance_tests.mocks.mockUpgrader.html b/functions/_libp2p_interface_compliance_tests.mocks.mockUpgrader.html index 37d422e149..62be7f17e6 100644 --- a/functions/_libp2p_interface_compliance_tests.mocks.mockUpgrader.html +++ b/functions/_libp2p_interface_compliance_tests.mocks.mockUpgrader.html @@ -1 +1 @@ -mockUpgrader | libp2p

Generated using TypeDoc

\ No newline at end of file +mockUpgrader | libp2p

Generated using TypeDoc

\ No newline at end of file diff --git a/functions/_libp2p_interface_compliance_tests.mocks.streamPair.html b/functions/_libp2p_interface_compliance_tests.mocks.streamPair.html index 7fe67caf15..01632bca18 100644 --- a/functions/_libp2p_interface_compliance_tests.mocks.streamPair.html +++ b/functions/_libp2p_interface_compliance_tests.mocks.streamPair.html @@ -1 +1 @@ -streamPair | libp2p

Generated using TypeDoc

\ No newline at end of file +streamPair | libp2p

Generated using TypeDoc

\ No newline at end of file diff --git a/functions/_libp2p_interface_compliance_tests.peer_discovery.default.html b/functions/_libp2p_interface_compliance_tests.peer_discovery.default.html index 0f6dc00db0..894b6c3365 100644 --- a/functions/_libp2p_interface_compliance_tests.peer_discovery.default.html +++ b/functions/_libp2p_interface_compliance_tests.peer_discovery.default.html @@ -1 +1 @@ -default | libp2p

Generated using TypeDoc

\ No newline at end of file +default | libp2p

Generated using TypeDoc

\ No newline at end of file diff --git a/functions/_libp2p_interface_compliance_tests.pubsub.default.html b/functions/_libp2p_interface_compliance_tests.pubsub.default.html index fa62eb0d69..4e6cf62b97 100644 --- a/functions/_libp2p_interface_compliance_tests.pubsub.default.html +++ b/functions/_libp2p_interface_compliance_tests.pubsub.default.html @@ -1 +1 @@ -default | libp2p

Generated using TypeDoc

\ No newline at end of file +default | libp2p

Generated using TypeDoc

\ No newline at end of file diff --git a/functions/_libp2p_interface_compliance_tests.stream_muxer.default.html b/functions/_libp2p_interface_compliance_tests.stream_muxer.default.html index 372d854085..53a620bb9e 100644 --- a/functions/_libp2p_interface_compliance_tests.stream_muxer.default.html +++ b/functions/_libp2p_interface_compliance_tests.stream_muxer.default.html @@ -1 +1 @@ -default | libp2p

Generated using TypeDoc

\ No newline at end of file +default | libp2p

Generated using TypeDoc

\ No newline at end of file diff --git a/functions/_libp2p_interface_compliance_tests.transport.default.html b/functions/_libp2p_interface_compliance_tests.transport.default.html index 17aeb60ff5..de84153459 100644 --- a/functions/_libp2p_interface_compliance_tests.transport.default.html +++ b/functions/_libp2p_interface_compliance_tests.transport.default.html @@ -1 +1 @@ -default | libp2p

Generated using TypeDoc

\ No newline at end of file +default | libp2p

Generated using TypeDoc

\ No newline at end of file diff --git a/functions/_libp2p_kad_dht.kadDHT-1.html b/functions/_libp2p_kad_dht.kadDHT-1.html index d7fa64b93c..b1f3d6b037 100644 --- a/functions/_libp2p_kad_dht.kadDHT-1.html +++ b/functions/_libp2p_kad_dht.kadDHT-1.html @@ -1 +1 @@ -kadDHT | libp2p

Generated using TypeDoc

\ No newline at end of file +kadDHT | libp2p

Generated using TypeDoc

\ No newline at end of file diff --git a/functions/_libp2p_keychain.keychain-1.html b/functions/_libp2p_keychain.keychain-1.html index 6065f45b15..0df3c3ab3a 100644 --- a/functions/_libp2p_keychain.keychain-1.html +++ b/functions/_libp2p_keychain.keychain-1.html @@ -1 +1 @@ -keychain | libp2p

Generated using TypeDoc

\ No newline at end of file +keychain | libp2p

Generated using TypeDoc

\ No newline at end of file diff --git a/functions/_libp2p_logger.defaultLogger.html b/functions/_libp2p_logger.defaultLogger.html index 65fc698ff6..ccd829a348 100644 --- a/functions/_libp2p_logger.defaultLogger.html +++ b/functions/_libp2p_logger.defaultLogger.html @@ -1,4 +1,4 @@ defaultLogger | libp2p

Function defaultLogger

  • Create a component logger

    Returns ComponentLogger

    Example

    import { defaultLogger } from '@libp2p/logger'
    import { peerIdFromString } from '@libp2p/peer-id'

    const logger = defaultLogger()

    const log = logger.forComponent('my-component')
    log.info('hello world')
    // logs "my-component hello world"
    -

Generated using TypeDoc

\ No newline at end of file +

Generated using TypeDoc

\ No newline at end of file diff --git a/functions/_libp2p_logger.disable.html b/functions/_libp2p_logger.disable.html index f919fe0adf..5286e95cf2 100644 --- a/functions/_libp2p_logger.disable.html +++ b/functions/_libp2p_logger.disable.html @@ -1 +1 @@ -disable | libp2p

Generated using TypeDoc

\ No newline at end of file +disable | libp2p

Generated using TypeDoc

\ No newline at end of file diff --git a/functions/_libp2p_logger.enable.html b/functions/_libp2p_logger.enable.html index 9233022e4e..38f8f48308 100644 --- a/functions/_libp2p_logger.enable.html +++ b/functions/_libp2p_logger.enable.html @@ -1 +1 @@ -enable | libp2p
  • Parameters

    • namespaces: string

    Returns void

Generated using TypeDoc

\ No newline at end of file +enable | libp2p
  • Parameters

    • namespaces: string

    Returns void

Generated using TypeDoc

\ No newline at end of file diff --git a/functions/_libp2p_logger.enabled.html b/functions/_libp2p_logger.enabled.html index 378e48a97d..cc5ebd6a1b 100644 --- a/functions/_libp2p_logger.enabled.html +++ b/functions/_libp2p_logger.enabled.html @@ -1 +1 @@ -enabled | libp2p
  • Parameters

    • namespaces: string

    Returns boolean

Generated using TypeDoc

\ No newline at end of file +enabled | libp2p
  • Parameters

    • namespaces: string

    Returns boolean

Generated using TypeDoc

\ No newline at end of file diff --git a/functions/_libp2p_logger.logger-1.html b/functions/_libp2p_logger.logger-1.html index 00e5a5f4b6..8fc8453a2c 100644 --- a/functions/_libp2p_logger.logger-1.html +++ b/functions/_libp2p_logger.logger-1.html @@ -1,4 +1,4 @@ logger | libp2p
  • Creates a logger for the passed component name.

    Parameters

    • name: string

    Returns Logger

    Example

    import { logger } from '@libp2p/logger'

    const log = logger('my-component')
    log.info('hello world')
    // logs "my-component hello world"
    -

Generated using TypeDoc

\ No newline at end of file +

Generated using TypeDoc

\ No newline at end of file diff --git a/functions/_libp2p_logger.peerLogger.html b/functions/_libp2p_logger.peerLogger.html index 0d85d5f386..9d4d4d9ea4 100644 --- a/functions/_libp2p_logger.peerLogger.html +++ b/functions/_libp2p_logger.peerLogger.html @@ -2,4 +2,4 @@ peer id.

Parameters

Returns ComponentLogger

Example

import { peerLogger } from '@libp2p/logger'
import { peerIdFromString } from '@libp2p/peer-id'

const peerId = peerIdFromString('12D3FooBar')
const logger = peerLogger(peerId)

const log = logger.forComponent('my-component')
log.info('hello world')
// logs "12…oBar:my-component hello world"
-

Generated using TypeDoc

\ No newline at end of file +

Generated using TypeDoc

\ No newline at end of file diff --git a/functions/_libp2p_logger.prefixLogger.html b/functions/_libp2p_logger.prefixLogger.html index f49503a1c1..07cafb4ed8 100644 --- a/functions/_libp2p_logger.prefixLogger.html +++ b/functions/_libp2p_logger.prefixLogger.html @@ -2,4 +2,4 @@ string.

Parameters

Returns ComponentLogger

Example

import { prefixLogger } from '@libp2p/logger'

const logger = prefixLogger('my-node')

const log = logger.forComponent('my-component')
log.info('hello world')
// logs "my-node:my-component hello world"
-

Generated using TypeDoc

\ No newline at end of file +

Generated using TypeDoc

\ No newline at end of file diff --git a/functions/_libp2p_mdns.mdns.html b/functions/_libp2p_mdns.mdns.html index 8fd9789d56..40835b97e7 100644 --- a/functions/_libp2p_mdns.mdns.html +++ b/functions/_libp2p_mdns.mdns.html @@ -1 +1 @@ -mdns | libp2p

Generated using TypeDoc

\ No newline at end of file +mdns | libp2p

Generated using TypeDoc

\ No newline at end of file diff --git a/functions/_libp2p_mplex.mplex.html b/functions/_libp2p_mplex.mplex.html index 1f32ccd250..f2f92fdbc1 100644 --- a/functions/_libp2p_mplex.mplex.html +++ b/functions/_libp2p_mplex.mplex.html @@ -1 +1 @@ -mplex | libp2p

Generated using TypeDoc

\ No newline at end of file +mplex | libp2p

Generated using TypeDoc

\ No newline at end of file diff --git a/functions/_libp2p_multistream_select.handle.html b/functions/_libp2p_multistream_select.handle.html index d1568e3a6d..0df529d76e 100644 --- a/functions/_libp2p_multistream_select.handle.html +++ b/functions/_libp2p_multistream_select.handle.html @@ -6,4 +6,4 @@

Returns Promise<ProtocolStream<Stream>>

A stream for the selected protocol and the protocol that was selected from the list of protocols provided to select

Example

import { pipe } from 'it-pipe'
import * as mss from '@libp2p/multistream-select'
import { Mplex } from '@libp2p/mplex'

const muxer = new Mplex({
async onStream (muxedStream) {
// mss.handle(handledProtocols)
// Returns selected stream and protocol
const { stream, protocol } = await mss.handle(muxedStream, [
'/ipfs-dht/1.0.0',
'/ipfs-bitswap/1.0.0'
])

// Typically here we'd call the handler function that was registered in
// libp2p for the given protocol:
// e.g. handlers[protocol].handler(stream)
//
// If protocol was /ipfs-dht/1.0.0 it might do something like this:
// try {
// await pipe(
// dhtStream,
// source => (async function * () {
// for await (const chunk of source)
// // Incoming DHT data -> process and yield to respond
// })(),
// dhtStream
// )
// } catch (err) {
// // Error in stream
// }
}
})
-

Generated using TypeDoc

\ No newline at end of file +

Generated using TypeDoc

\ No newline at end of file diff --git a/functions/_libp2p_multistream_select.select.html b/functions/_libp2p_multistream_select.select.html index 5a7003769b..fa80fd74b6 100644 --- a/functions/_libp2p_multistream_select.select.html +++ b/functions/_libp2p_multistream_select.select.html @@ -5,4 +5,4 @@

Returns Promise<ProtocolStream<Stream>>

A stream for the selected protocol and the protocol that was selected from the list of protocols provided to select.

Example

import { pipe } from 'it-pipe'
import * as mss from '@libp2p/multistream-select'
import { Mplex } from '@libp2p/mplex'

const muxer = new Mplex()
const muxedStream = muxer.newStream()

// mss.select(protocol(s))
// Select from one of the passed protocols (in priority order)
// Returns selected stream and protocol
const { stream: dhtStream, protocol } = await mss.select(muxedStream, [
// This might just be different versions of DHT, but could be different impls
'/ipfs-dht/2.0.0', // Most of the time this will probably just be one item.
'/ipfs-dht/1.0.0'
])

// Typically this stream will be passed back to the caller of libp2p.dialProtocol
//
// ...it might then do something like this:
// try {
// await pipe(
// [uint8ArrayFromString('Some DHT data')]
// dhtStream,
// async source => {
// for await (const chunk of source)
// // DHT response data
// }
// )
// } catch (err) {
// // Error in stream
// }
-

Generated using TypeDoc

\ No newline at end of file +

Generated using TypeDoc

\ No newline at end of file diff --git a/functions/_libp2p_peer_id.createPeerId.html b/functions/_libp2p_peer_id.createPeerId.html index 8dd207f15a..ec75a05e53 100644 --- a/functions/_libp2p_peer_id.createPeerId.html +++ b/functions/_libp2p_peer_id.createPeerId.html @@ -1 +1 @@ -createPeerId | libp2p

Generated using TypeDoc

\ No newline at end of file +createPeerId | libp2p

Generated using TypeDoc

\ No newline at end of file diff --git a/functions/_libp2p_peer_id.peerIdFromBytes.html b/functions/_libp2p_peer_id.peerIdFromBytes.html index 45b96d8436..2b884c3faa 100644 --- a/functions/_libp2p_peer_id.peerIdFromBytes.html +++ b/functions/_libp2p_peer_id.peerIdFromBytes.html @@ -1 +1 @@ -peerIdFromBytes | libp2p

Function peerIdFromBytes

Generated using TypeDoc

\ No newline at end of file +peerIdFromBytes | libp2p

Function peerIdFromBytes

Generated using TypeDoc

\ No newline at end of file diff --git a/functions/_libp2p_peer_id.peerIdFromCID.html b/functions/_libp2p_peer_id.peerIdFromCID.html index e2489b3d7a..86789f23d0 100644 --- a/functions/_libp2p_peer_id.peerIdFromCID.html +++ b/functions/_libp2p_peer_id.peerIdFromCID.html @@ -1 +1 @@ -peerIdFromCID | libp2p

Generated using TypeDoc

\ No newline at end of file +peerIdFromCID | libp2p

Generated using TypeDoc

\ No newline at end of file diff --git a/functions/_libp2p_peer_id.peerIdFromKeys.html b/functions/_libp2p_peer_id.peerIdFromKeys.html index 31c9370325..872524edcb 100644 --- a/functions/_libp2p_peer_id.peerIdFromKeys.html +++ b/functions/_libp2p_peer_id.peerIdFromKeys.html @@ -1,3 +1,3 @@ peerIdFromKeys | libp2p

Generated using TypeDoc

\ No newline at end of file +

Returns Promise<PeerId>

Generated using TypeDoc

\ No newline at end of file diff --git a/functions/_libp2p_peer_id.peerIdFromPeerId.html b/functions/_libp2p_peer_id.peerIdFromPeerId.html index d989478548..7124d663f9 100644 --- a/functions/_libp2p_peer_id.peerIdFromPeerId.html +++ b/functions/_libp2p_peer_id.peerIdFromPeerId.html @@ -1 +1 @@ -peerIdFromPeerId | libp2p

Function peerIdFromPeerId

Generated using TypeDoc

\ No newline at end of file +peerIdFromPeerId | libp2p

Function peerIdFromPeerId

Generated using TypeDoc

\ No newline at end of file diff --git a/functions/_libp2p_peer_id.peerIdFromString.html b/functions/_libp2p_peer_id.peerIdFromString.html index 967eb7b6e3..b88ccefdfb 100644 --- a/functions/_libp2p_peer_id.peerIdFromString.html +++ b/functions/_libp2p_peer_id.peerIdFromString.html @@ -1 +1 @@ -peerIdFromString | libp2p

Function peerIdFromString

Generated using TypeDoc

\ No newline at end of file +peerIdFromString | libp2p

Function peerIdFromString

Generated using TypeDoc

\ No newline at end of file diff --git a/functions/_libp2p_peer_id_factory.createEd25519PeerId.html b/functions/_libp2p_peer_id_factory.createEd25519PeerId.html index 8f3641f579..7b78ff3c32 100644 --- a/functions/_libp2p_peer_id_factory.createEd25519PeerId.html +++ b/functions/_libp2p_peer_id_factory.createEd25519PeerId.html @@ -1 +1 @@ -createEd25519PeerId | libp2p

Generated using TypeDoc

\ No newline at end of file +createEd25519PeerId | libp2p

Generated using TypeDoc

\ No newline at end of file diff --git a/functions/_libp2p_peer_id_factory.createFromJSON.html b/functions/_libp2p_peer_id_factory.createFromJSON.html index d8f78cf064..2c763948d7 100644 --- a/functions/_libp2p_peer_id_factory.createFromJSON.html +++ b/functions/_libp2p_peer_id_factory.createFromJSON.html @@ -1 +1 @@ -createFromJSON | libp2p
  • Parameters

    • obj: {
          id: string;
          privKey?: string;
          pubKey?: string;
      }
      • id: string
      • Optional privKey?: string
      • Optional pubKey?: string

    Returns Promise<PeerId>

Generated using TypeDoc

\ No newline at end of file +createFromJSON | libp2p
  • Parameters

    • obj: {
          id: string;
          privKey?: string;
          pubKey?: string;
      }
      • id: string
      • Optional privKey?: string
      • Optional pubKey?: string

    Returns Promise<PeerId>

Generated using TypeDoc

\ No newline at end of file diff --git a/functions/_libp2p_peer_id_factory.createFromPrivKey.html b/functions/_libp2p_peer_id_factory.createFromPrivKey.html index 168842699c..93581df8b5 100644 --- a/functions/_libp2p_peer_id_factory.createFromPrivKey.html +++ b/functions/_libp2p_peer_id_factory.createFromPrivKey.html @@ -1 +1 @@ -createFromPrivKey | libp2p

Generated using TypeDoc

\ No newline at end of file +createFromPrivKey | libp2p

Generated using TypeDoc

\ No newline at end of file diff --git a/functions/_libp2p_peer_id_factory.createFromProtobuf.html b/functions/_libp2p_peer_id_factory.createFromProtobuf.html index 9628628b7a..b59967da4b 100644 --- a/functions/_libp2p_peer_id_factory.createFromProtobuf.html +++ b/functions/_libp2p_peer_id_factory.createFromProtobuf.html @@ -1 +1 @@ -createFromProtobuf | libp2p

Generated using TypeDoc

\ No newline at end of file +createFromProtobuf | libp2p

Generated using TypeDoc

\ No newline at end of file diff --git a/functions/_libp2p_peer_id_factory.createFromPubKey.html b/functions/_libp2p_peer_id_factory.createFromPubKey.html index 7548d38c3b..5bb87f9e1a 100644 --- a/functions/_libp2p_peer_id_factory.createFromPubKey.html +++ b/functions/_libp2p_peer_id_factory.createFromPubKey.html @@ -1 +1 @@ -createFromPubKey | libp2p

Generated using TypeDoc

\ No newline at end of file +createFromPubKey | libp2p

Generated using TypeDoc

\ No newline at end of file diff --git a/functions/_libp2p_peer_id_factory.createRSAPeerId.html b/functions/_libp2p_peer_id_factory.createRSAPeerId.html index 2991f663e8..cc76bc98d8 100644 --- a/functions/_libp2p_peer_id_factory.createRSAPeerId.html +++ b/functions/_libp2p_peer_id_factory.createRSAPeerId.html @@ -1 +1 @@ -createRSAPeerId | libp2p

Generated using TypeDoc

\ No newline at end of file +createRSAPeerId | libp2p

Generated using TypeDoc

\ No newline at end of file diff --git a/functions/_libp2p_peer_id_factory.createSecp256k1PeerId.html b/functions/_libp2p_peer_id_factory.createSecp256k1PeerId.html index 2cf5f090d0..dbfa5e96dc 100644 --- a/functions/_libp2p_peer_id_factory.createSecp256k1PeerId.html +++ b/functions/_libp2p_peer_id_factory.createSecp256k1PeerId.html @@ -1 +1 @@ -createSecp256k1PeerId | libp2p

Generated using TypeDoc

\ No newline at end of file +createSecp256k1PeerId | libp2p

Generated using TypeDoc

\ No newline at end of file diff --git a/functions/_libp2p_peer_id_factory.exportToProtobuf.html b/functions/_libp2p_peer_id_factory.exportToProtobuf.html index df509f17be..a24a808110 100644 --- a/functions/_libp2p_peer_id_factory.exportToProtobuf.html +++ b/functions/_libp2p_peer_id_factory.exportToProtobuf.html @@ -1 +1 @@ -exportToProtobuf | libp2p

Generated using TypeDoc

\ No newline at end of file +exportToProtobuf | libp2p

Generated using TypeDoc

\ No newline at end of file diff --git a/functions/_libp2p_perf.perf-1.html b/functions/_libp2p_perf.perf-1.html index f3c191ed3a..f441eb7cb8 100644 --- a/functions/_libp2p_perf.perf-1.html +++ b/functions/_libp2p_perf.perf-1.html @@ -1 +1 @@ -perf | libp2p

Generated using TypeDoc

\ No newline at end of file +perf | libp2p

Generated using TypeDoc

\ No newline at end of file diff --git a/functions/_libp2p_ping.ping.html b/functions/_libp2p_ping.ping.html index 3e5e989b16..a7b74fe15f 100644 --- a/functions/_libp2p_ping.ping.html +++ b/functions/_libp2p_ping.ping.html @@ -1 +1 @@ -ping | libp2p

Generated using TypeDoc

\ No newline at end of file +ping | libp2p

Generated using TypeDoc

\ No newline at end of file diff --git a/functions/_libp2p_plaintext.plaintext.html b/functions/_libp2p_plaintext.plaintext.html index 8724f3a3ac..b3722b8233 100644 --- a/functions/_libp2p_plaintext.plaintext.html +++ b/functions/_libp2p_plaintext.plaintext.html @@ -1 +1 @@ -plaintext | libp2p

Generated using TypeDoc

\ No newline at end of file +plaintext | libp2p

Generated using TypeDoc

\ No newline at end of file diff --git a/functions/_libp2p_pnet.generateKey.html b/functions/_libp2p_pnet.generateKey.html index fd9dc4585b..c679491b97 100644 --- a/functions/_libp2p_pnet.generateKey.html +++ b/functions/_libp2p_pnet.generateKey.html @@ -1,3 +1,3 @@ generateKey | libp2p

Function generateKey

  • Generates a PSK that can be used in a libp2p-pnet private network

    Parameters

    Returns void

Generated using TypeDoc

\ No newline at end of file +

Returns void

Generated using TypeDoc

\ No newline at end of file diff --git a/functions/_libp2p_pnet.preSharedKey.html b/functions/_libp2p_pnet.preSharedKey.html index 6f98a914d2..17c5aecbb0 100644 --- a/functions/_libp2p_pnet.preSharedKey.html +++ b/functions/_libp2p_pnet.preSharedKey.html @@ -1 +1 @@ -preSharedKey | libp2p

Function preSharedKey

Generated using TypeDoc

\ No newline at end of file +preSharedKey | libp2p

Function preSharedKey

Generated using TypeDoc

\ No newline at end of file diff --git a/functions/_libp2p_prometheus_metrics.prometheusMetrics.html b/functions/_libp2p_prometheus_metrics.prometheusMetrics.html index ba0ae6bd78..1082073fe1 100644 --- a/functions/_libp2p_prometheus_metrics.prometheusMetrics.html +++ b/functions/_libp2p_prometheus_metrics.prometheusMetrics.html @@ -1 +1 @@ -prometheusMetrics | libp2p

Generated using TypeDoc

\ No newline at end of file +prometheusMetrics | libp2p

Generated using TypeDoc

\ No newline at end of file diff --git a/functions/_libp2p_pubsub.utils.anyMatch.html b/functions/_libp2p_pubsub.utils.anyMatch.html index 97b4844486..d910e90ea1 100644 --- a/functions/_libp2p_pubsub.utils.anyMatch.html +++ b/functions/_libp2p_pubsub.utils.anyMatch.html @@ -1,3 +1,3 @@ anyMatch | libp2p
  • Check if any member of the first set is also a member of the second set

    -

    Parameters

    • a: Set<number> | number[]
    • b: Set<number> | number[]

    Returns boolean

Generated using TypeDoc

\ No newline at end of file +

Parameters

Returns boolean

Generated using TypeDoc

\ No newline at end of file diff --git a/functions/_libp2p_pubsub.utils.bigIntFromBytes.html b/functions/_libp2p_pubsub.utils.bigIntFromBytes.html index eca3258668..09bfa2300a 100644 --- a/functions/_libp2p_pubsub.utils.bigIntFromBytes.html +++ b/functions/_libp2p_pubsub.utils.bigIntFromBytes.html @@ -1 +1 @@ -bigIntFromBytes | libp2p

Generated using TypeDoc

\ No newline at end of file +bigIntFromBytes | libp2p

Generated using TypeDoc

\ No newline at end of file diff --git a/functions/_libp2p_pubsub.utils.bigIntToBytes.html b/functions/_libp2p_pubsub.utils.bigIntToBytes.html index 1e38e4b645..0681f2c1ca 100644 --- a/functions/_libp2p_pubsub.utils.bigIntToBytes.html +++ b/functions/_libp2p_pubsub.utils.bigIntToBytes.html @@ -1 +1 @@ -bigIntToBytes | libp2p

Generated using TypeDoc

\ No newline at end of file +bigIntToBytes | libp2p

Generated using TypeDoc

\ No newline at end of file diff --git a/functions/_libp2p_pubsub.utils.ensureArray.html b/functions/_libp2p_pubsub.utils.ensureArray.html index 7f31f54447..4aaa620191 100644 --- a/functions/_libp2p_pubsub.utils.ensureArray.html +++ b/functions/_libp2p_pubsub.utils.ensureArray.html @@ -1,2 +1,2 @@ ensureArray | libp2p
  • Make everything an array

    -

    Type Parameters

    • T

    Parameters

    • maybeArray: T | T[]

    Returns T[]

Generated using TypeDoc

\ No newline at end of file +

Type Parameters

Parameters

Returns T[]

Generated using TypeDoc

\ No newline at end of file diff --git a/functions/_libp2p_pubsub.utils.msgId.html b/functions/_libp2p_pubsub.utils.msgId.html index d34fe61ca5..8ca7857b74 100644 --- a/functions/_libp2p_pubsub.utils.msgId.html +++ b/functions/_libp2p_pubsub.utils.msgId.html @@ -1,2 +1,2 @@ msgId | libp2p

Generated using TypeDoc

\ No newline at end of file +

Parameters

Returns Uint8Array

Generated using TypeDoc

\ No newline at end of file diff --git a/functions/_libp2p_pubsub.utils.noSignMsgId.html b/functions/_libp2p_pubsub.utils.noSignMsgId.html index 61392e45ee..314fa434ae 100644 --- a/functions/_libp2p_pubsub.utils.noSignMsgId.html +++ b/functions/_libp2p_pubsub.utils.noSignMsgId.html @@ -1,2 +1,2 @@ noSignMsgId | libp2p

Generated using TypeDoc

\ No newline at end of file +

Parameters

Returns Uint8Array | Promise<Uint8Array>

Generated using TypeDoc

\ No newline at end of file diff --git a/functions/_libp2p_pubsub.utils.randomSeqno.html b/functions/_libp2p_pubsub.utils.randomSeqno.html index 003ba9bd53..63197f0429 100644 --- a/functions/_libp2p_pubsub.utils.randomSeqno.html +++ b/functions/_libp2p_pubsub.utils.randomSeqno.html @@ -1,2 +1,2 @@ randomSeqno | libp2p

Generated using TypeDoc

\ No newline at end of file +

Returns bigint

Generated using TypeDoc

\ No newline at end of file diff --git a/functions/_libp2p_pubsub.utils.toMessage.html b/functions/_libp2p_pubsub.utils.toMessage.html index 0534e2a13e..f04828e8e0 100644 --- a/functions/_libp2p_pubsub.utils.toMessage.html +++ b/functions/_libp2p_pubsub.utils.toMessage.html @@ -1 +1 @@ -toMessage | libp2p

Generated using TypeDoc

\ No newline at end of file +toMessage | libp2p

Generated using TypeDoc

\ No newline at end of file diff --git a/functions/_libp2p_pubsub.utils.toRpcMessage.html b/functions/_libp2p_pubsub.utils.toRpcMessage.html index 5ee578aa9e..a9438b9528 100644 --- a/functions/_libp2p_pubsub.utils.toRpcMessage.html +++ b/functions/_libp2p_pubsub.utils.toRpcMessage.html @@ -1 +1 @@ -toRpcMessage | libp2p

Generated using TypeDoc

\ No newline at end of file +toRpcMessage | libp2p

Generated using TypeDoc

\ No newline at end of file diff --git a/functions/_libp2p_tcp.tcp.html b/functions/_libp2p_tcp.tcp.html index 1a202242bd..2b782bf1b8 100644 --- a/functions/_libp2p_tcp.tcp.html +++ b/functions/_libp2p_tcp.tcp.html @@ -1 +1 @@ -tcp | libp2p

Generated using TypeDoc

\ No newline at end of file +tcp | libp2p

Generated using TypeDoc

\ No newline at end of file diff --git a/functions/_libp2p_upnp_nat.uPnPNAT.html b/functions/_libp2p_upnp_nat.uPnPNAT.html index 1b6341a6aa..1ca5433f1b 100644 --- a/functions/_libp2p_upnp_nat.uPnPNAT.html +++ b/functions/_libp2p_upnp_nat.uPnPNAT.html @@ -1 +1 @@ -uPnPNAT | libp2p
  • Parameters

    Returns ((components) => unknown)

Generated using TypeDoc

\ No newline at end of file +uPnPNAT | libp2p
  • Parameters

    Returns ((components) => unknown)

Generated using TypeDoc

\ No newline at end of file diff --git a/functions/_libp2p_utils.address_sort.certifiedAddressesFirst.html b/functions/_libp2p_utils.address_sort.certifiedAddressesFirst.html index 85f29ac32d..6734a522d5 100644 --- a/functions/_libp2p_utils.address_sort.certifiedAddressesFirst.html +++ b/functions/_libp2p_utils.address_sort.certifiedAddressesFirst.html @@ -1,3 +1,3 @@ certifiedAddressesFirst | libp2p

Generated using TypeDoc

\ No newline at end of file +

Parameters

Returns -1 | 0 | 1

Generated using TypeDoc

\ No newline at end of file diff --git a/functions/_libp2p_utils.address_sort.circuitRelayAddressesLast.html b/functions/_libp2p_utils.address_sort.circuitRelayAddressesLast.html index 42b482636d..293a54a874 100644 --- a/functions/_libp2p_utils.address_sort.circuitRelayAddressesLast.html +++ b/functions/_libp2p_utils.address_sort.circuitRelayAddressesLast.html @@ -1,3 +1,3 @@ circuitRelayAddressesLast | libp2p

Generated using TypeDoc

\ No newline at end of file +

Parameters

Returns -1 | 0 | 1

Generated using TypeDoc

\ No newline at end of file diff --git a/functions/_libp2p_utils.address_sort.defaultAddressSort.html b/functions/_libp2p_utils.address_sort.defaultAddressSort.html index 02314d3535..1634f69129 100644 --- a/functions/_libp2p_utils.address_sort.defaultAddressSort.html +++ b/functions/_libp2p_utils.address_sort.defaultAddressSort.html @@ -1 +1 @@ -defaultAddressSort | libp2p

Generated using TypeDoc

\ No newline at end of file +defaultAddressSort | libp2p

Generated using TypeDoc

\ No newline at end of file diff --git a/functions/_libp2p_utils.address_sort.publicAddressesFirst.html b/functions/_libp2p_utils.address_sort.publicAddressesFirst.html index f304d3981f..2ae667e947 100644 --- a/functions/_libp2p_utils.address_sort.publicAddressesFirst.html +++ b/functions/_libp2p_utils.address_sort.publicAddressesFirst.html @@ -1,3 +1,3 @@ publicAddressesFirst | libp2p

Generated using TypeDoc

\ No newline at end of file +

Parameters

Returns -1 | 0 | 1

Generated using TypeDoc

\ No newline at end of file diff --git a/functions/_libp2p_utils.array_equals.arrayEquals.html b/functions/_libp2p_utils.array_equals.arrayEquals.html index 2f347fc424..feee09374c 100644 --- a/functions/_libp2p_utils.array_equals.arrayEquals.html +++ b/functions/_libp2p_utils.array_equals.arrayEquals.html @@ -1,3 +1,3 @@ arrayEquals | libp2p
  • Verify if two arrays of non primitive types with the "equals" function are equal. Compatible with multiaddr, peer-id and others.

    -

    Parameters

    • a: any[]
    • b: any[]

    Returns boolean

Generated using TypeDoc

\ No newline at end of file +

Parameters

Returns boolean

Generated using TypeDoc

\ No newline at end of file diff --git a/functions/_libp2p_utils.close_source.closeSource.html b/functions/_libp2p_utils.close_source.closeSource.html index 7a99f5eb7a..8a6fbf5e2b 100644 --- a/functions/_libp2p_utils.close_source.closeSource.html +++ b/functions/_libp2p_utils.close_source.closeSource.html @@ -1 +1 @@ -closeSource | libp2p

Generated using TypeDoc

\ No newline at end of file +closeSource | libp2p

Generated using TypeDoc

\ No newline at end of file diff --git a/functions/_libp2p_utils.ip_port_to_multiaddr.ipPortToMultiaddr.html b/functions/_libp2p_utils.ip_port_to_multiaddr.ipPortToMultiaddr.html index 3a92463a29..c50b3c22f8 100644 --- a/functions/_libp2p_utils.ip_port_to_multiaddr.ipPortToMultiaddr.html +++ b/functions/_libp2p_utils.ip_port_to_multiaddr.ipPortToMultiaddr.html @@ -1,2 +1,2 @@ ipPortToMultiaddr | libp2p

Generated using TypeDoc

\ No newline at end of file +

Parameters

Returns Multiaddr

Generated using TypeDoc

\ No newline at end of file diff --git a/functions/_libp2p_utils.is_promise.isPromise.html b/functions/_libp2p_utils.is_promise.isPromise.html index 8a29f8dd8c..bf4f23c6e8 100644 --- a/functions/_libp2p_utils.is_promise.isPromise.html +++ b/functions/_libp2p_utils.is_promise.isPromise.html @@ -1 +1 @@ -isPromise | libp2p

Generated using TypeDoc

\ No newline at end of file +isPromise | libp2p

Generated using TypeDoc

\ No newline at end of file diff --git a/functions/_libp2p_utils.multiaddr_is_loopback.isLoopback.html b/functions/_libp2p_utils.multiaddr_is_loopback.isLoopback.html index 204a9edd85..280911d01b 100644 --- a/functions/_libp2p_utils.multiaddr_is_loopback.isLoopback.html +++ b/functions/_libp2p_utils.multiaddr_is_loopback.isLoopback.html @@ -1,2 +1,2 @@ isLoopback | libp2p

Generated using TypeDoc

\ No newline at end of file +

Parameters

Returns boolean

Generated using TypeDoc

\ No newline at end of file diff --git a/functions/_libp2p_utils.multiaddr_is_private.isPrivate.html b/functions/_libp2p_utils.multiaddr_is_private.isPrivate.html index 97feb6fd36..3238abdbfd 100644 --- a/functions/_libp2p_utils.multiaddr_is_private.isPrivate.html +++ b/functions/_libp2p_utils.multiaddr_is_private.isPrivate.html @@ -1,2 +1,2 @@ isPrivate | libp2p

Generated using TypeDoc

\ No newline at end of file +

Parameters

Returns boolean

Generated using TypeDoc

\ No newline at end of file diff --git a/functions/_libp2p_utils.stream_to_ma_conn.streamToMaConnection.html b/functions/_libp2p_utils.stream_to_ma_conn.streamToMaConnection.html index 04339c0fd0..87135bafe3 100644 --- a/functions/_libp2p_utils.stream_to_ma_conn.streamToMaConnection.html +++ b/functions/_libp2p_utils.stream_to_ma_conn.streamToMaConnection.html @@ -1,3 +1,3 @@ streamToMaConnection | libp2p

Generated using TypeDoc

\ No newline at end of file +

Parameters

Returns MultiaddrConnection

Generated using TypeDoc

\ No newline at end of file diff --git a/functions/_libp2p_webrtc.webRTC.html b/functions/_libp2p_webrtc.webRTC.html index 78ef06b678..22a6ee407e 100644 --- a/functions/_libp2p_webrtc.webRTC.html +++ b/functions/_libp2p_webrtc.webRTC.html @@ -1,2 +1,2 @@ webRTC | libp2p

Generated using TypeDoc

\ No newline at end of file +

Returns ((components) => Transport)

Generated using TypeDoc

\ No newline at end of file diff --git a/functions/_libp2p_webrtc.webRTCDirect.html b/functions/_libp2p_webrtc.webRTCDirect.html index 4f3b52c5d4..7031b85c0e 100644 --- a/functions/_libp2p_webrtc.webRTCDirect.html +++ b/functions/_libp2p_webrtc.webRTCDirect.html @@ -1,2 +1,2 @@ webRTCDirect | libp2p

Generated using TypeDoc

\ No newline at end of file +

Returns ((components) => Transport)

Generated using TypeDoc

\ No newline at end of file diff --git a/functions/_libp2p_websockets.filters.all.html b/functions/_libp2p_websockets.filters.all.html index 66bce7e0f8..c104875b2d 100644 --- a/functions/_libp2p_websockets.filters.all.html +++ b/functions/_libp2p_websockets.filters.all.html @@ -1 +1 @@ -all | libp2p

Generated using TypeDoc

\ No newline at end of file +all | libp2p

Generated using TypeDoc

\ No newline at end of file diff --git a/functions/_libp2p_websockets.filters.dnsWsOrWss.html b/functions/_libp2p_websockets.filters.dnsWsOrWss.html index 441fe30e5b..813d9bc8c1 100644 --- a/functions/_libp2p_websockets.filters.dnsWsOrWss.html +++ b/functions/_libp2p_websockets.filters.dnsWsOrWss.html @@ -1 +1 @@ -dnsWsOrWss | libp2p

Generated using TypeDoc

\ No newline at end of file +dnsWsOrWss | libp2p

Generated using TypeDoc

\ No newline at end of file diff --git a/functions/_libp2p_websockets.filters.dnsWss.html b/functions/_libp2p_websockets.filters.dnsWss.html index 2ea15a141b..2a7cb14c9e 100644 --- a/functions/_libp2p_websockets.filters.dnsWss.html +++ b/functions/_libp2p_websockets.filters.dnsWss.html @@ -1 +1 @@ -dnsWss | libp2p

Generated using TypeDoc

\ No newline at end of file +dnsWss | libp2p

Generated using TypeDoc

\ No newline at end of file diff --git a/functions/_libp2p_websockets.filters.wss.html b/functions/_libp2p_websockets.filters.wss.html index dde55b4100..ed276105d8 100644 --- a/functions/_libp2p_websockets.filters.wss.html +++ b/functions/_libp2p_websockets.filters.wss.html @@ -1 +1 @@ -wss | libp2p

Generated using TypeDoc

\ No newline at end of file +wss | libp2p

Generated using TypeDoc

\ No newline at end of file diff --git a/functions/_libp2p_websockets.index.webSockets.html b/functions/_libp2p_websockets.index.webSockets.html index 13f8bc9c7e..195f2e73a7 100644 --- a/functions/_libp2p_websockets.index.webSockets.html +++ b/functions/_libp2p_websockets.index.webSockets.html @@ -1 +1 @@ -webSockets | libp2p

Generated using TypeDoc

\ No newline at end of file +webSockets | libp2p

Generated using TypeDoc

\ No newline at end of file diff --git a/functions/_libp2p_webtransport.webTransport.html b/functions/_libp2p_webtransport.webTransport.html index 5438e9cdd0..f82700bf1b 100644 --- a/functions/_libp2p_webtransport.webTransport.html +++ b/functions/_libp2p_webtransport.webTransport.html @@ -1 +1 @@ -webTransport | libp2p

Generated using TypeDoc

\ No newline at end of file +webTransport | libp2p

Generated using TypeDoc

\ No newline at end of file diff --git a/functions/libp2p.createLibp2p.html b/functions/libp2p.createLibp2p.html index e8b1437897..2f90c2ccbc 100644 --- a/functions/libp2p.createLibp2p.html +++ b/functions/libp2p.createLibp2p.html @@ -3,4 +3,4 @@

The node will be started unless start: false is passed as an option.

Type Parameters

Parameters

Returns Promise<Libp2p<T>>

Example

import { createLibp2p } from 'libp2p'
import { tcp } from '@libp2p/tcp'
import { mplex } from '@libp2p/mplex'
import { noise } from '@chainsafe/libp2p-noise'
import { yamux } from '@chainsafe/libp2p-yamux'

// specify options
const options = {
transports: [tcp()],
streamMuxers: [yamux(), mplex()],
connectionEncryption: [noise()]
}

// create libp2p
const libp2p = await createLibp2p(options)
-

Generated using TypeDoc

\ No newline at end of file +

Generated using TypeDoc

\ No newline at end of file diff --git a/interfaces/_libp2p_autonat.AutoNATComponents.html b/interfaces/_libp2p_autonat.AutoNATComponents.html index c402bfb8c7..e789521dee 100644 --- a/interfaces/_libp2p_autonat.AutoNATComponents.html +++ b/interfaces/_libp2p_autonat.AutoNATComponents.html @@ -1,8 +1,8 @@ -AutoNATComponents | libp2p

Interface AutoNATComponents

interface AutoNATComponents {
    addressManager: AddressManager;
    connectionManager: ConnectionManager;
    logger: ComponentLogger;
    peerId: PeerId;
    peerRouting: PeerRouting;
    registrar: Registrar;
    transportManager: TransportManager;
}

Properties

addressManager +AutoNATComponents | libp2p

Generated using TypeDoc

\ No newline at end of file +

Properties

addressManager: AddressManager
connectionManager: ConnectionManager
peerId: PeerId
peerRouting: PeerRouting
registrar: Registrar
transportManager: TransportManager

Generated using TypeDoc

\ No newline at end of file diff --git a/interfaces/_libp2p_autonat.AutoNATServiceInit.html b/interfaces/_libp2p_autonat.AutoNATServiceInit.html index 4f32c53717..f2a3c14846 100644 --- a/interfaces/_libp2p_autonat.AutoNATServiceInit.html +++ b/interfaces/_libp2p_autonat.AutoNATServiceInit.html @@ -1,13 +1,13 @@ -AutoNATServiceInit | libp2p

Interface AutoNATServiceInit

interface AutoNATServiceInit {
    maxInboundStreams?: number;
    maxOutboundStreams?: number;
    protocolPrefix?: string;
    refreshInterval?: number;
    startupDelay?: number;
    timeout?: number;
}

Properties

maxInboundStreams? +AutoNATServiceInit | libp2p

Interface AutoNATServiceInit

interface AutoNATServiceInit {
    maxInboundStreams?: number;
    maxOutboundStreams?: number;
    protocolPrefix?: string;
    refreshInterval?: number;
    startupDelay?: number;
    timeout?: number;
}

Properties

maxInboundStreams?: number

How many parallel inbound autoNAT streams we allow per-connection

-
maxOutboundStreams?: number

How many parallel outbound autoNAT streams we allow per-connection

-
protocolPrefix?: string

Allows overriding the protocol prefix used

-
refreshInterval?: number

Verify our external addresses this often

-
startupDelay?: number

How long to wait after startup before trying to verify our external address

-
timeout?: number

How long we should wait for a remote peer to verify our external address

-

Generated using TypeDoc

\ No newline at end of file +
maxOutboundStreams?: number

How many parallel outbound autoNAT streams we allow per-connection

+
protocolPrefix?: string

Allows overriding the protocol prefix used

+
refreshInterval?: number

Verify our external addresses this often

+
startupDelay?: number

How long to wait after startup before trying to verify our external address

+
timeout?: number

How long we should wait for a remote peer to verify our external address

+

Generated using TypeDoc

\ No newline at end of file diff --git a/interfaces/_libp2p_bootstrap.BootstrapComponents.html b/interfaces/_libp2p_bootstrap.BootstrapComponents.html index f99dd20967..7a4d998473 100644 --- a/interfaces/_libp2p_bootstrap.BootstrapComponents.html +++ b/interfaces/_libp2p_bootstrap.BootstrapComponents.html @@ -1,3 +1,3 @@ -BootstrapComponents | libp2p

Interface BootstrapComponents

interface BootstrapComponents {
    logger: ComponentLogger;
    peerStore: PeerStore;
}

Properties

logger +BootstrapComponents | libp2p

Generated using TypeDoc

\ No newline at end of file +

Properties

peerStore: PeerStore

Generated using TypeDoc

\ No newline at end of file diff --git a/interfaces/_libp2p_bootstrap.BootstrapInit.html b/interfaces/_libp2p_bootstrap.BootstrapInit.html index 0213e2ab96..5ab9f3f9d0 100644 --- a/interfaces/_libp2p_bootstrap.BootstrapInit.html +++ b/interfaces/_libp2p_bootstrap.BootstrapInit.html @@ -1,11 +1,11 @@ -BootstrapInit | libp2p
interface BootstrapInit {
    list: string[];
    tagName?: string;
    tagTTL?: number;
    tagValue?: number;
    timeout?: number;
}

Properties

list +BootstrapInit | libp2p
interface BootstrapInit {
    list: string[];
    tagName?: string;
    tagTTL?: number;
    tagValue?: number;
    timeout?: number;
}

Properties

list: string[]

The list of peer addresses in multi-address format

-
tagName?: string

Tag a bootstrap peer with this name before "discovering" it (default: 'bootstrap')

-
tagTTL?: number

Cause the bootstrap peer tag to be removed after this number of ms (default: 2 minutes)

-
tagValue?: number

The bootstrap peer tag will have this value (default: 50)

-
timeout?: number

How long to wait before discovering bootstrap nodes

-

Generated using TypeDoc

\ No newline at end of file +
tagName?: string

Tag a bootstrap peer with this name before "discovering" it (default: 'bootstrap')

+
tagTTL?: number

Cause the bootstrap peer tag to be removed after this number of ms (default: 2 minutes)

+
tagValue?: number

The bootstrap peer tag will have this value (default: 50)

+
timeout?: number

How long to wait before discovering bootstrap nodes

+

Generated using TypeDoc

\ No newline at end of file diff --git a/interfaces/_libp2p_circuit_relay_v2.CircuitRelayService.html b/interfaces/_libp2p_circuit_relay_v2.CircuitRelayService.html index d667990eed..e252839b7f 100644 --- a/interfaces/_libp2p_circuit_relay_v2.CircuitRelayService.html +++ b/interfaces/_libp2p_circuit_relay_v2.CircuitRelayService.html @@ -1,12 +1,12 @@ CircuitRelayService | libp2p

An implementation of a typed event target etc

-
interface CircuitRelayService {
    #private: any;
    reservations: PeerMap<RelayReservation>;
    addEventListener<K>(type, listener, options?): void;
    dispatchEvent(event): boolean;
    listenerCount(type): number;
    removeEventListener<K>(type, listener?, options?): void;
    safeDispatchEvent<Detail>(type, detail): boolean;
}

Hierarchy

Properties

interface CircuitRelayService {
    #private: any;
    reservations: PeerMap<RelayReservation>;
    addEventListener<K>(type, listener, options?): void;
    dispatchEvent(event): boolean;
    listenerCount(type): number;
    removeEventListener<K>(type, listener?, options?): void;
    safeDispatchEvent<Detail>(type, detail): boolean;
}

Hierarchy

Properties

#private: any
reservations: PeerMap<RelayReservation>

Methods

  • Dispatches a synthetic event event to target and returns true if either event's cancelable attribute value is false or its preventDefault() method was not invoked, and false otherwise.

    +

Properties

#private: any
reservations: PeerMap<RelayReservation>

Methods

  • Dispatches a synthetic event event to target and returns true if either event's cancelable attribute value is false or its preventDefault() method was not invoked, and false otherwise.

    MDN Reference

    Parameters

    Returns boolean

  • Parameters

    • type: string

    Returns number

Generated using TypeDoc

\ No newline at end of file diff --git a/interfaces/_libp2p_circuit_relay_v2.CircuitRelayServiceEvents.html b/interfaces/_libp2p_circuit_relay_v2.CircuitRelayServiceEvents.html index 3e418e99a5..df8957a9a2 100644 --- a/interfaces/_libp2p_circuit_relay_v2.CircuitRelayServiceEvents.html +++ b/interfaces/_libp2p_circuit_relay_v2.CircuitRelayServiceEvents.html @@ -1,4 +1,4 @@ -CircuitRelayServiceEvents | libp2p
interface CircuitRelayServiceEvents {
    relay:advert:error: CustomEvent<Error>;
    relay:advert:success: CustomEvent<unknown>;
    relay:reservation: CustomEvent<RelayReservation>;
}

Properties

relay:advert:error +CircuitRelayServiceEvents | libp2p

Generated using TypeDoc

\ No newline at end of file +

Properties

relay:advert:error: CustomEvent<Error>
relay:advert:success: CustomEvent<unknown>
relay:reservation: CustomEvent<RelayReservation>

Generated using TypeDoc

\ No newline at end of file diff --git a/interfaces/_libp2p_circuit_relay_v2.RelayReservation.html b/interfaces/_libp2p_circuit_relay_v2.RelayReservation.html index 22ea65df9a..2515e89de4 100644 --- a/interfaces/_libp2p_circuit_relay_v2.RelayReservation.html +++ b/interfaces/_libp2p_circuit_relay_v2.RelayReservation.html @@ -1,4 +1,4 @@ -RelayReservation | libp2p
interface RelayReservation {
    addr: Multiaddr;
    expire: Date;
    limit?: Limit;
}

Properties

addr +RelayReservation | libp2p

Generated using TypeDoc

\ No newline at end of file +

Properties

addr: Multiaddr
expire: Date
limit?: Limit

Generated using TypeDoc

\ No newline at end of file diff --git a/interfaces/_libp2p_crypto.aes.AESCipher.html b/interfaces/_libp2p_crypto.aes.AESCipher.html index e82c4120aa..083674f4f0 100644 --- a/interfaces/_libp2p_crypto.aes.AESCipher.html +++ b/interfaces/_libp2p_crypto.aes.AESCipher.html @@ -1,3 +1,3 @@ -AESCipher | libp2p
interface AESCipher {
    decrypt(data): Promise<Uint8Array>;
    encrypt(data): Promise<Uint8Array>;
}

Methods

decrypt +AESCipher | libp2p

Generated using TypeDoc

\ No newline at end of file +

Methods

Generated using TypeDoc

\ No newline at end of file diff --git a/interfaces/_libp2p_crypto.hmac.HMAC.html b/interfaces/_libp2p_crypto.hmac.HMAC.html index 02561c2369..45bbb642a7 100644 --- a/interfaces/_libp2p_crypto.hmac.HMAC.html +++ b/interfaces/_libp2p_crypto.hmac.HMAC.html @@ -1,3 +1,3 @@ -HMAC | libp2p
interface HMAC {
    length: number;
    digest(data): Promise<Uint8Array>;
}

Properties

length +HMAC | libp2p

Generated using TypeDoc

\ No newline at end of file +

Properties

length: number

Methods

Generated using TypeDoc

\ No newline at end of file diff --git a/interfaces/_libp2p_crypto.keys.keysPBM.PrivateKey-1.html b/interfaces/_libp2p_crypto.keys.keysPBM.PrivateKey-1.html index 6ac42dd24d..d295b1c6c9 100644 --- a/interfaces/_libp2p_crypto.keys.keysPBM.PrivateKey-1.html +++ b/interfaces/_libp2p_crypto.keys.keysPBM.PrivateKey-1.html @@ -1,3 +1,3 @@ -PrivateKey | libp2p
interface PrivateKey {
    Data?: Uint8Array;
    Type?: keysPBM.KeyType;
}

Properties

Data? +PrivateKey | libp2p

Generated using TypeDoc

\ No newline at end of file +

Properties

Data?: Uint8Array

Generated using TypeDoc

\ No newline at end of file diff --git a/interfaces/_libp2p_crypto.keys.keysPBM.PublicKey-1.html b/interfaces/_libp2p_crypto.keys.keysPBM.PublicKey-1.html index c27b0c38e3..f7d606320b 100644 --- a/interfaces/_libp2p_crypto.keys.keysPBM.PublicKey-1.html +++ b/interfaces/_libp2p_crypto.keys.keysPBM.PublicKey-1.html @@ -1,3 +1,3 @@ -PublicKey | libp2p
interface PublicKey {
    Data?: Uint8Array;
    Type?: keysPBM.KeyType;
}

Properties

Data? +PublicKey | libp2p

Generated using TypeDoc

\ No newline at end of file +

Properties

Data?: Uint8Array

Generated using TypeDoc

\ No newline at end of file diff --git a/interfaces/_libp2p_dcutr.DCUtRServiceComponents.html b/interfaces/_libp2p_dcutr.DCUtRServiceComponents.html index ed150f41e6..c04a69ee03 100644 --- a/interfaces/_libp2p_dcutr.DCUtRServiceComponents.html +++ b/interfaces/_libp2p_dcutr.DCUtRServiceComponents.html @@ -1,7 +1,7 @@ -DCUtRServiceComponents | libp2p

Interface DCUtRServiceComponents

interface DCUtRServiceComponents {
    addressManager: AddressManager;
    connectionManager: ConnectionManager;
    logger: ComponentLogger;
    peerStore: PeerStore;
    registrar: Registrar;
    transportManager: TransportManager;
}

Properties

addressManager +DCUtRServiceComponents | libp2p

Generated using TypeDoc

\ No newline at end of file +

Properties

addressManager: AddressManager
connectionManager: ConnectionManager
peerStore: PeerStore
registrar: Registrar
transportManager: TransportManager

Generated using TypeDoc

\ No newline at end of file diff --git a/interfaces/_libp2p_dcutr.DCUtRServiceInit.html b/interfaces/_libp2p_dcutr.DCUtRServiceInit.html index 46465428de..6eae5cd261 100644 --- a/interfaces/_libp2p_dcutr.DCUtRServiceInit.html +++ b/interfaces/_libp2p_dcutr.DCUtRServiceInit.html @@ -1,11 +1,11 @@ -DCUtRServiceInit | libp2p

Interface DCUtRServiceInit

interface DCUtRServiceInit {
    maxInboundStreams?: number;
    maxOutboundStreams?: number;
    retries?: number;
    timeout?: number;
}

Properties

maxInboundStreams? +DCUtRServiceInit | libp2p

Interface DCUtRServiceInit

interface DCUtRServiceInit {
    maxInboundStreams?: number;
    maxOutboundStreams?: number;
    retries?: number;
    timeout?: number;
}

Properties

maxInboundStreams?: number

How many simultaneous inbound DCUtR protocol streams to allow on each connection (default: 1)

-
maxOutboundStreams?: number

How many simultaneous outbound DCUtR protocol streams to allow on each +

maxOutboundStreams?: number

How many simultaneous outbound DCUtR protocol streams to allow on each connection (default: 1)

-
retries?: number

How many times to retry the connection upgrade (default: 3)

-
timeout?: number

How long we should wait for the connection upgrade to complete (default: 5s)

-

Generated using TypeDoc

\ No newline at end of file +
retries?: number

How many times to retry the connection upgrade (default: 3)

+
timeout?: number

How long we should wait for the connection upgrade to complete (default: 5s)

+

Generated using TypeDoc

\ No newline at end of file diff --git a/interfaces/_libp2p_fetch.Fetch.html b/interfaces/_libp2p_fetch.Fetch.html index 154d93f7f3..edaf13a470 100644 --- a/interfaces/_libp2p_fetch.Fetch.html +++ b/interfaces/_libp2p_fetch.Fetch.html @@ -1,13 +1,13 @@ -Fetch | libp2p
interface Fetch {
    fetch(peer, key, options?): Promise<undefined | Uint8Array>;
    registerLookupFunction(prefix, lookup): void;
    unregisterLookupFunction(prefix, lookup?): void;
}

Methods

fetch +Fetch | libp2p
interface Fetch {
    fetch(peer, key, options?): Promise<undefined | Uint8Array>;
    registerLookupFunction(prefix, lookup): void;
    unregisterLookupFunction(prefix, lookup?): void;
}

Methods

  • Registers a new lookup callback that can map keys to values, for a given set of keys that +

    Parameters

    Returns Promise<undefined | Uint8Array>

  • Registers a new lookup callback that can map keys to values, for a given set of keys that share the same prefix

    Parameters

    Returns void

    Example

    // ...
    libp2p.fetchService.registerLookupFunction('/prefix', (key) => { ... })
    -
  • Registers a new lookup callback that can map keys to values, for a given set of keys that +

  • Registers a new lookup callback that can map keys to values, for a given set of keys that share the same prefix.

    Parameters

    Returns void

    Example

    // ...
    libp2p.fetchService.unregisterLookupFunction('/prefix')
    -

Generated using TypeDoc

\ No newline at end of file +

Generated using TypeDoc

\ No newline at end of file diff --git a/interfaces/_libp2p_fetch.FetchComponents.html b/interfaces/_libp2p_fetch.FetchComponents.html index 0322437f0b..94582a39e8 100644 --- a/interfaces/_libp2p_fetch.FetchComponents.html +++ b/interfaces/_libp2p_fetch.FetchComponents.html @@ -1,4 +1,4 @@ -FetchComponents | libp2p

Interface FetchComponents

interface FetchComponents {
    connectionManager: ConnectionManager;
    logger: ComponentLogger;
    registrar: Registrar;
}

Properties

connectionManager +FetchComponents | libp2p

Generated using TypeDoc

\ No newline at end of file +

Properties

connectionManager: ConnectionManager
registrar: Registrar

Generated using TypeDoc

\ No newline at end of file diff --git a/interfaces/_libp2p_fetch.FetchInit.html b/interfaces/_libp2p_fetch.FetchInit.html index 2449e0cbec..b87362d7cc 100644 --- a/interfaces/_libp2p_fetch.FetchInit.html +++ b/interfaces/_libp2p_fetch.FetchInit.html @@ -1,6 +1,6 @@ -FetchInit | libp2p

Interface FetchInit

interface FetchInit {
    maxInboundStreams?: number;
    maxOutboundStreams?: number;
    protocolPrefix?: string;
    timeout?: number;
}

Properties

maxInboundStreams? +FetchInit | libp2p

Interface FetchInit

interface FetchInit {
    maxInboundStreams?: number;
    maxOutboundStreams?: number;
    protocolPrefix?: string;
    timeout?: number;
}

Properties

maxInboundStreams?: number
maxOutboundStreams?: number
protocolPrefix?: string
timeout?: number

How long we should wait for a remote peer to send any data

-

Generated using TypeDoc

\ No newline at end of file +

Properties

maxInboundStreams?: number
maxOutboundStreams?: number
protocolPrefix?: string
timeout?: number

How long we should wait for a remote peer to send any data

+

Generated using TypeDoc

\ No newline at end of file diff --git a/interfaces/_libp2p_fetch.LookupFunction.html b/interfaces/_libp2p_fetch.LookupFunction.html index 6f16dbe0e8..212c9b92c2 100644 --- a/interfaces/_libp2p_fetch.LookupFunction.html +++ b/interfaces/_libp2p_fetch.LookupFunction.html @@ -1 +1 @@ -LookupFunction | libp2p

Interface LookupFunction

interface LookupFunction ((key) => Promise<undefined | Uint8Array>)

Generated using TypeDoc

\ No newline at end of file +LookupFunction | libp2p

Interface LookupFunction

interface LookupFunction ((key) => Promise<undefined | Uint8Array>)

Generated using TypeDoc

\ No newline at end of file diff --git a/interfaces/_libp2p_floodsub.FloodSubComponents.html b/interfaces/_libp2p_floodsub.FloodSubComponents.html index a0453ff511..7d2d38f765 100644 --- a/interfaces/_libp2p_floodsub.FloodSubComponents.html +++ b/interfaces/_libp2p_floodsub.FloodSubComponents.html @@ -1,4 +1,4 @@ -FloodSubComponents | libp2p

Interface FloodSubComponents

interface FloodSubComponents {
    logger: ComponentLogger;
    peerId: PeerId;
    registrar: Registrar;
}

Hierarchy

Properties

logger +FloodSubComponents | libp2p

Interface FloodSubComponents

interface FloodSubComponents {
    logger: ComponentLogger;
    peerId: PeerId;
    registrar: Registrar;
}

Hierarchy

Properties

Properties

peerId: PeerId
registrar: Registrar

Generated using TypeDoc

\ No newline at end of file +

Properties

peerId: PeerId
registrar: Registrar

Generated using TypeDoc

\ No newline at end of file diff --git a/interfaces/_libp2p_floodsub.FloodSubInit.html b/interfaces/_libp2p_floodsub.FloodSubInit.html index 1d18995ac1..8b76bc0c72 100644 --- a/interfaces/_libp2p_floodsub.FloodSubInit.html +++ b/interfaces/_libp2p_floodsub.FloodSubInit.html @@ -1,4 +1,4 @@ -FloodSubInit | libp2p
interface FloodSubInit {
    canRelayMessage?: boolean;
    emitSelf?: boolean;
    enabled?: boolean;
    globalSignaturePolicy?: SignaturePolicy;
    maxInboundStreams?: number;
    maxOutboundStreams?: number;
    messageProcessingConcurrency?: number;
    multicodecs?: string[];
    seenTTL?: number;
}

Hierarchy

Properties

canRelayMessage? +FloodSubInit | libp2p
interface FloodSubInit {
    canRelayMessage?: boolean;
    emitSelf?: boolean;
    enabled?: boolean;
    globalSignaturePolicy?: SignaturePolicy;
    maxInboundStreams?: number;
    maxOutboundStreams?: number;
    messageProcessingConcurrency?: number;
    multicodecs?: string[];
    seenTTL?: number;
}

Hierarchy

Properties

maxInboundStreams?: number

How many parallel incoming streams to allow on the pubsub protocol per-connection

maxOutboundStreams?: number

How many parallel outgoing streams to allow on the pubsub protocol per-connection

messageProcessingConcurrency?: number

handle this many incoming pubsub messages concurrently

-
multicodecs?: string[]
seenTTL?: number

Generated using TypeDoc

\ No newline at end of file +
multicodecs?: string[]
seenTTL?: number

Generated using TypeDoc

\ No newline at end of file diff --git a/interfaces/_libp2p_identify.Identify.html b/interfaces/_libp2p_identify.Identify.html index cb2da6ef84..9a57d4201e 100644 --- a/interfaces/_libp2p_identify.Identify.html +++ b/interfaces/_libp2p_identify.Identify.html @@ -1,8 +1,8 @@ -Identify | libp2p
interface Identify {
    identify(connection, options?): Promise<IdentifyResult>;
    push(): Promise<void>;
}

Methods

identify +Identify | libp2p
interface Identify {
    identify(connection, options?): Promise<IdentifyResult>;
    push(): Promise<void>;
}

Methods

Methods

  • due to the default limits on inbound/outbound streams for this protocol, invoking this method when runOnConnectionOpen is true can lead to unpredictable results as streams may be closed by the local or the remote node. Please use with caution. If you find yourself needing to call this method to discover other peers that support your protocol, you may be better off configuring a topology to be notified instead.

    -

    Parameters

    Returns Promise<IdentifyResult>

Generated using TypeDoc

\ No newline at end of file +

Parameters

Returns Promise<IdentifyResult>

Generated using TypeDoc

\ No newline at end of file diff --git a/interfaces/_libp2p_identify.IdentifyComponents.html b/interfaces/_libp2p_identify.IdentifyComponents.html index bf17f41643..5396dbbd8a 100644 --- a/interfaces/_libp2p_identify.IdentifyComponents.html +++ b/interfaces/_libp2p_identify.IdentifyComponents.html @@ -1,4 +1,4 @@ -IdentifyComponents | libp2p

Interface IdentifyComponents

interface IdentifyComponents {
    addressManager: AddressManager;
    connectionManager: ConnectionManager;
    events: TypedEventTarget<Libp2pEvents<ServiceMap>>;
    logger: ComponentLogger;
    nodeInfo: NodeInfo;
    peerId: PeerId;
    peerStore: PeerStore;
    registrar: Registrar;
}

Properties

addressManager +IdentifyComponents | libp2p

Interface IdentifyComponents

interface IdentifyComponents {
    addressManager: AddressManager;
    connectionManager: ConnectionManager;
    events: TypedEventTarget<Libp2pEvents<ServiceMap>>;
    logger: ComponentLogger;
    nodeInfo: NodeInfo;
    peerId: PeerId;
    peerStore: PeerStore;
    registrar: Registrar;
}

Properties

addressManager: AddressManager
connectionManager: ConnectionManager
nodeInfo: NodeInfo
peerId: PeerId
peerStore: PeerStore
registrar: Registrar

Generated using TypeDoc

\ No newline at end of file +

Properties

addressManager: AddressManager
connectionManager: ConnectionManager
nodeInfo: NodeInfo
peerId: PeerId
peerStore: PeerStore
registrar: Registrar

Generated using TypeDoc

\ No newline at end of file diff --git a/interfaces/_libp2p_identify.IdentifyInit.html b/interfaces/_libp2p_identify.IdentifyInit.html index 6e498c897b..1ee1656dc8 100644 --- a/interfaces/_libp2p_identify.IdentifyInit.html +++ b/interfaces/_libp2p_identify.IdentifyInit.html @@ -1,4 +1,4 @@ -IdentifyInit | libp2p
interface IdentifyInit {
    agentVersion?: string;
    maxIdentifyMessageSize?: number;
    maxInboundStreams?: number;
    maxObservedAddresses?: number;
    maxOutboundStreams?: number;
    maxPushIncomingStreams?: number;
    maxPushOutgoingStreams?: number;
    protocolPrefix?: string;
    runOnConnectionOpen?: boolean;
    runOnTransientConnection?: boolean;
    timeout?: number;
}

Properties

agentVersion? +IdentifyInit | libp2p
interface IdentifyInit {
    agentVersion?: string;
    maxIdentifyMessageSize?: number;
    maxInboundStreams?: number;
    maxObservedAddresses?: number;
    maxOutboundStreams?: number;
    maxPushIncomingStreams?: number;
    maxPushOutgoingStreams?: number;
    protocolPrefix?: string;
    runOnConnectionOpen?: boolean;
    runOnTransientConnection?: boolean;
    timeout?: number;
}

Properties

agentVersion?: string

What details we should send as part of an identify message

-
maxIdentifyMessageSize?: number

Identify responses larger than this in bytes will be rejected (default: 8192)

-
maxInboundStreams?: number
maxObservedAddresses?: number
maxOutboundStreams?: number
maxPushIncomingStreams?: number
maxPushOutgoingStreams?: number
protocolPrefix?: string

The prefix to use for the protocol (default: 'ipfs')

-
runOnConnectionOpen?: boolean

Whether to automatically dial identify on newly opened connections (default: true)

-
runOnTransientConnection?: boolean

Whether to run on connections with data or duration limits (default: true)

-
timeout?: number

How long we should wait for a remote peer to send their identify response

-

Generated using TypeDoc

\ No newline at end of file +
maxIdentifyMessageSize?: number

Identify responses larger than this in bytes will be rejected (default: 8192)

+
maxInboundStreams?: number
maxObservedAddresses?: number
maxOutboundStreams?: number
maxPushIncomingStreams?: number
maxPushOutgoingStreams?: number
protocolPrefix?: string

The prefix to use for the protocol (default: 'ipfs')

+
runOnConnectionOpen?: boolean

Whether to automatically dial identify on newly opened connections (default: true)

+
runOnTransientConnection?: boolean

Whether to run on connections with data or duration limits (default: true)

+
timeout?: number

How long we should wait for a remote peer to send their identify response

+

Generated using TypeDoc

\ No newline at end of file diff --git a/interfaces/_libp2p_interface.connection.Connection.html b/interfaces/_libp2p_interface.connection.Connection.html index 693a5eeaa5..adf3a9f688 100644 --- a/interfaces/_libp2p_interface.connection.Connection.html +++ b/interfaces/_libp2p_interface.connection.Connection.html @@ -2,7 +2,7 @@ to a remote peer that may have been secured by encryption and multiplexed, depending on the configuration of the nodes between which the connection is made.

-
interface Connection {
    direction: Direction;
    encryption?: string;
    id: string;
    log: Logger;
    multiplexer?: string;
    remoteAddr: Multiaddr;
    remotePeer: PeerId;
    status: ConnectionStatus;
    streams: Stream[];
    tags: string[];
    timeline: ConnectionTimeline;
    transient: boolean;
    abort(err): void;
    close(options?): Promise<void>;
    newStream(protocols, options?): Promise<Stream>;
}

Properties

interface Connection {
    direction: Direction;
    encryption?: string;
    id: string;
    log: Logger;
    multiplexer?: string;
    remoteAddr: Multiaddr;
    remotePeer: PeerId;
    status: ConnectionStatus;
    streams: Stream[];
    tags: string[];
    timeline: ConnectionTimeline;
    transient: boolean;
    abort(err): void;
    close(options?): Promise<void>;
    newStream(protocols, options?): Promise<Stream>;
}

Properties

direction encryption? id log @@ -18,22 +18,22 @@ close newStream

Properties

direction: Direction

Outbound conections are opened by the local node, inbound streams are opened by the remote

-
encryption?: string

The encryption protocol negotiated for this connection

-
id: string

The unique identifier for this connection

-
log: Logger

The connection logger

-
multiplexer?: string

The multiplexer negotiated for this connection

-
remoteAddr: Multiaddr

The address of the remote end of the connection

-
remotePeer: PeerId

The id of the peer at the remote end of the connection

-

The current status of the connection

-
streams: Stream[]

A list of open streams on this connection

-
tags: string[]

A list of tags applied to this connection

-

Lifecycle times for the connection

-
transient: boolean

A transient connection is one that is not expected to be open for very long +

encryption?: string

The encryption protocol negotiated for this connection

+
id: string

The unique identifier for this connection

+
log: Logger

The connection logger

+
multiplexer?: string

The multiplexer negotiated for this connection

+
remoteAddr: Multiaddr

The address of the remote end of the connection

+
remotePeer: PeerId

The id of the peer at the remote end of the connection

+

The current status of the connection

+
streams: Stream[]

A list of open streams on this connection

+
tags: string[]

A list of tags applied to this connection

+

Lifecycle times for the connection

+
transient: boolean

A transient connection is one that is not expected to be open for very long or one that cannot transfer very much data, such as one being used as a circuit relay connection. Protocols need to explicitly opt-in to being run over transient connections.

-

Methods

Methods

Generated using TypeDoc

\ No newline at end of file +

Parameters

Returns Promise<void>

Generated using TypeDoc

\ No newline at end of file diff --git a/interfaces/_libp2p_interface.connection.ConnectionProtector.html b/interfaces/_libp2p_interface.connection.ConnectionProtector.html index 085eab02e5..e996cb87ea 100644 --- a/interfaces/_libp2p_interface.connection.ConnectionProtector.html +++ b/interfaces/_libp2p_interface.connection.ConnectionProtector.html @@ -1,5 +1,5 @@ -ConnectionProtector | libp2p
interface ConnectionProtector {
    protect(connection): Promise<MultiaddrConnection>;
}

Methods

protect +ConnectionProtector | libp2p

Generated using TypeDoc

\ No newline at end of file +

Parameters

Returns Promise<MultiaddrConnection>

Generated using TypeDoc

\ No newline at end of file diff --git a/interfaces/_libp2p_interface.connection.ConnectionTimeline.html b/interfaces/_libp2p_interface.connection.ConnectionTimeline.html index c88e6f8963..b560160ae6 100644 --- a/interfaces/_libp2p_interface.connection.ConnectionTimeline.html +++ b/interfaces/_libp2p_interface.connection.ConnectionTimeline.html @@ -1,8 +1,8 @@ -ConnectionTimeline | libp2p
interface ConnectionTimeline {
    close?: number;
    open: number;
    upgraded?: number;
}

Properties

close? +ConnectionTimeline | libp2p
interface ConnectionTimeline {
    close?: number;
    open: number;
    upgraded?: number;
}

Properties

Properties

close?: number

When the connection was closed.

-
open: number

When the connection was opened

-
upgraded?: number

When the MultiaddrConnection was upgraded to a Connection - e.g. the type +

open: number

When the connection was opened

+
upgraded?: number

When the MultiaddrConnection was upgraded to a Connection - e.g. the type of connection encryption and multiplexing was negotiated.

-

Generated using TypeDoc

\ No newline at end of file +

Generated using TypeDoc

\ No newline at end of file diff --git a/interfaces/_libp2p_interface.connection.MultiaddrConnection.html b/interfaces/_libp2p_interface.connection.MultiaddrConnection.html index fbe0f52e2b..67e2d7af3b 100644 --- a/interfaces/_libp2p_interface.connection.MultiaddrConnection.html +++ b/interfaces/_libp2p_interface.connection.MultiaddrConnection.html @@ -1,7 +1,7 @@ MultiaddrConnection | libp2p

A MultiaddrConnection is returned by transports after dialing a peer. It is a low-level primitive and is the raw connection without encryption or stream multiplexing.

-
interface MultiaddrConnection {
    log: Logger;
    remoteAddr: Multiaddr;
    sink: Sink<AsyncGenerator<Uint8Array | Uint8ArrayList, any, unknown>, unknown>;
    source: AsyncGenerator<Uint8Array | Uint8ArrayList, any, unknown>;
    timeline: MultiaddrConnectionTimeline;
    abort(err): void;
    close(options?): Promise<void>;
}

Hierarchy

Properties

log +
interface MultiaddrConnection {
    log: Logger;
    remoteAddr: Multiaddr;
    sink: Sink<AsyncGenerator<Uint8Array | Uint8ArrayList, any, unknown>, unknown>;
    source: AsyncGenerator<Uint8Array | Uint8ArrayList, any, unknown>;
    timeline: MultiaddrConnectionTimeline;
    abort(err): void;
    close(options?): Promise<void>;
}

Hierarchy

Properties

log remoteAddr sink source @@ -9,9 +9,9 @@

Methods

Properties

log: Logger

The multiaddr connection logger

-
remoteAddr: Multiaddr

The address of the remote end of the connection

-
sink: Sink<AsyncGenerator<Uint8Array | Uint8ArrayList, any, unknown>, unknown>
source: AsyncGenerator<Uint8Array | Uint8ArrayList, any, unknown>

When connection lifecycle events occurred

-

Methods

remoteAddr: Multiaddr

The address of the remote end of the connection

+
sink: Sink<AsyncGenerator<Uint8Array | Uint8ArrayList, any, unknown>, unknown>
source: AsyncGenerator<Uint8Array | Uint8ArrayList, any, unknown>

When connection lifecycle events occurred

+

Methods

Generated using TypeDoc

\ No newline at end of file +

Parameters

Returns Promise<void>

Generated using TypeDoc

\ No newline at end of file diff --git a/interfaces/_libp2p_interface.connection.MultiaddrConnectionTimeline.html b/interfaces/_libp2p_interface.connection.MultiaddrConnectionTimeline.html index 866d09a103..2e9ba6f10e 100644 --- a/interfaces/_libp2p_interface.connection.MultiaddrConnectionTimeline.html +++ b/interfaces/_libp2p_interface.connection.MultiaddrConnectionTimeline.html @@ -1,8 +1,8 @@ -MultiaddrConnectionTimeline | libp2p
interface MultiaddrConnectionTimeline {
    close?: number;
    open: number;
    upgraded?: number;
}

Properties

close? +MultiaddrConnectionTimeline | libp2p
interface MultiaddrConnectionTimeline {
    close?: number;
    open: number;
    upgraded?: number;
}

Properties

Properties

close?: number

When the connection was closed.

-
open: number

When the connection was opened

-
upgraded?: number

When the MultiaddrConnection was upgraded to a Connection - the type of +

open: number

When the connection was opened

+
upgraded?: number

When the MultiaddrConnection was upgraded to a Connection - the type of connection encryption and multiplexing was negotiated.

-

Generated using TypeDoc

\ No newline at end of file +

Generated using TypeDoc

\ No newline at end of file diff --git a/interfaces/_libp2p_interface.connection.NewStreamOptions.html b/interfaces/_libp2p_interface.connection.NewStreamOptions.html index 415b58a692..dfa450e300 100644 --- a/interfaces/_libp2p_interface.connection.NewStreamOptions.html +++ b/interfaces/_libp2p_interface.connection.NewStreamOptions.html @@ -2,12 +2,12 @@ the optional signal property.

Example

const controller = new AbortController()

aLongRunningOperation({
signal: controller.signal
})

// later

controller.abort()
-
interface NewStreamOptions {
    maxOutboundStreams?: number;
    runOnTransientConnection?: boolean;
    signal?: AbortSignal;
}

Hierarchy

Properties

interface NewStreamOptions {
    maxOutboundStreams?: number;
    runOnTransientConnection?: boolean;
    signal?: AbortSignal;
}

Hierarchy

Properties

maxOutboundStreams?: number

If specified, and no handler has been registered with the registrar for the successfully negotiated protocol, use this as the max outbound stream limit for the protocol

-
runOnTransientConnection?: boolean

Opt-in to running over a transient connection - one that has time/data limits +

runOnTransientConnection?: boolean

Opt-in to running over a transient connection - one that has time/data limits placed on it.

-
signal?: AbortSignal

Generated using TypeDoc

\ No newline at end of file +
signal?: AbortSignal

Generated using TypeDoc

\ No newline at end of file diff --git a/interfaces/_libp2p_interface.connection.Stream.html b/interfaces/_libp2p_interface.connection.Stream.html index 28b91a4588..553554b2d0 100644 --- a/interfaces/_libp2p_interface.connection.Stream.html +++ b/interfaces/_libp2p_interface.connection.Stream.html @@ -2,7 +2,7 @@ can be written to and read from at both ends.

It may be encrypted and multiplexed depending on the configuration of the nodes.

-
interface Stream {
    direction: Direction;
    id: string;
    log: Logger;
    metadata: Record<string, any>;
    protocol?: string;
    readStatus: ReadStatus;
    sink: Sink<Source<Uint8Array | Uint8ArrayList>, Promise<void>>;
    source: AsyncGenerator<Uint8ArrayList, any, unknown>;
    status: StreamStatus;
    timeline: StreamTimeline;
    writeStatus: WriteStatus;
    abort(err): void;
    close(options?): Promise<void>;
    closeRead(options?): Promise<void>;
    closeWrite(options?): Promise<void>;
}

Hierarchy

Implemented by

Properties

interface Stream {
    direction: Direction;
    id: string;
    log: Logger;
    metadata: Record<string, any>;
    protocol?: string;
    readStatus: ReadStatus;
    sink: Sink<Source<Uint8Array | Uint8ArrayList>, Promise<void>>;
    source: AsyncGenerator<Uint8ArrayList, any, unknown>;
    status: StreamStatus;
    timeline: StreamTimeline;
    writeStatus: WriteStatus;
    abort(err): void;
    close(options?): Promise<void>;
    closeRead(options?): Promise<void>;
    closeWrite(options?): Promise<void>;
}

Hierarchy

Implemented by

    Properties

    Properties

    direction: Direction

    Outbound streams are opened by the local node, inbound streams are opened by the remote

    -
    id: string

    Unique identifier for a stream. Identifiers are not unique across muxers.

    -
    log: Logger

    The stream logger

    -
    metadata: Record<string, any>

    User defined stream metadata

    -
    protocol?: string

    The protocol negotiated for this stream

    -
    readStatus: ReadStatus

    The current status of the readable end of the stream

    -
    source: AsyncGenerator<Uint8ArrayList, any, unknown>
    status: StreamStatus

    The current status of the stream

    -
    timeline: StreamTimeline

    Lifecycle times for the stream

    -
    writeStatus: WriteStatus

    The current status of the writable end of the stream

    -

    Methods

    id: string

    Unique identifier for a stream. Identifiers are not unique across muxers.

    +
    log: Logger

    The stream logger

    +
    metadata: Record<string, any>

    User defined stream metadata

    +
    protocol?: string

    The protocol negotiated for this stream

    +
    readStatus: ReadStatus

    The current status of the readable end of the stream

    +
    source: AsyncGenerator<Uint8ArrayList, any, unknown>
    status: StreamStatus

    The current status of the stream

    +
    timeline: StreamTimeline

    Lifecycle times for the stream

    +
    writeStatus: WriteStatus

    The current status of the writable end of the stream

    +

    Methods

    • Closes the stream for reading and writing. This should be called when a local error has occurred.

      Note, if called without an error any buffered data in the source can still be consumed and the stream will end normally.

      This will cause a RESET message to be sent to the remote, unless the sink has already ended.

      The sink will return and the source will throw if an error is passed or return normally if not.

      -

      Parameters

      Returns void

    • Closes the stream for reading and writing.

      Any buffered data in the source can still be consumed and the stream will end normally.

      This will cause a CLOSE message to be sent to the remote, unless the sink has already ended.

      The sink and the source will return normally.

      -

      Parameters

      Returns Promise<void>

    • Closes the stream for reading. If iterating over the source of this stream in a for await of loop, it will return (exit the loop) after any buffered data has been consumed.

      This function is called automatically by the muxer when it receives a CLOSE message from the remote.

      The source will return normally, the sink will continue to consume.

      -

      Parameters

      Returns Promise<void>

    • Closes the stream for writing. If iterating over the source of this stream in a for await of loop, it will return (exit the loop) after any buffered data has been consumed.

      The source will return normally, the sink will continue to consume.

      -

      Parameters

      Returns Promise<void>

    Generated using TypeDoc

    \ No newline at end of file +

    Parameters

    Returns Promise<void>

    Generated using TypeDoc

    \ No newline at end of file diff --git a/interfaces/_libp2p_interface.connection.StreamTimeline.html b/interfaces/_libp2p_interface.connection.StreamTimeline.html index f37ca7c054..a14f54c693 100644 --- a/interfaces/_libp2p_interface.connection.StreamTimeline.html +++ b/interfaces/_libp2p_interface.connection.StreamTimeline.html @@ -1,13 +1,13 @@ -StreamTimeline | libp2p
    interface StreamTimeline {
        abort?: number;
        close?: number;
        closeRead?: number;
        closeWrite?: number;
        open: number;
        reset?: number;
    }

    Properties

    abort? +StreamTimeline | libp2p
    interface StreamTimeline {
        abort?: number;
        close?: number;
        closeRead?: number;
        closeWrite?: number;
        open: number;
        reset?: number;
    }

    Properties

    abort?: number

    A timestamp of when the stream was aborted

    -
    close?: number

    A timestamp of when the stream was closed for both reading and writing

    -
    closeRead?: number

    A timestamp of when the stream was closed for reading

    -
    closeWrite?: number

    A timestamp of when the stream was closed for writing

    -
    open: number

    A timestamp of when the stream was opened

    -
    reset?: number

    A timestamp of when the stream was reset

    -

    Generated using TypeDoc

    \ No newline at end of file +
    close?: number

    A timestamp of when the stream was closed for both reading and writing

    +
    closeRead?: number

    A timestamp of when the stream was closed for reading

    +
    closeWrite?: number

    A timestamp of when the stream was closed for writing

    +
    open: number

    A timestamp of when the stream was opened

    +
    reset?: number

    A timestamp of when the stream was reset

    +

    Generated using TypeDoc

    \ No newline at end of file diff --git a/interfaces/_libp2p_interface.connection_encrypter.ConnectionEncrypter.html b/interfaces/_libp2p_interface.connection_encrypter.ConnectionEncrypter.html index af60fe3265..3c11ba288f 100644 --- a/interfaces/_libp2p_interface.connection_encrypter.ConnectionEncrypter.html +++ b/interfaces/_libp2p_interface.connection_encrypter.ConnectionEncrypter.html @@ -1,12 +1,12 @@ ConnectionEncrypter | libp2p

    A libp2p connection encrypter module must be compliant to this interface to ensure all exchanged data between two peers is encrypted.

    -
    interface ConnectionEncrypter {
        protocol: string;
        secureInbound<Stream>(localPeer, connection, remotePeer?): Promise<SecuredConnection<Stream, Extension>>;
        secureOutbound<Stream>(localPeer, connection, remotePeer?): Promise<SecuredConnection<Stream, Extension>>;
    }

    Type Parameters

    • Extension = unknown

    Properties

    interface ConnectionEncrypter {
        protocol: string;
        secureInbound<Stream>(localPeer, connection, remotePeer?): Promise<SecuredConnection<Stream, Extension>>;
        secureOutbound<Stream>(localPeer, connection, remotePeer?): Promise<SecuredConnection<Stream, Extension>>;
    }

    Type Parameters

    • Extension = unknown

    Properties

    protocol: string

    Methods

    • Decrypt incoming data. If the remote PeerId is known, +

    Properties

    protocol: string

    Methods

    Generated using TypeDoc

    \ No newline at end of file +

    Type Parameters

    Parameters

    Returns Promise<SecuredConnection<Stream, Extension>>

    Generated using TypeDoc

    \ No newline at end of file diff --git a/interfaces/_libp2p_interface.connection_encrypter.SecuredConnection.html b/interfaces/_libp2p_interface.connection_encrypter.SecuredConnection.html index 11c84ba89a..87bd50dbc7 100644 --- a/interfaces/_libp2p_interface.connection_encrypter.SecuredConnection.html +++ b/interfaces/_libp2p_interface.connection_encrypter.SecuredConnection.html @@ -1,4 +1,4 @@ -SecuredConnection | libp2p

    Interface SecuredConnection<Stream, Extension>

    interface SecuredConnection {
        conn: Stream;
        remoteExtensions?: Extension;
        remotePeer: PeerId;
    }

    Type Parameters

    • Stream = any

    • Extension = unknown

    Properties

    conn +SecuredConnection | libp2p

    Generated using TypeDoc

    \ No newline at end of file +

    Properties

    conn: Stream
    remoteExtensions?: Extension
    remotePeer: PeerId

    Generated using TypeDoc

    \ No newline at end of file diff --git a/interfaces/_libp2p_interface.connection_gater.ConnectionGater.html b/interfaces/_libp2p_interface.connection_gater.ConnectionGater.html index 8671312a2b..72c0d1b486 100644 --- a/interfaces/_libp2p_interface.connection_gater.ConnectionGater.html +++ b/interfaces/_libp2p_interface.connection_gater.ConnectionGater.html @@ -1,4 +1,4 @@ -ConnectionGater | libp2p
    interface ConnectionGater {
        denyDialMultiaddr?(multiaddr): Promise<boolean>;
        denyDialPeer?(peerId): Promise<boolean>;
        denyInboundConnection?(maConn): Promise<boolean>;
        denyInboundEncryptedConnection?(peerId, maConn): Promise<boolean>;
        denyInboundRelayReservation?(source): Promise<boolean>;
        denyInboundRelayedConnection?(relay, remotePeer): Promise<boolean>;
        denyInboundUpgradedConnection?(peerId, maConn): Promise<boolean>;
        denyOutboundConnection?(peerId, maConn): Promise<boolean>;
        denyOutboundEncryptedConnection?(peerId, maConn): Promise<boolean>;
        denyOutboundRelayedConnection?(source, destination): Promise<boolean>;
        denyOutboundUpgradedConnection?(peerId, maConn): Promise<boolean>;
        filterMultiaddrForPeer?(peer, multiaddr): Promise<boolean>;
    }

    Methods

    denyDialMultiaddr? +ConnectionGater | libp2p
    interface ConnectionGater {
        denyDialMultiaddr?(multiaddr): Promise<boolean>;
        denyDialPeer?(peerId): Promise<boolean>;
        denyInboundConnection?(maConn): Promise<boolean>;
        denyInboundEncryptedConnection?(peerId, maConn): Promise<boolean>;
        denyInboundRelayReservation?(source): Promise<boolean>;
        denyInboundRelayedConnection?(relay, remotePeer): Promise<boolean>;
        denyInboundUpgradedConnection?(peerId, maConn): Promise<boolean>;
        denyOutboundConnection?(peerId, maConn): Promise<boolean>;
        denyOutboundEncryptedConnection?(peerId, maConn): Promise<boolean>;
        denyOutboundRelayedConnection?(source, destination): Promise<boolean>;
        denyOutboundUpgradedConnection?(peerId, maConn): Promise<boolean>;
        filterMultiaddrForPeer?(peer, multiaddr): Promise<boolean>;
    }

    Methods

    denyDialMultiaddr? denyDialPeer? denyInboundConnection? denyInboundEncryptedConnection? @@ -15,52 +15,52 @@

    This is called by the connection manager - if the peer id of the remote node is known it will be present in the multiaddr.

    Return true to prevent dialing the passed peer on the passed multiaddr.

    -

    Parameters

    Returns Promise<boolean>

    • denyInboundConnection tests whether an incipient inbound connection is allowed.

      This is called by the upgrader, or by the transport directly (e.g. QUIC, Bluetooth), straight after it has accepted a connection from its socket.

      Return true to deny the incoming passed connection.

      -

      Parameters

      Returns Promise<boolean>

    • denyInboundEncryptedConnection tests whether a given connection, now encrypted, is allowed.

      This is called by the upgrader, after it has performed the security handshake, and before it negotiates the muxer, or by the directly by the transport, at the exact same checkpoint.

      Return true to deny the passed secured connection.

      -

      Parameters

      Returns Promise<boolean>

    • denyInboundRelayedConnection tests whether a remote peer is allowed to open a relayed connection to this node.

      This is invoked on the relay client when a remote relay has received an instruction to relay a connection to the client.

      Return true to deny the relayed connection.

      -

      Parameters

      Returns Promise<boolean>

    • denyInboundUpgradedConnection tests whether a fully capable connection is allowed.

      This is called after encryption has been negotiated and the connection has been multiplexed, if a multiplexer is configured.

      Return true to deny the passed upgraded connection.

      -

      Parameters

      Returns Promise<boolean>

    • denyOutboundConnection tests whether an incipient outbound connection is allowed.

      This is called by the upgrader, or by the transport directly (e.g. QUIC, Bluetooth), straight after it has created a connection with its socket.

      Return true to deny the incoming passed connection.

      -

      Parameters

      Returns Promise<boolean>

    • denyOutboundEncryptedConnection tests whether a given connection, now encrypted, is allowed.

      This is called by the upgrader, after it has performed the security handshake, and before it negotiates the muxer, or by the directly by the transport, at the exact same checkpoint.

      Return true to deny the passed secured connection.

      -

      Parameters

      Returns Promise<boolean>

    • denyOutboundRelayedConnection tests whether a remote peer is allowed to open a relayed connection to the destination node.

      This is invoked on the relay server when a source client with a reservation instructs the server to relay a connection to a destination peer.

      Return true to deny the relayed connection.

      -

      Parameters

      Returns Promise<boolean>

    • denyOutboundUpgradedConnection tests whether a fully capable connection is allowed.

      This is called after encryption has been negotiated and the connection has been multiplexed, if a multiplexer is configured.

      Return true to deny the passed upgraded connection.

      -

      Parameters

      Returns Promise<boolean>

    Generated using TypeDoc

    \ No newline at end of file +

    Parameters

    Returns Promise<boolean>

    Generated using TypeDoc

    \ No newline at end of file diff --git a/interfaces/_libp2p_interface.content_routing.ContentRouting.html b/interfaces/_libp2p_interface.content_routing.ContentRouting.html index 4d381dd790..1b51087ba4 100644 --- a/interfaces/_libp2p_interface.content_routing.ContentRouting.html +++ b/interfaces/_libp2p_interface.content_routing.ContentRouting.html @@ -1,19 +1,19 @@ -ContentRouting | libp2p
    interface ContentRouting {
        findProviders(cid, options?): AsyncIterable<PeerInfo>;
        get(key, options?): Promise<Uint8Array>;
        provide(cid, options?): Promise<void>;
        put(key, value, options?): Promise<void>;
    }

    Methods

    findProviders +ContentRouting | libp2p
    interface ContentRouting {
        findProviders(cid, options?): AsyncIterable<PeerInfo>;
        get(key, options?): Promise<Uint8Array>;
        provide(cid, options?): Promise<void>;
        put(key, value, options?): Promise<void>;
    }

    Methods

    • Find the providers of the passed CID.

      Parameters

      Returns AsyncIterable<PeerInfo>

      Example

      // Iterate over the providers found for the given cid
      for await (const provider of contentRouting.findProviders(cid)) {
      console.log(provider.id, provider.multiaddrs)
      }
      -

    Generated using TypeDoc

    \ No newline at end of file +

    Generated using TypeDoc

    \ No newline at end of file diff --git a/interfaces/_libp2p_interface.events.EventCallback.html b/interfaces/_libp2p_interface.events.EventCallback.html index e4b0b4b7ab..72222e9eda 100644 --- a/interfaces/_libp2p_interface.events.EventCallback.html +++ b/interfaces/_libp2p_interface.events.EventCallback.html @@ -1 +1 @@ -EventCallback | libp2p

    Interface EventCallback<EventType>

    interface EventCallback ((evt) => void)

    Type Parameters

    • EventType

    Generated using TypeDoc

    \ No newline at end of file +EventCallback | libp2p

    Interface EventCallback<EventType>

    interface EventCallback ((evt) => void)

    Type Parameters

    • EventType

    Generated using TypeDoc

    \ No newline at end of file diff --git a/interfaces/_libp2p_interface.events.EventObject.html b/interfaces/_libp2p_interface.events.EventObject.html index daae4a4685..ac5b1b66e2 100644 --- a/interfaces/_libp2p_interface.events.EventObject.html +++ b/interfaces/_libp2p_interface.events.EventObject.html @@ -1,2 +1,2 @@ -EventObject | libp2p

    Interface EventObject<EventType>

    interface EventObject {
        handleEvent: EventCallback<EventType>;
    }

    Type Parameters

    • EventType

    Properties

    Properties

    handleEvent: EventCallback<EventType>

    Generated using TypeDoc

    \ No newline at end of file +EventObject | libp2p

    Interface EventObject<EventType>

    interface EventObject {
        handleEvent: EventCallback<EventType>;
    }

    Type Parameters

    • EventType

    Properties

    Properties

    handleEvent: EventCallback<EventType>

    Generated using TypeDoc

    \ No newline at end of file diff --git a/interfaces/_libp2p_interface.events.TypedEventTarget.html b/interfaces/_libp2p_interface.events.TypedEventTarget.html index c593205393..4192de402c 100644 --- a/interfaces/_libp2p_interface.events.TypedEventTarget.html +++ b/interfaces/_libp2p_interface.events.TypedEventTarget.html @@ -3,13 +3,13 @@ https://github.com/microsoft/TypeScript/issues/43477 https://github.com/microsoft/TypeScript/issues/299 etc

    -
    interface TypedEventTarget {
        addEventListener<K>(type, listener, options?): void;
        dispatchEvent(event): boolean;
        dispatchEvent(event): boolean;
        listenerCount(type): number;
        removeEventListener<K>(type, listener?, options?): void;
        removeEventListener(type, listener?, options?): void;
        safeDispatchEvent<Detail>(type, detail): boolean;
    }

    Type Parameters

    Hierarchy

    Implemented by

    Methods

    interface TypedEventTarget {
        addEventListener<K>(type, listener, options?): void;
        dispatchEvent(event): boolean;
        dispatchEvent(event): boolean;
        listenerCount(type): number;
        removeEventListener<K>(type, listener?, options?): void;
        removeEventListener(type, listener?, options?): void;
        safeDispatchEvent<Detail>(type, detail): boolean;
    }

    Type Parameters

    • EventMap extends Record<string, any>

    Hierarchy

    Implemented by

    Methods

    • Type Parameters

      • K extends string | number | symbol

      Parameters

      • type: K
      • listener: null | EventHandler<EventMap[K]>
      • Optional options: boolean | AddEventListenerOptions

      Returns void

    • Dispatches a synthetic event event to target and returns true if either event's cancelable attribute value is false or its preventDefault() method was not invoked, and false otherwise.

      +

    Methods

    Generated using TypeDoc

    \ No newline at end of file +

    Parameters

    Returns boolean

    Generated using TypeDoc

    \ No newline at end of file diff --git a/interfaces/_libp2p_interface.index.AbortOptions.html b/interfaces/_libp2p_interface.index.AbortOptions.html index 0590f178b9..c4186ca1e5 100644 --- a/interfaces/_libp2p_interface.index.AbortOptions.html +++ b/interfaces/_libp2p_interface.index.AbortOptions.html @@ -2,5 +2,5 @@ the optional signal property.

    Example

    const controller = new AbortController()

    aLongRunningOperation({
    signal: controller.signal
    })

    // later

    controller.abort()
    -
    interface AbortOptions {
        signal?: AbortSignal;
    }

    Hierarchy

    Properties

    Properties

    signal?: AbortSignal

    Generated using TypeDoc

    \ No newline at end of file +
    interface AbortOptions {
        signal?: AbortSignal;
    }

    Hierarchy

    Properties

    Properties

    signal?: AbortSignal

    Generated using TypeDoc

    \ No newline at end of file diff --git a/interfaces/_libp2p_interface.index.AddressSorter.html b/interfaces/_libp2p_interface.index.AddressSorter.html index fbbbd6920d..fe53ebb620 100644 --- a/interfaces/_libp2p_interface.index.AddressSorter.html +++ b/interfaces/_libp2p_interface.index.AddressSorter.html @@ -1,2 +1,2 @@ AddressSorter | libp2p

    Used by the connection manager to sort addresses into order before dialling

    -
    interface AddressSorter ((a, b) => 0 | 1 | -1)

    Generated using TypeDoc

    \ No newline at end of file +
    interface AddressSorter ((a, b) => 0 | 1 | -1)

    Generated using TypeDoc

    \ No newline at end of file diff --git a/interfaces/_libp2p_interface.index.ComponentLogger.html b/interfaces/_libp2p_interface.index.ComponentLogger.html index f62509a618..413657b208 100644 --- a/interfaces/_libp2p_interface.index.ComponentLogger.html +++ b/interfaces/_libp2p_interface.index.ComponentLogger.html @@ -1,3 +1,3 @@ ComponentLogger | libp2p

    Peer logger component for libp2p

    -
    interface ComponentLogger {
        forComponent(name): Logger;
    }

    Methods

    Methods

    Generated using TypeDoc

    \ No newline at end of file +
    interface ComponentLogger {
        forComponent(name): Logger;
    }

    Methods

    Methods

    Generated using TypeDoc

    \ No newline at end of file diff --git a/interfaces/_libp2p_interface.index.IdentifyResult.html b/interfaces/_libp2p_interface.index.IdentifyResult.html index bc98893574..c5383bb430 100644 --- a/interfaces/_libp2p_interface.index.IdentifyResult.html +++ b/interfaces/_libp2p_interface.index.IdentifyResult.html @@ -1,5 +1,5 @@ IdentifyResult | libp2p

    Data returned from a successful identify response

    -
    interface IdentifyResult {
        agentVersion?: string;
        connection: Connection;
        listenAddrs: Multiaddr[];
        observedAddr?: Multiaddr;
        peerId: PeerId;
        protocolVersion?: string;
        protocols: string[];
        publicKey?: Uint8Array;
        signedPeerRecord?: SignedPeerRecord;
    }

    Properties

    interface IdentifyResult {
        agentVersion?: string;
        connection: Connection;
        listenAddrs: Multiaddr[];
        observedAddr?: Multiaddr;
        peerId: PeerId;
        protocolVersion?: string;
        protocols: string[];
        publicKey?: Uint8Array;
        signedPeerRecord?: SignedPeerRecord;
    }

    Properties

    agentVersion?: string

    The remote agent version

    -
    connection: Connection

    The connection that the identify protocol ran over

    -
    listenAddrs: Multiaddr[]

    The unsigned addresses they are listening on. Note - any multiaddrs present +

    connection: Connection

    The connection that the identify protocol ran over

    +
    listenAddrs: Multiaddr[]

    The unsigned addresses they are listening on. Note - any multiaddrs present in the signed peer record should be preferred to the value here.

    -
    observedAddr?: Multiaddr

    If set this is the address that the remote peer saw the identify request +

    observedAddr?: Multiaddr

    If set this is the address that the remote peer saw the identify request originate from

    -
    peerId: PeerId

    The remote Peer's PeerId

    -
    protocolVersion?: string

    The remote protocol version

    -
    protocols: string[]

    The protocols the remote peer supports

    -
    publicKey?: Uint8Array

    The public key part of the remote PeerId - this is only useful for older +

    peerId: PeerId

    The remote Peer's PeerId

    +
    protocolVersion?: string

    The remote protocol version

    +
    protocols: string[]

    The protocols the remote peer supports

    +
    publicKey?: Uint8Array

    The public key part of the remote PeerId - this is only useful for older RSA-based PeerIds, the more modern Ed25519 and secp256k1 types have the public key embedded in them

    -
    signedPeerRecord?: SignedPeerRecord

    If sent by the remote peer this is the deserialized signed peer record

    -

    Generated using TypeDoc

    \ No newline at end of file +
    signedPeerRecord?: SignedPeerRecord

    If sent by the remote peer this is the deserialized signed peer record

    +

    Generated using TypeDoc

    \ No newline at end of file diff --git a/interfaces/_libp2p_interface.index.Libp2p.html b/interfaces/_libp2p_interface.index.Libp2p.html index f7666b5032..24809ba6c8 100644 --- a/interfaces/_libp2p_interface.index.Libp2p.html +++ b/interfaces/_libp2p_interface.index.Libp2p.html @@ -1,5 +1,5 @@ Libp2p | libp2p

    Libp2p nodes implement this interface.

    -
    interface Libp2p {
        contentRouting: ContentRouting;
        logger: ComponentLogger;
        metrics?: Metrics;
        peerId: PeerId;
        peerRouting: PeerRouting;
        peerStore: PeerStore;
        services: T;
        status: Libp2pStatus;
        addEventListener<K>(type, listener, options?): void;
        afterStart?(): void | Promise<void>;
        afterStop?(): void | Promise<void>;
        beforeStart?(): void | Promise<void>;
        beforeStop?(): void | Promise<void>;
        dial(peer, options?): Promise<Connection>;
        dialProtocol(peer, protocols, options?): Promise<Stream>;
        dispatchEvent(event): boolean;
        dispatchEvent(event): boolean;
        getConnections(peerId?): Connection[];
        getDialQueue(): PendingDial[];
        getMultiaddrs(): Multiaddr[];
        getPeers(): PeerId[];
        getProtocols(): string[];
        getPublicKey(peer, options?): Promise<Uint8Array>;
        handle(protocol, handler, options?): Promise<void>;
        hangUp(peer, options?): Promise<void>;
        listenerCount(type): number;
        register(protocol, topology): Promise<string>;
        removeEventListener<K>(type, listener?, options?): void;
        removeEventListener(type, listener?, options?): void;
        safeDispatchEvent<Detail>(type, detail): boolean;
        start(): void | Promise<void>;
        stop(): void | Promise<void>;
        unhandle(protocols): Promise<void>;
        unregister(id): void;
    }

    Type Parameters

    Hierarchy

    Properties

    interface Libp2p {
        contentRouting: ContentRouting;
        logger: ComponentLogger;
        metrics?: Metrics;
        peerId: PeerId;
        peerRouting: PeerRouting;
        peerStore: PeerStore;
        services: T;
        status: Libp2pStatus;
        addEventListener<K>(type, listener, options?): void;
        afterStart?(): void | Promise<void>;
        afterStop?(): void | Promise<void>;
        beforeStart?(): void | Promise<void>;
        beforeStop?(): void | Promise<void>;
        dial(peer, options?): Promise<Connection>;
        dialProtocol(peer, protocols, options?): Promise<Stream>;
        dispatchEvent(event): boolean;
        dispatchEvent(event): boolean;
        getConnections(peerId?): Connection[];
        getDialQueue(): PendingDial[];
        getMultiaddrs(): Multiaddr[];
        getPeers(): PeerId[];
        getProtocols(): string[];
        getPublicKey(peer, options?): Promise<Uint8Array>;
        handle(protocol, handler, options?): Promise<void>;
        hangUp(peer, options?): Promise<void>;
        listenerCount(type): number;
        register(protocol, topology): Promise<string>;
        removeEventListener<K>(type, listener?, options?): void;
        removeEventListener(type, listener?, options?): void;
        safeDispatchEvent<Detail>(type, detail): boolean;
        start(): void | Promise<void>;
        stop(): void | Promise<void>;
        unhandle(protocols): Promise<void>;
        unregister(id): void;
    }

    Type Parameters

    Hierarchy

    Properties

    contentRouting logger metrics? peerId @@ -36,49 +36,49 @@ the DHT.

    Example

    for await (const peerInfo of libp2p.contentRouting.findProviders(cid)) {
    console.info(peerInfo)
    // { id: PeerId(12D3Foo...), multiaddrs: [] ... }
    }
    -

    The logger used by this libp2p node

    -
    metrics?: Metrics

    The metrics subsystem allows recording values to assess the health/performance +

    The logger used by this libp2p node

    +
    metrics?: Metrics

    The metrics subsystem allows recording values to assess the health/performance of the running node.

    Example

    const metric = libp2p.metrics.registerMetric({
    'my-metric'
    })

    // later
    metric.update(5)
    -
    peerId: PeerId

    The PeerId is a unique identifier for a node on the network.

    +
    peerId: PeerId

    The PeerId is a unique identifier for a node on the network.

    It is the hash of an RSA public key or, for Ed25519 or secp256k1 keys, the key itself.

    Example

    console.info(libp2p.peerId)
    // PeerId(12D3Foo...)
    -
    peerRouting: PeerRouting

    The peer routing subsystem allows the user to find peers on the network +

    peerRouting: PeerRouting

    The peer routing subsystem allows the user to find peers on the network or to find peers close to binary keys.

    Example

    const peerInfo = await libp2p.peerRouting.findPeer(peerId)
    console.info(peerInfo)
    // { id: PeerId(12D3Foo...), multiaddrs: [] ... }

    Example

    for await (const peerInfo of libp2p.peerRouting.getClosestPeers(key)) {
    console.info(peerInfo)
    // { id: PeerId(12D3Foo...), multiaddrs: [] ... }
    }
    -
    peerStore: PeerStore

    The peer store holds information we know about other peers on the network.

    +
    peerStore: PeerStore

    The peer store holds information we know about other peers on the network.

    • multiaddrs, supported protocols, etc.

    Example

    const peer = await libp2p.peerStore.get(peerId)
    console.info(peer)
    // { id: PeerId(12D3Foo...), addresses: [] ... }
    -
    services: T

    A set of user defined services

    -
    status: Libp2pStatus

    The current status of the libp2p node

    -

    Methods

    services: T

    A set of user defined services

    +
    status: Libp2pStatus

    The current status of the libp2p node

    +

    Methods

    • Dials to the provided peer. If successful, the known metadata of the peer will be added to the nodes peerStore.

      If a PeerId is passed as the first argument, the peer will need to have known multiaddrs for it in the PeerStore.

      Parameters

      Returns Promise<Connection>

      Example

      const conn = await libp2p.dial(remotePeerId)

      // create a new stream within the connection
      const { stream, protocol } = await conn.newStream(['/echo/1.1.0', '/echo/1.0.0'])

      // protocol negotiated: 'echo/1.0.0' means that the other party only supports the older version

      // ...
      await conn.close()
      -
    • Dials to the provided peer and tries to handshake with the given protocols in order. If successful, the known metadata of the peer will be added to the nodes peerStore, and the MuxedStream will be returned together with the successful negotiated protocol.

      Parameters

      Returns Promise<Stream>

      Example

      import { pipe } from 'it-pipe'

      const { stream, protocol } = await libp2p.dialProtocol(remotePeerId, protocols)

      // Use this new stream like any other duplex stream
      pipe([1, 2, 3], stream, consume)
      -
    • Dispatches a synthetic event event to target and returns true if either event's cancelable attribute value is false or its preventDefault() method was not invoked, and false otherwise.

      +
    • Dispatches a synthetic event event to target and returns true if either event's cancelable attribute value is false or its preventDefault() method was not invoked, and false otherwise.

      MDN Reference

      Parameters

      Returns boolean

    • Dispatches a synthetic event event to target and returns true if either event's cancelable attribute value is false or its preventDefault() method was not invoked, and false otherwise.

      MDN Reference

      @@ -86,48 +86,48 @@

      Example

      for
       

      Parameters

      Returns Connection[]

      Example

      for (const connection of libp2p.getConnections()) {
      console.log(peerId, connection.remoteAddr.toString())
      // Logs the PeerId string and the observed remote multiaddr of each Connection
      }
      -
    • Get a deduplicated list of peer advertising multiaddrs by concatenating the listen addresses used by transports with any configured announce addresses as well as observed addresses reported by peers.

      If Announce addrs are specified, configured listen addresses will be ignored though observed addresses will still be included.

      Returns Multiaddr[]

      Example

      const listenMa = libp2p.getMultiaddrs()
      // [ <Multiaddr 047f00000106f9ba - /ip4/127.0.0.1/tcp/63930> ]
      -
    • Returns a list of supported protocols

      Returns string[]

      Example

      const protocols = libp2p.getProtocols()
      // [ '/ipfs/ping/1.0.0', '/ipfs/id/1.0.0' ]
      -
    • Sets up multistream-select routing of protocols to their application handlers. Whenever a stream is opened on one of the provided protocols, the handler will be called. handle must be called in order to register a handler and support for a given protocol. This also informs other peers of the protocols you support.

      libp2p.handle(protocols, handler, options)

      In the event of a new handler for the same protocol being added, the first one is discarded.

      Parameters

      Returns Promise<void>

      Example

      const handler = ({ connection, stream, protocol }) => {
      // use stream or connection according to the needs
      }

      libp2p.handle('/echo/1.0.0', handler, {
      maxInboundStreams: 5,
      maxOutboundStreams: 5
      })
      -
    • Attempts to gracefully close an open connection to the given peer. If the connection is not closed in the grace period, it will be forcefully closed.

      An AbortSignal can optionally be passed to control when the connection is forcefully closed.

      Parameters

      Returns Promise<void>

      Example

      await libp2p.hangUp(remotePeerId)
       
      -
    • Register a topology to be informed when peers are encountered that support the specified protocol

      Parameters

      Returns Promise<string>

      Example

      const id = await libp2p.register('/echo/1.0.0', {
      onConnect: (peer, connection) => {
      // handle connect
      },
      onDisconnect: (peer, connection) => {
      // handle disconnect
      }
      })
      -
    • Removes the handler for each protocol. The protocol will no longer be supported on streams.

      Parameters

      • protocols: string | string[]

      Returns Promise<void>

      Example

      libp2p.unhandle(['/echo/1.0.0'])
       
      -
    • Unregister topology to no longer be informed when peers connect or disconnect.

      Parameters

      • id: string

      Returns void

      Example

      const id = await libp2p.register(...)

      libp2p.unregister(id)
      -

    Generated using TypeDoc

    \ No newline at end of file +

    Generated using TypeDoc

    \ No newline at end of file diff --git a/interfaces/_libp2p_interface.index.Libp2pEvents.html b/interfaces/_libp2p_interface.index.Libp2pEvents.html index 0906249284..f92b7df9d8 100644 --- a/interfaces/_libp2p_interface.index.Libp2pEvents.html +++ b/interfaces/_libp2p_interface.index.Libp2pEvents.html @@ -2,7 +2,7 @@ so that you can be notified of relevant network events.

    Event names are noun:verb so the first part is the name of the object being acted on and the second is the action.

    -
    interface Libp2pEvents {
        connection:close: CustomEvent<Connection>;
        connection:open: CustomEvent<Connection>;
        connection:prune: CustomEvent<Connection[]>;
        peer:connect: CustomEvent<PeerId>;
        peer:disconnect: CustomEvent<PeerId>;
        peer:discovery: CustomEvent<PeerInfo>;
        peer:identify: CustomEvent<IdentifyResult>;
        peer:update: CustomEvent<PeerUpdate>;
        self:peer:update: CustomEvent<PeerUpdate>;
        start: CustomEvent<Libp2p<T>>;
        stop: CustomEvent<Libp2p<T>>;
        transport:close: CustomEvent<Listener>;
        transport:listening: CustomEvent<Listener>;
    }

    Type Parameters

    Properties

    Type Parameters

    Properties

    connection:close: CustomEvent<Connection>

    This event notifies listeners when incoming or outgoing connections are closed.

    -
    connection:open: CustomEvent<Connection>

    This event notifies listeners when new incoming or outgoing connections +

    connection:open: CustomEvent<Connection>

    This event notifies listeners when new incoming or outgoing connections are opened.

    -
    connection:prune: CustomEvent<Connection[]>

    This event is dispatched when the connection manager has more than the +

    connection:prune: CustomEvent<Connection[]>

    This event is dispatched when the connection manager has more than the configured allowable max connections and has closed some connections to bring the node back under the limit.

    -
    peer:connect: CustomEvent<PeerId>

    This event will be triggered any time a new peer connects.

    +
    peer:connect: CustomEvent<PeerId>

    This event will be triggered any time a new peer connects.

    Example

    libp2p.addEventListener('peer:connect', (event) => {
    const peerId = event.detail
    // ...
    })
    -
    peer:disconnect: CustomEvent<PeerId>

    This event will be triggered any time we are disconnected from another peer, regardless of +

    peer:disconnect: CustomEvent<PeerId>

    This event will be triggered any time we are disconnected from another peer, regardless of the circumstances of that disconnection. If we happen to have multiple connections to a peer, this event will only be triggered when the last connection is closed.

    Example

    libp2p.addEventListener('peer:disconnect', (event) => {
    const peerId = event.detail
    // ...
    })
    -
    peer:discovery: CustomEvent<PeerInfo>

    This event is dispatched when a new network peer is discovered.

    +
    peer:discovery: CustomEvent<PeerInfo>

    This event is dispatched when a new network peer is discovered.

    Example

    libp2p.addEventListener('peer:discovery', (event) => {
    const peerInfo = event.detail
    // ...
    })
    -
    peer:identify: CustomEvent<IdentifyResult>

    This event is dispatched after a remote peer has successfully responded to the identify +

    peer:identify: CustomEvent<IdentifyResult>

    This event is dispatched after a remote peer has successfully responded to the identify protocol. Note that for this to be emitted, both peers must have an identify service configured.

    Example

    libp2p.addEventListener('peer:identify', (event) => {
    const identifyResult = event.detail
    // ...
    })
    -
    peer:update: CustomEvent<PeerUpdate>

    This event is dispatched when the peer store data for a peer has been +

    peer:update: CustomEvent<PeerUpdate>

    This event is dispatched when the peer store data for a peer has been updated - e.g. their multiaddrs, protocols etc have changed.

    If they were previously known to this node, the old peer data will be set in the previous field.

    This may be in response to the identify protocol running, a manual update or some other event.

    -
    self:peer:update: CustomEvent<PeerUpdate>

    This event is dispatched when the current node's peer record changes - +

    self:peer:update: CustomEvent<PeerUpdate>

    This event is dispatched when the current node's peer record changes - for example a transport started listening on a new address or a new protocol handler was registered.

    Example

    libp2p.addEventListener('self:peer:update', (event) => {
    const { peer } = event.detail
    // ...
    })
    -
    start: CustomEvent<Libp2p<T>>

    This event notifies listeners that the node has started

    +
    start: CustomEvent<Libp2p<T>>

    This event notifies listeners that the node has started

    libp2p.addEventListener('start', (event) => {
    console.info(libp2p.isStarted()) // true
    })
    -

    This event notifies listeners that the node has stopped

    +

    This event notifies listeners that the node has stopped

    libp2p.addEventListener('stop', (event) => {
    console.info(libp2p.isStarted()) // false
    })
    -
    transport:close: CustomEvent<Listener>

    This event is dispatched when a transport stops listening on an address

    -
    transport:listening: CustomEvent<Listener>

    This event is dispatched when a transport begins listening on a new address

    -

    Generated using TypeDoc

    \ No newline at end of file +
    transport:close: CustomEvent<Listener>

    This event is dispatched when a transport stops listening on an address

    +
    transport:listening: CustomEvent<Listener>

    This event is dispatched when a transport begins listening on a new address

    +

    Generated using TypeDoc

    \ No newline at end of file diff --git a/interfaces/_libp2p_interface.index.Logger.html b/interfaces/_libp2p_interface.index.Logger.html index 9e2bd6317b..549a2d9edb 100644 --- a/interfaces/_libp2p_interface.index.Logger.html +++ b/interfaces/_libp2p_interface.index.Logger.html @@ -1,5 +1,5 @@ Logger | libp2p

    Logger component for libp2p

    -
    interface Logger {
        enabled: boolean;
        error(formatter, ...args): void;
        trace(formatter, ...args): void;
        (formatter, ...args): void;
    }

    Properties

    interface Logger {
        enabled: boolean;
        error(formatter, ...args): void;
        trace(formatter, ...args): void;
        (formatter, ...args): void;
    }

    Properties

    Methods

    Properties

    enabled: boolean

    Methods

    Generated using TypeDoc

    \ No newline at end of file +

    Properties

    enabled: boolean

    Methods

    Generated using TypeDoc

    \ No newline at end of file diff --git a/interfaces/_libp2p_interface.index.LoggerOptions.html b/interfaces/_libp2p_interface.index.LoggerOptions.html index bf59f3b96f..a1fcd846f2 100644 --- a/interfaces/_libp2p_interface.index.LoggerOptions.html +++ b/interfaces/_libp2p_interface.index.LoggerOptions.html @@ -1,3 +1,3 @@ LoggerOptions | libp2p

    An object that contains a Logger as the log property.

    -
    interface LoggerOptions {
        log: Logger;
    }

    Hierarchy

    • LoggerOptions

      Properties

      log -

      Properties

      log: Logger

      Generated using TypeDoc

      \ No newline at end of file +
      interface LoggerOptions {
          log: Logger;
      }

      Hierarchy

      Properties

      log +

      Properties

      log: Logger

      Generated using TypeDoc

      \ No newline at end of file diff --git a/interfaces/_libp2p_interface.index.NodeInfo.html b/interfaces/_libp2p_interface.index.NodeInfo.html index 7b6bf51173..954c31dda9 100644 --- a/interfaces/_libp2p_interface.index.NodeInfo.html +++ b/interfaces/_libp2p_interface.index.NodeInfo.html @@ -1,6 +1,6 @@ NodeInfo | libp2p

      Metadata about the current node

      -
      interface NodeInfo {
          name: string;
          version: string;
      }

      Properties

      interface NodeInfo {
          name: string;
          version: string;
      }

      Properties

      Properties

      name: string

      The implementation name

      -
      version: string

      The implementation version

      -

      Generated using TypeDoc

      \ No newline at end of file +
      version: string

      The implementation version

      +

      Generated using TypeDoc

      \ No newline at end of file diff --git a/interfaces/_libp2p_interface.index.PeerUpdate.html b/interfaces/_libp2p_interface.index.PeerUpdate.html index 0aaa95d599..e59c241e3b 100644 --- a/interfaces/_libp2p_interface.index.PeerUpdate.html +++ b/interfaces/_libp2p_interface.index.PeerUpdate.html @@ -1,4 +1,4 @@ PeerUpdate | libp2p

      Generated using TypeDoc

      \ No newline at end of file +

      Properties

      peer: Peer
      previous?: Peer

      Generated using TypeDoc

      \ No newline at end of file diff --git a/interfaces/_libp2p_interface.index.PendingDial.html b/interfaces/_libp2p_interface.index.PendingDial.html index fb400fbd09..857271ac58 100644 --- a/interfaces/_libp2p_interface.index.PendingDial.html +++ b/interfaces/_libp2p_interface.index.PendingDial.html @@ -1,12 +1,12 @@ PendingDial | libp2p

      An item in the dial queue

      -
      interface PendingDial {
          id: string;
          multiaddrs: Multiaddr[];
          peerId?: PeerId;
          status: PendingDialStatus;
      }

      Properties

      id +
      interface PendingDial {
          id: string;
          multiaddrs: Multiaddr[];
          peerId?: PeerId;
          status: PendingDialStatus;
      }

      Properties

      id: string

      A unique identifier for this dial

      -
      multiaddrs: Multiaddr[]

      The list of multiaddrs that will be dialled. The returned connection will +

      multiaddrs: Multiaddr[]

      The list of multiaddrs that will be dialled. The returned connection will use the first address that succeeds, all other dials part of this pending dial will be cancelled.

      -
      peerId?: PeerId

      If known, this is the peer id that libp2p expects to be dialling

      -

      The current status of the dial

      -

      Generated using TypeDoc

      \ No newline at end of file +
      peerId?: PeerId

      If known, this is the peer id that libp2p expects to be dialling

      +

      The current status of the dial

      +

      Generated using TypeDoc

      \ No newline at end of file diff --git a/interfaces/_libp2p_interface.index.SignedPeerRecord.html b/interfaces/_libp2p_interface.index.SignedPeerRecord.html index 8963bdec8e..b646ecbaf8 100644 --- a/interfaces/_libp2p_interface.index.SignedPeerRecord.html +++ b/interfaces/_libp2p_interface.index.SignedPeerRecord.html @@ -1,4 +1,4 @@ SignedPeerRecord | libp2p

      Generated using TypeDoc

      \ No newline at end of file +

      Properties

      addresses: Multiaddr[]
      seq: bigint

      Generated using TypeDoc

      \ No newline at end of file diff --git a/interfaces/_libp2p_interface.index.Topology.html b/interfaces/_libp2p_interface.index.Topology.html index e335723fa7..026f0ee66b 100644 --- a/interfaces/_libp2p_interface.index.Topology.html +++ b/interfaces/_libp2p_interface.index.Topology.html @@ -1,10 +1,10 @@ -Topology | libp2p
      interface Topology {
          notifyOnTransient?: boolean;
          onConnect?(peerId, conn): void;
          onDisconnect?(peerId): void;
      }

      Properties

      notifyOnTransient? +Topology | libp2p
      interface Topology {
          notifyOnTransient?: boolean;
          onConnect?(peerId, conn): void;
          onDisconnect?(peerId): void;
      }

      Properties

      notifyOnTransient?: boolean

      If true, invoke onConnect for this topology on transient (e.g. short-lived and/or data-limited) connections. (default: false)

      -

      Methods

      Methods

      Generated using TypeDoc

      \ No newline at end of file +

      Parameters

      Returns void

      Generated using TypeDoc

      \ No newline at end of file diff --git a/interfaces/_libp2p_interface.keys.PrivateKey.html b/interfaces/_libp2p_interface.keys.PrivateKey.html index ff91f6260d..0e0fa20355 100644 --- a/interfaces/_libp2p_interface.keys.PrivateKey.html +++ b/interfaces/_libp2p_interface.keys.PrivateKey.html @@ -1,5 +1,5 @@ PrivateKey | libp2p

      Generic private key interface

      -
      interface PrivateKey {
          bytes: Uint8Array;
          public: PublicKey;
          equals(key): boolean;
          export(password, format?): Promise<string>;
          hash(): Uint8Array | Promise<Uint8Array>;
          id(): Promise<string>;
          marshal(): Uint8Array;
          sign(data): Uint8Array | Promise<Uint8Array>;
      }

      Properties

      interface PrivateKey {
          bytes: Uint8Array;
          public: PublicKey;
          equals(key): boolean;
          export(password, format?): Promise<string>;
          hash(): Uint8Array | Promise<Uint8Array>;
          id(): Promise<string>;
          marshal(): Uint8Array;
          sign(data): Uint8Array | Promise<Uint8Array>;
      }

      Properties

      Methods

      equals export @@ -7,9 +7,9 @@ id marshal sign -

      Properties

      bytes: Uint8Array
      public: PublicKey

      Methods

      • Gets the ID of the key.

        +

      Properties

      bytes: Uint8Array
      public: PublicKey

      Methods

      • Gets the ID of the key.

        The key id is the base58 encoding of the SHA-256 multihash of its public key. The public key is a protobuf encoding containing a type and the DER encoding of the PKCS SubjectPublicKeyInfo.

        -

        Returns Promise<string>

      Generated using TypeDoc

      \ No newline at end of file +

      Returns Promise<string>

      Generated using TypeDoc

      \ No newline at end of file diff --git a/interfaces/_libp2p_interface.keys.PublicKey.html b/interfaces/_libp2p_interface.keys.PublicKey.html index 067893e28e..faa693c022 100644 --- a/interfaces/_libp2p_interface.keys.PublicKey.html +++ b/interfaces/_libp2p_interface.keys.PublicKey.html @@ -1,6 +1,6 @@ -PublicKey | libp2p
      interface PublicKey {
          bytes: Uint8Array;
          equals(key): boolean;
          hash(): Uint8Array | Promise<Uint8Array>;
          marshal(): Uint8Array;
          verify(data, sig): boolean | Promise<boolean>;
      }

      Properties

      bytes +PublicKey | libp2p
      interface PublicKey {
          bytes: Uint8Array;
          equals(key): boolean;
          hash(): Uint8Array | Promise<Uint8Array>;
          marshal(): Uint8Array;
          verify(data, sig): boolean | Promise<boolean>;
      }

      Properties

      Methods

      Properties

      bytes: Uint8Array

      Methods

      Generated using TypeDoc

      \ No newline at end of file +

      Properties

      bytes: Uint8Array

      Methods

      Generated using TypeDoc

      \ No newline at end of file diff --git a/interfaces/_libp2p_interface.metrics.CalculatedMetricOptions.html b/interfaces/_libp2p_interface.metrics.CalculatedMetricOptions.html index 9dc2cdf823..85a4cf5215 100644 --- a/interfaces/_libp2p_interface.metrics.CalculatedMetricOptions.html +++ b/interfaces/_libp2p_interface.metrics.CalculatedMetricOptions.html @@ -1,10 +1,10 @@ CalculatedMetricOptions | libp2p

      Interface CalculatedMetricOptions<T>

      Create tracked metrics that are expensive to calculate by passing a function that is only invoked when metrics are being scraped

      -
      interface CalculatedMetricOptions {
          calculate: CalculateMetric<T>;
          help?: string;
          label?: string;
      }

      Type Parameters

      • T = number

      Hierarchy

      Properties

      interface CalculatedMetricOptions {
          calculate: CalculateMetric<T>;
          help?: string;
          label?: string;
      }

      Type Parameters

      • T = number

      Hierarchy

      Properties

      calculate: CalculateMetric<T>

      An optional function invoked to calculate the component metric instead of using .update, .increment, and .decrement

      -
      help?: string

      Optional help for the metric

      -
      label?: string

      Optional label for the metric

      -

      Generated using TypeDoc

      \ No newline at end of file +
      help?: string

      Optional help for the metric

      +
      label?: string

      Optional label for the metric

      +

      Generated using TypeDoc

      \ No newline at end of file diff --git a/interfaces/_libp2p_interface.metrics.Counter.html b/interfaces/_libp2p_interface.metrics.Counter.html index 7d4eac17ff..d1e7ed82f2 100644 --- a/interfaces/_libp2p_interface.metrics.Counter.html +++ b/interfaces/_libp2p_interface.metrics.Counter.html @@ -1,7 +1,7 @@ Counter | libp2p

      A tracked counter loosely based on the Counter interface exposed by the prom-client module - counters are metrics that only go up

      -
      interface Counter {
          increment(value?): void;
          reset(): void;
      }

      Methods

      interface Counter {
          increment(value?): void;
          reset(): void;
      }

      Methods

      Generated using TypeDoc

      \ No newline at end of file +

      Parameters

      Returns void

      Generated using TypeDoc

      \ No newline at end of file diff --git a/interfaces/_libp2p_interface.metrics.CounterGroup.html b/interfaces/_libp2p_interface.metrics.CounterGroup.html index 302688495d..977c2ef090 100644 --- a/interfaces/_libp2p_interface.metrics.CounterGroup.html +++ b/interfaces/_libp2p_interface.metrics.CounterGroup.html @@ -1,10 +1,10 @@ CounterGroup | libp2p

      A group of tracked counters loosely based on the Counter interface exposed by the prom-client module - counters are metrics that only go up

      -
      interface CounterGroup {
          increment(values): void;
          reset(): void;
      }

      Methods

      interface CounterGroup {
          increment(values): void;
          reset(): void;
      }

      Methods

      Generated using TypeDoc

      \ No newline at end of file +

      Returns void

      Generated using TypeDoc

      \ No newline at end of file diff --git a/interfaces/_libp2p_interface.metrics.Metric.html b/interfaces/_libp2p_interface.metrics.Metric.html index e58b60f3c5..eb89903bb9 100644 --- a/interfaces/_libp2p_interface.metrics.Metric.html +++ b/interfaces/_libp2p_interface.metrics.Metric.html @@ -1,14 +1,14 @@ Metric | libp2p

      A tracked metric loosely based on the interfaces exposed by the prom-client module

      -
      interface Metric {
          decrement(value?): void;
          increment(value?): void;
          reset(): void;
          timer(): StopTimer;
          update(value): void;
      }

      Methods

      interface Metric {
          decrement(value?): void;
          increment(value?): void;
          reset(): void;
          timer(): StopTimer;
          update(value): void;
      }

      Methods

      Generated using TypeDoc

      \ No newline at end of file +

      Returns StopTimer

      Generated using TypeDoc

      \ No newline at end of file diff --git a/interfaces/_libp2p_interface.metrics.MetricGroup.html b/interfaces/_libp2p_interface.metrics.MetricGroup.html index 873fc6a2c2..30b3c11250 100644 --- a/interfaces/_libp2p_interface.metrics.MetricGroup.html +++ b/interfaces/_libp2p_interface.metrics.MetricGroup.html @@ -1,17 +1,17 @@ MetricGroup | libp2p

      A group of related metrics loosely based on the interfaces exposed by the prom-client module

      -
      interface MetricGroup {
          decrement(values): void;
          increment(values): void;
          reset(): void;
          timer(key): StopTimer;
          update(values): void;
      }

      Methods

      interface MetricGroup {
          decrement(values): void;
          increment(values): void;
          reset(): void;
          timer(key): StopTimer;
          update(values): void;
      }

      Methods

      Generated using TypeDoc

      \ No newline at end of file +

      Parameters

      Returns StopTimer

      Generated using TypeDoc

      \ No newline at end of file diff --git a/interfaces/_libp2p_interface.metrics.MetricOptions.html b/interfaces/_libp2p_interface.metrics.MetricOptions.html index 11b50154e9..d5feb433dc 100644 --- a/interfaces/_libp2p_interface.metrics.MetricOptions.html +++ b/interfaces/_libp2p_interface.metrics.MetricOptions.html @@ -1,7 +1,7 @@ MetricOptions | libp2p

      Create tracked metrics with these options. Loosely based on the interfaces exposed by the prom-client module

      -
      interface MetricOptions {
          help?: string;
          label?: string;
      }

      Hierarchy

      Properties

      interface MetricOptions {
          help?: string;
          label?: string;
      }

      Hierarchy

      Properties

      Properties

      help?: string

      Optional help for the metric

      -
      label?: string

      Optional label for the metric

      -

      Generated using TypeDoc

      \ No newline at end of file +
      label?: string

      Optional label for the metric

      +

      Generated using TypeDoc

      \ No newline at end of file diff --git a/interfaces/_libp2p_interface.metrics.Metrics.html b/interfaces/_libp2p_interface.metrics.Metrics.html index 18bce476b5..38cb89b659 100644 --- a/interfaces/_libp2p_interface.metrics.Metrics.html +++ b/interfaces/_libp2p_interface.metrics.Metrics.html @@ -1,7 +1,7 @@ Metrics | libp2p

      The libp2p metrics tracking object. This interface is only concerned with the collection of metrics, please see the individual implementations for how to extract metrics for viewing.

      -
      interface Metrics {
          registerCounter: ((name, options?) => Counter) & ((name, options) => void);
          registerCounterGroup: ((name, options?) => CounterGroup) & ((name, options) => void);
          registerMetric: ((name, options?) => Metric) & ((name, options) => void);
          registerMetricGroup: ((name, options?) => MetricGroup) & ((name, options) => void);
          trackMultiaddrConnection(maConn): void;
          trackProtocolStream(stream, connection): void;
      }

      Properties

      interface Metrics {
          registerCounter: ((name, options?) => Counter) & ((name, options) => void);
          registerCounterGroup: ((name, options?) => CounterGroup) & ((name, options) => void);
          registerMetric: ((name, options?) => Metric) & ((name, options) => void);
          registerMetricGroup: ((name, options?) => MetricGroup) & ((name, options) => void);
          trackMultiaddrConnection(maConn): void;
          trackProtocolStream(stream, connection): void;
      }

      Properties

      registerCounter: ((name, options?) => Counter) & ((name, options) => void)

      Register an arbitrary counter. Call this to set help/labels for counters and increment them by calling methods on the returned counter object

      -

      Type declaration

      Type declaration

      registerCounterGroup: ((name, options?) => CounterGroup) & ((name, options) => void)

      Register a a group of related counters. Call this to set help/labels for +

      Type declaration

      Type declaration

      registerCounterGroup: ((name, options?) => CounterGroup) & ((name, options) => void)

      Register a a group of related counters. Call this to set help/labels for groups of related counters that will be updated with by calling the .increment method on the returned counter group object

      -

      Type declaration

      Type declaration

      registerMetric: ((name, options?) => Metric) & ((name, options) => void)

      Register an arbitrary metric. Call this to set help/labels for metrics +

      Type declaration

      Type declaration

      registerMetric: ((name, options?) => Metric) & ((name, options) => void)

      Register an arbitrary metric. Call this to set help/labels for metrics and update/increment/decrement/etc them by calling methods on the returned metric object

      -

      Type declaration

      Type declaration

      registerMetricGroup: ((name, options?) => MetricGroup) & ((name, options) => void)

      Register a a group of related metrics. Call this to set help/labels for +

      Type declaration

      Type declaration

      registerMetricGroup: ((name, options?) => MetricGroup) & ((name, options) => void)

      Register a a group of related metrics. Call this to set help/labels for groups of related metrics that will be updated with by calling .update, .increment and/or .decrement methods on the returned metric group object

      -

      Type declaration

      Type declaration

      Methods

      Generated using TypeDoc

      \ No newline at end of file +

      Type declaration

      Type declaration

      Methods

      Generated using TypeDoc

      \ No newline at end of file diff --git a/interfaces/_libp2p_interface.metrics.StopTimer.html b/interfaces/_libp2p_interface.metrics.StopTimer.html index 6fc9fd49cc..cec0660716 100644 --- a/interfaces/_libp2p_interface.metrics.StopTimer.html +++ b/interfaces/_libp2p_interface.metrics.StopTimer.html @@ -1,3 +1,3 @@ StopTimer | libp2p

      Call this function to stop the timer returned from the .timer method on the metric

      -
      interface StopTimer (() => void)

      Generated using TypeDoc

      \ No newline at end of file +
      interface StopTimer (() => void)

      Generated using TypeDoc

      \ No newline at end of file diff --git a/interfaces/_libp2p_interface.peer_discovery.PeerDiscovery.html b/interfaces/_libp2p_interface.peer_discovery.PeerDiscovery.html index 794310efd7..62ccdd708e 100644 --- a/interfaces/_libp2p_interface.peer_discovery.PeerDiscovery.html +++ b/interfaces/_libp2p_interface.peer_discovery.PeerDiscovery.html @@ -3,13 +3,13 @@ https://github.com/microsoft/TypeScript/issues/43477 https://github.com/microsoft/TypeScript/issues/299 etc

      -
      interface PeerDiscovery {
          addEventListener<K>(type, listener, options?): void;
          dispatchEvent(event): boolean;
          dispatchEvent(event): boolean;
          listenerCount(type): number;
          removeEventListener<K>(type, listener?, options?): void;
          removeEventListener(type, listener?, options?): void;
          safeDispatchEvent<Detail>(type, detail): boolean;
      }

      Hierarchy

      Methods

      interface PeerDiscovery {
          addEventListener<K>(type, listener, options?): void;
          dispatchEvent(event): boolean;
          dispatchEvent(event): boolean;
          listenerCount(type): number;
          removeEventListener<K>(type, listener?, options?): void;
          removeEventListener(type, listener?, options?): void;
          safeDispatchEvent<Detail>(type, detail): boolean;
      }

      Hierarchy

      Methods

      • Dispatches a synthetic event event to target and returns true if either event's cancelable attribute value is false or its preventDefault() method was not invoked, and false otherwise.

        +

      Methods

      • Dispatches a synthetic event event to target and returns true if either event's cancelable attribute value is false or its preventDefault() method was not invoked, and false otherwise.

        MDN Reference

        Parameters

        Returns boolean

      • Dispatches a synthetic event event to target and returns true if either event's cancelable attribute value is false or its preventDefault() method was not invoked, and false otherwise.

        MDN Reference

        -

        Parameters

        Returns boolean

      Generated using TypeDoc

      \ No newline at end of file +

      Parameters

      Returns boolean

      Generated using TypeDoc

      \ No newline at end of file diff --git a/interfaces/_libp2p_interface.peer_discovery.PeerDiscoveryEvents.html b/interfaces/_libp2p_interface.peer_discovery.PeerDiscoveryEvents.html index 1ba422e32d..87cbb15479 100644 --- a/interfaces/_libp2p_interface.peer_discovery.PeerDiscoveryEvents.html +++ b/interfaces/_libp2p_interface.peer_discovery.PeerDiscoveryEvents.html @@ -1,2 +1,2 @@ -PeerDiscoveryEvents | libp2p
      interface PeerDiscoveryEvents {
          peer: CustomEvent<PeerInfo>;
      }

      Properties

      Properties

      Generated using TypeDoc

      \ No newline at end of file +PeerDiscoveryEvents | libp2p
      interface PeerDiscoveryEvents {
          peer: CustomEvent<PeerInfo>;
      }

      Properties

      Properties

      Generated using TypeDoc

      \ No newline at end of file diff --git a/interfaces/_libp2p_interface.peer_id.Ed25519PeerId.html b/interfaces/_libp2p_interface.peer_id.Ed25519PeerId.html index 106f39f682..00627f4e2f 100644 --- a/interfaces/_libp2p_interface.peer_id.Ed25519PeerId.html +++ b/interfaces/_libp2p_interface.peer_id.Ed25519PeerId.html @@ -1,4 +1,4 @@ -Ed25519PeerId | libp2p
      interface Ed25519PeerId {
          multihash: MultihashDigest<number>;
          privateKey?: Uint8Array;
          publicKey: Uint8Array;
          type: "Ed25519";
          equals(other): boolean;
          toBytes(): Uint8Array;
          toCID(): CID<unknown, number, number, Version>;
          toString(): string;
      }

      Hierarchy

      Properties

      multihash +Ed25519PeerId | libp2p
      interface Ed25519PeerId {
          multihash: MultihashDigest<number>;
          privateKey?: Uint8Array;
          publicKey: Uint8Array;
          type: "Ed25519";
          equals(other): boolean;
          toBytes(): Uint8Array;
          toCID(): CID<unknown, number, number, Version>;
          toString(): string;
      }

      Hierarchy

      Properties

      multihash: MultihashDigest<number>
      privateKey?: Uint8Array
      publicKey: Uint8Array
      type: "Ed25519"

      Methods

      Generated using TypeDoc

      \ No newline at end of file +

      Properties

      multihash: MultihashDigest<number>
      privateKey?: Uint8Array
      publicKey: Uint8Array
      type: "Ed25519"

      Methods

      Generated using TypeDoc

      \ No newline at end of file diff --git a/interfaces/_libp2p_interface.peer_id.RSAPeerId.html b/interfaces/_libp2p_interface.peer_id.RSAPeerId.html index cc53b7e598..cf394c5956 100644 --- a/interfaces/_libp2p_interface.peer_id.RSAPeerId.html +++ b/interfaces/_libp2p_interface.peer_id.RSAPeerId.html @@ -1,4 +1,4 @@ -RSAPeerId | libp2p
      interface RSAPeerId {
          multihash: MultihashDigest<number>;
          privateKey?: Uint8Array;
          publicKey?: Uint8Array;
          type: "RSA";
          equals(other): boolean;
          toBytes(): Uint8Array;
          toCID(): CID<unknown, number, number, Version>;
          toString(): string;
      }

      Hierarchy

      Properties

      multihash +RSAPeerId | libp2p
      interface RSAPeerId {
          multihash: MultihashDigest<number>;
          privateKey?: Uint8Array;
          publicKey?: Uint8Array;
          type: "RSA";
          equals(other): boolean;
          toBytes(): Uint8Array;
          toCID(): CID<unknown, number, number, Version>;
          toString(): string;
      }

      Hierarchy

      Properties

      multihash: MultihashDigest<number>
      privateKey?: Uint8Array
      publicKey?: Uint8Array
      type: "RSA"

      Methods

      Generated using TypeDoc

      \ No newline at end of file +

      Properties

      multihash: MultihashDigest<number>
      privateKey?: Uint8Array
      publicKey?: Uint8Array
      type: "RSA"

      Methods

      Generated using TypeDoc

      \ No newline at end of file diff --git a/interfaces/_libp2p_interface.peer_id.Secp256k1PeerId.html b/interfaces/_libp2p_interface.peer_id.Secp256k1PeerId.html index d0b3e8dd27..b8ed9b9e6e 100644 --- a/interfaces/_libp2p_interface.peer_id.Secp256k1PeerId.html +++ b/interfaces/_libp2p_interface.peer_id.Secp256k1PeerId.html @@ -1,4 +1,4 @@ -Secp256k1PeerId | libp2p
      interface Secp256k1PeerId {
          multihash: MultihashDigest<number>;
          privateKey?: Uint8Array;
          publicKey: Uint8Array;
          type: "secp256k1";
          equals(other): boolean;
          toBytes(): Uint8Array;
          toCID(): CID<unknown, number, number, Version>;
          toString(): string;
      }

      Hierarchy

      Properties

      multihash +Secp256k1PeerId | libp2p
      interface Secp256k1PeerId {
          multihash: MultihashDigest<number>;
          privateKey?: Uint8Array;
          publicKey: Uint8Array;
          type: "secp256k1";
          equals(other): boolean;
          toBytes(): Uint8Array;
          toCID(): CID<unknown, number, number, Version>;
          toString(): string;
      }

      Hierarchy

      Properties

      multihash: MultihashDigest<number>
      privateKey?: Uint8Array
      publicKey: Uint8Array
      type: "secp256k1"

      Methods

      Generated using TypeDoc

      \ No newline at end of file +

      Properties

      multihash: MultihashDigest<number>
      privateKey?: Uint8Array
      publicKey: Uint8Array
      type: "secp256k1"

      Methods

      Generated using TypeDoc

      \ No newline at end of file diff --git a/interfaces/_libp2p_interface.peer_info.PeerInfo.html b/interfaces/_libp2p_interface.peer_info.PeerInfo.html index c7f7a830ec..c54aec5edf 100644 --- a/interfaces/_libp2p_interface.peer_info.PeerInfo.html +++ b/interfaces/_libp2p_interface.peer_info.PeerInfo.html @@ -1,8 +1,8 @@ PeerInfo | libp2p

      A PeerInfo is a lightweight object that represents a remote peer, it can be obtained from peer discovery mechanisms, HTTP RPC endpoints, etc.

      interface PeerInfo {
          id: PeerId;
          multiaddrs: Multiaddr[];
      }

      Properties

      id +
      interface PeerInfo {
          id: PeerId;
          multiaddrs: Multiaddr[];
      }

      Properties

      Properties

      id: PeerId

      The identifier of the remote peer

      -
      multiaddrs: Multiaddr[]

      The multiaddrs a peer is listening on

      -

      Generated using TypeDoc

      \ No newline at end of file +
      multiaddrs: Multiaddr[]

      The multiaddrs a peer is listening on

      +

      Generated using TypeDoc

      \ No newline at end of file diff --git a/interfaces/_libp2p_interface.peer_routing.PeerRouting.html b/interfaces/_libp2p_interface.peer_routing.PeerRouting.html index 44724b414c..10d57b0eeb 100644 --- a/interfaces/_libp2p_interface.peer_routing.PeerRouting.html +++ b/interfaces/_libp2p_interface.peer_routing.PeerRouting.html @@ -1,10 +1,10 @@ -PeerRouting | libp2p
      interface PeerRouting {
          findPeer(peerId, options?): Promise<PeerInfo>;
          getClosestPeers(key, options?): AsyncIterable<PeerInfo>;
      }

      Methods

      findPeer +PeerRouting | libp2p
      interface PeerRouting {
          findPeer(peerId, options?): Promise<PeerInfo>;
          getClosestPeers(key, options?): AsyncIterable<PeerInfo>;
      }

      Methods

      • Search the network for peers that are closer to the passed key. Peer info should be yielded in ever-increasing closeness to the key.

        Parameters

        Returns AsyncIterable<PeerInfo>

        Example

        // Iterate over the closest peers found for the given key
        for await (const peer of peerRouting.getClosestPeers(key)) {
        console.log(peer.id, peer.multiaddrs)
        }
        -

      Generated using TypeDoc

      \ No newline at end of file +

      Generated using TypeDoc

      \ No newline at end of file diff --git a/interfaces/_libp2p_interface.peer_store.Address.html b/interfaces/_libp2p_interface.peer_store.Address.html index 6161a00a95..35701c5744 100644 --- a/interfaces/_libp2p_interface.peer_store.Address.html +++ b/interfaces/_libp2p_interface.peer_store.Address.html @@ -1,6 +1,6 @@ Address | libp2p

      Generated using TypeDoc

      \ No newline at end of file +
      multiaddr: Multiaddr

      Peer multiaddr

      +

      Generated using TypeDoc

      \ No newline at end of file diff --git a/interfaces/_libp2p_interface.peer_store.Peer.html b/interfaces/_libp2p_interface.peer_store.Peer.html index d976dedca8..9441773d6f 100644 --- a/interfaces/_libp2p_interface.peer_store.Peer.html +++ b/interfaces/_libp2p_interface.peer_store.Peer.html @@ -1,5 +1,5 @@ Peer | libp2p

      Data stored in the peer store about peers

      -
      interface Peer {
          addresses: Address[];
          id: PeerId;
          metadata: Map<string, Uint8Array>;
          peerRecordEnvelope?: Uint8Array;
          protocols: string[];
          tags: Map<string, Tag>;
      }

      Properties

      interface Peer {
          addresses: Address[];
          id: PeerId;
          metadata: Map<string, Uint8Array>;
          peerRecordEnvelope?: Uint8Array;
          protocols: string[];
          tags: Map<string, Tag>;
      }

      Properties

      Properties

      addresses: Address[]

      Peer's addresses containing a list of multiaddrs and a isCertified field indicating if the address was loaded from a signed peer record or not

      -
      id: PeerId

      Peer's peer-id instance

      -
      metadata: Map<string, Uint8Array>

      Peer's metadata map

      -
      peerRecordEnvelope?: Uint8Array

      The last peer record envelope received

      -
      protocols: string[]

      Peer's supported protocols

      -
      tags: Map<string, Tag>

      Tags a peer has

      -

      Generated using TypeDoc

      \ No newline at end of file +
      id: PeerId

      Peer's peer-id instance

      +
      metadata: Map<string, Uint8Array>

      Peer's metadata map

      +
      peerRecordEnvelope?: Uint8Array

      The last peer record envelope received

      +
      protocols: string[]

      Peer's supported protocols

      +
      tags: Map<string, Tag>

      Tags a peer has

      +

      Generated using TypeDoc

      \ No newline at end of file diff --git a/interfaces/_libp2p_interface.peer_store.PeerData.html b/interfaces/_libp2p_interface.peer_store.PeerData.html index 87391b061f..6936062cc1 100644 --- a/interfaces/_libp2p_interface.peer_store.PeerData.html +++ b/interfaces/_libp2p_interface.peer_store.PeerData.html @@ -1,5 +1,5 @@ PeerData | libp2p

      Peer data used to update the peer store

      -
      interface PeerData {
          addresses?: Address[];
          metadata?: Map<string, undefined | Uint8Array> | Record<string, undefined | Uint8Array>;
          multiaddrs?: Multiaddr[];
          peerRecordEnvelope?: Uint8Array;
          protocols?: string[];
          publicKey?: Uint8Array;
          tags?: Map<string, undefined | TagOptions> | Record<string, undefined | TagOptions>;
      }

      Properties

      interface PeerData {
          addresses?: Address[];
          metadata?: Map<string, undefined | Uint8Array> | Record<string, undefined | Uint8Array>;
          multiaddrs?: Multiaddr[];
          peerRecordEnvelope?: Uint8Array;
          protocols?: string[];
          publicKey?: Uint8Array;
          tags?: Map<string, undefined | TagOptions> | Record<string, undefined | TagOptions>;
      }

      Properties

      addresses? metadata? multiaddrs? peerRecordEnvelope? @@ -11,13 +11,13 @@ set to true.

      If both addresses and multiaddrs are specified they will be merged together with entries in addresses taking precedence.

      -
      metadata?: Map<string, undefined | Uint8Array> | Record<string, undefined | Uint8Array>

      Peer's metadata map. When merging pass undefined as values to remove metadata.

      -
      multiaddrs?: Multiaddr[]

      Peer's multiaddrs - any multiaddrs passed here will be treated as +

      metadata?: Map<string, undefined | Uint8Array> | Record<string, undefined | Uint8Array>

      Peer's metadata map. When merging pass undefined as values to remove metadata.

      +
      multiaddrs?: Multiaddr[]

      Peer's multiaddrs - any multiaddrs passed here will be treated as uncertified.

      If both addresses and multiaddrs are specified they will be merged together with entries in addresses taking precedence.

      -
      peerRecordEnvelope?: Uint8Array

      The last peer record envelope received

      -
      protocols?: string[]

      Peer's supported protocols

      -
      publicKey?: Uint8Array

      If this Peer has an RSA key, it's public key can be set with this property

      -
      tags?: Map<string, undefined | TagOptions> | Record<string, undefined | TagOptions>

      Peer tags. When merging pass undefined as values to remove tags.

      -

      Generated using TypeDoc

      \ No newline at end of file +
      peerRecordEnvelope?: Uint8Array

      The last peer record envelope received

      +
      protocols?: string[]

      Peer's supported protocols

      +
      publicKey?: Uint8Array

      If this Peer has an RSA key, it's public key can be set with this property

      +
      tags?: Map<string, undefined | TagOptions> | Record<string, undefined | TagOptions>

      Peer tags. When merging pass undefined as values to remove tags.

      +

      Generated using TypeDoc

      \ No newline at end of file diff --git a/interfaces/_libp2p_interface.peer_store.PeerQuery.html b/interfaces/_libp2p_interface.peer_store.PeerQuery.html index a38773f4dd..841fbb1479 100644 --- a/interfaces/_libp2p_interface.peer_store.PeerQuery.html +++ b/interfaces/_libp2p_interface.peer_store.PeerQuery.html @@ -1,6 +1,6 @@ PeerQuery | libp2p

      Generated using TypeDoc

      \ No newline at end of file +

      Properties

      filters?: PeerQueryFilter[]
      limit?: number
      offset?: number
      orders?: PeerQueryOrder[]

      Generated using TypeDoc

      \ No newline at end of file diff --git a/interfaces/_libp2p_interface.peer_store.PeerQueryFilter.html b/interfaces/_libp2p_interface.peer_store.PeerQueryFilter.html index 8478bb200c..920bfa40f1 100644 --- a/interfaces/_libp2p_interface.peer_store.PeerQueryFilter.html +++ b/interfaces/_libp2p_interface.peer_store.PeerQueryFilter.html @@ -1,2 +1,2 @@ PeerQueryFilter | libp2p

      A predicate by which to filter lists of peers

      -
      interface PeerQueryFilter ((peer) => boolean)

      Generated using TypeDoc

      \ No newline at end of file +
      interface PeerQueryFilter ((peer) => boolean)

      Generated using TypeDoc

      \ No newline at end of file diff --git a/interfaces/_libp2p_interface.peer_store.PeerQueryOrder.html b/interfaces/_libp2p_interface.peer_store.PeerQueryOrder.html index 65408c7bb5..473efd6d46 100644 --- a/interfaces/_libp2p_interface.peer_store.PeerQueryOrder.html +++ b/interfaces/_libp2p_interface.peer_store.PeerQueryOrder.html @@ -1,2 +1,2 @@ PeerQueryOrder | libp2p

      A predicate by which to sort lists of peers

      -
      interface PeerQueryOrder ((a, b) => 0 | 1 | -1)

      Generated using TypeDoc

      \ No newline at end of file +
      interface PeerQueryOrder ((a, b) => 0 | 1 | -1)

      Generated using TypeDoc

      \ No newline at end of file diff --git a/interfaces/_libp2p_interface.peer_store.PeerStore.html b/interfaces/_libp2p_interface.peer_store.PeerStore.html index d6c9d8a3fc..4a77e4d5ad 100644 --- a/interfaces/_libp2p_interface.peer_store.PeerStore.html +++ b/interfaces/_libp2p_interface.peer_store.PeerStore.html @@ -1,4 +1,4 @@ -PeerStore | libp2p
      interface PeerStore {
          all(query?): Promise<Peer[]>;
          consumePeerRecord(buf, expectedPeer?): Promise<boolean>;
          delete(peerId): Promise<void>;
          forEach(fn, query?): Promise<void>;
          get(peerId): Promise<Peer>;
          has(peerId): Promise<boolean>;
          merge(id, data): Promise<Peer>;
          patch(id, data): Promise<Peer>;
          save(id, data): Promise<Peer>;
      }

      Implemented by

        Methods

        all +PeerStore | libp2p
        interface PeerStore {
            all(query?): Promise<Peer[]>;
            consumePeerRecord(buf, expectedPeer?): Promise<boolean>;
            delete(peerId): Promise<void>;
            forEach(fn, query?): Promise<void>;
            get(peerId): Promise<Peer>;
            has(peerId): Promise<boolean>;
            merge(id, data): Promise<Peer>;
            patch(id, data): Promise<Peer>;
            save(id, data): Promise<Peer>;
        }

        Implemented by

          Methods

          all consumePeerRecord delete forEach @@ -10,35 +10,35 @@

          Methods

          • Unmarshal and verify a signed peer record, extract the multiaddrs and overwrite the stored addresses for the peer.

            Optionally pass an expected PeerId to verify that the peer record was signed by that peer.

            Parameters

            Returns Promise<boolean>

            Example

            await peerStore.consumePeerRecord(buf, expectedPeer)
             
            -
          • Delete all data stored for the passed peer

            Parameters

            Returns Promise<void>

            Example

            await peerStore.addressBook.set(peerId, multiaddrs)
            await peerStore.addressBook.get(peerId)
            // multiaddrs[]

            await peerStore.delete(peerId)

            await peerStore.addressBook.get(peerId)
            // []
            -
          • Loop over every peer - the looping is async because we read from a datastore but the peer operation is sync, this is to prevent long-lived peer operations causing deadlocks over the datastore which can happen if they try to access the peer store during the loop

            Parameters

            • fn: ((peer) => void)
                • (peer): void
                • Parameters

                  Returns void

            • Optional query: PeerQuery

            Returns Promise<void>

            Example

            await peerStore.forEach(peer => {
            // ...
            })
            -

          Generated using TypeDoc

          \ No newline at end of file +

          Generated using TypeDoc

          \ No newline at end of file diff --git a/interfaces/_libp2p_interface.peer_store.Tag.html b/interfaces/_libp2p_interface.peer_store.Tag.html index 18e3c1f56a..7c8d5cd561 100644 --- a/interfaces/_libp2p_interface.peer_store.Tag.html +++ b/interfaces/_libp2p_interface.peer_store.Tag.html @@ -1,3 +1,3 @@ -Tag | libp2p
          interface Tag {
              value: number;
          }

          Properties

          value +Tag | libp2p

          Generated using TypeDoc

          \ No newline at end of file +

          Generated using TypeDoc

          \ No newline at end of file diff --git a/interfaces/_libp2p_interface.peer_store.TagOptions.html b/interfaces/_libp2p_interface.peer_store.TagOptions.html index fc83695a55..7f1f127d91 100644 --- a/interfaces/_libp2p_interface.peer_store.TagOptions.html +++ b/interfaces/_libp2p_interface.peer_store.TagOptions.html @@ -1,5 +1,5 @@ -TagOptions | libp2p
          interface TagOptions {
              ttl?: number;
              value?: number;
          }

          Properties

          ttl? +TagOptions | libp2p

          Generated using TypeDoc

          \ No newline at end of file +
          value?: number

          An optional tag value (1-100)

          +

          Generated using TypeDoc

          \ No newline at end of file diff --git a/interfaces/_libp2p_interface.pubsub.PeerStreamEvents.html b/interfaces/_libp2p_interface.pubsub.PeerStreamEvents.html index 19a25d8b99..e8d99fbb9e 100644 --- a/interfaces/_libp2p_interface.pubsub.PeerStreamEvents.html +++ b/interfaces/_libp2p_interface.pubsub.PeerStreamEvents.html @@ -1,4 +1,4 @@ -PeerStreamEvents | libp2p
          interface PeerStreamEvents {
              close: CustomEvent<never>;
              stream:inbound: CustomEvent<never>;
              stream:outbound: CustomEvent<never>;
          }

          Properties

          close +PeerStreamEvents | libp2p

          Generated using TypeDoc

          \ No newline at end of file +

          Properties

          close: CustomEvent<never>
          stream:inbound: CustomEvent<never>
          stream:outbound: CustomEvent<never>

          Generated using TypeDoc

          \ No newline at end of file diff --git a/interfaces/_libp2p_interface.pubsub.PeerStreams.html b/interfaces/_libp2p_interface.pubsub.PeerStreams.html index 3ce37d3dcf..34a5d9bf2a 100644 --- a/interfaces/_libp2p_interface.pubsub.PeerStreams.html +++ b/interfaces/_libp2p_interface.pubsub.PeerStreams.html @@ -3,7 +3,7 @@ https://github.com/microsoft/TypeScript/issues/43477 https://github.com/microsoft/TypeScript/issues/299 etc

          -
          interface PeerStreams {
              id: PeerId;
              inboundStream?: AsyncIterable<Uint8ArrayList>;
              isWritable: boolean;
              outboundStream?: Pushable<Uint8ArrayList, void, unknown>;
              protocol: string;
              addEventListener<K>(type, listener, options?): void;
              attachInboundStream(stream): AsyncIterable<Uint8ArrayList>;
              attachOutboundStream(stream): Promise<Pushable<Uint8ArrayList, void, unknown>>;
              close(): void;
              dispatchEvent(event): boolean;
              dispatchEvent(event): boolean;
              listenerCount(type): number;
              removeEventListener<K>(type, listener?, options?): void;
              removeEventListener(type, listener?, options?): void;
              safeDispatchEvent<Detail>(type, detail): boolean;
              write(buf): void;
          }

          Hierarchy

          Properties

          id +
          interface PeerStreams {
              id: PeerId;
              inboundStream?: AsyncIterable<Uint8ArrayList>;
              isWritable: boolean;
              outboundStream?: Pushable<Uint8ArrayList, void, unknown>;
              protocol: string;
              addEventListener<K>(type, listener, options?): void;
              attachInboundStream(stream): AsyncIterable<Uint8ArrayList>;
              attachOutboundStream(stream): Promise<Pushable<Uint8ArrayList, void, unknown>>;
              close(): void;
              dispatchEvent(event): boolean;
              dispatchEvent(event): boolean;
              listenerCount(type): number;
              removeEventListener<K>(type, listener?, options?): void;
              removeEventListener(type, listener?, options?): void;
              safeDispatchEvent<Detail>(type, detail): boolean;
              write(buf): void;
          }

          Hierarchy

          Properties

          id: PeerId
          inboundStream?: AsyncIterable<Uint8ArrayList>
          isWritable: boolean
          outboundStream?: Pushable<Uint8ArrayList, void, unknown>
          protocol: string

          Methods

          • Dispatches a synthetic event event to target and returns true if either event's cancelable attribute value is false or its preventDefault() method was not invoked, and false otherwise.

            +

          Properties

          id: PeerId
          inboundStream?: AsyncIterable<Uint8ArrayList>
          isWritable: boolean
          outboundStream?: Pushable<Uint8ArrayList, void, unknown>
          protocol: string

          Methods

          • Dispatches a synthetic event event to target and returns true if either event's cancelable attribute value is false or its preventDefault() method was not invoked, and false otherwise.

            MDN Reference

            Parameters

            Returns boolean

          • Dispatches a synthetic event event to target and returns true if either event's cancelable attribute value is false or its preventDefault() method was not invoked, and false otherwise.

            MDN Reference

            -

            Parameters

            Returns boolean

          Generated using TypeDoc

          \ No newline at end of file +

          Parameters

          Returns boolean

          Generated using TypeDoc

          \ No newline at end of file diff --git a/interfaces/_libp2p_interface.pubsub.PubSub.html b/interfaces/_libp2p_interface.pubsub.PubSub.html index 51bf3f0ca8..81f20d91b2 100644 --- a/interfaces/_libp2p_interface.pubsub.PubSub.html +++ b/interfaces/_libp2p_interface.pubsub.PubSub.html @@ -3,7 +3,7 @@ https://github.com/microsoft/TypeScript/issues/43477 https://github.com/microsoft/TypeScript/issues/299 etc

          -
          interface PubSub {
              globalSignaturePolicy: "StrictSign" | "StrictNoSign";
              multicodecs: string[];
              topicValidators: Map<string, TopicValidatorFn>;
              addEventListener<K>(type, listener, options?): void;
              dispatchEvent(event): boolean;
              dispatchEvent(event): boolean;
              getPeers(): PeerId[];
              getSubscribers(topic): PeerId[];
              getTopics(): string[];
              listenerCount(type): number;
              publish(topic, data): Promise<PublishResult>;
              removeEventListener<K>(type, listener?, options?): void;
              removeEventListener(type, listener?, options?): void;
              safeDispatchEvent<Detail>(type, detail): boolean;
              subscribe(topic): void;
              unsubscribe(topic): void;
          }

          Type Parameters

          Hierarchy

          Implemented by

          Properties

          interface PubSub {
              globalSignaturePolicy: "StrictSign" | "StrictNoSign";
              multicodecs: string[];
              topicValidators: Map<string, TopicValidatorFn>;
              addEventListener<K>(type, listener, options?): void;
              dispatchEvent(event): boolean;
              dispatchEvent(event): boolean;
              getPeers(): PeerId[];
              getSubscribers(topic): PeerId[];
              getTopics(): string[];
              listenerCount(type): number;
              publish(topic, data): Promise<PublishResult>;
              removeEventListener<K>(type, listener?, options?): void;
              removeEventListener(type, listener?, options?): void;
              safeDispatchEvent<Detail>(type, detail): boolean;
              subscribe(topic): void;
              unsubscribe(topic): void;
          }

          Type Parameters

          Hierarchy

          Implemented by

            Properties

            Methods

            addEventListener @@ -21,29 +21,29 @@ signed or unsigned messages.

            Signed messages prevent spoofing message senders and should be preferred to using unsigned messages.

            -
            multicodecs: string[]

            A list of multicodecs that contain the pubsub protocol name.

            -
            topicValidators: Map<string, TopicValidatorFn>

            Pubsub routers support message validators per topic, which will validate the message +

            multicodecs: string[]

            A list of multicodecs that contain the pubsub protocol name.

            +
            topicValidators: Map<string, TopicValidatorFn>

            Pubsub routers support message validators per topic, which will validate the message before its propagations. They are stored in a map where keys are the topic name and values are the validators.

            Example

            const topic = 'topic'
            const validateMessage = (msgTopic, msg) => {
            const input = uint8ArrayToString(msg.data)
            const validInputs = ['a', 'b', 'c']

            if (!validInputs.includes(input)) {
            throw new Error('no valid input received')
            }
            }
            libp2p.pubsub.topicValidators.set(topic, validateMessage)
            -

            Methods

            • Dispatches a synthetic event event to target and returns true if either event's cancelable attribute value is false or its preventDefault() method was not invoked, and false otherwise.

              +

            Methods

            • Dispatches a synthetic event event to target and returns true if either event's cancelable attribute value is false or its preventDefault() method was not invoked, and false otherwise.

              MDN Reference

              Parameters

              Returns boolean

            • Dispatches a synthetic event event to target and returns true if either event's cancelable attribute value is false or its preventDefault() method was not invoked, and false otherwise.

              MDN Reference

              -

              Parameters

              Returns boolean

            • Gets a list of the PeerIds that are subscribed to one topic.

              +

              Parameters

              Returns boolean

            • Subscribes to a pubsub topic.

              Parameters

              • topic: string

              Returns void

              Example

              const topic = 'topic'
              const handler = (msg) => {
              if (msg.topic === topic) {
              // msg.data - pubsub data received
              }
              }

              libp2p.pubsub.addEventListener('message', handler)
              libp2p.pubsub.subscribe(topic)
              -
            • Unsubscribes from a pubsub topic.

              Parameters

              • topic: string

              Returns void

              Example

              const topic = 'topic'
              const handler = (msg) => {
              // msg.data - pubsub data received
              }

              libp2p.pubsub.removeEventListener(topic handler)
              libp2p.pubsub.unsubscribe(topic)
              -

            Generated using TypeDoc

            \ No newline at end of file +

            Generated using TypeDoc

            \ No newline at end of file diff --git a/interfaces/_libp2p_interface.pubsub.PubSubEvents.html b/interfaces/_libp2p_interface.pubsub.PubSubEvents.html index c8d2106ddc..bfa4ad91ba 100644 --- a/interfaces/_libp2p_interface.pubsub.PubSubEvents.html +++ b/interfaces/_libp2p_interface.pubsub.PubSubEvents.html @@ -1,3 +1,3 @@ -PubSubEvents | libp2p
            interface PubSubEvents {
                message: CustomEvent<Message>;
                subscription-change: CustomEvent<SubscriptionChangeData>;
            }

            Properties

            message +PubSubEvents | libp2p

            Generated using TypeDoc

            \ No newline at end of file +

            Properties

            subscription-change: CustomEvent<SubscriptionChangeData>

            Generated using TypeDoc

            \ No newline at end of file diff --git a/interfaces/_libp2p_interface.pubsub.PubSubInit.html b/interfaces/_libp2p_interface.pubsub.PubSubInit.html index c02f1d480f..f1a1ab513c 100644 --- a/interfaces/_libp2p_interface.pubsub.PubSubInit.html +++ b/interfaces/_libp2p_interface.pubsub.PubSubInit.html @@ -1,4 +1,4 @@ -PubSubInit | libp2p
            interface PubSubInit {
                canRelayMessage?: boolean;
                emitSelf?: boolean;
                enabled?: boolean;
                globalSignaturePolicy?: SignaturePolicy;
                maxInboundStreams?: number;
                maxOutboundStreams?: number;
                messageProcessingConcurrency?: number;
                multicodecs?: string[];
            }

            Hierarchy

            • PubSubInit

              Properties

              canRelayMessage? +PubSubInit | libp2p
              interface PubSubInit {
                  canRelayMessage?: boolean;
                  emitSelf?: boolean;
                  enabled?: boolean;
                  globalSignaturePolicy?: SignaturePolicy;
                  maxInboundStreams?: number;
                  maxOutboundStreams?: number;
                  messageProcessingConcurrency?: number;
                  multicodecs?: string[];
              }

              Hierarchy

              • PubSubInit

                Properties

                canRelayMessage?: boolean

                if can relay messages not subscribed

                -
                emitSelf?: boolean

                if publish should emit to self, if subscribed

                -
                enabled?: boolean
                globalSignaturePolicy?: SignaturePolicy

                defines how signatures should be handled

                -
                maxInboundStreams?: number

                How many parallel incoming streams to allow on the pubsub protocol per-connection

                -
                maxOutboundStreams?: number

                How many parallel outgoing streams to allow on the pubsub protocol per-connection

                -
                messageProcessingConcurrency?: number

                handle this many incoming pubsub messages concurrently

                -
                multicodecs?: string[]

                Generated using TypeDoc

                \ No newline at end of file +
                emitSelf?: boolean

                if publish should emit to self, if subscribed

                +
                enabled?: boolean
                globalSignaturePolicy?: SignaturePolicy

                defines how signatures should be handled

                +
                maxInboundStreams?: number

                How many parallel incoming streams to allow on the pubsub protocol per-connection

                +
                maxOutboundStreams?: number

                How many parallel outgoing streams to allow on the pubsub protocol per-connection

                +
                messageProcessingConcurrency?: number

                handle this many incoming pubsub messages concurrently

                +
                multicodecs?: string[]

                Generated using TypeDoc

                \ No newline at end of file diff --git a/interfaces/_libp2p_interface.pubsub.PubSubRPC.html b/interfaces/_libp2p_interface.pubsub.PubSubRPC.html index ff71b0fcb9..18bbb8ef3c 100644 --- a/interfaces/_libp2p_interface.pubsub.PubSubRPC.html +++ b/interfaces/_libp2p_interface.pubsub.PubSubRPC.html @@ -1,3 +1,3 @@ -PubSubRPC | libp2p
                interface PubSubRPC {
                    messages: PubSubRPCMessage[];
                    subscriptions: PubSubRPCSubscription[];
                }

                Properties

                messages +PubSubRPC | libp2p

                Generated using TypeDoc

                \ No newline at end of file +

                Properties

                messages: PubSubRPCMessage[]
                subscriptions: PubSubRPCSubscription[]

                Generated using TypeDoc

                \ No newline at end of file diff --git a/interfaces/_libp2p_interface.pubsub.PubSubRPCMessage.html b/interfaces/_libp2p_interface.pubsub.PubSubRPCMessage.html index f27023581a..1075a5ecdb 100644 --- a/interfaces/_libp2p_interface.pubsub.PubSubRPCMessage.html +++ b/interfaces/_libp2p_interface.pubsub.PubSubRPCMessage.html @@ -1,7 +1,7 @@ -PubSubRPCMessage | libp2p
                interface PubSubRPCMessage {
                    data?: Uint8Array;
                    from?: Uint8Array;
                    key?: Uint8Array;
                    sequenceNumber?: Uint8Array;
                    signature?: Uint8Array;
                    topic?: string;
                }

                Properties

                data? +PubSubRPCMessage | libp2p

                Generated using TypeDoc

                \ No newline at end of file +

                Properties

                data?: Uint8Array
                from?: Uint8Array
                sequenceNumber?: Uint8Array
                signature?: Uint8Array
                topic?: string

                Generated using TypeDoc

                \ No newline at end of file diff --git a/interfaces/_libp2p_interface.pubsub.PubSubRPCSubscription.html b/interfaces/_libp2p_interface.pubsub.PubSubRPCSubscription.html index bc7ae7544a..db122f4b26 100644 --- a/interfaces/_libp2p_interface.pubsub.PubSubRPCSubscription.html +++ b/interfaces/_libp2p_interface.pubsub.PubSubRPCSubscription.html @@ -1,3 +1,3 @@ -PubSubRPCSubscription | libp2p
                interface PubSubRPCSubscription {
                    subscribe?: boolean;
                    topic?: string;
                }

                Properties

                subscribe? +PubSubRPCSubscription | libp2p

                Generated using TypeDoc

                \ No newline at end of file +

                Properties

                subscribe?: boolean
                topic?: string

                Generated using TypeDoc

                \ No newline at end of file diff --git a/interfaces/_libp2p_interface.pubsub.PublishResult.html b/interfaces/_libp2p_interface.pubsub.PublishResult.html index 491e3773cf..9958464852 100644 --- a/interfaces/_libp2p_interface.pubsub.PublishResult.html +++ b/interfaces/_libp2p_interface.pubsub.PublishResult.html @@ -1,2 +1,2 @@ -PublishResult | libp2p
                interface PublishResult {
                    recipients: PeerId[];
                }

                Properties

                Properties

                recipients: PeerId[]

                Generated using TypeDoc

                \ No newline at end of file +PublishResult | libp2p
                interface PublishResult {
                    recipients: PeerId[];
                }

                Properties

                Properties

                recipients: PeerId[]

                Generated using TypeDoc

                \ No newline at end of file diff --git a/interfaces/_libp2p_interface.pubsub.SignedMessage.html b/interfaces/_libp2p_interface.pubsub.SignedMessage.html index 576a2eeb76..a87cfae9e0 100644 --- a/interfaces/_libp2p_interface.pubsub.SignedMessage.html +++ b/interfaces/_libp2p_interface.pubsub.SignedMessage.html @@ -1,8 +1,8 @@ -SignedMessage | libp2p
                interface SignedMessage {
                    data: Uint8Array;
                    from: PeerId;
                    key: Uint8Array;
                    sequenceNumber: bigint;
                    signature: Uint8Array;
                    topic: string;
                    type: "signed";
                }

                Properties

                data +SignedMessage | libp2p

                Generated using TypeDoc

                \ No newline at end of file +

                Properties

                from: PeerId
                sequenceNumber: bigint
                signature: Uint8Array
                topic: string
                type: "signed"

                Generated using TypeDoc

                \ No newline at end of file diff --git a/interfaces/_libp2p_interface.pubsub.SubscriptionChangeData.html b/interfaces/_libp2p_interface.pubsub.SubscriptionChangeData.html index 761300bd08..b02d9c32e6 100644 --- a/interfaces/_libp2p_interface.pubsub.SubscriptionChangeData.html +++ b/interfaces/_libp2p_interface.pubsub.SubscriptionChangeData.html @@ -1,3 +1,3 @@ -SubscriptionChangeData | libp2p
                interface SubscriptionChangeData {
                    peerId: PeerId;
                    subscriptions: Subscription[];
                }

                Properties

                peerId +SubscriptionChangeData | libp2p

                Generated using TypeDoc

                \ No newline at end of file +

                Properties

                peerId: PeerId
                subscriptions: Subscription[]

                Generated using TypeDoc

                \ No newline at end of file diff --git a/interfaces/_libp2p_interface.pubsub.TopicValidatorFn.html b/interfaces/_libp2p_interface.pubsub.TopicValidatorFn.html index 8fa43ea47e..a2306e4064 100644 --- a/interfaces/_libp2p_interface.pubsub.TopicValidatorFn.html +++ b/interfaces/_libp2p_interface.pubsub.TopicValidatorFn.html @@ -1 +1 @@ -TopicValidatorFn | libp2p
                interface TopicValidatorFn ((peer, message) => TopicValidatorResult | Promise<TopicValidatorResult>)

                Generated using TypeDoc

                \ No newline at end of file +TopicValidatorFn | libp2p
                interface TopicValidatorFn ((peer, message) => TopicValidatorResult | Promise<TopicValidatorResult>)

                Generated using TypeDoc

                \ No newline at end of file diff --git a/interfaces/_libp2p_interface.pubsub.UnsignedMessage.html b/interfaces/_libp2p_interface.pubsub.UnsignedMessage.html index 320a69128a..31d888ec77 100644 --- a/interfaces/_libp2p_interface.pubsub.UnsignedMessage.html +++ b/interfaces/_libp2p_interface.pubsub.UnsignedMessage.html @@ -1,4 +1,4 @@ -UnsignedMessage | libp2p
                interface UnsignedMessage {
                    data: Uint8Array;
                    topic: string;
                    type: "unsigned";
                }

                Properties

                data +UnsignedMessage | libp2p

                Generated using TypeDoc

                \ No newline at end of file +

                Properties

                topic: string
                type: "unsigned"

                Generated using TypeDoc

                \ No newline at end of file diff --git a/interfaces/_libp2p_interface.record.Envelope.html b/interfaces/_libp2p_interface.record.Envelope.html index af4c9aae92..42003e544f 100644 --- a/interfaces/_libp2p_interface.record.Envelope.html +++ b/interfaces/_libp2p_interface.record.Envelope.html @@ -1,8 +1,8 @@ -Envelope | libp2p
                interface Envelope {
                    payload: Uint8Array;
                    payloadType: Uint8Array | Uint8ArrayList;
                    peerId: PeerId;
                    signature: Uint8Array | Uint8ArrayList;
                    equals(other): boolean;
                    marshal(): Uint8Array;
                    validate(domain): Promise<boolean>;
                }

                Implemented by

                  Properties

                  payload +Envelope | libp2p
                  interface Envelope {
                      payload: Uint8Array;
                      payloadType: Uint8Array | Uint8ArrayList;
                      peerId: PeerId;
                      signature: Uint8Array | Uint8ArrayList;
                      equals(other): boolean;
                      marshal(): Uint8Array;
                      validate(domain): Promise<boolean>;
                  }

                  Implemented by

                    Properties

                    payload: Uint8Array
                    payloadType: Uint8Array | Uint8ArrayList
                    peerId: PeerId

                    Methods

                    Generated using TypeDoc

                    \ No newline at end of file +

                    Properties

                    payload: Uint8Array
                    payloadType: Uint8Array | Uint8ArrayList
                    peerId: PeerId

                    Methods

                    Generated using TypeDoc

                    \ No newline at end of file diff --git a/interfaces/_libp2p_interface.record.Record.html b/interfaces/_libp2p_interface.record.Record.html index 0ad7273b88..1b820e1315 100644 --- a/interfaces/_libp2p_interface.record.Record.html +++ b/interfaces/_libp2p_interface.record.Record.html @@ -1,10 +1,10 @@ Record | libp2p

                    Record is the base implementation of a record that can be used as the payload of a libp2p envelope.

                    -
                    interface Record {
                        codec: Uint8Array;
                        domain: string;
                        equals(other): boolean;
                        marshal(): Uint8Array;
                    }

                    Properties

                    interface Record {
                        codec: Uint8Array;
                        domain: string;
                        equals(other): boolean;
                        marshal(): Uint8Array;
                    }

                    Properties

                    Methods

                    Properties

                    codec: Uint8Array

                    identifier of the type of record

                    -
                    domain: string

                    signature domain.

                    -

                    Methods

                    Generated using TypeDoc

                    \ No newline at end of file +
                    domain: string

                    signature domain.

                    +

                    Methods

                    Generated using TypeDoc

                    \ No newline at end of file diff --git a/interfaces/_libp2p_interface.startable.Startable.html b/interfaces/_libp2p_interface.startable.Startable.html index 8102b7225e..5bb49d8439 100644 --- a/interfaces/_libp2p_interface.startable.Startable.html +++ b/interfaces/_libp2p_interface.startable.Startable.html @@ -1,5 +1,5 @@ Startable | libp2p

                    Implemented by components that have a lifecycle

                    -
                    interface Startable {
                        afterStart?(): void | Promise<void>;
                        afterStop?(): void | Promise<void>;
                        beforeStart?(): void | Promise<void>;
                        beforeStop?(): void | Promise<void>;
                        start(): void | Promise<void>;
                        stop(): void | Promise<void>;
                    }

                    Hierarchy

                    Methods

                    interface Startable {
                        afterStart?(): void | Promise<void>;
                        afterStop?(): void | Promise<void>;
                        beforeStart?(): void | Promise<void>;
                        beforeStop?(): void | Promise<void>;
                        start(): void | Promise<void>;
                        stop(): void | Promise<void>;
                    }

                    Hierarchy

                    Methods

                    • If implemented, this method will be invoked after the start method.

                      All other components will have had their start method invoked before this method is called.

                      -

                      Returns void | Promise<void>

                    • If implemented, this method will be invoked after the stop method.

                      All other components will have had their stop method invoked before this method is called.

                      -

                      Returns void | Promise<void>

                    Generated using TypeDoc

                    \ No newline at end of file +

                    Returns void | Promise<void>

                    Generated using TypeDoc

                    \ No newline at end of file diff --git a/interfaces/_libp2p_interface.stream_handler.IncomingStreamData.html b/interfaces/_libp2p_interface.stream_handler.IncomingStreamData.html index 0c9cc88a8c..5d6118d011 100644 --- a/interfaces/_libp2p_interface.stream_handler.IncomingStreamData.html +++ b/interfaces/_libp2p_interface.stream_handler.IncomingStreamData.html @@ -1,3 +1,3 @@ -IncomingStreamData | libp2p
                    interface IncomingStreamData {
                        connection: Connection;
                        stream: Stream;
                    }

                    Properties

                    connection +IncomingStreamData | libp2p

                    Generated using TypeDoc

                    \ No newline at end of file +

                    Properties

                    connection: Connection
                    stream: Stream

                    Generated using TypeDoc

                    \ No newline at end of file diff --git a/interfaces/_libp2p_interface.stream_handler.StreamHandler.html b/interfaces/_libp2p_interface.stream_handler.StreamHandler.html index 3777a56d85..43d99eb90e 100644 --- a/interfaces/_libp2p_interface.stream_handler.StreamHandler.html +++ b/interfaces/_libp2p_interface.stream_handler.StreamHandler.html @@ -1 +1 @@ -StreamHandler | libp2p
                    interface StreamHandler ((data) => void)

                    Generated using TypeDoc

                    \ No newline at end of file +StreamHandler | libp2p
                    interface StreamHandler ((data) => void)

                    Generated using TypeDoc

                    \ No newline at end of file diff --git a/interfaces/_libp2p_interface.stream_handler.StreamHandlerOptions.html b/interfaces/_libp2p_interface.stream_handler.StreamHandlerOptions.html index 3dfc354cb4..79e78ed0cb 100644 --- a/interfaces/_libp2p_interface.stream_handler.StreamHandlerOptions.html +++ b/interfaces/_libp2p_interface.stream_handler.StreamHandlerOptions.html @@ -1,8 +1,8 @@ -StreamHandlerOptions | libp2p
                    interface StreamHandlerOptions {
                        maxInboundStreams?: number;
                        maxOutboundStreams?: number;
                        runOnTransientConnection?: boolean;
                    }

                    Properties

                    maxInboundStreams? +StreamHandlerOptions | libp2p
                    interface StreamHandlerOptions {
                        maxInboundStreams?: number;
                        maxOutboundStreams?: number;
                        runOnTransientConnection?: boolean;
                    }

                    Properties

                    maxInboundStreams?: number

                    How many incoming streams can be open for this protocol at the same time on each connection (default: 32)

                    -
                    maxOutboundStreams?: number

                    How many outgoing streams can be open for this protocol at the same time on each connection (default: 64)

                    -
                    runOnTransientConnection?: boolean

                    Opt-in to running over a transient connection - one that has time/data limits +

                    maxOutboundStreams?: number

                    How many outgoing streams can be open for this protocol at the same time on each connection (default: 64)

                    +
                    runOnTransientConnection?: boolean

                    Opt-in to running over a transient connection - one that has time/data limits placed on it.

                    -

                    Generated using TypeDoc

                    \ No newline at end of file +

                    Generated using TypeDoc

                    \ No newline at end of file diff --git a/interfaces/_libp2p_interface.stream_handler.StreamHandlerRecord.html b/interfaces/_libp2p_interface.stream_handler.StreamHandlerRecord.html index 27215a72b3..4c486288d7 100644 --- a/interfaces/_libp2p_interface.stream_handler.StreamHandlerRecord.html +++ b/interfaces/_libp2p_interface.stream_handler.StreamHandlerRecord.html @@ -1,3 +1,3 @@ -StreamHandlerRecord | libp2p
                    interface StreamHandlerRecord {
                        handler: StreamHandler;
                        options: StreamHandlerOptions;
                    }

                    Properties

                    handler +StreamHandlerRecord | libp2p

                    Generated using TypeDoc

                    \ No newline at end of file +

                    Properties

                    handler: StreamHandler

                    Generated using TypeDoc

                    \ No newline at end of file diff --git a/interfaces/_libp2p_interface.stream_muxer.StreamMuxer.html b/interfaces/_libp2p_interface.stream_muxer.StreamMuxer.html index cd369142ec..1b0db613c6 100644 --- a/interfaces/_libp2p_interface.stream_muxer.StreamMuxer.html +++ b/interfaces/_libp2p_interface.stream_muxer.StreamMuxer.html @@ -1,5 +1,5 @@ StreamMuxer | libp2p

                    A libp2p stream muxer

                    -
                    interface StreamMuxer {
                        protocol: string;
                        sink: Sink<AsyncGenerator<Uint8Array | Uint8ArrayList, any, unknown>, unknown>;
                        source: AsyncGenerator<Uint8Array | Uint8ArrayList, any, unknown>;
                        streams: Stream[];
                        abort(err): void;
                        close(options?): Promise<void>;
                        newStream(name?): Stream | Promise<Stream>;
                    }

                    Hierarchy

                    Properties

                    interface StreamMuxer {
                        protocol: string;
                        sink: Sink<AsyncGenerator<Uint8Array | Uint8ArrayList, any, unknown>, unknown>;
                        source: AsyncGenerator<Uint8Array | Uint8ArrayList, any, unknown>;
                        streams: Stream[];
                        abort(err): void;
                        close(options?): Promise<void>;
                        newStream(name?): Stream | Promise<Stream>;
                    }

                    Hierarchy

                    Properties

                    Properties

                    protocol: string

                    The protocol used to select this muxer during connection opening

                    -
                    sink: Sink<AsyncGenerator<Uint8Array | Uint8ArrayList, any, unknown>, unknown>
                    source: AsyncGenerator<Uint8Array | Uint8ArrayList, any, unknown>
                    streams: Stream[]

                    A list of streams that are currently open. Closed streams will not be returned.

                    -

                    Methods

                    sink: Sink<AsyncGenerator<Uint8Array | Uint8ArrayList, any, unknown>, unknown>
                    source: AsyncGenerator<Uint8Array | Uint8ArrayList, any, unknown>
                    streams: Stream[]

                    A list of streams that are currently open. Closed streams will not be returned.

                    +

                    Methods

                    Generated using TypeDoc

                    \ No newline at end of file +

                    Parameters

                    Returns Stream | Promise<Stream>

                    Generated using TypeDoc

                    \ No newline at end of file diff --git a/interfaces/_libp2p_interface.stream_muxer.StreamMuxerFactory.html b/interfaces/_libp2p_interface.stream_muxer.StreamMuxerFactory.html index fd6193616f..0a2bc67a90 100644 --- a/interfaces/_libp2p_interface.stream_muxer.StreamMuxerFactory.html +++ b/interfaces/_libp2p_interface.stream_muxer.StreamMuxerFactory.html @@ -1,5 +1,5 @@ -StreamMuxerFactory | libp2p
                    interface StreamMuxerFactory {
                        protocol: string;
                        createStreamMuxer(init?): StreamMuxer;
                    }

                    Properties

                    protocol +StreamMuxerFactory | libp2p
                    interface StreamMuxerFactory {
                        protocol: string;
                        createStreamMuxer(init?): StreamMuxer;
                    }

                    Properties

                    Methods

                    Properties

                    protocol: string

                    The protocol used to select this muxer during connection opening

                    -

                    Methods

                    Generated using TypeDoc

                    \ No newline at end of file +

                    Methods

                    Generated using TypeDoc

                    \ No newline at end of file diff --git a/interfaces/_libp2p_interface.stream_muxer.StreamMuxerInit.html b/interfaces/_libp2p_interface.stream_muxer.StreamMuxerInit.html index 54566623d1..d7da78ac1a 100644 --- a/interfaces/_libp2p_interface.stream_muxer.StreamMuxerInit.html +++ b/interfaces/_libp2p_interface.stream_muxer.StreamMuxerInit.html @@ -1,7 +1,7 @@ -StreamMuxerInit | libp2p
                    interface StreamMuxerInit {
                        direction?: Direction;
                        onIncomingStream?(stream): void;
                        onStreamEnd?(stream): void;
                    }

                    Properties

                    direction? +StreamMuxerInit | libp2p
                    interface StreamMuxerInit {
                        direction?: Direction;
                        onIncomingStream?(stream): void;
                        onStreamEnd?(stream): void;
                    }

                    Properties

                    direction?: Direction

                    Outbound stream muxers are opened by the local node, inbound stream muxers are opened by the remote

                    -

                    Methods

                    Generated using TypeDoc

                    \ No newline at end of file +

                    Methods

                    Generated using TypeDoc

                    \ No newline at end of file diff --git a/interfaces/_libp2p_interface.transport.ConnectionHandler.html b/interfaces/_libp2p_interface.transport.ConnectionHandler.html index 51fdf2c0a0..53a03dbb8f 100644 --- a/interfaces/_libp2p_interface.transport.ConnectionHandler.html +++ b/interfaces/_libp2p_interface.transport.ConnectionHandler.html @@ -1 +1 @@ -ConnectionHandler | libp2p
                    interface ConnectionHandler ((connection) => void)

                    Generated using TypeDoc

                    \ No newline at end of file +ConnectionHandler | libp2p
                    interface ConnectionHandler ((connection) => void)

                    Generated using TypeDoc

                    \ No newline at end of file diff --git a/interfaces/_libp2p_interface.transport.CreateListenerOptions.html b/interfaces/_libp2p_interface.transport.CreateListenerOptions.html index b2ea898b35..1b1030e72e 100644 --- a/interfaces/_libp2p_interface.transport.CreateListenerOptions.html +++ b/interfaces/_libp2p_interface.transport.CreateListenerOptions.html @@ -1,3 +1,3 @@ -CreateListenerOptions | libp2p
                    interface CreateListenerOptions {
                        handler?: ConnectionHandler;
                        upgrader: Upgrader;
                    }

                    Hierarchy

                    • CreateListenerOptions

                      Properties

                      handler? +CreateListenerOptions | libp2p

                      Generated using TypeDoc

                      \ No newline at end of file +

                      Properties

                      upgrader: Upgrader

                      Generated using TypeDoc

                      \ No newline at end of file diff --git a/interfaces/_libp2p_interface.transport.DialOptions.html b/interfaces/_libp2p_interface.transport.DialOptions.html index fb4ff37c16..4af2863ba3 100644 --- a/interfaces/_libp2p_interface.transport.DialOptions.html +++ b/interfaces/_libp2p_interface.transport.DialOptions.html @@ -2,6 +2,6 @@ the optional signal property.

                      Example

                      const controller = new AbortController()

                      aLongRunningOperation({
                      signal: controller.signal
                      })

                      // later

                      controller.abort()
                      -
                      interface DialOptions {
                          signal?: AbortSignal;
                          upgrader: Upgrader;
                      }

                      Hierarchy

                      Properties

                      interface DialOptions {
                          signal?: AbortSignal;
                          upgrader: Upgrader;
                      }

                      Hierarchy

                      Properties

                      Properties

                      signal?: AbortSignal
                      upgrader: Upgrader

                      Generated using TypeDoc

                      \ No newline at end of file +

                      Properties

                      signal?: AbortSignal
                      upgrader: Upgrader

                      Generated using TypeDoc

                      \ No newline at end of file diff --git a/interfaces/_libp2p_interface.transport.Listener.html b/interfaces/_libp2p_interface.transport.Listener.html index d35e03f56a..3cfaea3383 100644 --- a/interfaces/_libp2p_interface.transport.Listener.html +++ b/interfaces/_libp2p_interface.transport.Listener.html @@ -3,7 +3,7 @@ https://github.com/microsoft/TypeScript/issues/43477 https://github.com/microsoft/TypeScript/issues/299 etc

                      -
                      interface Listener {
                          addEventListener<K>(type, listener, options?): void;
                          close(): Promise<void>;
                          dispatchEvent(event): boolean;
                          dispatchEvent(event): boolean;
                          getAddrs(): Multiaddr[];
                          listen(multiaddr): Promise<void>;
                          listenerCount(type): number;
                          removeEventListener<K>(type, listener?, options?): void;
                          removeEventListener(type, listener?, options?): void;
                          safeDispatchEvent<Detail>(type, detail): boolean;
                      }

                      Hierarchy

                      Methods

                      interface Listener {
                          addEventListener<K>(type, listener, options?): void;
                          close(): Promise<void>;
                          dispatchEvent(event): boolean;
                          dispatchEvent(event): boolean;
                          getAddrs(): Multiaddr[];
                          listen(multiaddr): Promise<void>;
                          listenerCount(type): number;
                          removeEventListener<K>(type, listener?, options?): void;
                          removeEventListener(type, listener?, options?): void;
                          safeDispatchEvent<Detail>(type, detail): boolean;
                      }

                      Hierarchy

                      Methods

                      • Dispatches a synthetic event event to target and returns true if either event's cancelable attribute value is false or its preventDefault() method was not invoked, and false otherwise.

                        +

                      Methods

                      • Dispatches a synthetic event event to target and returns true if either event's cancelable attribute value is false or its preventDefault() method was not invoked, and false otherwise.

                        MDN Reference

                        Parameters

                        Returns boolean

                      • Dispatches a synthetic event event to target and returns true if either event's cancelable attribute value is false or its preventDefault() method was not invoked, and false otherwise.

                        MDN Reference

                        Parameters

                        Returns boolean

                      Generated using TypeDoc

                      \ No newline at end of file +

                      Returns Multiaddr[]

                      Generated using TypeDoc

                      \ No newline at end of file diff --git a/interfaces/_libp2p_interface.transport.ListenerEvents.html b/interfaces/_libp2p_interface.transport.ListenerEvents.html index 107f192b8f..f658a9a5d1 100644 --- a/interfaces/_libp2p_interface.transport.ListenerEvents.html +++ b/interfaces/_libp2p_interface.transport.ListenerEvents.html @@ -1,5 +1,5 @@ -ListenerEvents | libp2p
                      interface ListenerEvents {
                          close: CustomEvent<any>;
                          connection: CustomEvent<Connection>;
                          error: CustomEvent<Error>;
                          listening: CustomEvent<any>;
                      }

                      Properties

                      close +ListenerEvents | libp2p

                      Generated using TypeDoc

                      \ No newline at end of file +

                      Properties

                      close: CustomEvent<any>
                      connection: CustomEvent<Connection>
                      listening: CustomEvent<any>

                      Generated using TypeDoc

                      \ No newline at end of file diff --git a/interfaces/_libp2p_interface.transport.MultiaddrFilter.html b/interfaces/_libp2p_interface.transport.MultiaddrFilter.html index c1540b321f..37f81d1f4d 100644 --- a/interfaces/_libp2p_interface.transport.MultiaddrFilter.html +++ b/interfaces/_libp2p_interface.transport.MultiaddrFilter.html @@ -1 +1 @@ -MultiaddrFilter | libp2p
                      interface MultiaddrFilter ((multiaddrs) => Multiaddr[])

                      Generated using TypeDoc

                      \ No newline at end of file +MultiaddrFilter | libp2p
                      interface MultiaddrFilter ((multiaddrs) => Multiaddr[])

                      Generated using TypeDoc

                      \ No newline at end of file diff --git a/interfaces/_libp2p_interface.transport.Transport.html b/interfaces/_libp2p_interface.transport.Transport.html index 4f639d2dbc..8b56a940b8 100644 --- a/interfaces/_libp2p_interface.transport.Transport.html +++ b/interfaces/_libp2p_interface.transport.Transport.html @@ -1,12 +1,12 @@ Transport | libp2p

                      A libp2p transport is understood as something that offers a dial and listen interface to establish connections.

                      -
                      interface Transport {
                          [toStringTag]: string;
                          [transportSymbol]: true;
                          filter: MultiaddrFilter;
                          createListener(options): Listener;
                          dial(ma, options): Promise<Connection>;
                      }

                      Properties

                      interface Transport {
                          [toStringTag]: string;
                          [transportSymbol]: true;
                          filter: MultiaddrFilter;
                          createListener(options): Listener;
                          dial(ma, options): Promise<Connection>;
                      }

                      Properties

                      [toStringTag]: string

                      Used to identify the transport

                      -
                      [transportSymbol]: true

                      Used by the isTransport function

                      -

                      Takes a list of Multiaddrs and returns only valid addresses for the transport

                      -

                      Methods

                      Generated using TypeDoc

                      \ No newline at end of file +
                      [transportSymbol]: true

                      Used by the isTransport function

                      +

                      Takes a list of Multiaddrs and returns only valid addresses for the transport

                      +

                      Methods

                      Generated using TypeDoc

                      \ No newline at end of file diff --git a/interfaces/_libp2p_interface.transport.Upgrader.html b/interfaces/_libp2p_interface.transport.Upgrader.html index 9414acfb89..bc6e44157d 100644 --- a/interfaces/_libp2p_interface.transport.Upgrader.html +++ b/interfaces/_libp2p_interface.transport.Upgrader.html @@ -1,5 +1,5 @@ -Upgrader | libp2p
                      interface Upgrader {
                          upgradeInbound(maConn, opts?): Promise<Connection>;
                          upgradeOutbound(maConn, opts?): Promise<Connection>;
                      }

                      Methods

                      upgradeInbound +Upgrader | libp2p

                      Generated using TypeDoc

                      \ No newline at end of file +

                      Parameters

                      Returns Promise<Connection>

                      Generated using TypeDoc

                      \ No newline at end of file diff --git a/interfaces/_libp2p_interface.transport.UpgraderOptions.html b/interfaces/_libp2p_interface.transport.UpgraderOptions.html index 84f3b63bfd..575fb0ad41 100644 --- a/interfaces/_libp2p_interface.transport.UpgraderOptions.html +++ b/interfaces/_libp2p_interface.transport.UpgraderOptions.html @@ -1,7 +1,7 @@ -UpgraderOptions | libp2p
                      interface UpgraderOptions {
                          muxerFactory?: StreamMuxerFactory;
                          skipEncryption?: boolean;
                          skipProtection?: boolean;
                          transient?: boolean;
                      }

                      Properties

                      muxerFactory? +UpgraderOptions | libp2p
                      interface UpgraderOptions {
                          muxerFactory?: StreamMuxerFactory;
                          skipEncryption?: boolean;
                          skipProtection?: boolean;
                          transient?: boolean;
                      }

                      Properties

                      muxerFactory?: StreamMuxerFactory
                      skipEncryption?: boolean
                      skipProtection?: boolean
                      transient?: boolean

                      The passed MultiaddrConnection has limits place on duration and/or data +

                      Properties

                      muxerFactory?: StreamMuxerFactory
                      skipEncryption?: boolean
                      skipProtection?: boolean
                      transient?: boolean

                      The passed MultiaddrConnection has limits place on duration and/or data transfer amounts so is not expected to be open for very long.

                      -

                      Generated using TypeDoc

                      \ No newline at end of file +

                      Generated using TypeDoc

                      \ No newline at end of file diff --git a/interfaces/_libp2p_interface_compliance_tests.index.TestSetup.html b/interfaces/_libp2p_interface_compliance_tests.index.TestSetup.html index 9ca3b37848..dce4fadcf1 100644 --- a/interfaces/_libp2p_interface_compliance_tests.index.TestSetup.html +++ b/interfaces/_libp2p_interface_compliance_tests.index.TestSetup.html @@ -1,3 +1,3 @@ -TestSetup | libp2p
                      interface TestSetup {
                          setup(args?): Promise<T>;
                          teardown(): Promise<void>;
                      }

                      Type Parameters

                      • T

                      • SetupArgs = Record<string, unknown>

                      Methods

                      setup +TestSetup | libp2p
                      interface TestSetup {
                          setup(args?): Promise<T>;
                          teardown(): Promise<void>;
                      }

                      Type Parameters

                      • T

                      • SetupArgs = Record<string, unknown>

                      Methods

                      Methods

                      Generated using TypeDoc

                      \ No newline at end of file +

                      Methods

                      Generated using TypeDoc

                      \ No newline at end of file diff --git a/interfaces/_libp2p_interface_compliance_tests.mocks.MockNetworkComponents.html b/interfaces/_libp2p_interface_compliance_tests.mocks.MockNetworkComponents.html index bed0161f66..b0181f32b4 100644 --- a/interfaces/_libp2p_interface_compliance_tests.mocks.MockNetworkComponents.html +++ b/interfaces/_libp2p_interface_compliance_tests.mocks.MockNetworkComponents.html @@ -1,7 +1,7 @@ -MockNetworkComponents | libp2p
                      interface MockNetworkComponents {
                          connectionManager: ConnectionManager;
                          events: TypedEventTarget<Libp2pEvents<ServiceMap>>;
                          logger: ComponentLogger;
                          peerId: PeerId;
                          pubsub?: PubSub<PubSubEvents>;
                          registrar: Registrar;
                      }

                      Properties

                      connectionManager +MockNetworkComponents | libp2p

                      Generated using TypeDoc

                      \ No newline at end of file +

                      Properties

                      connectionManager: ConnectionManager
                      peerId: PeerId
                      registrar: Registrar

                      Generated using TypeDoc

                      \ No newline at end of file diff --git a/interfaces/_libp2p_interface_compliance_tests.mocks.MockUpgraderInit.html b/interfaces/_libp2p_interface_compliance_tests.mocks.MockUpgraderInit.html index 1ff1c809bb..137a022b0d 100644 --- a/interfaces/_libp2p_interface_compliance_tests.mocks.MockUpgraderInit.html +++ b/interfaces/_libp2p_interface_compliance_tests.mocks.MockUpgraderInit.html @@ -1,3 +1,3 @@ -MockUpgraderInit | libp2p
                      interface MockUpgraderInit {
                          events?: TypedEventTarget<Libp2pEvents<ServiceMap>>;
                          registrar?: Registrar;
                      }

                      Properties

                      events? +MockUpgraderInit | libp2p

                      Generated using TypeDoc

                      \ No newline at end of file +

                      Properties

                      registrar?: Registrar

                      Generated using TypeDoc

                      \ No newline at end of file diff --git a/interfaces/_libp2p_interface_compliance_tests.pubsub.PubSubArgs.html b/interfaces/_libp2p_interface_compliance_tests.pubsub.PubSubArgs.html index f7a123b268..54a57b9742 100644 --- a/interfaces/_libp2p_interface_compliance_tests.pubsub.PubSubArgs.html +++ b/interfaces/_libp2p_interface_compliance_tests.pubsub.PubSubArgs.html @@ -1,3 +1,3 @@ -PubSubArgs | libp2p
                      interface PubSubArgs {
                          components: PubSubComponents;
                          init: PubSubInit;
                      }

                      Properties

                      components +PubSubArgs | libp2p

                      Generated using TypeDoc

                      \ No newline at end of file +

                      Properties

                      components: PubSubComponents

                      Generated using TypeDoc

                      \ No newline at end of file diff --git a/interfaces/_libp2p_interface_compliance_tests.pubsub.PubSubComponents.html b/interfaces/_libp2p_interface_compliance_tests.pubsub.PubSubComponents.html index 13a0d9523b..c52b90fcf7 100644 --- a/interfaces/_libp2p_interface_compliance_tests.pubsub.PubSubComponents.html +++ b/interfaces/_libp2p_interface_compliance_tests.pubsub.PubSubComponents.html @@ -1,6 +1,6 @@ -PubSubComponents | libp2p
                      interface PubSubComponents {
                          connectionManager: ConnectionManager;
                          logger: ComponentLogger;
                          peerId: PeerId;
                          pubsub?: PubSub<PubSubEvents>;
                          registrar: Registrar;
                      }

                      Properties

                      connectionManager +PubSubComponents | libp2p

                      Generated using TypeDoc

                      \ No newline at end of file +

                      Properties

                      connectionManager: ConnectionManager
                      peerId: PeerId
                      registrar: Registrar

                      Generated using TypeDoc

                      \ No newline at end of file diff --git a/interfaces/_libp2p_interface_compliance_tests.transport.Connector.html b/interfaces/_libp2p_interface_compliance_tests.transport.Connector.html index b3e6662b9c..51d956a991 100644 --- a/interfaces/_libp2p_interface_compliance_tests.transport.Connector.html +++ b/interfaces/_libp2p_interface_compliance_tests.transport.Connector.html @@ -1,3 +1,3 @@ -Connector | libp2p
                      interface Connector {
                          delay(ms): void;
                          restore(): void;
                      }

                      Methods

                      delay +Connector | libp2p

                      Generated using TypeDoc

                      \ No newline at end of file +

                      Methods

                      Generated using TypeDoc

                      \ No newline at end of file diff --git a/interfaces/_libp2p_interface_compliance_tests.transport.TransportTestFixtures.html b/interfaces/_libp2p_interface_compliance_tests.transport.TransportTestFixtures.html index 4e42357808..733f52e9b8 100644 --- a/interfaces/_libp2p_interface_compliance_tests.transport.TransportTestFixtures.html +++ b/interfaces/_libp2p_interface_compliance_tests.transport.TransportTestFixtures.html @@ -1,4 +1,4 @@ -TransportTestFixtures | libp2p
                      interface TransportTestFixtures {
                          addrs: Multiaddr[];
                          connector: Connector;
                          transport: Transport;
                      }

                      Properties

                      addrs +TransportTestFixtures | libp2p

                      Generated using TypeDoc

                      \ No newline at end of file +

                      Properties

                      addrs: Multiaddr[]
                      connector: Connector
                      transport: Transport

                      Generated using TypeDoc

                      \ No newline at end of file diff --git a/interfaces/_libp2p_interface_internal.AddressManager.html b/interfaces/_libp2p_interface_internal.AddressManager.html index ccd3d2359c..2c36b37256 100644 --- a/interfaces/_libp2p_interface_internal.AddressManager.html +++ b/interfaces/_libp2p_interface_internal.AddressManager.html @@ -1,4 +1,4 @@ -AddressManager | libp2p
                      interface AddressManager {
                          addObservedAddr(addr): void;
                          confirmObservedAddr(addr): void;
                          getAddresses(): Multiaddr[];
                          getAnnounceAddrs(): Multiaddr[];
                          getListenAddrs(): Multiaddr[];
                          getObservedAddrs(): Multiaddr[];
                          removeObservedAddr(addr): void;
                      }

                      Methods

                      addObservedAddr +AddressManager | libp2p
                      interface AddressManager {
                          addObservedAddr(addr): void;
                          confirmObservedAddr(addr): void;
                          getAddresses(): Multiaddr[];
                          getAnnounceAddrs(): Multiaddr[];
                          getListenAddrs(): Multiaddr[];
                          getObservedAddrs(): Multiaddr[];
                          removeObservedAddr(addr): void;
                      }

                      Methods

                      • Add peer observed addresses. These will then appear in the output of getObservedAddrs but not getAddresses() until their dialability has been confirmed via a call to confirmObservedAddr.

                        -

                        Parameters

                        Returns void

                      Generated using TypeDoc

                      \ No newline at end of file +

                      Parameters

                      Returns void

                      Generated using TypeDoc

                      \ No newline at end of file diff --git a/interfaces/_libp2p_interface_internal.ConnectionManager.html b/interfaces/_libp2p_interface_internal.ConnectionManager.html index 1964eaf309..95c0288244 100644 --- a/interfaces/_libp2p_interface_internal.ConnectionManager.html +++ b/interfaces/_libp2p_interface_internal.ConnectionManager.html @@ -1,4 +1,4 @@ -ConnectionManager | libp2p
                      interface ConnectionManager {
                          acceptIncomingConnection(maConn): Promise<boolean>;
                          afterUpgradeInbound(): void;
                          closeConnections(peer, options?): Promise<void>;
                          getConnections(peerId?): Connection[];
                          getConnectionsMap(): PeerMap<Connection[]>;
                          getDialQueue(): PendingDial[];
                          openConnection(peer, options?): Promise<Connection>;
                      }

                      Methods

                      acceptIncomingConnection +ConnectionManager | libp2p
                      interface ConnectionManager {
                          acceptIncomingConnection(maConn): Promise<boolean>;
                          afterUpgradeInbound(): void;
                          closeConnections(peer, options?): Promise<void>;
                          getConnections(peerId?): Connection[];
                          getConnectionsMap(): PeerMap<Connection[]>;
                          getDialQueue(): PendingDial[];
                          openConnection(peer, options?): Promise<Connection>;
                      }

                      Methods

                      acceptIncomingConnection afterUpgradeInbound closeConnections getConnections @@ -9,18 +9,18 @@ exchanged, this lets the ConnectionManager check we have sufficient resources to accept the connection in which case it will return true, otherwise it will return false.

                      -

                      Parameters

                      Returns Promise<boolean>

                      Generated using TypeDoc

                      \ No newline at end of file +

                      Generated using TypeDoc

                      \ No newline at end of file diff --git a/interfaces/_libp2p_interface_internal.Envelope.html b/interfaces/_libp2p_interface_internal.Envelope.html index 27b785e8e2..2a82f7aea6 100644 --- a/interfaces/_libp2p_interface_internal.Envelope.html +++ b/interfaces/_libp2p_interface_internal.Envelope.html @@ -1,8 +1,8 @@ -Envelope | libp2p
                      interface Envelope {
                          payload: Uint8Array;
                          payloadType: Uint8Array | Uint8ArrayList;
                          peerId: PeerId;
                          signature: Uint8Array | Uint8ArrayList;
                          equals(other): boolean;
                          marshal(): Uint8Array;
                          validate(domain): Promise<boolean>;
                      }

                      Properties

                      payload +Envelope | libp2p
                      interface Envelope {
                          payload: Uint8Array;
                          payloadType: Uint8Array | Uint8ArrayList;
                          peerId: PeerId;
                          signature: Uint8Array | Uint8ArrayList;
                          equals(other): boolean;
                          marshal(): Uint8Array;
                          validate(domain): Promise<boolean>;
                      }

                      Properties

                      payload: Uint8Array
                      payloadType: Uint8Array | Uint8ArrayList
                      peerId: PeerId

                      Methods

                      Generated using TypeDoc

                      \ No newline at end of file +

                      Properties

                      payload: Uint8Array
                      payloadType: Uint8Array | Uint8ArrayList
                      peerId: PeerId

                      Methods

                      Generated using TypeDoc

                      \ No newline at end of file diff --git a/interfaces/_libp2p_interface_internal.IncomingStreamData.html b/interfaces/_libp2p_interface_internal.IncomingStreamData.html index fff65df3cd..f17e23be5a 100644 --- a/interfaces/_libp2p_interface_internal.IncomingStreamData.html +++ b/interfaces/_libp2p_interface_internal.IncomingStreamData.html @@ -1,5 +1,5 @@ -IncomingStreamData | libp2p
                      interface IncomingStreamData {
                          connection: Connection;
                          stream: Stream;
                      }

                      Properties

                      connection +IncomingStreamData | libp2p

                      Generated using TypeDoc

                      \ No newline at end of file +
                      stream: Stream

                      The stream that has been opened

                      +

                      Generated using TypeDoc

                      \ No newline at end of file diff --git a/interfaces/_libp2p_interface_internal.OpenConnectionOptions.html b/interfaces/_libp2p_interface_internal.OpenConnectionOptions.html index 762dafbd2e..68ee6cde0e 100644 --- a/interfaces/_libp2p_interface_internal.OpenConnectionOptions.html +++ b/interfaces/_libp2p_interface_internal.OpenConnectionOptions.html @@ -2,12 +2,12 @@ the optional signal property.

                      Example

                      const controller = new AbortController()

                      aLongRunningOperation({
                      signal: controller.signal
                      })

                      // later

                      controller.abort()
                      -
                      interface OpenConnectionOptions {
                          force?: boolean;
                          priority?: number;
                          signal?: AbortSignal;
                      }

                      Hierarchy

                      Properties

                      interface OpenConnectionOptions {
                          force?: boolean;
                          priority?: number;
                          signal?: AbortSignal;
                      }

                      Hierarchy

                      Properties

                      force?: boolean

                      When opening a connection to a remote peer, if a connection already exists it will be returned instead of creating a new connection. Pass true here to override that and dial a new connection anyway. (default: false)

                      -
                      priority?: number

                      Connection requests with a higher priority will be executed before those +

                      priority?: number

                      Connection requests with a higher priority will be executed before those with a lower priority. (default: 50)

                      -
                      signal?: AbortSignal

                      Generated using TypeDoc

                      \ No newline at end of file +
                      signal?: AbortSignal

                      Generated using TypeDoc

                      \ No newline at end of file diff --git a/interfaces/_libp2p_interface_internal.Record.html b/interfaces/_libp2p_interface_internal.Record.html index 6a1941a296..9967611723 100644 --- a/interfaces/_libp2p_interface_internal.Record.html +++ b/interfaces/_libp2p_interface_internal.Record.html @@ -1,10 +1,10 @@ Record | libp2p

                      Record is the base implementation of a record that can be used as the payload of a libp2p envelope.

                      -
                      interface Record {
                          codec: Uint8Array;
                          domain: string;
                          equals(other): boolean;
                          marshal(): Uint8Array;
                      }

                      Properties

                      interface Record {
                          codec: Uint8Array;
                          domain: string;
                          equals(other): boolean;
                          marshal(): Uint8Array;
                      }

                      Properties

                      Methods

                      Properties

                      codec: Uint8Array

                      identifier of the type of record

                      -
                      domain: string

                      signature domain.

                      -

                      Methods

                      Generated using TypeDoc

                      \ No newline at end of file +
                      domain: string

                      signature domain.

                      +

                      Methods

                      Generated using TypeDoc

                      \ No newline at end of file diff --git a/interfaces/_libp2p_interface_internal.Registrar.html b/interfaces/_libp2p_interface_internal.Registrar.html index f99e9eedbe..2440dcd30a 100644 --- a/interfaces/_libp2p_interface_internal.Registrar.html +++ b/interfaces/_libp2p_interface_internal.Registrar.html @@ -1,4 +1,4 @@ -Registrar | libp2p
                      interface Registrar {
                          getHandler(protocol): StreamHandlerRecord;
                          getProtocols(): string[];
                          getTopologies(protocol): Topology[];
                          handle(protocol, handler, options?): Promise<void>;
                          register(protocol, topology): Promise<string>;
                          unhandle(protocol): Promise<void>;
                          unregister(id): void;
                      }

                      Methods

                      getHandler +Registrar | libp2p
                      interface Registrar {
                          getHandler(protocol): StreamHandlerRecord;
                          getProtocols(): string[];
                          getTopologies(protocol): Topology[];
                          handle(protocol, handler, options?): Promise<void>;
                          register(protocol, topology): Promise<string>;
                          unhandle(protocol): Promise<void>;
                          unregister(id): void;
                      }

                      Methods

                      • Register a topology handler for a protocol - the topology will be invoked when peers are discovered on the network that support the passed protocol.

                        An id will be returned that can later be used to unregister the topology.

                        -

                        Parameters

                        Returns Promise<string>

                      Generated using TypeDoc

                      \ No newline at end of file +

                      Parameters

                      Returns Promise<string>

                      Generated using TypeDoc

                      \ No newline at end of file diff --git a/interfaces/_libp2p_interface_internal.StreamHandler.html b/interfaces/_libp2p_interface_internal.StreamHandler.html index 2a66334206..fa8b081446 100644 --- a/interfaces/_libp2p_interface_internal.StreamHandler.html +++ b/interfaces/_libp2p_interface_internal.StreamHandler.html @@ -1 +1 @@ -StreamHandler | libp2p
                      interface StreamHandler ((data) => void)

                      Generated using TypeDoc

                      \ No newline at end of file +StreamHandler | libp2p
                      interface StreamHandler ((data) => void)

                      Generated using TypeDoc

                      \ No newline at end of file diff --git a/interfaces/_libp2p_interface_internal.StreamHandlerOptions.html b/interfaces/_libp2p_interface_internal.StreamHandlerOptions.html index cbfc18ea31..2ca3d29a60 100644 --- a/interfaces/_libp2p_interface_internal.StreamHandlerOptions.html +++ b/interfaces/_libp2p_interface_internal.StreamHandlerOptions.html @@ -1,9 +1,9 @@ -StreamHandlerOptions | libp2p
                      interface StreamHandlerOptions {
                          maxInboundStreams?: number;
                          maxOutboundStreams?: number;
                          runOnTransientConnection?: boolean;
                      }

                      Properties

                      maxInboundStreams? +StreamHandlerOptions | libp2p
                      interface StreamHandlerOptions {
                          maxInboundStreams?: number;
                          maxOutboundStreams?: number;
                          runOnTransientConnection?: boolean;
                      }

                      Properties

                      maxInboundStreams?: number

                      How many incoming streams can be open for this protocol at the same time on each connection (default: 32)

                      -
                      maxOutboundStreams?: number

                      How many outgoing streams can be open for this protocol at the same time on each connection (default: 64)

                      -
                      runOnTransientConnection?: boolean

                      If true, allow this protocol to run on limited connections (e.g. +

                      maxOutboundStreams?: number

                      How many outgoing streams can be open for this protocol at the same time on each connection (default: 64)

                      +
                      runOnTransientConnection?: boolean

                      If true, allow this protocol to run on limited connections (e.g. connections with data or duration limits such as circuit relay connections) (default: false)

                      -

                      Generated using TypeDoc

                      \ No newline at end of file +

                      Generated using TypeDoc

                      \ No newline at end of file diff --git a/interfaces/_libp2p_interface_internal.StreamHandlerRecord.html b/interfaces/_libp2p_interface_internal.StreamHandlerRecord.html index 7a8790ecc8..1b43e27579 100644 --- a/interfaces/_libp2p_interface_internal.StreamHandlerRecord.html +++ b/interfaces/_libp2p_interface_internal.StreamHandlerRecord.html @@ -1,5 +1,5 @@ -StreamHandlerRecord | libp2p
                      interface StreamHandlerRecord {
                          handler: StreamHandler;
                          options: StreamHandlerOptions;
                      }

                      Properties

                      handler +StreamHandlerRecord | libp2p

                      Generated using TypeDoc

                      \ No newline at end of file +

                      The options that were used to register the stream handler

                      +

                      Generated using TypeDoc

                      \ No newline at end of file diff --git a/interfaces/_libp2p_interface_internal.TransportManager.html b/interfaces/_libp2p_interface_internal.TransportManager.html index fa3a2ac7cf..93b7c8e1c6 100644 --- a/interfaces/_libp2p_interface_internal.TransportManager.html +++ b/interfaces/_libp2p_interface_internal.TransportManager.html @@ -1,4 +1,4 @@ -TransportManager | libp2p
                      interface TransportManager {
                          add(transport): void;
                          dial(ma, options?): Promise<Connection>;
                          getAddrs(): Multiaddr[];
                          getListeners(): Listener[];
                          getTransports(): Transport[];
                          listen(addrs): Promise<void>;
                          remove(key): Promise<void>;
                          removeAll(): Promise<void>;
                          transportForMultiaddr(ma): undefined | Transport;
                      }

                      Methods

                      add +TransportManager | libp2p
                      interface TransportManager {
                          add(transport): void;
                          dial(ma, options?): Promise<Connection>;
                          getAddrs(): Multiaddr[];
                          getListeners(): Listener[];
                          getTransports(): Transport[];
                          listen(addrs): Promise<void>;
                          remove(key): Promise<void>;
                          removeAll(): Promise<void>;
                          transportForMultiaddr(ma): undefined | Transport;
                      }

                      Methods

                      Generated using TypeDoc

                      \ No newline at end of file +

                      Parameters

                      Returns Promise<Connection>

                      Generated using TypeDoc

                      \ No newline at end of file diff --git a/interfaces/_libp2p_kad_dht.AddPeerEvent.html b/interfaces/_libp2p_kad_dht.AddPeerEvent.html index 453027829d..5713fe86ed 100644 --- a/interfaces/_libp2p_kad_dht.AddPeerEvent.html +++ b/interfaces/_libp2p_kad_dht.AddPeerEvent.html @@ -1,5 +1,5 @@ AddPeerEvent | libp2p

                      Generated using TypeDoc

                      \ No newline at end of file +

                      Properties

                      name: "ADD_PEER"
                      peer: PeerId
                      type: ADD_PEER

                      Generated using TypeDoc

                      \ No newline at end of file diff --git a/interfaces/_libp2p_kad_dht.DHTRecord.html b/interfaces/_libp2p_kad_dht.DHTRecord.html index a52d75267c..c0fde4b241 100644 --- a/interfaces/_libp2p_kad_dht.DHTRecord.html +++ b/interfaces/_libp2p_kad_dht.DHTRecord.html @@ -1,4 +1,4 @@ -DHTRecord | libp2p
                      interface DHTRecord {
                          key: Uint8Array;
                          timeReceived?: Date;
                          value: Uint8Array;
                      }

                      Properties

                      key +DHTRecord | libp2p

                      Generated using TypeDoc

                      \ No newline at end of file +

                      Properties

                      timeReceived?: Date
                      value: Uint8Array

                      Generated using TypeDoc

                      \ No newline at end of file diff --git a/interfaces/_libp2p_kad_dht.DialPeerEvent.html b/interfaces/_libp2p_kad_dht.DialPeerEvent.html index d1e16f6bcd..80fec2295b 100644 --- a/interfaces/_libp2p_kad_dht.DialPeerEvent.html +++ b/interfaces/_libp2p_kad_dht.DialPeerEvent.html @@ -1,5 +1,5 @@ DialPeerEvent | libp2p

                      Interface DialPeerEvent

                      Emitted when peers are dialled as part of a query

                      -
                      interface DialPeerEvent {
                          name: "DIAL_PEER";
                          peer: PeerId;
                          type: DIAL_PEER;
                      }

                      Properties

                      interface DialPeerEvent {
                          name: "DIAL_PEER";
                          peer: PeerId;
                          type: DIAL_PEER;
                      }

                      Properties

                      Properties

                      name: "DIAL_PEER"
                      peer: PeerId
                      type: DIAL_PEER

                      Generated using TypeDoc

                      \ No newline at end of file +

                      Properties

                      name: "DIAL_PEER"
                      peer: PeerId
                      type: DIAL_PEER

                      Generated using TypeDoc

                      \ No newline at end of file diff --git a/interfaces/_libp2p_kad_dht.DualKadDHT.html b/interfaces/_libp2p_kad_dht.DualKadDHT.html index 5c62d9ccd1..118d3b6901 100644 --- a/interfaces/_libp2p_kad_dht.DualKadDHT.html +++ b/interfaces/_libp2p_kad_dht.DualKadDHT.html @@ -1,4 +1,4 @@ -DualKadDHT | libp2p
                      interface DualKadDHT {
                          lan: SingleKadDHT;
                          wan: SingleKadDHT;
                          findPeer(id, options?): AsyncIterable<QueryEvent>;
                          findProviders(key, options?): AsyncIterable<QueryEvent>;
                          get(key, options?): AsyncIterable<QueryEvent>;
                          getClosestPeers(key, options?): AsyncIterable<QueryEvent>;
                          getMode(): Promise<"client" | "server">;
                          provide(key, options?): AsyncIterable<QueryEvent>;
                          put(key, value, options?): AsyncIterable<QueryEvent>;
                          refreshRoutingTable(): Promise<void>;
                          setMode(mode): Promise<void>;
                      }

                      Hierarchy

                      Properties

                      lan +DualKadDHT | libp2p
                      interface DualKadDHT {
                          lan: SingleKadDHT;
                          wan: SingleKadDHT;
                          findPeer(id, options?): AsyncIterable<QueryEvent>;
                          findProviders(key, options?): AsyncIterable<QueryEvent>;
                          get(key, options?): AsyncIterable<QueryEvent>;
                          getClosestPeers(key, options?): AsyncIterable<QueryEvent>;
                          getMode(): Promise<"client" | "server">;
                          provide(key, options?): AsyncIterable<QueryEvent>;
                          put(key, value, options?): AsyncIterable<QueryEvent>;
                          refreshRoutingTable(): Promise<void>;
                          setMode(mode): Promise<void>;
                      }

                      Hierarchy

                      Properties

                      Methods

                      Properties

                      Methods

                      Generated using TypeDoc

                      \ No newline at end of file +

                      Properties

                      Methods

                      Generated using TypeDoc

                      \ No newline at end of file diff --git a/interfaces/_libp2p_kad_dht.FinalPeerEvent.html b/interfaces/_libp2p_kad_dht.FinalPeerEvent.html index 1c0b0be118..abf8be8911 100644 --- a/interfaces/_libp2p_kad_dht.FinalPeerEvent.html +++ b/interfaces/_libp2p_kad_dht.FinalPeerEvent.html @@ -1,6 +1,6 @@ FinalPeerEvent | libp2p

                      Interface FinalPeerEvent

                      Emitted at the end of a findPeer query

                      -
                      interface FinalPeerEvent {
                          from: PeerId;
                          name: "FINAL_PEER";
                          peer: PeerInfo;
                          type: FINAL_PEER;
                      }

                      Properties

                      interface FinalPeerEvent {
                          from: PeerId;
                          name: "FINAL_PEER";
                          peer: PeerInfo;
                          type: FINAL_PEER;
                      }

                      Properties

                      Properties

                      from: PeerId
                      name: "FINAL_PEER"
                      peer: PeerInfo

                      Generated using TypeDoc

                      \ No newline at end of file +

                      Properties

                      from: PeerId
                      name: "FINAL_PEER"
                      peer: PeerInfo

                      Generated using TypeDoc

                      \ No newline at end of file diff --git a/interfaces/_libp2p_kad_dht.KadDHT.html b/interfaces/_libp2p_kad_dht.KadDHT.html index 04f3001511..25dc3ab142 100644 --- a/interfaces/_libp2p_kad_dht.KadDHT.html +++ b/interfaces/_libp2p_kad_dht.KadDHT.html @@ -1,4 +1,4 @@ -KadDHT | libp2p
                      interface KadDHT {
                          findPeer(id, options?): AsyncIterable<QueryEvent>;
                          findProviders(key, options?): AsyncIterable<QueryEvent>;
                          get(key, options?): AsyncIterable<QueryEvent>;
                          getClosestPeers(key, options?): AsyncIterable<QueryEvent>;
                          getMode(): Promise<"client" | "server">;
                          provide(key, options?): AsyncIterable<QueryEvent>;
                          put(key, value, options?): AsyncIterable<QueryEvent>;
                          refreshRoutingTable(): Promise<void>;
                          setMode(mode): Promise<void>;
                      }

                      Hierarchy

                      Methods

                      findPeer +KadDHT | libp2p
                      interface KadDHT {
                          findPeer(id, options?): AsyncIterable<QueryEvent>;
                          findProviders(key, options?): AsyncIterable<QueryEvent>;
                          get(key, options?): AsyncIterable<QueryEvent>;
                          getClosestPeers(key, options?): AsyncIterable<QueryEvent>;
                          getMode(): Promise<"client" | "server">;
                          provide(key, options?): AsyncIterable<QueryEvent>;
                          put(key, value, options?): AsyncIterable<QueryEvent>;
                          refreshRoutingTable(): Promise<void>;
                          setMode(mode): Promise<void>;
                      }

                      Hierarchy

                      Methods

                      Generated using TypeDoc

                      \ No newline at end of file +

                      Parameters

                      Returns AsyncIterable<QueryEvent>

                      Generated using TypeDoc

                      \ No newline at end of file diff --git a/interfaces/_libp2p_kad_dht.KadDHTComponents.html b/interfaces/_libp2p_kad_dht.KadDHTComponents.html index 9b13b48c8b..3e778bb62b 100644 --- a/interfaces/_libp2p_kad_dht.KadDHTComponents.html +++ b/interfaces/_libp2p_kad_dht.KadDHTComponents.html @@ -1,4 +1,4 @@ -KadDHTComponents | libp2p

                      Interface KadDHTComponents

                      interface KadDHTComponents {
                          addressManager: AddressManager;
                          connectionManager: ConnectionManager;
                          datastore: Datastore<{}, {}, {}, {}, {}, {}, {}, {}, {}, {}>;
                          events: TypedEventTarget<Libp2pEvents<ServiceMap>>;
                          logger: ComponentLogger;
                          metrics?: Metrics;
                          peerId: PeerId;
                          peerStore: PeerStore;
                          registrar: Registrar;
                      }

                      Properties

                      addressManager +KadDHTComponents | libp2p

                      Interface KadDHTComponents

                      interface KadDHTComponents {
                          addressManager: AddressManager;
                          connectionManager: ConnectionManager;
                          datastore: Datastore<{}, {}, {}, {}, {}, {}, {}, {}, {}, {}>;
                          events: TypedEventTarget<Libp2pEvents<ServiceMap>>;
                          logger: ComponentLogger;
                          metrics?: Metrics;
                          peerId: PeerId;
                          peerStore: PeerStore;
                          registrar: Registrar;
                      }

                      Properties

                      addressManager: AddressManager
                      connectionManager: ConnectionManager
                      datastore: Datastore<{}, {}, {}, {}, {}, {}, {}, {}, {}, {}>

                      Type declaration

                        Type declaration

                          Type declaration

                            Type declaration

                              Type declaration

                                Type declaration

                                  Type declaration

                                    Type declaration

                                      Type declaration

                                        Type declaration

                                          metrics?: Metrics
                                          peerId: PeerId
                                          peerStore: PeerStore
                                          registrar: Registrar

                                          Generated using TypeDoc

                                          \ No newline at end of file +

                                          Properties

                                          addressManager: AddressManager
                                          connectionManager: ConnectionManager
                                          datastore: Datastore<{}, {}, {}, {}, {}, {}, {}, {}, {}, {}>

                                          Type declaration

                                            Type declaration

                                              Type declaration

                                                Type declaration

                                                  Type declaration

                                                    Type declaration

                                                      Type declaration

                                                        Type declaration

                                                          Type declaration

                                                            Type declaration

                                                              metrics?: Metrics
                                                              peerId: PeerId
                                                              peerStore: PeerStore
                                                              registrar: Registrar

                                                              Generated using TypeDoc

                                                              \ No newline at end of file diff --git a/interfaces/_libp2p_kad_dht.KadDHTInit.html b/interfaces/_libp2p_kad_dht.KadDHTInit.html index 434c9f0410..e388be1c91 100644 --- a/interfaces/_libp2p_kad_dht.KadDHTInit.html +++ b/interfaces/_libp2p_kad_dht.KadDHTInit.html @@ -1,4 +1,4 @@ -KadDHTInit | libp2p
                                                              interface KadDHTInit {
                                                                  allowQueryWithZeroPeers?: boolean;
                                                                  clientMode?: boolean;
                                                                  initialQuerySelfInterval?: number;
                                                                  kBucketSize?: number;
                                                                  maxInboundStreams?: number;
                                                                  maxOutboundStreams?: number;
                                                                  pingConcurrency?: number;
                                                                  pingTimeout?: number;
                                                                  protocolPrefix?: string;
                                                                  providers?: ProvidersInit;
                                                                  querySelfInterval?: number;
                                                                  selectors?: Selectors;
                                                                  validators?: Validators;
                                                              }

                                                              Properties

                                                              allowQueryWithZeroPeers? +KadDHTInit | libp2p
                                                              interface KadDHTInit {
                                                                  allowQueryWithZeroPeers?: boolean;
                                                                  clientMode?: boolean;
                                                                  initialQuerySelfInterval?: number;
                                                                  kBucketSize?: number;
                                                                  maxInboundStreams?: number;
                                                                  maxOutboundStreams?: number;
                                                                  pingConcurrency?: number;
                                                                  pingTimeout?: number;
                                                                  protocolPrefix?: string;
                                                                  providers?: ProvidersInit;
                                                                  querySelfInterval?: number;
                                                                  selectors?: Selectors;
                                                                  validators?: Validators;
                                                              }

                                                              Properties

                                                              allowQueryWithZeroPeers?: boolean

                                                              After startup by default all queries will be paused until the initial self-query has run and there are some peers in the routing table.

                                                              Pass true here to disable this behaviour. (default: false)

                                                              -
                                                              clientMode?: boolean

                                                              Whether to start up as a DHT client or server

                                                              -
                                                              initialQuerySelfInterval?: number

                                                              During startup we run the self-query at a shorter interval to ensure +

                                                              clientMode?: boolean

                                                              Whether to start up as a DHT client or server

                                                              +
                                                              initialQuerySelfInterval?: number

                                                              During startup we run the self-query at a shorter interval to ensure the containing node can respond to queries quickly. Set this interval here in ms (default: 1000)

                                                              -
                                                              kBucketSize?: number

                                                              How many peers to store in each kBucket (default 20)

                                                              -
                                                              maxInboundStreams?: number

                                                              How many parallel incoming streams to allow on the DHT protocol per-connection

                                                              -
                                                              maxOutboundStreams?: number

                                                              How many parallel outgoing streams to allow on the DHT protocol per-connection

                                                              -
                                                              pingConcurrency?: number

                                                              How many peers to ping in parallel when deciding if they should +

                                                              kBucketSize?: number

                                                              How many peers to store in each kBucket (default 20)

                                                              +
                                                              maxInboundStreams?: number

                                                              How many parallel incoming streams to allow on the DHT protocol per-connection

                                                              +
                                                              maxOutboundStreams?: number

                                                              How many parallel outgoing streams to allow on the DHT protocol per-connection

                                                              +
                                                              pingConcurrency?: number

                                                              How many peers to ping in parallel when deciding if they should be evicted from the routing table or not (default 10)

                                                              -
                                                              pingTimeout?: number

                                                              How long to wait in ms when pinging DHT peers to decide if they +

                                                              pingTimeout?: number

                                                              How long to wait in ms when pinging DHT peers to decide if they should be evicted from the routing table or not (default 10000)

                                                              -
                                                              protocolPrefix?: string

                                                              A custom protocol prefix to use (default: '/ipfs')

                                                              -
                                                              providers?: ProvidersInit

                                                              Initialization options for the Providers component

                                                              -
                                                              querySelfInterval?: number

                                                              How often to query our own PeerId in order to ensure we have a +

                                                              protocolPrefix?: string

                                                              A custom protocol prefix to use (default: '/ipfs')

                                                              +
                                                              providers?: ProvidersInit

                                                              Initialization options for the Providers component

                                                              +
                                                              querySelfInterval?: number

                                                              How often to query our own PeerId in order to ensure we have a good view on the KAD address space local to our PeerId

                                                              -
                                                              selectors?: Selectors

                                                              Record selectors

                                                              -
                                                              validators?: Validators

                                                              Record validators

                                                              -

                                                              Generated using TypeDoc

                                                              \ No newline at end of file +
                                                              selectors?: Selectors

                                                              Record selectors

                                                              +
                                                              validators?: Validators

                                                              Record validators

                                                              +

                                                              Generated using TypeDoc

                                                              \ No newline at end of file diff --git a/interfaces/_libp2p_kad_dht.PeerResponseEvent.html b/interfaces/_libp2p_kad_dht.PeerResponseEvent.html index c84f356a88..de98f1e875 100644 --- a/interfaces/_libp2p_kad_dht.PeerResponseEvent.html +++ b/interfaces/_libp2p_kad_dht.PeerResponseEvent.html @@ -1,6 +1,6 @@ PeerResponseEvent | libp2p

                                                              Interface PeerResponseEvent

                                                              Emitted when query responses are received form remote peers. Depending on the query these events may be followed by a FinalPeerEvent, a ValueEvent or a ProviderEvent.

                                                              -
                                                              interface PeerResponseEvent {
                                                                  closer: PeerInfo[];
                                                                  from: PeerId;
                                                                  messageName: "PUT_VALUE" | "GET_VALUE" | "ADD_PROVIDER" | "GET_PROVIDERS" | "FIND_NODE" | "PING";
                                                                  messageType: MessageType;
                                                                  name: "PEER_RESPONSE";
                                                                  providers: PeerInfo[];
                                                                  record?: DHTRecord;
                                                                  type: PEER_RESPONSE;
                                                              }

                                                              Properties

                                                              interface PeerResponseEvent {
                                                                  closer: PeerInfo[];
                                                                  from: PeerId;
                                                                  messageName: "PUT_VALUE" | "GET_VALUE" | "ADD_PROVIDER" | "GET_PROVIDERS" | "FIND_NODE" | "PING";
                                                                  messageType: MessageType;
                                                                  name: "PEER_RESPONSE";
                                                                  providers: PeerInfo[];
                                                                  record?: DHTRecord;
                                                                  type: PEER_RESPONSE;
                                                              }

                                                              Properties

                                                              closer: PeerInfo[]
                                                              from: PeerId
                                                              messageName: "PUT_VALUE" | "GET_VALUE" | "ADD_PROVIDER" | "GET_PROVIDERS" | "FIND_NODE" | "PING"
                                                              messageType: MessageType
                                                              name: "PEER_RESPONSE"
                                                              providers: PeerInfo[]
                                                              record?: DHTRecord

                                                              Generated using TypeDoc

                                                              \ No newline at end of file +

                                                              Properties

                                                              closer: PeerInfo[]
                                                              from: PeerId
                                                              messageName: "PUT_VALUE" | "GET_VALUE" | "ADD_PROVIDER" | "GET_PROVIDERS" | "FIND_NODE" | "PING"
                                                              messageType: MessageType
                                                              name: "PEER_RESPONSE"
                                                              providers: PeerInfo[]
                                                              record?: DHTRecord

                                                              Generated using TypeDoc

                                                              \ No newline at end of file diff --git a/interfaces/_libp2p_kad_dht.ProviderEvent.html b/interfaces/_libp2p_kad_dht.ProviderEvent.html index e786f51489..487ac37215 100644 --- a/interfaces/_libp2p_kad_dht.ProviderEvent.html +++ b/interfaces/_libp2p_kad_dht.ProviderEvent.html @@ -1,6 +1,6 @@ ProviderEvent | libp2p

                                                              Generated using TypeDoc

                                                              \ No newline at end of file +

                                                              Properties

                                                              from: PeerId
                                                              name: "PROVIDER"
                                                              providers: PeerInfo[]
                                                              type: PROVIDER

                                                              Generated using TypeDoc

                                                              \ No newline at end of file diff --git a/interfaces/_libp2p_kad_dht.QueryErrorEvent.html b/interfaces/_libp2p_kad_dht.QueryErrorEvent.html index 1c9660de08..7d10da78e0 100644 --- a/interfaces/_libp2p_kad_dht.QueryErrorEvent.html +++ b/interfaces/_libp2p_kad_dht.QueryErrorEvent.html @@ -1,6 +1,6 @@ QueryErrorEvent | libp2p

                                                              Interface QueryErrorEvent

                                                              Something went wrong with the query

                                                              -
                                                              interface QueryErrorEvent {
                                                                  error: Error;
                                                                  from: PeerId;
                                                                  name: "QUERY_ERROR";
                                                                  type: QUERY_ERROR;
                                                              }

                                                              Properties

                                                              interface QueryErrorEvent {
                                                                  error: Error;
                                                                  from: PeerId;
                                                                  name: "QUERY_ERROR";
                                                                  type: QUERY_ERROR;
                                                              }

                                                              Properties

                                                              Properties

                                                              error: Error
                                                              from: PeerId
                                                              name: "QUERY_ERROR"

                                                              Generated using TypeDoc

                                                              \ No newline at end of file +

                                                              Properties

                                                              error: Error
                                                              from: PeerId
                                                              name: "QUERY_ERROR"

                                                              Generated using TypeDoc

                                                              \ No newline at end of file diff --git a/interfaces/_libp2p_kad_dht.QueryOptions.html b/interfaces/_libp2p_kad_dht.QueryOptions.html index 6bb4d835c8..a60d3bb5f8 100644 --- a/interfaces/_libp2p_kad_dht.QueryOptions.html +++ b/interfaces/_libp2p_kad_dht.QueryOptions.html @@ -2,7 +2,7 @@ the optional signal property.

                                                              Example

                                                              const controller = new AbortController()

                                                              aLongRunningOperation({
                                                              signal: controller.signal
                                                              })

                                                              // later

                                                              controller.abort()
                                                              -
                                                              interface QueryOptions {
                                                                  onProgress?: ((evt) => void);
                                                                  queryFuncTimeout?: number;
                                                                  signal?: AbortSignal;
                                                              }

                                                              Hierarchy

                                                              Properties

                                                              interface QueryOptions {
                                                                  onProgress?: ((evt) => void);
                                                                  queryFuncTimeout?: number;
                                                                  signal?: AbortSignal;
                                                              }

                                                              Hierarchy

                                                              Properties

                                                              onProgress?: ((evt) => void)

                                                              Type declaration

                                                                • (evt): void
                                                                • Parameters

                                                                  • evt: any

                                                                  Returns void

                                                              queryFuncTimeout?: number
                                                              signal?: AbortSignal

                                                              Generated using TypeDoc

                                                              \ No newline at end of file +

                                                              Properties

                                                              onProgress?: ((evt) => void)

                                                              Type declaration

                                                                • (evt): void
                                                                • Parameters

                                                                  • evt: any

                                                                  Returns void

                                                              queryFuncTimeout?: number
                                                              signal?: AbortSignal

                                                              Generated using TypeDoc

                                                              \ No newline at end of file diff --git a/interfaces/_libp2p_kad_dht.RoutingTable.html b/interfaces/_libp2p_kad_dht.RoutingTable.html index 62b4db4653..12c1e71df3 100644 --- a/interfaces/_libp2p_kad_dht.RoutingTable.html +++ b/interfaces/_libp2p_kad_dht.RoutingTable.html @@ -1,2 +1,2 @@ -RoutingTable | libp2p

                                                              Interface RoutingTable

                                                              interface RoutingTable {
                                                                  size: number;
                                                              }

                                                              Properties

                                                              Properties

                                                              size: number

                                                              Generated using TypeDoc

                                                              \ No newline at end of file +RoutingTable | libp2p

                                                              Interface RoutingTable

                                                              interface RoutingTable {
                                                                  size: number;
                                                              }

                                                              Properties

                                                              Properties

                                                              size: number

                                                              Generated using TypeDoc

                                                              \ No newline at end of file diff --git a/interfaces/_libp2p_kad_dht.SelectFn.html b/interfaces/_libp2p_kad_dht.SelectFn.html index 52591561a2..c348675227 100644 --- a/interfaces/_libp2p_kad_dht.SelectFn.html +++ b/interfaces/_libp2p_kad_dht.SelectFn.html @@ -1,3 +1,3 @@ SelectFn | libp2p

                                                              A selector function takes a DHT key and a list of records and returns the index of the best record in the list

                                                              -
                                                              interface SelectFn ((key, records) => number)

                                                              Generated using TypeDoc

                                                              \ No newline at end of file +
                                                              interface SelectFn ((key, records) => number)

                                                              Generated using TypeDoc

                                                              \ No newline at end of file diff --git a/interfaces/_libp2p_kad_dht.SendQueryEvent.html b/interfaces/_libp2p_kad_dht.SendQueryEvent.html index 797b209b56..50808bb5ab 100644 --- a/interfaces/_libp2p_kad_dht.SendQueryEvent.html +++ b/interfaces/_libp2p_kad_dht.SendQueryEvent.html @@ -1,7 +1,7 @@ SendQueryEvent | libp2p

                                                              Interface SendQueryEvent

                                                              Emitted when sending queries to remote peers

                                                              -
                                                              interface SendQueryEvent {
                                                                  messageName: "PUT_VALUE" | "GET_VALUE" | "ADD_PROVIDER" | "GET_PROVIDERS" | "FIND_NODE" | "PING";
                                                                  messageType: MessageType;
                                                                  name: "SEND_QUERY";
                                                                  to: PeerId;
                                                                  type: SEND_QUERY;
                                                              }

                                                              Properties

                                                              interface SendQueryEvent {
                                                                  messageName: "PUT_VALUE" | "GET_VALUE" | "ADD_PROVIDER" | "GET_PROVIDERS" | "FIND_NODE" | "PING";
                                                                  messageType: MessageType;
                                                                  name: "SEND_QUERY";
                                                                  to: PeerId;
                                                                  type: SEND_QUERY;
                                                              }

                                                              Properties

                                                              messageName: "PUT_VALUE" | "GET_VALUE" | "ADD_PROVIDER" | "GET_PROVIDERS" | "FIND_NODE" | "PING"
                                                              messageType: MessageType
                                                              name: "SEND_QUERY"
                                                              to: PeerId

                                                              Generated using TypeDoc

                                                              \ No newline at end of file +

                                                              Properties

                                                              messageName: "PUT_VALUE" | "GET_VALUE" | "ADD_PROVIDER" | "GET_PROVIDERS" | "FIND_NODE" | "PING"
                                                              messageType: MessageType
                                                              name: "SEND_QUERY"
                                                              to: PeerId

                                                              Generated using TypeDoc

                                                              \ No newline at end of file diff --git a/interfaces/_libp2p_kad_dht.SingleKadDHT.html b/interfaces/_libp2p_kad_dht.SingleKadDHT.html index 6d80a8f8ca..4adaad4707 100644 --- a/interfaces/_libp2p_kad_dht.SingleKadDHT.html +++ b/interfaces/_libp2p_kad_dht.SingleKadDHT.html @@ -1,4 +1,4 @@ -SingleKadDHT | libp2p

                                                              Interface SingleKadDHT

                                                              interface SingleKadDHT {
                                                                  routingTable: RoutingTable;
                                                                  findPeer(id, options?): AsyncIterable<QueryEvent>;
                                                                  findProviders(key, options?): AsyncIterable<QueryEvent>;
                                                                  get(key, options?): AsyncIterable<QueryEvent>;
                                                                  getClosestPeers(key, options?): AsyncIterable<QueryEvent>;
                                                                  getMode(): Promise<"client" | "server">;
                                                                  provide(key, options?): AsyncIterable<QueryEvent>;
                                                                  put(key, value, options?): AsyncIterable<QueryEvent>;
                                                                  refreshRoutingTable(): Promise<void>;
                                                                  setMode(mode): Promise<void>;
                                                              }

                                                              Hierarchy

                                                              Properties

                                                              routingTable +SingleKadDHT | libp2p

                                                              Interface SingleKadDHT

                                                              interface SingleKadDHT {
                                                                  routingTable: RoutingTable;
                                                                  findPeer(id, options?): AsyncIterable<QueryEvent>;
                                                                  findProviders(key, options?): AsyncIterable<QueryEvent>;
                                                                  get(key, options?): AsyncIterable<QueryEvent>;
                                                                  getClosestPeers(key, options?): AsyncIterable<QueryEvent>;
                                                                  getMode(): Promise<"client" | "server">;
                                                                  provide(key, options?): AsyncIterable<QueryEvent>;
                                                                  put(key, value, options?): AsyncIterable<QueryEvent>;
                                                                  refreshRoutingTable(): Promise<void>;
                                                                  setMode(mode): Promise<void>;
                                                              }

                                                              Hierarchy

                                                              Properties

                                                              routingTable: RoutingTable

                                                              Methods

                                                              Generated using TypeDoc

                                                              \ No newline at end of file +

                                                              Properties

                                                              routingTable: RoutingTable

                                                              Methods

                                                              Generated using TypeDoc

                                                              \ No newline at end of file diff --git a/interfaces/_libp2p_kad_dht.ValidateFn.html b/interfaces/_libp2p_kad_dht.ValidateFn.html index 8cc7b268b6..e9fe03ef5e 100644 --- a/interfaces/_libp2p_kad_dht.ValidateFn.html +++ b/interfaces/_libp2p_kad_dht.ValidateFn.html @@ -1,3 +1,3 @@ ValidateFn | libp2p

                                                              A validator function takes a DHT key and the value of the record for that key and throws if the record is invalid

                                                              -
                                                              interface ValidateFn ((key, value) => Promise<void>)

                                                              Generated using TypeDoc

                                                              \ No newline at end of file +
                                                              interface ValidateFn ((key, value) => Promise<void>)

                                                              Generated using TypeDoc

                                                              \ No newline at end of file diff --git a/interfaces/_libp2p_kad_dht.ValueEvent.html b/interfaces/_libp2p_kad_dht.ValueEvent.html index df043f1019..90d65146a0 100644 --- a/interfaces/_libp2p_kad_dht.ValueEvent.html +++ b/interfaces/_libp2p_kad_dht.ValueEvent.html @@ -1,6 +1,6 @@ ValueEvent | libp2p

                                                              Generated using TypeDoc

                                                              \ No newline at end of file +

                                                              Properties

                                                              from: PeerId
                                                              name: "VALUE"
                                                              type: VALUE
                                                              value: Uint8Array

                                                              Generated using TypeDoc

                                                              \ No newline at end of file diff --git a/interfaces/_libp2p_keychain.DEKConfig.html b/interfaces/_libp2p_keychain.DEKConfig.html index 03b15faa17..e4dca00f91 100644 --- a/interfaces/_libp2p_keychain.DEKConfig.html +++ b/interfaces/_libp2p_keychain.DEKConfig.html @@ -1,5 +1,5 @@ -DEKConfig | libp2p
                                                              interface DEKConfig {
                                                                  hash: string;
                                                                  iterationCount: number;
                                                                  keyLength: number;
                                                                  salt: string;
                                                              }

                                                              Properties

                                                              hash +DEKConfig | libp2p
                                                              interface DEKConfig {
                                                                  hash: string;
                                                                  iterationCount: number;
                                                                  keyLength: number;
                                                                  salt: string;
                                                              }

                                                              Properties

                                                              hash: string
                                                              iterationCount: number
                                                              keyLength: number
                                                              salt: string

                                                              Generated using TypeDoc

                                                              \ No newline at end of file +

                                                              Properties

                                                              hash: string
                                                              iterationCount: number
                                                              keyLength: number
                                                              salt: string

                                                              Generated using TypeDoc

                                                              \ No newline at end of file diff --git a/interfaces/_libp2p_keychain.KeyInfo.html b/interfaces/_libp2p_keychain.KeyInfo.html index db75aa08aa..e1c4d3827c 100644 --- a/interfaces/_libp2p_keychain.KeyInfo.html +++ b/interfaces/_libp2p_keychain.KeyInfo.html @@ -1,5 +1,5 @@ -KeyInfo | libp2p
                                                              interface KeyInfo {
                                                                  id: string;
                                                                  name: string;
                                                              }

                                                              Properties

                                                              id +KeyInfo | libp2p
                                                              interface KeyInfo {
                                                                  id: string;
                                                                  name: string;
                                                              }

                                                              Properties

                                                              Properties

                                                              id: string

                                                              The universally unique key id

                                                              -
                                                              name: string

                                                              The local key name

                                                              -

                                                              Generated using TypeDoc

                                                              \ No newline at end of file +
                                                              name: string

                                                              The local key name

                                                              +

                                                              Generated using TypeDoc

                                                              \ No newline at end of file diff --git a/interfaces/_libp2p_keychain.Keychain.html b/interfaces/_libp2p_keychain.Keychain.html index 45eecb49e7..454bce1067 100644 --- a/interfaces/_libp2p_keychain.Keychain.html +++ b/interfaces/_libp2p_keychain.Keychain.html @@ -1,4 +1,4 @@ -Keychain | libp2p
                                                              interface Keychain {
                                                                  createKey(name, type, size?): Promise<KeyInfo>;
                                                                  exportKey(name, password): Promise<Multibase<"m">>;
                                                                  exportPeerId(name): Promise<PeerId>;
                                                                  findKeyById(id): Promise<KeyInfo>;
                                                                  findKeyByName(name): Promise<KeyInfo>;
                                                                  importKey(name, pem, password): Promise<KeyInfo>;
                                                                  importPeer(name, peerId): Promise<KeyInfo>;
                                                                  listKeys(): Promise<KeyInfo[]>;
                                                                  removeKey(name): Promise<KeyInfo>;
                                                                  renameKey(oldName, newName): Promise<KeyInfo>;
                                                                  rotateKeychainPass(oldPass, newPass): Promise<void>;
                                                              }

                                                              Methods

                                                              createKey +Keychain | libp2p
                                                              interface Keychain {
                                                                  createKey(name, type, size?): Promise<KeyInfo>;
                                                                  exportKey(name, password): Promise<Multibase<"m">>;
                                                                  exportPeerId(name): Promise<PeerId>;
                                                                  findKeyById(id): Promise<KeyInfo>;
                                                                  findKeyByName(name): Promise<KeyInfo>;
                                                                  importKey(name, pem, password): Promise<KeyInfo>;
                                                                  importPeer(name, peerId): Promise<KeyInfo>;
                                                                  listKeys(): Promise<KeyInfo[]>;
                                                                  removeKey(name): Promise<KeyInfo>;
                                                                  renameKey(oldName, newName): Promise<KeyInfo>;
                                                                  rotateKeychainPass(oldPass, newPass): Promise<void>;
                                                              }

                                                              Methods

                                                              Methods

                                                              • Create a key in the keychain.

                                                                Parameters

                                                                • name: string
                                                                • type: KeyType
                                                                • Optional size: number

                                                                Returns Promise<KeyInfo>

                                                                Example

                                                                const keyInfo = await libp2p.keychain.createKey('keyTest', 'RSA', 4096)
                                                                 
                                                                -
                                                              • Export an existing key as a PEM encrypted PKCS #8 string.

                                                                Parameters

                                                                • name: string
                                                                • password: string

                                                                Returns Promise<Multibase<"m">>

                                                                Example

                                                                await libp2p.keychain.createKey('keyTest', 'RSA', 4096)
                                                                const pemKey = await libp2p.keychain.exportKey('keyTest', 'password123')
                                                                -
                                                              • Export an existing key as a PeerId

                                                                Parameters

                                                                • name: string

                                                                Returns Promise<PeerId>

                                                                Example

                                                                const peerId = await libp2p.keychain.exportPeerId('key-name')
                                                                 
                                                                -
                                                              • Find a key by it's id.

                                                                Parameters

                                                                • id: string

                                                                Returns Promise<KeyInfo>

                                                                Example

                                                                const keyInfo = await libp2p.keychain.createKey('keyTest', 'RSA', 4096)
                                                                const keyInfo2 = await libp2p.keychain.findKeyById(keyInfo.id)
                                                                -
                                                              • Find a key by it's name.

                                                                Parameters

                                                                • name: string

                                                                Returns Promise<KeyInfo>

                                                                Example

                                                                const keyInfo = await libp2p.keychain.createKey('keyTest', 'RSA', 4096)
                                                                const keyInfo2 = await libp2p.keychain.findKeyByName('keyTest')
                                                                -
                                                              • Import a new key from a PEM encoded PKCS #8 string.

                                                                Parameters

                                                                • name: string
                                                                • pem: string
                                                                • password: string

                                                                Returns Promise<KeyInfo>

                                                                Example

                                                                await libp2p.keychain.createKey('keyTest', 'RSA', 4096)
                                                                const pemKey = await libp2p.keychain.exportKey('keyTest', 'password123')
                                                                const keyInfo = await libp2p.keychain.importKey('keyTestImport', pemKey, 'password123')
                                                                -
                                                              • Import a new key from a PeerId with a private key component

                                                                Parameters

                                                                Returns Promise<KeyInfo>

                                                                Example

                                                                const keyInfo = await libp2p.keychain.importPeer('keyTestImport', peerIdFromString('12D3Foo...'))
                                                                 
                                                                -
                                                              • Removes a key from the keychain.

                                                                Parameters

                                                                • name: string

                                                                Returns Promise<KeyInfo>

                                                                Example

                                                                await libp2p.keychain.createKey('keyTest', 'RSA', 4096)
                                                                const keyInfo = await libp2p.keychain.removeKey('keyTest')
                                                                -
                                                              • Rename a key in the keychain.

                                                                Parameters

                                                                • oldName: string
                                                                • newName: string

                                                                Returns Promise<KeyInfo>

                                                                Example

                                                                await libp2p.keychain.createKey('keyTest', 'RSA', 4096)
                                                                const keyInfo = await libp2p.keychain.renameKey('keyTest', 'keyNewNtest')
                                                                -
                                                              • Rotate keychain password and re-encrypt all associated keys

                                                                +
                                                              • Rotate keychain password and re-encrypt all associated keys

                                                                Parameters

                                                                • oldPass: string
                                                                • newPass: string

                                                                Returns Promise<void>

                                                                Example

                                                                await libp2p.keychain.rotateKeychainPass('oldPassword', 'newPassword')
                                                                 
                                                                -

                                                              Generated using TypeDoc

                                                              \ No newline at end of file +

                                                              Generated using TypeDoc

                                                              \ No newline at end of file diff --git a/interfaces/_libp2p_keychain.KeychainComponents.html b/interfaces/_libp2p_keychain.KeychainComponents.html index de0378ca9b..3ef1fe90fe 100644 --- a/interfaces/_libp2p_keychain.KeychainComponents.html +++ b/interfaces/_libp2p_keychain.KeychainComponents.html @@ -1,3 +1,3 @@ -KeychainComponents | libp2p

                                                              Interface KeychainComponents

                                                              interface KeychainComponents {
                                                                  datastore: Datastore<{}, {}, {}, {}, {}, {}, {}, {}, {}, {}>;
                                                                  logger: ComponentLogger;
                                                              }

                                                              Properties

                                                              datastore +KeychainComponents | libp2p

                                                              Interface KeychainComponents

                                                              interface KeychainComponents {
                                                                  datastore: Datastore<{}, {}, {}, {}, {}, {}, {}, {}, {}, {}>;
                                                                  logger: ComponentLogger;
                                                              }

                                                              Properties

                                                              Properties

                                                              datastore: Datastore<{}, {}, {}, {}, {}, {}, {}, {}, {}, {}>

                                                              Type declaration

                                                                Type declaration

                                                                  Type declaration

                                                                    Type declaration

                                                                      Type declaration

                                                                        Type declaration

                                                                          Type declaration

                                                                            Type declaration

                                                                              Type declaration

                                                                                Type declaration

                                                                                  Generated using TypeDoc

                                                                                  \ No newline at end of file +

                                                                                  Properties

                                                                                  datastore: Datastore<{}, {}, {}, {}, {}, {}, {}, {}, {}, {}>

                                                                                  Type declaration

                                                                                    Type declaration

                                                                                      Type declaration

                                                                                        Type declaration

                                                                                          Type declaration

                                                                                            Type declaration

                                                                                              Type declaration

                                                                                                Type declaration

                                                                                                  Type declaration

                                                                                                    Type declaration

                                                                                                      Generated using TypeDoc

                                                                                                      \ No newline at end of file diff --git a/interfaces/_libp2p_keychain.KeychainInit.html b/interfaces/_libp2p_keychain.KeychainInit.html index 697dba294e..8a53f966a1 100644 --- a/interfaces/_libp2p_keychain.KeychainInit.html +++ b/interfaces/_libp2p_keychain.KeychainInit.html @@ -1,3 +1,3 @@ -KeychainInit | libp2p
                                                                                                      interface KeychainInit {
                                                                                                          dek?: DEKConfig;
                                                                                                          pass?: string;
                                                                                                      }

                                                                                                      Properties

                                                                                                      dek? +KeychainInit | libp2p

                                                                                                      Generated using TypeDoc

                                                                                                      \ No newline at end of file +

                                                                                                      Properties

                                                                                                      dek?: DEKConfig
                                                                                                      pass?: string

                                                                                                      Generated using TypeDoc

                                                                                                      \ No newline at end of file diff --git a/interfaces/_libp2p_logger.ComponentLogger.html b/interfaces/_libp2p_logger.ComponentLogger.html index 43e29d8bd2..c728cc0618 100644 --- a/interfaces/_libp2p_logger.ComponentLogger.html +++ b/interfaces/_libp2p_logger.ComponentLogger.html @@ -1,2 +1,2 @@ -ComponentLogger | libp2p

                                                                                                      Interface ComponentLogger

                                                                                                      interface ComponentLogger {
                                                                                                          forComponent(name): Logger;
                                                                                                      }

                                                                                                      Methods

                                                                                                      Methods

                                                                                                      Generated using TypeDoc

                                                                                                      \ No newline at end of file +ComponentLogger | libp2p

                                                                                                      Interface ComponentLogger

                                                                                                      interface ComponentLogger {
                                                                                                          forComponent(name): Logger;
                                                                                                      }

                                                                                                      Methods

                                                                                                      Methods

                                                                                                      Generated using TypeDoc

                                                                                                      \ No newline at end of file diff --git a/interfaces/_libp2p_logger.Logger.html b/interfaces/_libp2p_logger.Logger.html index 369d715db9..eedd9268bc 100644 --- a/interfaces/_libp2p_logger.Logger.html +++ b/interfaces/_libp2p_logger.Logger.html @@ -1,4 +1,4 @@ -Logger | libp2p
                                                                                                      interface Logger {
                                                                                                          enabled: boolean;
                                                                                                          error(formatter, ...args): void;
                                                                                                          trace(formatter, ...args): void;
                                                                                                          (formatter, ...args): void;
                                                                                                      }
                                                                                                      • Parameters

                                                                                                        • formatter: any
                                                                                                        • Rest ...args: any[]

                                                                                                        Returns void

                                                                                                      Properties

                                                                                                      enabled +Logger | libp2p
                                                                                                      interface Logger {
                                                                                                          enabled: boolean;
                                                                                                          error(formatter, ...args): void;
                                                                                                          trace(formatter, ...args): void;
                                                                                                          (formatter, ...args): void;
                                                                                                      }
                                                                                                      • Parameters

                                                                                                        • formatter: any
                                                                                                        • Rest ...args: any[]

                                                                                                        Returns void

                                                                                                      Properties

                                                                                                      Methods

                                                                                                      Properties

                                                                                                      enabled: boolean

                                                                                                      Methods

                                                                                                      • Parameters

                                                                                                        • formatter: any
                                                                                                        • Rest ...args: any[]

                                                                                                        Returns void

                                                                                                      • Parameters

                                                                                                        • formatter: any
                                                                                                        • Rest ...args: any[]

                                                                                                        Returns void

                                                                                                      Generated using TypeDoc

                                                                                                      \ No newline at end of file +

                                                                                                      Properties

                                                                                                      enabled: boolean

                                                                                                      Methods

                                                                                                      • Parameters

                                                                                                        • formatter: any
                                                                                                        • Rest ...args: any[]

                                                                                                        Returns void

                                                                                                      • Parameters

                                                                                                        • formatter: any
                                                                                                        • Rest ...args: any[]

                                                                                                        Returns void

                                                                                                      Generated using TypeDoc

                                                                                                      \ No newline at end of file diff --git a/interfaces/_libp2p_logger.PeerLoggerOptions.html b/interfaces/_libp2p_logger.PeerLoggerOptions.html index c87ec92cf0..70ea385e80 100644 --- a/interfaces/_libp2p_logger.PeerLoggerOptions.html +++ b/interfaces/_libp2p_logger.PeerLoggerOptions.html @@ -1,3 +1,3 @@ -PeerLoggerOptions | libp2p

                                                                                                      Interface PeerLoggerOptions

                                                                                                      interface PeerLoggerOptions {
                                                                                                          prefixLength: number;
                                                                                                          suffixLength: number;
                                                                                                      }

                                                                                                      Properties

                                                                                                      prefixLength +PeerLoggerOptions | libp2p

                                                                                                      Generated using TypeDoc

                                                                                                      \ No newline at end of file +

                                                                                                      Properties

                                                                                                      prefixLength: number
                                                                                                      suffixLength: number

                                                                                                      Generated using TypeDoc

                                                                                                      \ No newline at end of file diff --git a/interfaces/_libp2p_mplex.MplexInit.html b/interfaces/_libp2p_mplex.MplexInit.html index ec48239158..dd964c54db 100644 --- a/interfaces/_libp2p_mplex.MplexInit.html +++ b/interfaces/_libp2p_mplex.MplexInit.html @@ -1,4 +1,4 @@ -MplexInit | libp2p

                                                                                                      Interface MplexInit

                                                                                                      interface MplexInit {
                                                                                                          disconnectThreshold?: number;
                                                                                                          maxInboundStreams?: number;
                                                                                                          maxMsgSize?: number;
                                                                                                          maxOutboundStreams?: number;
                                                                                                          maxStreamBufferSize?: number;
                                                                                                          maxUnprocessedMessageQueueSize?: number;
                                                                                                      }

                                                                                                      Properties

                                                                                                      disconnectThreshold? +MplexInit | libp2p

                                                                                                      Interface MplexInit

                                                                                                      interface MplexInit {
                                                                                                          disconnectThreshold?: number;
                                                                                                          maxInboundStreams?: number;
                                                                                                          maxMsgSize?: number;
                                                                                                          maxOutboundStreams?: number;
                                                                                                          maxStreamBufferSize?: number;
                                                                                                          maxUnprocessedMessageQueueSize?: number;
                                                                                                      }

                                                                                                      Properties

                                                                                                      disconnectThreshold?: number

                                                                                                      When maxInboundStreams is hit, if the remote continues try to open more than this many new multiplexed streams per second the connection will be closed (default: 5)

                                                                                                      -
                                                                                                      maxInboundStreams?: number

                                                                                                      The maximum number of multiplexed streams that can be open at any +

                                                                                                      maxInboundStreams?: number

                                                                                                      The maximum number of multiplexed streams that can be open at any one time. A request to open more than this will have a stream reset message sent immediately as a response for the newly opened stream id (default: 1024)

                                                                                                      -
                                                                                                      maxMsgSize?: number

                                                                                                      The maximum size of message that can be sent in one go in bytes. +

                                                                                                      maxMsgSize?: number

                                                                                                      The maximum size of message that can be sent in one go in bytes. Messages larger than this will be split into multiple smaller messages. If we receive a message larger than this an error will be thrown and the connection closed. (default: 1MB)

                                                                                                      -
                                                                                                      maxOutboundStreams?: number

                                                                                                      The maximum number of multiplexed streams that can be open at any +

                                                                                                      maxOutboundStreams?: number

                                                                                                      The maximum number of multiplexed streams that can be open at any one time. An attempt to open more than this will throw (default: 1024)

                                                                                                      -
                                                                                                      maxStreamBufferSize?: number

                                                                                                      Incoming stream messages are buffered until processed by the stream +

                                                                                                      maxStreamBufferSize?: number

                                                                                                      Incoming stream messages are buffered until processed by the stream handler. If the buffer reaches this size in bytes the stream will be reset (default: 4MB)

                                                                                                      -
                                                                                                      maxUnprocessedMessageQueueSize?: number

                                                                                                      Constrains the size of the unprocessed message queue buffer. +

                                                                                                      maxUnprocessedMessageQueueSize?: number

                                                                                                      Constrains the size of the unprocessed message queue buffer. Before messages are deserialized, the raw bytes are buffered to ensure we have the complete message to deserialized. If the queue gets longer than this value an error will be thrown and the connection closed. (default: 4MB)

                                                                                                      -

                                                                                                      Generated using TypeDoc

                                                                                                      \ No newline at end of file +

                                                                                                      Generated using TypeDoc

                                                                                                      \ No newline at end of file diff --git a/interfaces/_libp2p_multistream_select.MultistreamSelectInit.html b/interfaces/_libp2p_multistream_select.MultistreamSelectInit.html index 755f671141..338c2cd8f7 100644 --- a/interfaces/_libp2p_multistream_select.MultistreamSelectInit.html +++ b/interfaces/_libp2p_multistream_select.MultistreamSelectInit.html @@ -2,7 +2,7 @@ the optional signal property.

                                                                                                      Example

                                                                                                      const controller = new AbortController()

                                                                                                      aLongRunningOperation({
                                                                                                      signal: controller.signal
                                                                                                      })

                                                                                                      // later

                                                                                                      controller.abort()
                                                                                                      -
                                                                                                      interface MultistreamSelectInit {
                                                                                                          lengthDecoder?: LengthDecoderFunction;
                                                                                                          lengthEncoder?: LengthEncoderFunction;
                                                                                                          log: Logger;
                                                                                                          maxDataLength?: number;
                                                                                                          maxLengthLength?: number;
                                                                                                          signal?: AbortSignal;
                                                                                                          yieldBytes?: boolean;
                                                                                                      }

                                                                                                      Hierarchy

                                                                                                      Properties

                                                                                                      interface MultistreamSelectInit {
                                                                                                          lengthDecoder?: LengthDecoderFunction;
                                                                                                          lengthEncoder?: LengthEncoderFunction;
                                                                                                          log: Logger;
                                                                                                          maxDataLength?: number;
                                                                                                          maxLengthLength?: number;
                                                                                                          signal?: AbortSignal;
                                                                                                          yieldBytes?: boolean;
                                                                                                      }

                                                                                                      Hierarchy

                                                                                                      Properties

                                                                                                      lengthDecoder? lengthEncoder? log maxDataLength? diff --git a/interfaces/_libp2p_multistream_select.ProtocolStream.html b/interfaces/_libp2p_multistream_select.ProtocolStream.html index e2711338d0..b0f7b0e20e 100644 --- a/interfaces/_libp2p_multistream_select.ProtocolStream.html +++ b/interfaces/_libp2p_multistream_select.ProtocolStream.html @@ -1,3 +1,3 @@ -ProtocolStream | libp2p

                                                                                                      Interface ProtocolStream<Stream>

                                                                                                      interface ProtocolStream {
                                                                                                          protocol: string;
                                                                                                          stream: Stream;
                                                                                                      }

                                                                                                      Type Parameters

                                                                                                      • Stream

                                                                                                      Properties

                                                                                                      protocol +ProtocolStream | libp2p

                                                                                                      Generated using TypeDoc

                                                                                                      \ No newline at end of file +

                                                                                                      Properties

                                                                                                      protocol: string
                                                                                                      stream: Stream

                                                                                                      Generated using TypeDoc

                                                                                                      \ No newline at end of file diff --git a/interfaces/_libp2p_peer_record.PeerRecordInit.html b/interfaces/_libp2p_peer_record.PeerRecordInit.html index 32f3d8e37e..c14b96459e 100644 --- a/interfaces/_libp2p_peer_record.PeerRecordInit.html +++ b/interfaces/_libp2p_peer_record.PeerRecordInit.html @@ -1,6 +1,6 @@ -PeerRecordInit | libp2p
                                                                                                      interface PeerRecordInit {
                                                                                                          multiaddrs?: Multiaddr[];
                                                                                                          peerId: PeerId;
                                                                                                          seqNumber?: bigint;
                                                                                                      }

                                                                                                      Properties

                                                                                                      multiaddrs? +PeerRecordInit | libp2p
                                                                                                      interface PeerRecordInit {
                                                                                                          multiaddrs?: Multiaddr[];
                                                                                                          peerId: PeerId;
                                                                                                          seqNumber?: bigint;
                                                                                                      }

                                                                                                      Properties

                                                                                                      multiaddrs?: Multiaddr[]

                                                                                                      Addresses of the associated peer.

                                                                                                      -
                                                                                                      peerId: PeerId
                                                                                                      seqNumber?: bigint

                                                                                                      Monotonically-increasing sequence counter that's used to order PeerRecords in time.

                                                                                                      -

                                                                                                      Generated using TypeDoc

                                                                                                      \ No newline at end of file +
                                                                                                      peerId: PeerId
                                                                                                      seqNumber?: bigint

                                                                                                      Monotonically-increasing sequence counter that's used to order PeerRecords in time.

                                                                                                      +

                                                                                                      Generated using TypeDoc

                                                                                                      \ No newline at end of file diff --git a/interfaces/_libp2p_peer_record.RecordEnvelopeInit.html b/interfaces/_libp2p_peer_record.RecordEnvelopeInit.html index bbea6821d1..e34c639df1 100644 --- a/interfaces/_libp2p_peer_record.RecordEnvelopeInit.html +++ b/interfaces/_libp2p_peer_record.RecordEnvelopeInit.html @@ -1,5 +1,5 @@ -RecordEnvelopeInit | libp2p
                                                                                                      interface RecordEnvelopeInit {
                                                                                                          payload: Uint8Array;
                                                                                                          payloadType: Uint8Array;
                                                                                                          peerId: PeerId;
                                                                                                          signature: Uint8Array;
                                                                                                      }

                                                                                                      Properties

                                                                                                      payload +RecordEnvelopeInit | libp2p

                                                                                                      Generated using TypeDoc

                                                                                                      \ No newline at end of file +

                                                                                                      Properties

                                                                                                      payload: Uint8Array
                                                                                                      payloadType: Uint8Array
                                                                                                      peerId: PeerId
                                                                                                      signature: Uint8Array

                                                                                                      Generated using TypeDoc

                                                                                                      \ No newline at end of file diff --git a/interfaces/_libp2p_peer_store.AddressFilter.html b/interfaces/_libp2p_peer_store.AddressFilter.html index be3cedfe9c..0f4f2ea94b 100644 --- a/interfaces/_libp2p_peer_store.AddressFilter.html +++ b/interfaces/_libp2p_peer_store.AddressFilter.html @@ -1,2 +1,2 @@ AddressFilter | libp2p

                                                                                                      Return true to allow storing the passed multiaddr for the passed peer

                                                                                                      -
                                                                                                      interface AddressFilter ((peerId, multiaddr) => Promise<boolean>)

                                                                                                      Generated using TypeDoc

                                                                                                      \ No newline at end of file +
                                                                                                      interface AddressFilter ((peerId, multiaddr) => Promise<boolean>)

                                                                                                      Generated using TypeDoc

                                                                                                      \ No newline at end of file diff --git a/interfaces/_libp2p_peer_store.PersistentPeerStoreComponents.html b/interfaces/_libp2p_peer_store.PersistentPeerStoreComponents.html index 25a1ea048a..262809ca60 100644 --- a/interfaces/_libp2p_peer_store.PersistentPeerStoreComponents.html +++ b/interfaces/_libp2p_peer_store.PersistentPeerStoreComponents.html @@ -1,5 +1,5 @@ -PersistentPeerStoreComponents | libp2p

                                                                                                      Interface PersistentPeerStoreComponents

                                                                                                      interface PersistentPeerStoreComponents {
                                                                                                          datastore: Datastore<{}, {}, {}, {}, {}, {}, {}, {}, {}, {}>;
                                                                                                          events: TypedEventTarget<Libp2pEvents<ServiceMap>>;
                                                                                                          logger: ComponentLogger;
                                                                                                          peerId: PeerId;
                                                                                                      }

                                                                                                      Properties

                                                                                                      datastore +PersistentPeerStoreComponents | libp2p

                                                                                                      Interface PersistentPeerStoreComponents

                                                                                                      interface PersistentPeerStoreComponents {
                                                                                                          datastore: Datastore<{}, {}, {}, {}, {}, {}, {}, {}, {}, {}>;
                                                                                                          events: TypedEventTarget<Libp2pEvents<ServiceMap>>;
                                                                                                          logger: ComponentLogger;
                                                                                                          peerId: PeerId;
                                                                                                      }

                                                                                                      Properties

                                                                                                      datastore: Datastore<{}, {}, {}, {}, {}, {}, {}, {}, {}, {}>

                                                                                                      Type declaration

                                                                                                        Type declaration

                                                                                                          Type declaration

                                                                                                            Type declaration

                                                                                                              Type declaration

                                                                                                                Type declaration

                                                                                                                  Type declaration

                                                                                                                    Type declaration

                                                                                                                      Type declaration

                                                                                                                        Type declaration

                                                                                                                          peerId: PeerId

                                                                                                                          Generated using TypeDoc

                                                                                                                          \ No newline at end of file +

                                                                                                                          Properties

                                                                                                                          datastore: Datastore<{}, {}, {}, {}, {}, {}, {}, {}, {}, {}>

                                                                                                                          Type declaration

                                                                                                                            Type declaration

                                                                                                                              Type declaration

                                                                                                                                Type declaration

                                                                                                                                  Type declaration

                                                                                                                                    Type declaration

                                                                                                                                      Type declaration

                                                                                                                                        Type declaration

                                                                                                                                          Type declaration

                                                                                                                                            Type declaration

                                                                                                                                              peerId: PeerId

                                                                                                                                              Generated using TypeDoc

                                                                                                                                              \ No newline at end of file diff --git a/interfaces/_libp2p_peer_store.PersistentPeerStoreInit.html b/interfaces/_libp2p_peer_store.PersistentPeerStoreInit.html index 32de4d0ebb..1a42fcb506 100644 --- a/interfaces/_libp2p_peer_store.PersistentPeerStoreInit.html +++ b/interfaces/_libp2p_peer_store.PersistentPeerStoreInit.html @@ -1,2 +1,2 @@ -PersistentPeerStoreInit | libp2p

                                                                                                                                              Generated using TypeDoc

                                                                                                                                              \ No newline at end of file +PersistentPeerStoreInit | libp2p

                                                                                                                                              Generated using TypeDoc

                                                                                                                                              \ No newline at end of file diff --git a/interfaces/_libp2p_perf.Perf.html b/interfaces/_libp2p_perf.Perf.html index 3da5cc2b1a..d272936f8c 100644 --- a/interfaces/_libp2p_perf.Perf.html +++ b/interfaces/_libp2p_perf.Perf.html @@ -1,2 +1,2 @@ -Perf | libp2p
                                                                                                                                              interface Perf {
                                                                                                                                                  measurePerformance(multiaddr, sendBytes, recvBytes, options?): AsyncGenerator<PerfOutput, any, unknown>;
                                                                                                                                              }

                                                                                                                                              Methods

                                                                                                                                              Generated using TypeDoc

                                                                                                                                              \ No newline at end of file +Perf | libp2p
                                                                                                                                              interface Perf {
                                                                                                                                                  measurePerformance(multiaddr, sendBytes, recvBytes, options?): AsyncGenerator<PerfOutput, any, unknown>;
                                                                                                                                              }

                                                                                                                                              Methods

                                                                                                                                              Generated using TypeDoc

                                                                                                                                              \ No newline at end of file diff --git a/interfaces/_libp2p_perf.PerfComponents.html b/interfaces/_libp2p_perf.PerfComponents.html index 9c331d2edb..d3b1de2107 100644 --- a/interfaces/_libp2p_perf.PerfComponents.html +++ b/interfaces/_libp2p_perf.PerfComponents.html @@ -1,4 +1,4 @@ -PerfComponents | libp2p

                                                                                                                                              Interface PerfComponents

                                                                                                                                              interface PerfComponents {
                                                                                                                                                  connectionManager: ConnectionManager;
                                                                                                                                                  logger: ComponentLogger;
                                                                                                                                                  registrar: Registrar;
                                                                                                                                              }

                                                                                                                                              Properties

                                                                                                                                              connectionManager +PerfComponents | libp2p

                                                                                                                                              Generated using TypeDoc

                                                                                                                                              \ No newline at end of file +

                                                                                                                                              Properties

                                                                                                                                              connectionManager: ConnectionManager
                                                                                                                                              registrar: Registrar

                                                                                                                                              Generated using TypeDoc

                                                                                                                                              \ No newline at end of file diff --git a/interfaces/_libp2p_perf.PerfInit.html b/interfaces/_libp2p_perf.PerfInit.html index 219ad9267f..7e3bc9073e 100644 --- a/interfaces/_libp2p_perf.PerfInit.html +++ b/interfaces/_libp2p_perf.PerfInit.html @@ -1,7 +1,7 @@ -PerfInit | libp2p

                                                                                                                                              Interface PerfInit

                                                                                                                                              interface PerfInit {
                                                                                                                                                  maxInboundStreams?: number;
                                                                                                                                                  maxOutboundStreams?: number;
                                                                                                                                                  protocolName?: string;
                                                                                                                                                  runOnTransientConnection?: boolean;
                                                                                                                                                  writeBlockSize?: number;
                                                                                                                                              }

                                                                                                                                              Properties

                                                                                                                                              maxInboundStreams? +PerfInit | libp2p

                                                                                                                                              Interface PerfInit

                                                                                                                                              interface PerfInit {
                                                                                                                                                  maxInboundStreams?: number;
                                                                                                                                                  maxOutboundStreams?: number;
                                                                                                                                                  protocolName?: string;
                                                                                                                                                  runOnTransientConnection?: boolean;
                                                                                                                                                  writeBlockSize?: number;
                                                                                                                                              }

                                                                                                                                              Properties

                                                                                                                                              maxInboundStreams?: number
                                                                                                                                              maxOutboundStreams?: number
                                                                                                                                              protocolName?: string
                                                                                                                                              runOnTransientConnection?: boolean
                                                                                                                                              writeBlockSize?: number

                                                                                                                                              Data sent/received will be sent in chunks of this size (default: 64KiB)

                                                                                                                                              -

                                                                                                                                              Generated using TypeDoc

                                                                                                                                              \ No newline at end of file +

                                                                                                                                              Properties

                                                                                                                                              maxInboundStreams?: number
                                                                                                                                              maxOutboundStreams?: number
                                                                                                                                              protocolName?: string
                                                                                                                                              runOnTransientConnection?: boolean
                                                                                                                                              writeBlockSize?: number

                                                                                                                                              Data sent/received will be sent in chunks of this size (default: 64KiB)

                                                                                                                                              +

                                                                                                                                              Generated using TypeDoc

                                                                                                                                              \ No newline at end of file diff --git a/interfaces/_libp2p_perf.PerfOptions.html b/interfaces/_libp2p_perf.PerfOptions.html index 98e8bf1685..37d03a3860 100644 --- a/interfaces/_libp2p_perf.PerfOptions.html +++ b/interfaces/_libp2p_perf.PerfOptions.html @@ -2,10 +2,10 @@ the optional signal property.

                                                                                                                                              Example

                                                                                                                                              const controller = new AbortController()

                                                                                                                                              aLongRunningOperation({
                                                                                                                                              signal: controller.signal
                                                                                                                                              })

                                                                                                                                              // later

                                                                                                                                              controller.abort()
                                                                                                                                              -
                                                                                                                                              interface PerfOptions {
                                                                                                                                                  reuseExistingConnection?: boolean;
                                                                                                                                                  signal?: AbortSignal;
                                                                                                                                              }

                                                                                                                                              Hierarchy

                                                                                                                                              Properties

                                                                                                                                              interface PerfOptions {
                                                                                                                                                  reuseExistingConnection?: boolean;
                                                                                                                                                  signal?: AbortSignal;
                                                                                                                                              }

                                                                                                                                              Hierarchy

                                                                                                                                              Properties

                                                                                                                                              reuseExistingConnection?: boolean

                                                                                                                                              By default measuring perf should include the time it takes to establish a connection, so a new connection will be opened for every performance run.

                                                                                                                                              To override this and re-use an existing connection if one is present, pass true here. (default: false)

                                                                                                                                              -
                                                                                                                                              signal?: AbortSignal

                                                                                                                                              Generated using TypeDoc

                                                                                                                                              \ No newline at end of file +
                                                                                                                                              signal?: AbortSignal

                                                                                                                                              Generated using TypeDoc

                                                                                                                                              \ No newline at end of file diff --git a/interfaces/_libp2p_perf.PerfOutput.html b/interfaces/_libp2p_perf.PerfOutput.html index c0c9f4685f..380288557d 100644 --- a/interfaces/_libp2p_perf.PerfOutput.html +++ b/interfaces/_libp2p_perf.PerfOutput.html @@ -1,5 +1,5 @@ -PerfOutput | libp2p

                                                                                                                                              Interface PerfOutput

                                                                                                                                              interface PerfOutput {
                                                                                                                                                  downloadBytes: number;
                                                                                                                                                  timeSeconds: number;
                                                                                                                                                  type: "stream" | "intermediary" | "connection" | "final";
                                                                                                                                                  uploadBytes: number;
                                                                                                                                              }

                                                                                                                                              Properties

                                                                                                                                              downloadBytes +PerfOutput | libp2p

                                                                                                                                              Interface PerfOutput

                                                                                                                                              interface PerfOutput {
                                                                                                                                                  downloadBytes: number;
                                                                                                                                                  timeSeconds: number;
                                                                                                                                                  type: "stream" | "intermediary" | "connection" | "final";
                                                                                                                                                  uploadBytes: number;
                                                                                                                                              }

                                                                                                                                              Properties

                                                                                                                                              downloadBytes: number
                                                                                                                                              timeSeconds: number
                                                                                                                                              type: "stream" | "intermediary" | "connection" | "final"
                                                                                                                                              uploadBytes: number

                                                                                                                                              Generated using TypeDoc

                                                                                                                                              \ No newline at end of file +

                                                                                                                                              Properties

                                                                                                                                              downloadBytes: number
                                                                                                                                              timeSeconds: number
                                                                                                                                              type: "stream" | "intermediary" | "connection" | "final"
                                                                                                                                              uploadBytes: number

                                                                                                                                              Generated using TypeDoc

                                                                                                                                              \ No newline at end of file diff --git a/interfaces/_libp2p_ping.PingService.html b/interfaces/_libp2p_ping.PingService.html index f8b8217eeb..d884a997d3 100644 --- a/interfaces/_libp2p_ping.PingService.html +++ b/interfaces/_libp2p_ping.PingService.html @@ -1,2 +1,2 @@ -PingService | libp2p

                                                                                                                                              Generated using TypeDoc

                                                                                                                                              \ No newline at end of file +PingService | libp2p

                                                                                                                                              Generated using TypeDoc

                                                                                                                                              \ No newline at end of file diff --git a/interfaces/_libp2p_ping.PingServiceComponents.html b/interfaces/_libp2p_ping.PingServiceComponents.html index b59b87be62..50339dd538 100644 --- a/interfaces/_libp2p_ping.PingServiceComponents.html +++ b/interfaces/_libp2p_ping.PingServiceComponents.html @@ -1,4 +1,4 @@ -PingServiceComponents | libp2p

                                                                                                                                              Interface PingServiceComponents

                                                                                                                                              interface PingServiceComponents {
                                                                                                                                                  connectionManager: ConnectionManager;
                                                                                                                                                  logger: ComponentLogger;
                                                                                                                                                  registrar: Registrar;
                                                                                                                                              }

                                                                                                                                              Properties

                                                                                                                                              connectionManager +PingServiceComponents | libp2p

                                                                                                                                              Generated using TypeDoc

                                                                                                                                              \ No newline at end of file +

                                                                                                                                              Properties

                                                                                                                                              connectionManager: ConnectionManager
                                                                                                                                              registrar: Registrar

                                                                                                                                              Generated using TypeDoc

                                                                                                                                              \ No newline at end of file diff --git a/interfaces/_libp2p_ping.PingServiceInit.html b/interfaces/_libp2p_ping.PingServiceInit.html index 73aa822308..a2bf1e2aad 100644 --- a/interfaces/_libp2p_ping.PingServiceInit.html +++ b/interfaces/_libp2p_ping.PingServiceInit.html @@ -1,7 +1,7 @@ -PingServiceInit | libp2p

                                                                                                                                              Interface PingServiceInit

                                                                                                                                              interface PingServiceInit {
                                                                                                                                                  maxInboundStreams?: number;
                                                                                                                                                  maxOutboundStreams?: number;
                                                                                                                                                  protocolPrefix?: string;
                                                                                                                                                  runOnTransientConnection?: boolean;
                                                                                                                                                  timeout?: number;
                                                                                                                                              }

                                                                                                                                              Properties

                                                                                                                                              maxInboundStreams? +PingServiceInit | libp2p

                                                                                                                                              Interface PingServiceInit

                                                                                                                                              interface PingServiceInit {
                                                                                                                                                  maxInboundStreams?: number;
                                                                                                                                                  maxOutboundStreams?: number;
                                                                                                                                                  protocolPrefix?: string;
                                                                                                                                                  runOnTransientConnection?: boolean;
                                                                                                                                                  timeout?: number;
                                                                                                                                              }

                                                                                                                                              Properties

                                                                                                                                              maxInboundStreams?: number
                                                                                                                                              maxOutboundStreams?: number
                                                                                                                                              protocolPrefix?: string
                                                                                                                                              runOnTransientConnection?: boolean
                                                                                                                                              timeout?: number

                                                                                                                                              How long we should wait for a ping response

                                                                                                                                              -

                                                                                                                                              Generated using TypeDoc

                                                                                                                                              \ No newline at end of file +

                                                                                                                                              Properties

                                                                                                                                              maxInboundStreams?: number
                                                                                                                                              maxOutboundStreams?: number
                                                                                                                                              protocolPrefix?: string
                                                                                                                                              runOnTransientConnection?: boolean
                                                                                                                                              timeout?: number

                                                                                                                                              How long we should wait for a ping response

                                                                                                                                              +

                                                                                                                                              Generated using TypeDoc

                                                                                                                                              \ No newline at end of file diff --git a/interfaces/_libp2p_plaintext.PlaintextComponents.html b/interfaces/_libp2p_plaintext.PlaintextComponents.html index d050c214c1..74d907ad22 100644 --- a/interfaces/_libp2p_plaintext.PlaintextComponents.html +++ b/interfaces/_libp2p_plaintext.PlaintextComponents.html @@ -1,2 +1,2 @@ -PlaintextComponents | libp2p

                                                                                                                                              Generated using TypeDoc

                                                                                                                                              \ No newline at end of file +PlaintextComponents | libp2p

                                                                                                                                              Generated using TypeDoc

                                                                                                                                              \ No newline at end of file diff --git a/interfaces/_libp2p_plaintext.PlaintextInit.html b/interfaces/_libp2p_plaintext.PlaintextInit.html index 0f598d6364..1b1e1dcaef 100644 --- a/interfaces/_libp2p_plaintext.PlaintextInit.html +++ b/interfaces/_libp2p_plaintext.PlaintextInit.html @@ -1,4 +1,4 @@ -PlaintextInit | libp2p
                                                                                                                                              interface PlaintextInit {
                                                                                                                                                  timeout?: number;
                                                                                                                                              }

                                                                                                                                              Properties

                                                                                                                                              timeout? +PlaintextInit | libp2p
                                                                                                                                              interface PlaintextInit {
                                                                                                                                                  timeout?: number;
                                                                                                                                              }

                                                                                                                                              Properties

                                                                                                                                              Properties

                                                                                                                                              timeout?: number

                                                                                                                                              The peer id exchange must complete within this many milliseconds (default: 1000)

                                                                                                                                              -

                                                                                                                                              Generated using TypeDoc

                                                                                                                                              \ No newline at end of file +

                                                                                                                                              Generated using TypeDoc

                                                                                                                                              \ No newline at end of file diff --git a/interfaces/_libp2p_pnet.ProtectorComponents.html b/interfaces/_libp2p_pnet.ProtectorComponents.html index f23e5cb84f..0582b7e86a 100644 --- a/interfaces/_libp2p_pnet.ProtectorComponents.html +++ b/interfaces/_libp2p_pnet.ProtectorComponents.html @@ -1,2 +1,2 @@ -ProtectorComponents | libp2p

                                                                                                                                              Generated using TypeDoc

                                                                                                                                              \ No newline at end of file +ProtectorComponents | libp2p

                                                                                                                                              Generated using TypeDoc

                                                                                                                                              \ No newline at end of file diff --git a/interfaces/_libp2p_pnet.ProtectorInit.html b/interfaces/_libp2p_pnet.ProtectorInit.html index 98f17d02d0..a06f8d18f1 100644 --- a/interfaces/_libp2p_pnet.ProtectorInit.html +++ b/interfaces/_libp2p_pnet.ProtectorInit.html @@ -1,7 +1,7 @@ -ProtectorInit | libp2p

                                                                                                                                              Interface ProtectorInit

                                                                                                                                              interface ProtectorInit {
                                                                                                                                                  psk: Uint8Array;
                                                                                                                                                  timeout?: number;
                                                                                                                                              }

                                                                                                                                              Properties

                                                                                                                                              psk +ProtectorInit | libp2p

                                                                                                                                              Interface ProtectorInit

                                                                                                                                              interface ProtectorInit {
                                                                                                                                                  psk: Uint8Array;
                                                                                                                                                  timeout?: number;
                                                                                                                                              }

                                                                                                                                              Properties

                                                                                                                                              Properties

                                                                                                                                              A pre-shared key. This must be the same byte value for all peers in the swarm in order for them to communicate.

                                                                                                                                              -
                                                                                                                                              timeout?: number

                                                                                                                                              The initial nonce exchange must complete within this many milliseconds +

                                                                                                                                              timeout?: number

                                                                                                                                              The initial nonce exchange must complete within this many milliseconds (default: 1000)

                                                                                                                                              -

                                                                                                                                              Generated using TypeDoc

                                                                                                                                              \ No newline at end of file +

                                                                                                                                              Generated using TypeDoc

                                                                                                                                              \ No newline at end of file diff --git a/interfaces/_libp2p_prometheus_metrics.PrometheusCalculatedMetricOptions.html b/interfaces/_libp2p_prometheus_metrics.PrometheusCalculatedMetricOptions.html index 10f2fa2672..d4a4dd5ead 100644 --- a/interfaces/_libp2p_prometheus_metrics.PrometheusCalculatedMetricOptions.html +++ b/interfaces/_libp2p_prometheus_metrics.PrometheusCalculatedMetricOptions.html @@ -1,6 +1,6 @@ PrometheusCalculatedMetricOptions | libp2p

                                                                                                                                              Interface PrometheusCalculatedMetricOptions<T>

                                                                                                                                              Create tracked metrics that are expensive to calculate by passing a function that is only invoked when metrics are being scraped

                                                                                                                                              -
                                                                                                                                              interface PrometheusCalculatedMetricOptions {
                                                                                                                                                  calculate: CalculateMetric<T>;
                                                                                                                                                  help?: string;
                                                                                                                                                  label?: string;
                                                                                                                                                  registry?: Registry<"text/plain; version=0.0.4; charset=utf-8">;
                                                                                                                                              }

                                                                                                                                              Type Parameters

                                                                                                                                              • T = number

                                                                                                                                              Hierarchy

                                                                                                                                              Properties

                                                                                                                                              interface PrometheusCalculatedMetricOptions {
                                                                                                                                                  calculate: CalculateMetric<T>;
                                                                                                                                                  help?: string;
                                                                                                                                                  label?: string;
                                                                                                                                                  registry?: Registry<"text/plain; version=0.0.4; charset=utf-8">;
                                                                                                                                              }

                                                                                                                                              Type Parameters

                                                                                                                                              • T = number

                                                                                                                                              Hierarchy

                                                                                                                                              Properties

                                                                                                                                              calculate help? label? registry? @@ -8,4 +8,4 @@ using .update, .increment, and .decrement

                                                                                                                                              help?: string

                                                                                                                                              Optional help for the metric

                                                                                                                                              label?: string

                                                                                                                                              Optional label for the metric

                                                                                                                                              -
                                                                                                                                              registry?: Registry<"text/plain; version=0.0.4; charset=utf-8">

                                                                                                                                              Generated using TypeDoc

                                                                                                                                              \ No newline at end of file +
                                                                                                                                              registry?: Registry<"text/plain; version=0.0.4; charset=utf-8">

                                                                                                                                              Generated using TypeDoc

                                                                                                                                              \ No newline at end of file diff --git a/interfaces/_libp2p_prometheus_metrics.PrometheusMetricsComponents.html b/interfaces/_libp2p_prometheus_metrics.PrometheusMetricsComponents.html index 03e3bcceee..1bf80bef0c 100644 --- a/interfaces/_libp2p_prometheus_metrics.PrometheusMetricsComponents.html +++ b/interfaces/_libp2p_prometheus_metrics.PrometheusMetricsComponents.html @@ -1,2 +1,2 @@ -PrometheusMetricsComponents | libp2p
                                                                                                                                              interface PrometheusMetricsComponents {
                                                                                                                                                  logger: ComponentLogger;
                                                                                                                                              }

                                                                                                                                              Properties

                                                                                                                                              Properties

                                                                                                                                              Generated using TypeDoc

                                                                                                                                              \ No newline at end of file +PrometheusMetricsComponents | libp2p
                                                                                                                                              interface PrometheusMetricsComponents {
                                                                                                                                                  logger: ComponentLogger;
                                                                                                                                              }

                                                                                                                                              Properties

                                                                                                                                              Properties

                                                                                                                                              Generated using TypeDoc

                                                                                                                                              \ No newline at end of file diff --git a/interfaces/_libp2p_prometheus_metrics.PrometheusMetricsInit.html b/interfaces/_libp2p_prometheus_metrics.PrometheusMetricsInit.html index 61fdd40019..e39de6f315 100644 --- a/interfaces/_libp2p_prometheus_metrics.PrometheusMetricsInit.html +++ b/interfaces/_libp2p_prometheus_metrics.PrometheusMetricsInit.html @@ -1,13 +1,13 @@ -PrometheusMetricsInit | libp2p
                                                                                                                                              interface PrometheusMetricsInit {
                                                                                                                                                  collectDefaultMetrics?: boolean;
                                                                                                                                                  defaultMetrics?: DefaultMetricsCollectorConfiguration<RegistryContentType>;
                                                                                                                                                  preserveExistingMetrics?: boolean;
                                                                                                                                                  registry?: Registry<"text/plain; version=0.0.4; charset=utf-8">;
                                                                                                                                              }

                                                                                                                                              Properties

                                                                                                                                              collectDefaultMetrics? +PrometheusMetricsInit | libp2p
                                                                                                                                              interface PrometheusMetricsInit {
                                                                                                                                                  collectDefaultMetrics?: boolean;
                                                                                                                                                  defaultMetrics?: DefaultMetricsCollectorConfiguration<RegistryContentType>;
                                                                                                                                                  preserveExistingMetrics?: boolean;
                                                                                                                                                  registry?: Registry<"text/plain; version=0.0.4; charset=utf-8">;
                                                                                                                                              }

                                                                                                                                              Properties

                                                                                                                                              collectDefaultMetrics?: boolean

                                                                                                                                              By default we collect default metrics - CPU, memory etc, to not do this, pass true here

                                                                                                                                              -

                                                                                                                                              prom-client options to pass to the collectDefaultMetrics function

                                                                                                                                              -
                                                                                                                                              preserveExistingMetrics?: boolean

                                                                                                                                              All metrics in prometheus are global so to prevent clashes in naming +

                                                                                                                                              prom-client options to pass to the collectDefaultMetrics function

                                                                                                                                              +
                                                                                                                                              preserveExistingMetrics?: boolean

                                                                                                                                              All metrics in prometheus are global so to prevent clashes in naming we reset the global metrics registry on creation - to not do this, pass true here

                                                                                                                                              -
                                                                                                                                              registry?: Registry<"text/plain; version=0.0.4; charset=utf-8">

                                                                                                                                              Use a custom registry to register metrics. +

                                                                                                                                              registry?: Registry<"text/plain; version=0.0.4; charset=utf-8">

                                                                                                                                              Use a custom registry to register metrics. By default, the global registry is used to register metrics.

                                                                                                                                              -

                                                                                                                                              Generated using TypeDoc

                                                                                                                                              \ No newline at end of file +

                                                                                                                                              Generated using TypeDoc

                                                                                                                                              \ No newline at end of file diff --git a/interfaces/_libp2p_pubsub.index.PubSubComponents.html b/interfaces/_libp2p_pubsub.index.PubSubComponents.html index 39cd954cba..77a4681c3e 100644 --- a/interfaces/_libp2p_pubsub.index.PubSubComponents.html +++ b/interfaces/_libp2p_pubsub.index.PubSubComponents.html @@ -1,4 +1,4 @@ -PubSubComponents | libp2p
                                                                                                                                              interface PubSubComponents {
                                                                                                                                                  logger: ComponentLogger;
                                                                                                                                                  peerId: PeerId;
                                                                                                                                                  registrar: Registrar;
                                                                                                                                              }

                                                                                                                                              Hierarchy

                                                                                                                                              • PubSubComponents

                                                                                                                                                Properties

                                                                                                                                                logger +PubSubComponents | libp2p

                                                                                                                                                Generated using TypeDoc

                                                                                                                                                \ No newline at end of file +

                                                                                                                                                Properties

                                                                                                                                                peerId: PeerId
                                                                                                                                                registrar: Registrar

                                                                                                                                                Generated using TypeDoc

                                                                                                                                                \ No newline at end of file diff --git a/interfaces/_libp2p_pubsub.peer_streams.PeerStreamsComponents.html b/interfaces/_libp2p_pubsub.peer_streams.PeerStreamsComponents.html index 7f783a3fa6..5696543195 100644 --- a/interfaces/_libp2p_pubsub.peer_streams.PeerStreamsComponents.html +++ b/interfaces/_libp2p_pubsub.peer_streams.PeerStreamsComponents.html @@ -1,2 +1,2 @@ -PeerStreamsComponents | libp2p
                                                                                                                                                interface PeerStreamsComponents {
                                                                                                                                                    logger: ComponentLogger;
                                                                                                                                                }

                                                                                                                                                Properties

                                                                                                                                                Properties

                                                                                                                                                Generated using TypeDoc

                                                                                                                                                \ No newline at end of file +PeerStreamsComponents | libp2p
                                                                                                                                                interface PeerStreamsComponents {
                                                                                                                                                    logger: ComponentLogger;
                                                                                                                                                }

                                                                                                                                                Properties

                                                                                                                                                Properties

                                                                                                                                                Generated using TypeDoc

                                                                                                                                                \ No newline at end of file diff --git a/interfaces/_libp2p_pubsub.peer_streams.PeerStreamsInit.html b/interfaces/_libp2p_pubsub.peer_streams.PeerStreamsInit.html index c2579d5b99..735279a305 100644 --- a/interfaces/_libp2p_pubsub.peer_streams.PeerStreamsInit.html +++ b/interfaces/_libp2p_pubsub.peer_streams.PeerStreamsInit.html @@ -1,3 +1,3 @@ -PeerStreamsInit | libp2p
                                                                                                                                                interface PeerStreamsInit {
                                                                                                                                                    id: PeerId;
                                                                                                                                                    protocol: string;
                                                                                                                                                }

                                                                                                                                                Properties

                                                                                                                                                id +PeerStreamsInit | libp2p

                                                                                                                                                Generated using TypeDoc

                                                                                                                                                \ No newline at end of file +

                                                                                                                                                Properties

                                                                                                                                                id: PeerId
                                                                                                                                                protocol: string

                                                                                                                                                Generated using TypeDoc

                                                                                                                                                \ No newline at end of file diff --git a/interfaces/_libp2p_tcp.TCPComponents.html b/interfaces/_libp2p_tcp.TCPComponents.html index 24580f42c3..f4f54c7ea6 100644 --- a/interfaces/_libp2p_tcp.TCPComponents.html +++ b/interfaces/_libp2p_tcp.TCPComponents.html @@ -1,3 +1,3 @@ -TCPComponents | libp2p

                                                                                                                                                Interface TCPComponents

                                                                                                                                                interface TCPComponents {
                                                                                                                                                    logger: ComponentLogger;
                                                                                                                                                    metrics?: Metrics;
                                                                                                                                                }

                                                                                                                                                Properties

                                                                                                                                                logger +TCPComponents | libp2p

                                                                                                                                                Generated using TypeDoc

                                                                                                                                                \ No newline at end of file +

                                                                                                                                                Properties

                                                                                                                                                metrics?: Metrics

                                                                                                                                                Generated using TypeDoc

                                                                                                                                                \ No newline at end of file diff --git a/interfaces/_libp2p_tcp.TCPCreateListenerOptions.html b/interfaces/_libp2p_tcp.TCPCreateListenerOptions.html index 8a8313e065..aab29f0c73 100644 --- a/interfaces/_libp2p_tcp.TCPCreateListenerOptions.html +++ b/interfaces/_libp2p_tcp.TCPCreateListenerOptions.html @@ -1,5 +1,5 @@ TCPCreateListenerOptions | libp2p

                                                                                                                                                Interface TCPCreateListenerOptions

                                                                                                                                                Expose a subset of net.connect options

                                                                                                                                                -
                                                                                                                                                interface TCPCreateListenerOptions {
                                                                                                                                                    allowHalfOpen?: boolean;
                                                                                                                                                    handler?: ConnectionHandler;
                                                                                                                                                    keepAlive?: boolean;
                                                                                                                                                    keepAliveInitialDelay?: number;
                                                                                                                                                    noDelay?: boolean;
                                                                                                                                                    signal?: AbortSignal;
                                                                                                                                                    upgrader: Upgrader;
                                                                                                                                                }

                                                                                                                                                Hierarchy

                                                                                                                                                Properties

                                                                                                                                                interface TCPCreateListenerOptions {
                                                                                                                                                    allowHalfOpen?: boolean;
                                                                                                                                                    handler?: ConnectionHandler;
                                                                                                                                                    keepAlive?: boolean;
                                                                                                                                                    keepAliveInitialDelay?: number;
                                                                                                                                                    noDelay?: boolean;
                                                                                                                                                    signal?: AbortSignal;
                                                                                                                                                    upgrader: Upgrader;
                                                                                                                                                }

                                                                                                                                                Hierarchy

                                                                                                                                                Properties

                                                                                                                                                allowHalfOpen?: boolean
                                                                                                                                                keepAlive?: boolean
                                                                                                                                                keepAliveInitialDelay?: number
                                                                                                                                                noDelay?: boolean
                                                                                                                                                signal?: AbortSignal
                                                                                                                                                upgrader: Upgrader

                                                                                                                                                Generated using TypeDoc

                                                                                                                                                \ No newline at end of file +
                                                                                                                                                keepAlive?: boolean
                                                                                                                                                keepAliveInitialDelay?: number
                                                                                                                                                noDelay?: boolean
                                                                                                                                                signal?: AbortSignal
                                                                                                                                                upgrader: Upgrader

                                                                                                                                                Generated using TypeDoc

                                                                                                                                                \ No newline at end of file diff --git a/interfaces/_libp2p_tcp.TCPDialOptions.html b/interfaces/_libp2p_tcp.TCPDialOptions.html index bf2ab25fe6..004639b37e 100644 --- a/interfaces/_libp2p_tcp.TCPDialOptions.html +++ b/interfaces/_libp2p_tcp.TCPDialOptions.html @@ -1,12 +1,12 @@ TCPDialOptions | libp2p

                                                                                                                                                Interface TCPDialOptions

                                                                                                                                                Expose a subset of net.connect options

                                                                                                                                                -
                                                                                                                                                interface TCPDialOptions {
                                                                                                                                                    allowHalfOpen?: boolean;
                                                                                                                                                    keepAlive?: boolean;
                                                                                                                                                    keepAliveInitialDelay?: number;
                                                                                                                                                    noDelay?: boolean;
                                                                                                                                                    signal?: AbortSignal;
                                                                                                                                                    upgrader: Upgrader;
                                                                                                                                                }

                                                                                                                                                Hierarchy

                                                                                                                                                Properties

                                                                                                                                                interface TCPDialOptions {
                                                                                                                                                    allowHalfOpen?: boolean;
                                                                                                                                                    keepAlive?: boolean;
                                                                                                                                                    keepAliveInitialDelay?: number;
                                                                                                                                                    noDelay?: boolean;
                                                                                                                                                    signal?: AbortSignal;
                                                                                                                                                    upgrader: Upgrader;
                                                                                                                                                }

                                                                                                                                                Hierarchy

                                                                                                                                                Properties

                                                                                                                                                allowHalfOpen?: boolean
                                                                                                                                                keepAlive?: boolean
                                                                                                                                                keepAliveInitialDelay?: number
                                                                                                                                                noDelay?: boolean
                                                                                                                                                signal?: AbortSignal
                                                                                                                                                upgrader: Upgrader

                                                                                                                                                Generated using TypeDoc

                                                                                                                                                \ No newline at end of file +
                                                                                                                                                keepAlive?: boolean
                                                                                                                                                keepAliveInitialDelay?: number
                                                                                                                                                noDelay?: boolean
                                                                                                                                                signal?: AbortSignal
                                                                                                                                                upgrader: Upgrader

                                                                                                                                                Generated using TypeDoc

                                                                                                                                                \ No newline at end of file diff --git a/interfaces/_libp2p_tcp.TCPMetrics.html b/interfaces/_libp2p_tcp.TCPMetrics.html index cdeb896648..5321a7ca78 100644 --- a/interfaces/_libp2p_tcp.TCPMetrics.html +++ b/interfaces/_libp2p_tcp.TCPMetrics.html @@ -1,2 +1,2 @@ -TCPMetrics | libp2p

                                                                                                                                                Interface TCPMetrics

                                                                                                                                                interface TCPMetrics {
                                                                                                                                                    dialerEvents: CounterGroup;
                                                                                                                                                }

                                                                                                                                                Properties

                                                                                                                                                Properties

                                                                                                                                                dialerEvents: CounterGroup

                                                                                                                                                Generated using TypeDoc

                                                                                                                                                \ No newline at end of file +TCPMetrics | libp2p

                                                                                                                                                Interface TCPMetrics

                                                                                                                                                interface TCPMetrics {
                                                                                                                                                    dialerEvents: CounterGroup;
                                                                                                                                                }

                                                                                                                                                Properties

                                                                                                                                                Properties

                                                                                                                                                dialerEvents: CounterGroup

                                                                                                                                                Generated using TypeDoc

                                                                                                                                                \ No newline at end of file diff --git a/interfaces/_libp2p_tcp.TCPOptions.html b/interfaces/_libp2p_tcp.TCPOptions.html index 1da98aa21f..9ea0a1e635 100644 --- a/interfaces/_libp2p_tcp.TCPOptions.html +++ b/interfaces/_libp2p_tcp.TCPOptions.html @@ -1,4 +1,4 @@ -TCPOptions | libp2p

                                                                                                                                                Interface TCPOptions

                                                                                                                                                interface TCPOptions {
                                                                                                                                                    backlog?: number;
                                                                                                                                                    closeServerOnMaxConnections?: CloseServerOnMaxConnectionsOpts;
                                                                                                                                                    dialOpts?: TCPSocketOptions;
                                                                                                                                                    inboundSocketInactivityTimeout?: number;
                                                                                                                                                    listenOpts?: TCPSocketOptions;
                                                                                                                                                    maxConnections?: number;
                                                                                                                                                    outboundSocketInactivityTimeout?: number;
                                                                                                                                                    socketCloseTimeout?: number;
                                                                                                                                                }

                                                                                                                                                Properties

                                                                                                                                                backlog? +TCPOptions | libp2p

                                                                                                                                                Interface TCPOptions

                                                                                                                                                interface TCPOptions {
                                                                                                                                                    backlog?: number;
                                                                                                                                                    closeServerOnMaxConnections?: CloseServerOnMaxConnectionsOpts;
                                                                                                                                                    dialOpts?: TCPSocketOptions;
                                                                                                                                                    inboundSocketInactivityTimeout?: number;
                                                                                                                                                    listenOpts?: TCPSocketOptions;
                                                                                                                                                    maxConnections?: number;
                                                                                                                                                    outboundSocketInactivityTimeout?: number;
                                                                                                                                                    socketCloseTimeout?: number;
                                                                                                                                                }

                                                                                                                                                Properties

                                                                                                                                                backlog?: number

                                                                                                                                                Parameter to specify the maximum length of the queue of pending connections https://nodejs.org/dist/latest-v18.x/docs/api/net.html#serverlisten

                                                                                                                                                -
                                                                                                                                                closeServerOnMaxConnections?: CloseServerOnMaxConnectionsOpts

                                                                                                                                                Close server (stop listening for new connections) if connections exceed a limit. +

                                                                                                                                                closeServerOnMaxConnections?: CloseServerOnMaxConnectionsOpts

                                                                                                                                                Close server (stop listening for new connections) if connections exceed a limit. Open server (start listening for new connections) if connections fall below a limit.

                                                                                                                                                -
                                                                                                                                                dialOpts?: TCPSocketOptions

                                                                                                                                                Options passed to net.connect for every opened TCP socket

                                                                                                                                                -
                                                                                                                                                inboundSocketInactivityTimeout?: number

                                                                                                                                                An optional number in ms that is used as an inactivity timeout after which the socket will be closed

                                                                                                                                                -
                                                                                                                                                listenOpts?: TCPSocketOptions

                                                                                                                                                Options passed to every net.createServer for every TCP server

                                                                                                                                                -
                                                                                                                                                maxConnections?: number

                                                                                                                                                Set this property to reject connections when the server's connection count gets high. +

                                                                                                                                                dialOpts?: TCPSocketOptions

                                                                                                                                                Options passed to net.connect for every opened TCP socket

                                                                                                                                                +
                                                                                                                                                inboundSocketInactivityTimeout?: number

                                                                                                                                                An optional number in ms that is used as an inactivity timeout after which the socket will be closed

                                                                                                                                                +
                                                                                                                                                listenOpts?: TCPSocketOptions

                                                                                                                                                Options passed to every net.createServer for every TCP server

                                                                                                                                                +
                                                                                                                                                maxConnections?: number

                                                                                                                                                Set this property to reject connections when the server's connection count gets high. https://nodejs.org/api/net.html#servermaxconnections

                                                                                                                                                -
                                                                                                                                                outboundSocketInactivityTimeout?: number

                                                                                                                                                An optional number in ms that is used as an inactivity timeout after which the socket will be closed

                                                                                                                                                -
                                                                                                                                                socketCloseTimeout?: number

                                                                                                                                                When closing a socket, wait this long for it to close gracefully before it is closed more forcibly

                                                                                                                                                -

                                                                                                                                                Generated using TypeDoc

                                                                                                                                                \ No newline at end of file +
                                                                                                                                                outboundSocketInactivityTimeout?: number

                                                                                                                                                An optional number in ms that is used as an inactivity timeout after which the socket will be closed

                                                                                                                                                +
                                                                                                                                                socketCloseTimeout?: number

                                                                                                                                                When closing a socket, wait this long for it to close gracefully before it is closed more forcibly

                                                                                                                                                +

                                                                                                                                                Generated using TypeDoc

                                                                                                                                                \ No newline at end of file diff --git a/interfaces/_libp2p_tcp.TCPSocketOptions.html b/interfaces/_libp2p_tcp.TCPSocketOptions.html index bb0c8dd536..b6d908e914 100644 --- a/interfaces/_libp2p_tcp.TCPSocketOptions.html +++ b/interfaces/_libp2p_tcp.TCPSocketOptions.html @@ -1,11 +1,11 @@ TCPSocketOptions | libp2p

                                                                                                                                                Interface TCPSocketOptions

                                                                                                                                                Expose a subset of net.connect options

                                                                                                                                                -
                                                                                                                                                interface TCPSocketOptions {
                                                                                                                                                    allowHalfOpen?: boolean;
                                                                                                                                                    keepAlive?: boolean;
                                                                                                                                                    keepAliveInitialDelay?: number;
                                                                                                                                                    noDelay?: boolean;
                                                                                                                                                    signal?: AbortSignal;
                                                                                                                                                }

                                                                                                                                                Hierarchy

                                                                                                                                                Properties

                                                                                                                                                interface TCPSocketOptions {
                                                                                                                                                    allowHalfOpen?: boolean;
                                                                                                                                                    keepAlive?: boolean;
                                                                                                                                                    keepAliveInitialDelay?: number;
                                                                                                                                                    noDelay?: boolean;
                                                                                                                                                    signal?: AbortSignal;
                                                                                                                                                }

                                                                                                                                                Hierarchy

                                                                                                                                                Properties

                                                                                                                                                allowHalfOpen?: boolean
                                                                                                                                                keepAlive?: boolean
                                                                                                                                                keepAliveInitialDelay?: number
                                                                                                                                                noDelay?: boolean
                                                                                                                                                signal?: AbortSignal

                                                                                                                                                Generated using TypeDoc

                                                                                                                                                \ No newline at end of file +
                                                                                                                                                keepAlive?: boolean
                                                                                                                                                keepAliveInitialDelay?: number
                                                                                                                                                noDelay?: boolean
                                                                                                                                                signal?: AbortSignal

                                                                                                                                                Generated using TypeDoc

                                                                                                                                                \ No newline at end of file diff --git a/interfaces/_libp2p_upnp_nat.PMPOptions.html b/interfaces/_libp2p_upnp_nat.PMPOptions.html index fbfebff6b6..8747f2d71e 100644 --- a/interfaces/_libp2p_upnp_nat.PMPOptions.html +++ b/interfaces/_libp2p_upnp_nat.PMPOptions.html @@ -1,3 +1,3 @@ -PMPOptions | libp2p
                                                                                                                                                interface PMPOptions {
                                                                                                                                                    enabled?: boolean;
                                                                                                                                                }

                                                                                                                                                Properties

                                                                                                                                                enabled? +PMPOptions | libp2p

                                                                                                                                                Generated using TypeDoc

                                                                                                                                                \ No newline at end of file +

                                                                                                                                                Generated using TypeDoc

                                                                                                                                                \ No newline at end of file diff --git a/interfaces/_libp2p_upnp_nat.UPnPNATComponents.html b/interfaces/_libp2p_upnp_nat.UPnPNATComponents.html index b6dca8a9d5..36a8598ce2 100644 --- a/interfaces/_libp2p_upnp_nat.UPnPNATComponents.html +++ b/interfaces/_libp2p_upnp_nat.UPnPNATComponents.html @@ -1,6 +1,6 @@ -UPnPNATComponents | libp2p

                                                                                                                                                Interface UPnPNATComponents

                                                                                                                                                interface UPnPNATComponents {
                                                                                                                                                    addressManager: AddressManager;
                                                                                                                                                    logger: ComponentLogger;
                                                                                                                                                    nodeInfo: NodeInfo;
                                                                                                                                                    peerId: PeerId;
                                                                                                                                                    transportManager: TransportManager;
                                                                                                                                                }

                                                                                                                                                Properties

                                                                                                                                                addressManager +UPnPNATComponents | libp2p

                                                                                                                                                Generated using TypeDoc

                                                                                                                                                \ No newline at end of file +

                                                                                                                                                Properties

                                                                                                                                                addressManager: AddressManager
                                                                                                                                                nodeInfo: NodeInfo
                                                                                                                                                peerId: PeerId
                                                                                                                                                transportManager: TransportManager

                                                                                                                                                Generated using TypeDoc

                                                                                                                                                \ No newline at end of file diff --git a/interfaces/_libp2p_upnp_nat.UPnPNATInit.html b/interfaces/_libp2p_upnp_nat.UPnPNATInit.html index 54016b9345..d2e850f0ce 100644 --- a/interfaces/_libp2p_upnp_nat.UPnPNATInit.html +++ b/interfaces/_libp2p_upnp_nat.UPnPNATInit.html @@ -1,13 +1,13 @@ -UPnPNATInit | libp2p
                                                                                                                                                interface UPnPNATInit {
                                                                                                                                                    description?: string;
                                                                                                                                                    externalAddress?: string;
                                                                                                                                                    gateway?: string;
                                                                                                                                                    keepAlive?: boolean;
                                                                                                                                                    localAddress?: string;
                                                                                                                                                    ttl?: number;
                                                                                                                                                }

                                                                                                                                                Properties

                                                                                                                                                description? +UPnPNATInit | libp2p
                                                                                                                                                interface UPnPNATInit {
                                                                                                                                                    description?: string;
                                                                                                                                                    externalAddress?: string;
                                                                                                                                                    gateway?: string;
                                                                                                                                                    keepAlive?: boolean;
                                                                                                                                                    localAddress?: string;
                                                                                                                                                    ttl?: number;
                                                                                                                                                }

                                                                                                                                                Properties

                                                                                                                                                description?: string

                                                                                                                                                A string value to use for the port mapping description on the gateway

                                                                                                                                                -
                                                                                                                                                externalAddress?: string

                                                                                                                                                Pass a value to use instead of auto-detection

                                                                                                                                                -
                                                                                                                                                gateway?: string

                                                                                                                                                Pass a value to use instead of auto-detection

                                                                                                                                                -
                                                                                                                                                keepAlive?: boolean

                                                                                                                                                Whether to automatically refresh UPnP port mappings when their TTL is reached

                                                                                                                                                -
                                                                                                                                                localAddress?: string

                                                                                                                                                Pass a value to use instead of auto-detection

                                                                                                                                                -
                                                                                                                                                ttl?: number

                                                                                                                                                How long UPnP port mappings should last for in seconds (minimum 1200)

                                                                                                                                                -

                                                                                                                                                Generated using TypeDoc

                                                                                                                                                \ No newline at end of file +
                                                                                                                                                externalAddress?: string

                                                                                                                                                Pass a value to use instead of auto-detection

                                                                                                                                                +
                                                                                                                                                gateway?: string

                                                                                                                                                Pass a value to use instead of auto-detection

                                                                                                                                                +
                                                                                                                                                keepAlive?: boolean

                                                                                                                                                Whether to automatically refresh UPnP port mappings when their TTL is reached

                                                                                                                                                +
                                                                                                                                                localAddress?: string

                                                                                                                                                Pass a value to use instead of auto-detection

                                                                                                                                                +
                                                                                                                                                ttl?: number

                                                                                                                                                How long UPnP port mappings should last for in seconds (minimum 1200)

                                                                                                                                                +

                                                                                                                                                Generated using TypeDoc

                                                                                                                                                \ No newline at end of file diff --git a/interfaces/_libp2p_utils.abstract_stream.AbstractStreamInit.html b/interfaces/_libp2p_utils.abstract_stream.AbstractStreamInit.html index e07c85adad..142620b4da 100644 --- a/interfaces/_libp2p_utils.abstract_stream.AbstractStreamInit.html +++ b/interfaces/_libp2p_utils.abstract_stream.AbstractStreamInit.html @@ -1,4 +1,4 @@ -AbstractStreamInit | libp2p
                                                                                                                                                interface AbstractStreamInit {
                                                                                                                                                    closeTimeout?: number;
                                                                                                                                                    direction: Direction;
                                                                                                                                                    id: string;
                                                                                                                                                    log: Logger;
                                                                                                                                                    metadata?: Record<string, unknown>;
                                                                                                                                                    sendCloseWriteTimeout?: number;
                                                                                                                                                    onAbort?(err): void;
                                                                                                                                                    onCloseRead?(): void;
                                                                                                                                                    onCloseWrite?(): void;
                                                                                                                                                    onEnd?(err?): void;
                                                                                                                                                    onReset?(): void;
                                                                                                                                                }

                                                                                                                                                Properties

                                                                                                                                                closeTimeout? +AbstractStreamInit | libp2p
                                                                                                                                                interface AbstractStreamInit {
                                                                                                                                                    closeTimeout?: number;
                                                                                                                                                    direction: Direction;
                                                                                                                                                    id: string;
                                                                                                                                                    log: Logger;
                                                                                                                                                    metadata?: Record<string, unknown>;
                                                                                                                                                    sendCloseWriteTimeout?: number;
                                                                                                                                                    onAbort?(err): void;
                                                                                                                                                    onCloseRead?(): void;
                                                                                                                                                    onCloseWrite?(): void;
                                                                                                                                                    onEnd?(err?): void;
                                                                                                                                                    onReset?(): void;
                                                                                                                                                }

                                                                                                                                                Properties

                                                                                                                                                closeTimeout? direction id log @@ -11,15 +11,15 @@ onReset?

                                                                                                                                                Properties

                                                                                                                                                closeTimeout?: number

                                                                                                                                                How long to wait in ms for stream data to be written to the underlying connection when closing the writable end of the stream. (default: 500)

                                                                                                                                                -
                                                                                                                                                direction: Direction

                                                                                                                                                The stream direction

                                                                                                                                                -
                                                                                                                                                id: string

                                                                                                                                                A unique identifier for this stream

                                                                                                                                                -
                                                                                                                                                log: Logger

                                                                                                                                                A Logger implementation used to log stream-specific information

                                                                                                                                                -
                                                                                                                                                metadata?: Record<string, unknown>

                                                                                                                                                User specific stream metadata

                                                                                                                                                -
                                                                                                                                                sendCloseWriteTimeout?: number

                                                                                                                                                After the stream sink has closed, a limit on how long it takes to send +

                                                                                                                                                direction: Direction

                                                                                                                                                The stream direction

                                                                                                                                                +
                                                                                                                                                id: string

                                                                                                                                                A unique identifier for this stream

                                                                                                                                                +
                                                                                                                                                log: Logger

                                                                                                                                                A Logger implementation used to log stream-specific information

                                                                                                                                                +
                                                                                                                                                metadata?: Record<string, unknown>

                                                                                                                                                User specific stream metadata

                                                                                                                                                +
                                                                                                                                                sendCloseWriteTimeout?: number

                                                                                                                                                After the stream sink has closed, a limit on how long it takes to send a close-write message to the remote peer.

                                                                                                                                                -

                                                                                                                                                Methods

                                                                                                                                                Generated using TypeDoc

                                                                                                                                                \ No newline at end of file +

                                                                                                                                                Methods

                                                                                                                                                Generated using TypeDoc

                                                                                                                                                \ No newline at end of file diff --git a/interfaces/_libp2p_utils.peer_job_queue.PeerPriorityQueueOptions.html b/interfaces/_libp2p_utils.peer_job_queue.PeerPriorityQueueOptions.html index 9b423f8a55..9dbf4d9970 100644 --- a/interfaces/_libp2p_utils.peer_job_queue.PeerPriorityQueueOptions.html +++ b/interfaces/_libp2p_utils.peer_job_queue.PeerPriorityQueueOptions.html @@ -1,9 +1,9 @@ -PeerPriorityQueueOptions | libp2p
                                                                                                                                                interface PeerPriorityQueueOptions {
                                                                                                                                                    peerId: PeerId;
                                                                                                                                                    priority?: number;
                                                                                                                                                    signal?: AbortSignal;
                                                                                                                                                    throwOnTimeout?: boolean;
                                                                                                                                                    timeout?: number;
                                                                                                                                                }

                                                                                                                                                Hierarchy

                                                                                                                                                Properties

                                                                                                                                                peerId +PeerPriorityQueueOptions | libp2p
                                                                                                                                                interface PeerPriorityQueueOptions {
                                                                                                                                                    peerId: PeerId;
                                                                                                                                                    priority?: number;
                                                                                                                                                    signal?: AbortSignal;
                                                                                                                                                    throwOnTimeout?: boolean;
                                                                                                                                                    timeout?: number;
                                                                                                                                                }

                                                                                                                                                Hierarchy

                                                                                                                                                Properties

                                                                                                                                                peerId: PeerId
                                                                                                                                                priority?: number

                                                                                                                                                Priority of operation. Operations with greater priority will be scheduled first.

                                                                                                                                                +

                                                                                                                                                Properties

                                                                                                                                                peerId: PeerId
                                                                                                                                                priority?: number

                                                                                                                                                Priority of operation. Operations with greater priority will be scheduled first.

                                                                                                                                                Default

                                                                                                                                                0
                                                                                                                                                 
                                                                                                                                                signal?: AbortSignal

                                                                                                                                                AbortSignal for cancellation of the operation. When aborted, it will be removed from the queue and the queue.add() call will reject with an AbortError. If the operation is already running, the signal will need to be handled by the operation itself.

                                                                                                                                                diff --git a/interfaces/_libp2p_utils.stream_to_ma_conn.StreamProperties.html b/interfaces/_libp2p_utils.stream_to_ma_conn.StreamProperties.html index 68fb100da1..3269952049 100644 --- a/interfaces/_libp2p_utils.stream_to_ma_conn.StreamProperties.html +++ b/interfaces/_libp2p_utils.stream_to_ma_conn.StreamProperties.html @@ -1,5 +1,5 @@ -StreamProperties | libp2p
                                                                                                                                                interface StreamProperties {
                                                                                                                                                    localAddr: Multiaddr;
                                                                                                                                                    logger: ComponentLogger;
                                                                                                                                                    remoteAddr: Multiaddr;
                                                                                                                                                    stream: Stream;
                                                                                                                                                }

                                                                                                                                                Properties

                                                                                                                                                localAddr +StreamProperties | libp2p

                                                                                                                                                Generated using TypeDoc

                                                                                                                                                \ No newline at end of file +

                                                                                                                                                Properties

                                                                                                                                                localAddr: Multiaddr
                                                                                                                                                remoteAddr: Multiaddr
                                                                                                                                                stream: Stream

                                                                                                                                                Generated using TypeDoc

                                                                                                                                                \ No newline at end of file diff --git a/interfaces/_libp2p_webrtc.DataChannelOptions.html b/interfaces/_libp2p_webrtc.DataChannelOptions.html index 9e60783944..ad2975cfde 100644 --- a/interfaces/_libp2p_webrtc.DataChannelOptions.html +++ b/interfaces/_libp2p_webrtc.DataChannelOptions.html @@ -1,4 +1,4 @@ -DataChannelOptions | libp2p

                                                                                                                                                Interface DataChannelOptions

                                                                                                                                                interface DataChannelOptions {
                                                                                                                                                    bufferedAmountLowEventTimeout?: number;
                                                                                                                                                    closeTimeout?: number;
                                                                                                                                                    drainTimeout?: number;
                                                                                                                                                    maxBufferedAmount?: number;
                                                                                                                                                    maxMessageSize?: number;
                                                                                                                                                    openTimeout?: number;
                                                                                                                                                }

                                                                                                                                                Properties

                                                                                                                                                bufferedAmountLowEventTimeout? +DataChannelOptions | libp2p

                                                                                                                                                Interface DataChannelOptions

                                                                                                                                                interface DataChannelOptions {
                                                                                                                                                    bufferedAmountLowEventTimeout?: number;
                                                                                                                                                    closeTimeout?: number;
                                                                                                                                                    drainTimeout?: number;
                                                                                                                                                    maxBufferedAmount?: number;
                                                                                                                                                    maxMessageSize?: number;
                                                                                                                                                    openTimeout?: number;
                                                                                                                                                }

                                                                                                                                                Properties

                                                                                                                                                bufferedAmountLowEventTimeout?: number

                                                                                                                                                When bufferedAmount is above maxBufferedAmount, we pause sending until the bufferedAmountLow event fires - this controls how long we wait for that event in ms (default: 30s)

                                                                                                                                                -
                                                                                                                                                closeTimeout?: number

                                                                                                                                                When closing a stream we first send a FIN flag to the remote and wait +

                                                                                                                                                closeTimeout?: number

                                                                                                                                                When closing a stream we first send a FIN flag to the remote and wait for a FIN_ACK reply before closing the underlying RTCDataChannel - this controls how long we wait for the acknowledgement in ms (default: 5s)

                                                                                                                                                -
                                                                                                                                                drainTimeout?: number

                                                                                                                                                When closing a stream, we wait for bufferedAmount to become 0 before +

                                                                                                                                                drainTimeout?: number

                                                                                                                                                When closing a stream, we wait for bufferedAmount to become 0 before closing the underlying RTCDataChannel - this controls how long we wait in ms (default: 30s)

                                                                                                                                                -
                                                                                                                                                maxBufferedAmount?: number

                                                                                                                                                If the channel's bufferedAmount grows over this amount in bytes, wait +

                                                                                                                                                maxBufferedAmount?: number

                                                                                                                                                If the channel's bufferedAmount grows over this amount in bytes, wait for it to drain before sending more data (default: 16MB)

                                                                                                                                                -
                                                                                                                                                maxMessageSize?: number

                                                                                                                                                The maximum message size sendable over the channel in bytes (default 16KB)

                                                                                                                                                -
                                                                                                                                                openTimeout?: number

                                                                                                                                                When sending the first data message, if the channel is not in the "open" +

                                                                                                                                                maxMessageSize?: number

                                                                                                                                                The maximum message size sendable over the channel in bytes (default 16KB)

                                                                                                                                                +
                                                                                                                                                openTimeout?: number

                                                                                                                                                When sending the first data message, if the channel is not in the "open" state, wait this long for the "open" event to fire.

                                                                                                                                                -

                                                                                                                                                Generated using TypeDoc

                                                                                                                                                \ No newline at end of file +

                                                                                                                                                Generated using TypeDoc

                                                                                                                                                \ No newline at end of file diff --git a/interfaces/_libp2p_websockets.index.WebSocketsComponents.html b/interfaces/_libp2p_websockets.index.WebSocketsComponents.html index 8ee174a064..67e8254a05 100644 --- a/interfaces/_libp2p_websockets.index.WebSocketsComponents.html +++ b/interfaces/_libp2p_websockets.index.WebSocketsComponents.html @@ -1,2 +1,2 @@ -WebSocketsComponents | libp2p

                                                                                                                                                Generated using TypeDoc

                                                                                                                                                \ No newline at end of file +WebSocketsComponents | libp2p

                                                                                                                                                Generated using TypeDoc

                                                                                                                                                \ No newline at end of file diff --git a/interfaces/_libp2p_websockets.index.WebSocketsInit.html b/interfaces/_libp2p_websockets.index.WebSocketsInit.html index daebdbe760..e9fdd54928 100644 --- a/interfaces/_libp2p_websockets.index.WebSocketsInit.html +++ b/interfaces/_libp2p_websockets.index.WebSocketsInit.html @@ -2,9 +2,9 @@ the optional signal property.

                                                                                                                                                Example

                                                                                                                                                const controller = new AbortController()

                                                                                                                                                aLongRunningOperation({
                                                                                                                                                signal: controller.signal
                                                                                                                                                })

                                                                                                                                                // later

                                                                                                                                                controller.abort()
                                                                                                                                                -
                                                                                                                                                interface WebSocketsInit {
                                                                                                                                                    closeOnEnd?: boolean;
                                                                                                                                                    filter?: MultiaddrFilter;
                                                                                                                                                    server?: Server<typeof IncomingMessage, typeof ServerResponse>;
                                                                                                                                                    signal?: AbortSignal;
                                                                                                                                                    websocket?: ClientOptions;
                                                                                                                                                }

                                                                                                                                                Hierarchy

                                                                                                                                                Properties

                                                                                                                                                interface WebSocketsInit {
                                                                                                                                                    closeOnEnd?: boolean;
                                                                                                                                                    filter?: MultiaddrFilter;
                                                                                                                                                    server?: Server<typeof IncomingMessage, typeof ServerResponse>;
                                                                                                                                                    signal?: AbortSignal;
                                                                                                                                                    websocket?: ClientOptions;
                                                                                                                                                }

                                                                                                                                                Hierarchy

                                                                                                                                                Properties

                                                                                                                                                closeOnEnd?: boolean
                                                                                                                                                server?: Server<typeof IncomingMessage, typeof ServerResponse>
                                                                                                                                                signal?: AbortSignal
                                                                                                                                                websocket?: ClientOptions

                                                                                                                                                Generated using TypeDoc

                                                                                                                                                \ No newline at end of file +

                                                                                                                                                Properties

                                                                                                                                                closeOnEnd?: boolean
                                                                                                                                                server?: Server<typeof IncomingMessage, typeof ServerResponse>
                                                                                                                                                signal?: AbortSignal
                                                                                                                                                websocket?: ClientOptions

                                                                                                                                                Generated using TypeDoc

                                                                                                                                                \ No newline at end of file diff --git a/interfaces/_libp2p_webtransport.WebTransportComponents.html b/interfaces/_libp2p_webtransport.WebTransportComponents.html index a066d57402..077cedc8b7 100644 --- a/interfaces/_libp2p_webtransport.WebTransportComponents.html +++ b/interfaces/_libp2p_webtransport.WebTransportComponents.html @@ -1,4 +1,4 @@ -WebTransportComponents | libp2p

                                                                                                                                                Interface WebTransportComponents

                                                                                                                                                interface WebTransportComponents {
                                                                                                                                                    logger: ComponentLogger;
                                                                                                                                                    metrics?: Metrics;
                                                                                                                                                    peerId: PeerId;
                                                                                                                                                }

                                                                                                                                                Properties

                                                                                                                                                logger +WebTransportComponents | libp2p

                                                                                                                                                Generated using TypeDoc

                                                                                                                                                \ No newline at end of file +

                                                                                                                                                Properties

                                                                                                                                                metrics?: Metrics
                                                                                                                                                peerId: PeerId

                                                                                                                                                Generated using TypeDoc

                                                                                                                                                \ No newline at end of file diff --git a/interfaces/_libp2p_webtransport.WebTransportInit.html b/interfaces/_libp2p_webtransport.WebTransportInit.html index a4db5bbeec..2b4faa9bbe 100644 --- a/interfaces/_libp2p_webtransport.WebTransportInit.html +++ b/interfaces/_libp2p_webtransport.WebTransportInit.html @@ -1,2 +1,2 @@ -WebTransportInit | libp2p
                                                                                                                                                interface WebTransportInit {
                                                                                                                                                    maxInboundStreams?: number;
                                                                                                                                                }

                                                                                                                                                Properties

                                                                                                                                                Properties

                                                                                                                                                maxInboundStreams?: number

                                                                                                                                                Generated using TypeDoc

                                                                                                                                                \ No newline at end of file +WebTransportInit | libp2p
                                                                                                                                                interface WebTransportInit {
                                                                                                                                                    maxInboundStreams?: number;
                                                                                                                                                }

                                                                                                                                                Properties

                                                                                                                                                Properties

                                                                                                                                                maxInboundStreams?: number

                                                                                                                                                Generated using TypeDoc

                                                                                                                                                \ No newline at end of file diff --git a/interfaces/_libp2p_webtransport.WebTransportMetrics.html b/interfaces/_libp2p_webtransport.WebTransportMetrics.html index e36442dba1..3cb2beb663 100644 --- a/interfaces/_libp2p_webtransport.WebTransportMetrics.html +++ b/interfaces/_libp2p_webtransport.WebTransportMetrics.html @@ -1,2 +1,2 @@ -WebTransportMetrics | libp2p
                                                                                                                                                interface WebTransportMetrics {
                                                                                                                                                    dialerEvents: CounterGroup;
                                                                                                                                                }

                                                                                                                                                Properties

                                                                                                                                                Properties

                                                                                                                                                dialerEvents: CounterGroup

                                                                                                                                                Generated using TypeDoc

                                                                                                                                                \ No newline at end of file +WebTransportMetrics | libp2p
                                                                                                                                                interface WebTransportMetrics {
                                                                                                                                                    dialerEvents: CounterGroup;
                                                                                                                                                }

                                                                                                                                                Properties

                                                                                                                                                Properties

                                                                                                                                                dialerEvents: CounterGroup

                                                                                                                                                Generated using TypeDoc

                                                                                                                                                \ No newline at end of file diff --git a/interfaces/libp2p.Libp2pInit.html b/interfaces/libp2p.Libp2pInit.html index 239629107b..2a03afa5fd 100644 --- a/interfaces/libp2p.Libp2pInit.html +++ b/interfaces/libp2p.Libp2pInit.html @@ -1,5 +1,5 @@ Libp2pInit | libp2p

                                                                                                                                                Interface Libp2pInit<T>

                                                                                                                                                For Libp2p configurations and modules details read the Configuration Document.

                                                                                                                                                -
                                                                                                                                                interface Libp2pInit {
                                                                                                                                                    addresses: AddressManagerInit;
                                                                                                                                                    connectionEncryption?: ((components) => ConnectionEncrypter<unknown>)[];
                                                                                                                                                    connectionGater: ConnectionGater;
                                                                                                                                                    connectionManager: ConnectionManagerInit;
                                                                                                                                                    contentRouters?: ((components) => ContentRouting)[];
                                                                                                                                                    datastore: Datastore<{}, {}, {}, {}, {}, {}, {}, {}, {}, {}>;
                                                                                                                                                    logger?: ComponentLogger;
                                                                                                                                                    nodeInfo: NodeInfo;
                                                                                                                                                    peerDiscovery?: ((components) => PeerDiscovery)[];
                                                                                                                                                    peerId: PeerId;
                                                                                                                                                    peerRouters?: ((components) => PeerRouting)[];
                                                                                                                                                    peerStore: PersistentPeerStoreInit;
                                                                                                                                                    services: ServiceFactoryMap<T>;
                                                                                                                                                    streamMuxers?: ((components) => StreamMuxerFactory)[];
                                                                                                                                                    transportManager: TransportManagerInit;
                                                                                                                                                    transports: ((components) => Transport)[];
                                                                                                                                                    connectionProtector?(components): ConnectionProtector;
                                                                                                                                                    metrics?(components): Metrics;
                                                                                                                                                }

                                                                                                                                                Type Parameters

                                                                                                                                                Properties

                                                                                                                                                interface Libp2pInit {
                                                                                                                                                    addresses: AddressManagerInit;
                                                                                                                                                    connectionEncryption?: ((components) => ConnectionEncrypter<unknown>)[];
                                                                                                                                                    connectionGater: ConnectionGater;
                                                                                                                                                    connectionManager: ConnectionManagerInit;
                                                                                                                                                    contentRouters?: ((components) => ContentRouting)[];
                                                                                                                                                    datastore: Datastore<{}, {}, {}, {}, {}, {}, {}, {}, {}, {}>;
                                                                                                                                                    logger?: ComponentLogger;
                                                                                                                                                    nodeInfo: NodeInfo;
                                                                                                                                                    peerDiscovery?: ((components) => PeerDiscovery)[];
                                                                                                                                                    peerId: PeerId;
                                                                                                                                                    peerRouters?: ((components) => PeerRouting)[];
                                                                                                                                                    peerStore: PersistentPeerStoreInit;
                                                                                                                                                    services: ServiceFactoryMap<T>;
                                                                                                                                                    streamMuxers?: ((components) => StreamMuxerFactory)[];
                                                                                                                                                    transportManager: TransportManagerInit;
                                                                                                                                                    transports: ((components) => Transport)[];
                                                                                                                                                    connectionProtector?(components): ConnectionProtector;
                                                                                                                                                    metrics?(components): Metrics;
                                                                                                                                                }

                                                                                                                                                Type Parameters

                                                                                                                                                Properties

                                                                                                                                                Addresses for transport listening and to advertise to the network

                                                                                                                                                -
                                                                                                                                                connectionEncryption?: ((components) => ConnectionEncrypter<unknown>)[]

                                                                                                                                                Type declaration

                                                                                                                                                connectionGater: ConnectionGater

                                                                                                                                                A connection gater can deny new connections based on user criteria

                                                                                                                                                -
                                                                                                                                                connectionManager: ConnectionManagerInit

                                                                                                                                                libp2p Connection Manager configuration

                                                                                                                                                -
                                                                                                                                                contentRouters?: ((components) => ContentRouting)[]

                                                                                                                                                Type declaration

                                                                                                                                                datastore: Datastore<{}, {}, {}, {}, {}, {}, {}, {}, {}, {}>

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

                                                                                                                                                +
                                                                                                                                                connectionEncryption?: ((components) => ConnectionEncrypter<unknown>)[]

                                                                                                                                                Type declaration

                                                                                                                                                connectionGater: ConnectionGater

                                                                                                                                                A connection gater can deny new connections based on user criteria

                                                                                                                                                +
                                                                                                                                                connectionManager: ConnectionManagerInit

                                                                                                                                                libp2p Connection Manager configuration

                                                                                                                                                +
                                                                                                                                                contentRouters?: ((components) => ContentRouting)[]

                                                                                                                                                Type declaration

                                                                                                                                                datastore: Datastore<{}, {}, {}, {}, {}, {}, {}, {}, {}, {}>

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

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

                                                                                                                                                -

                                                                                                                                                Type declaration

                                                                                                                                                  Type declaration

                                                                                                                                                    Type declaration

                                                                                                                                                      Type declaration

                                                                                                                                                        Type declaration

                                                                                                                                                          Type declaration

                                                                                                                                                            Type declaration

                                                                                                                                                              Type declaration

                                                                                                                                                                Type declaration

                                                                                                                                                                  Type declaration

                                                                                                                                                                    An optional logging implementation that can be used to write runtime logs.

                                                                                                                                                                    +

                                                                                                                                                                    Type declaration

                                                                                                                                                                      Type declaration

                                                                                                                                                                        Type declaration

                                                                                                                                                                          Type declaration

                                                                                                                                                                            Type declaration

                                                                                                                                                                              Type declaration

                                                                                                                                                                                Type declaration

                                                                                                                                                                                  Type declaration

                                                                                                                                                                                    Type declaration

                                                                                                                                                                                      Type declaration

                                                                                                                                                                                        An optional logging implementation that can be used to write runtime logs.

                                                                                                                                                                                        Set the DEBUG env var or the debug key on LocalStorage to see logs.

                                                                                                                                                                                        Example

                                                                                                                                                                                        Node.js:

                                                                                                                                                                                        $ DEBUG="*libp2p:*" node myscript.js
                                                                                                                                                                                        @@ -30,12 +30,12 @@
                                                                                                                                                                                         

                                                                                                                                                                                        Browsers:

                                                                                                                                                                                        localStorage.setItem('debug', '*libp2p:*')
                                                                                                                                                                                         
                                                                                                                                                                                        -
                                                                                                                                                                                        nodeInfo: NodeInfo

                                                                                                                                                                                        Metadata about the node - implementation name, version number, etc

                                                                                                                                                                                        -
                                                                                                                                                                                        peerDiscovery?: ((components) => PeerDiscovery)[]

                                                                                                                                                                                        Type declaration

                                                                                                                                                                                        peerId: PeerId

                                                                                                                                                                                        peerId instance (it will be created if not provided)

                                                                                                                                                                                        -
                                                                                                                                                                                        peerRouters?: ((components) => PeerRouting)[]

                                                                                                                                                                                        Type declaration

                                                                                                                                                                                        libp2p PeerStore configuration

                                                                                                                                                                                        -
                                                                                                                                                                                        services: ServiceFactoryMap<T>

                                                                                                                                                                                        Arbitrary libp2p modules

                                                                                                                                                                                        -
                                                                                                                                                                                        streamMuxers?: ((components) => StreamMuxerFactory)[]

                                                                                                                                                                                        Type declaration

                                                                                                                                                                                        transportManager: TransportManagerInit

                                                                                                                                                                                        libp2p transport manager configuration

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

                                                                                                                                                                                        An array that must include at least 1 compliant transport

                                                                                                                                                                                        -

                                                                                                                                                                                        Type declaration

                                                                                                                                                                                        Methods

                                                                                                                                                                                        Generated using TypeDoc

                                                                                                                                                                                        \ No newline at end of file +
                                                                                                                                                                                        nodeInfo: NodeInfo

                                                                                                                                                                                        Metadata about the node - implementation name, version number, etc

                                                                                                                                                                                        +
                                                                                                                                                                                        peerDiscovery?: ((components) => PeerDiscovery)[]

                                                                                                                                                                                        Type declaration

                                                                                                                                                                                        peerId: PeerId

                                                                                                                                                                                        peerId instance (it will be created if not provided)

                                                                                                                                                                                        +
                                                                                                                                                                                        peerRouters?: ((components) => PeerRouting)[]

                                                                                                                                                                                        Type declaration

                                                                                                                                                                                        libp2p PeerStore configuration

                                                                                                                                                                                        +
                                                                                                                                                                                        services: ServiceFactoryMap<T>

                                                                                                                                                                                        Arbitrary libp2p modules

                                                                                                                                                                                        +
                                                                                                                                                                                        streamMuxers?: ((components) => StreamMuxerFactory)[]

                                                                                                                                                                                        Type declaration

                                                                                                                                                                                        transportManager: TransportManagerInit

                                                                                                                                                                                        libp2p transport manager configuration

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

                                                                                                                                                                                        An array that must include at least 1 compliant transport

                                                                                                                                                                                        +

                                                                                                                                                                                        Type declaration

                                                                                                                                                                                        Methods

                                                                                                                                                                                        Generated using TypeDoc

                                                                                                                                                                                        \ No newline at end of file diff --git a/modules/_libp2p_crypto.aes.html b/modules/_libp2p_crypto.aes.html index 9fb579d034..ee4dba7713 100644 --- a/modules/_libp2p_crypto.aes.html +++ b/modules/_libp2p_crypto.aes.html @@ -3,6 +3,6 @@

                                                                                                                                                                                        /**

                                                                                                                                                                                        Example

                                                                                                                                                                                        import { create } from '@libp2p/crypto/aes'

                                                                                                                                                                                        // Setting up Key and IV

                                                                                                                                                                                        // A 16 bytes array, 128 Bits, AES-128 is chosen
                                                                                                                                                                                        const key128 = Uint8Array.from([0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15])

                                                                                                                                                                                        // A 16 bytes array, 128 Bits,
                                                                                                                                                                                        const IV = Uint8Array.from([0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15])

                                                                                                                                                                                        const decryptedMessage = 'Hello, world!'

                                                                                                                                                                                        // Encrypting
                                                                                                                                                                                        const cipher = await crypto.aes.create(key128, IV)
                                                                                                                                                                                        const encryptedBuffer = await encrypt(Uint8Array.from(decryptedMessage))
                                                                                                                                                                                        console.log(encryptedBuffer)
                                                                                                                                                                                        // prints: <Uint8Array 42 f1 67 d9 2e 42 d0 32 9e b1 f8 3c>

                                                                                                                                                                                        // Decrypting
                                                                                                                                                                                        const decipher = await crypto.aes.create(key128, IV)
                                                                                                                                                                                        const decryptedBuffer = await decrypt(encryptedBuffer)

                                                                                                                                                                                        console.log(decryptedBuffer)
                                                                                                                                                                                        // prints: <Uint8Array 42 f1 67 d9 2e 42 d0 32 9e b1 f8 3c>

                                                                                                                                                                                        console.log(decryptedBuffer.toString('utf-8'))
                                                                                                                                                                                        // prints: Hello, world!
                                                                                                                                                                                        -

                                                                                                                                                                                        Index

                                                                                                                                                                                        Interfaces

                                                                                                                                                                                        Index

                                                                                                                                                                                        Interfaces

                                                                                                                                                                                        Functions

                                                                                                                                                                                        Generated using TypeDoc

                                                                                                                                                                                        \ No newline at end of file diff --git a/modules/_libp2p_crypto.hmac.html b/modules/_libp2p_crypto.hmac.html index b9325fc0e3..b0407299b6 100644 --- a/modules/_libp2p_crypto.hmac.html +++ b/modules/_libp2p_crypto.hmac.html @@ -1,6 +1,6 @@ hmac | libp2p

                                                                                                                                                                                        Exposes an interface to the Keyed-Hash Message Authentication Code (HMAC) as defined in U.S. Federal Information Processing Standards Publication 198. An HMAC is a cryptographic hash that uses a key to sign a message. The receiver verifies the hash by recomputing it using the same key.

                                                                                                                                                                                        Example

                                                                                                                                                                                        import { create } from '@libp2p/hmac'

                                                                                                                                                                                        const hash = 'SHA1' // 'SHA256' || 'SHA512'
                                                                                                                                                                                        const hmac = await crypto.hmac.create(hash, uint8ArrayFromString('secret'))
                                                                                                                                                                                        const sig = await hmac.digest(uint8ArrayFromString('hello world'))
                                                                                                                                                                                        console.log(sig)
                                                                                                                                                                                        -

                                                                                                                                                                                        Index

                                                                                                                                                                                        Interfaces

                                                                                                                                                                                        Index

                                                                                                                                                                                        Interfaces

                                                                                                                                                                                        Functions

                                                                                                                                                                                        Generated using TypeDoc

                                                                                                                                                                                        \ No newline at end of file diff --git a/modules/_libp2p_crypto.index.html b/modules/_libp2p_crypto.index.html index 59250d9238..337888b9d1 100644 --- a/modules/_libp2p_crypto.index.html +++ b/modules/_libp2p_crypto.index.html @@ -1,7 +1,7 @@ index | libp2p

                                                                                                                                                                                        The libp2p-crypto library depends on the Web Crypto API in the browser. Web Crypto is available in all modern browsers, however browsers restrict its usage to Secure Contexts.

                                                                                                                                                                                        This means you will not be able to use some @libp2p/crypto functions in the browser when the page is served over HTTP.

                                                                                                                                                                                        To enable the Web Crypto API and allow @libp2p/crypto to work fully, please serve your page over HTTPS.

                                                                                                                                                                                        -

                                                                                                                                                                                        References

                                                                                                                                                                                        aes +

                                                                                                                                                                                        References

                                                                                                                                                                                        Functions

                                                                                                                                                                                        pbkdf2 diff --git a/modules/_libp2p_crypto.keys.html b/modules/_libp2p_crypto.keys.html index a2326e40df..e3870959fb 100644 --- a/modules/_libp2p_crypto.keys.html +++ b/modules/_libp2p_crypto.keys.html @@ -2,7 +2,7 @@

                                                                                                                                                                                        The generateKeyPair, marshalPublicKey, and marshalPrivateKey functions accept a string type argument.

                                                                                                                                                                                        Currently the 'RSA', 'ed25519', and secp256k1 types are supported, although ed25519 and secp256k1 keys support only signing and verification of messages.

                                                                                                                                                                                        For encryption / decryption support, RSA keys should be used.

                                                                                                                                                                                        -

                                                                                                                                                                                        Index

                                                                                                                                                                                        Namespaces

                                                                                                                                                                                        Index

                                                                                                                                                                                        Namespaces

                                                                                                                                                                                        Type Aliases

                                                                                                                                                                                        Variables

                                                                                                                                                                                        Functions

                                                                                                                                                                                        generateEphemeralKeyPair diff --git a/modules/_libp2p_crypto.keys.keysPBM.KeyType.html b/modules/_libp2p_crypto.keys.keysPBM.KeyType.html index 5701c683e4..71aa1ce94e 100644 --- a/modules/_libp2p_crypto.keys.keysPBM.KeyType.html +++ b/modules/_libp2p_crypto.keys.keysPBM.KeyType.html @@ -1,2 +1,2 @@ -KeyType | libp2p

                                                                                                                                                                                        Index

                                                                                                                                                                                        Functions

                                                                                                                                                                                        codec +KeyType | libp2p

                                                                                                                                                                                        Generated using TypeDoc

                                                                                                                                                                                        \ No newline at end of file diff --git a/modules/_libp2p_crypto.keys.keysPBM.PrivateKey.html b/modules/_libp2p_crypto.keys.keysPBM.PrivateKey.html index cab96780c0..ad1736bd11 100644 --- a/modules/_libp2p_crypto.keys.keysPBM.PrivateKey.html +++ b/modules/_libp2p_crypto.keys.keysPBM.PrivateKey.html @@ -1,4 +1,4 @@ -PrivateKey | libp2p

                                                                                                                                                                                        Index

                                                                                                                                                                                        Functions

                                                                                                                                                                                        codec +PrivateKey | libp2p

                                                                                                                                                                                        Generated using TypeDoc

                                                                                                                                                                                        \ No newline at end of file diff --git a/modules/_libp2p_crypto.keys.keysPBM.PublicKey.html b/modules/_libp2p_crypto.keys.keysPBM.PublicKey.html index a14e3deb37..be3ac06ce7 100644 --- a/modules/_libp2p_crypto.keys.keysPBM.PublicKey.html +++ b/modules/_libp2p_crypto.keys.keysPBM.PublicKey.html @@ -1,4 +1,4 @@ -PublicKey | libp2p

                                                                                                                                                                                        Index

                                                                                                                                                                                        Functions

                                                                                                                                                                                        codec +PublicKey | libp2p

                                                                                                                                                                                        Generated using TypeDoc

                                                                                                                                                                                        \ No newline at end of file diff --git a/modules/_libp2p_crypto.keys.keysPBM.html b/modules/_libp2p_crypto.keys.keysPBM.html index e718d2e7c5..dd5b6dc3a3 100644 --- a/modules/_libp2p_crypto.keys.keysPBM.html +++ b/modules/_libp2p_crypto.keys.keysPBM.html @@ -1,4 +1,4 @@ -keysPBM | libp2p

                                                                                                                                                                                        Index

                                                                                                                                                                                        Namespaces

                                                                                                                                                                                        KeyType +keysPBM | libp2p

                                                                                                                                                                                        Index

                                                                                                                                                                                        Namespaces

                                                                                                                                                                                        Enumerations

                                                                                                                                                                                        KeyType diff --git a/modules/_libp2p_floodsub.html b/modules/_libp2p_floodsub.html index 84e377d3ea..cb20f44eaa 100644 --- a/modules/_libp2p_floodsub.html +++ b/modules/_libp2p_floodsub.html @@ -4,7 +4,7 @@

                                                                                                                                                                                        This module is a naive implementation of pubsub. It broadcasts all messages to all network peers, cannot provide older messages and has no protection against bad actors.

                                                                                                                                                                                        It exists for academic purposes only, you should not use it in production.

                                                                                                                                                                                        Instead please use gossipsub - a more complete implementation which is also compatible with floodsub.

                                                                                                                                                                                        -

                                                                                                                                                                                        Example

                                                                                                                                                                                        import { createLibp2pNode } from 'libp2p'
                                                                                                                                                                                        import { floodsub } from '@libp2p/floodsub'

                                                                                                                                                                                        const node = await createLibp2pNode({
                                                                                                                                                                                        pubsub: floodsub()
                                                                                                                                                                                        //... other options
                                                                                                                                                                                        })
                                                                                                                                                                                        await node.start()

                                                                                                                                                                                        node.pubsub.subscribe('fruit')
                                                                                                                                                                                        node.pubsub.addEventListener('message', (evt) => {
                                                                                                                                                                                        console.this.log(evt)
                                                                                                                                                                                        })

                                                                                                                                                                                        node.pubsub.publish('fruit', new TextEncoder().encode('banana')) +

                                                                                                                                                                                        Example: Configuring libp2p to use floodsub

                                                                                                                                                                                        import { createLibp2pNode } from 'libp2p'
                                                                                                                                                                                        import { floodsub } from '@libp2p/floodsub'

                                                                                                                                                                                        const node = await createLibp2pNode({
                                                                                                                                                                                        pubsub: floodsub()
                                                                                                                                                                                        //... other options
                                                                                                                                                                                        })
                                                                                                                                                                                        await node.start()

                                                                                                                                                                                        node.pubsub.subscribe('fruit')
                                                                                                                                                                                        node.pubsub.addEventListener('message', (evt) => {
                                                                                                                                                                                        console.this.log(evt)
                                                                                                                                                                                        })

                                                                                                                                                                                        node.pubsub.publish('fruit', new TextEncoder().encode('banana'))

                                                                                                                                                                                        libp2p.io Discuss @@ -19,7 +19,7 @@

                                                                                                                                                                                        This module is a naive implementation of pubsub. It broadcasts all messages to all network peers, cannot provide older messages and has no protection against bad actors.

                                                                                                                                                                                        It exists for academic purposes only, you should not use it in production.

                                                                                                                                                                                        Instead please use gossipsub - a more complete implementation which is also compatible with floodsub.

                                                                                                                                                                                        -

                                                                                                                                                                                        Example

                                                                                                                                                                                        import { createLibp2pNode } from 'libp2p'
                                                                                                                                                                                        import { floodsub } from '@libp2p/floodsub'

                                                                                                                                                                                        const node = await createLibp2pNode({
                                                                                                                                                                                        pubsub: floodsub()
                                                                                                                                                                                        //... other options
                                                                                                                                                                                        })
                                                                                                                                                                                        await node.start()

                                                                                                                                                                                        node.pubsub.subscribe('fruit')
                                                                                                                                                                                        node.pubsub.addEventListener('message', (evt) => {
                                                                                                                                                                                        console.this.log(evt)
                                                                                                                                                                                        })

                                                                                                                                                                                        node.pubsub.publish('fruit', new TextEncoder().encode('banana')) +

                                                                                                                                                                                        Example - Configuring libp2p to use floodsub

                                                                                                                                                                                        import { createLibp2pNode } from 'libp2p'
                                                                                                                                                                                        import { floodsub } from '@libp2p/floodsub'

                                                                                                                                                                                        const node = await createLibp2pNode({
                                                                                                                                                                                        pubsub: floodsub()
                                                                                                                                                                                        //... other options
                                                                                                                                                                                        })
                                                                                                                                                                                        await node.start()

                                                                                                                                                                                        node.pubsub.subscribe('fruit')
                                                                                                                                                                                        node.pubsub.addEventListener('message', (evt) => {
                                                                                                                                                                                        console.this.log(evt)
                                                                                                                                                                                        })

                                                                                                                                                                                        node.pubsub.publish('fruit', new TextEncoder().encode('banana'))

                                                                                                                                                                                        Install

                                                                                                                                                                                        $ npm i @libp2p/floodsub
                                                                                                                                                                                         
                                                                                                                                                                                        @@ -40,4 +40,4 @@ FloodSubInit

                                                                                                                                                                                        Variables

                                                                                                                                                                                        Functions

                                                                                                                                                                                        Generated using TypeDoc

                                                                                                                                                                                        \ No newline at end of file +

                                                                                                                                                                                        Generated using TypeDoc

                                                                                                                                                                                        \ No newline at end of file diff --git a/modules/_libp2p_interface.connection.html b/modules/_libp2p_interface.connection.html index 737209584a..a552e54bc2 100644 --- a/modules/_libp2p_interface.connection.html +++ b/modules/_libp2p_interface.connection.html @@ -1,4 +1,4 @@ -connection | libp2p

                                                                                                                                                                                        Index

                                                                                                                                                                                        Interfaces

                                                                                                                                                                                        Connection +connection | libp2p

                                                                                                                                                                                        Index

                                                                                                                                                                                        Interfaces

                                                                                                                                                                                        Connection ConnectionProtector ConnectionTimeline MultiaddrConnection diff --git a/modules/_libp2p_interface.connection_encrypter.html b/modules/_libp2p_interface.connection_encrypter.html index 378eff0126..f81bb0d013 100644 --- a/modules/_libp2p_interface.connection_encrypter.html +++ b/modules/_libp2p_interface.connection_encrypter.html @@ -1,3 +1,3 @@ -connection-encrypter | libp2p

                                                                                                                                                                                        Index

                                                                                                                                                                                        Interfaces

                                                                                                                                                                                        ConnectionEncrypter +connection-encrypter | libp2p

                                                                                                                                                                                        Generated using TypeDoc

                                                                                                                                                                                        \ No newline at end of file diff --git a/modules/_libp2p_interface.connection_gater.html b/modules/_libp2p_interface.connection_gater.html index 799e47eb14..750c098659 100644 --- a/modules/_libp2p_interface.connection_gater.html +++ b/modules/_libp2p_interface.connection_gater.html @@ -1,2 +1,2 @@ -connection-gater | libp2p

                                                                                                                                                                                        Index

                                                                                                                                                                                        Interfaces

                                                                                                                                                                                        ConnectionGater +connection-gater | libp2p

                                                                                                                                                                                        Generated using TypeDoc

                                                                                                                                                                                        \ No newline at end of file diff --git a/modules/_libp2p_interface.content_routing.html b/modules/_libp2p_interface.content_routing.html index dba98e90e8..4a2699a786 100644 --- a/modules/_libp2p_interface.content_routing.html +++ b/modules/_libp2p_interface.content_routing.html @@ -1,3 +1,3 @@ -content-routing | libp2p

                                                                                                                                                                                        Index

                                                                                                                                                                                        Interfaces

                                                                                                                                                                                        ContentRouting +content-routing | libp2p

                                                                                                                                                                                        Generated using TypeDoc

                                                                                                                                                                                        \ No newline at end of file diff --git a/modules/_libp2p_interface.errors.html b/modules/_libp2p_interface.errors.html index 9a49f66a46..1f358441e1 100644 --- a/modules/_libp2p_interface.errors.html +++ b/modules/_libp2p_interface.errors.html @@ -1,4 +1,4 @@ -errors | libp2p

                                                                                                                                                                                        Index

                                                                                                                                                                                        Classes

                                                                                                                                                                                        AbortError +errors | libp2p

                                                                                                                                                                                        Index

                                                                                                                                                                                        Classes

                                                                                                                                                                                        AbortError CodeError InvalidCryptoExchangeError InvalidCryptoTransmissionError diff --git a/modules/_libp2p_interface.events.html b/modules/_libp2p_interface.events.html index 4379f8e29b..cd08876940 100644 --- a/modules/_libp2p_interface.events.html +++ b/modules/_libp2p_interface.events.html @@ -1,4 +1,4 @@ -events | libp2p

                                                                                                                                                                                        Index

                                                                                                                                                                                        Classes

                                                                                                                                                                                        TypedEventEmitter +events | libp2p

                                                                                                                                                                                        Index

                                                                                                                                                                                        Classes

                                                                                                                                                                                        Interfaces

                                                                                                                                                                                        EventCallback EventObject TypedEventTarget diff --git a/modules/_libp2p_interface.index.html b/modules/_libp2p_interface.index.html index c35134aa6f..608552f0c8 100644 --- a/modules/_libp2p_interface.index.html +++ b/modules/_libp2p_interface.index.html @@ -1,7 +1,7 @@ index | libp2p

                                                                                                                                                                                        Exports a Libp2p type for modules to use as a type argument.

                                                                                                                                                                                        Example

                                                                                                                                                                                        import type { Libp2p } from '@libp2p/interface'

                                                                                                                                                                                        function doSomethingWithLibp2p (node: Libp2p) {
                                                                                                                                                                                        // ...
                                                                                                                                                                                        }
                                                                                                                                                                                        -

                                                                                                                                                                                        References

                                                                                                                                                                                        References

                                                                                                                                                                                        AbortError Address CalculateMetric CalculatedMetricOptions diff --git a/modules/_libp2p_interface.keys.html b/modules/_libp2p_interface.keys.html index 7bb5227420..7349e5f57e 100644 --- a/modules/_libp2p_interface.keys.html +++ b/modules/_libp2p_interface.keys.html @@ -1,4 +1,4 @@ -keys | libp2p

                                                                                                                                                                                        Index

                                                                                                                                                                                        Interfaces

                                                                                                                                                                                        PrivateKey +keys | libp2p

                                                                                                                                                                                        Index

                                                                                                                                                                                        Interfaces

                                                                                                                                                                                        Type Aliases

                                                                                                                                                                                        Variables

                                                                                                                                                                                        Ed25519 diff --git a/modules/_libp2p_interface.metrics.html b/modules/_libp2p_interface.metrics.html index 6f83903da6..848bd7a63d 100644 --- a/modules/_libp2p_interface.metrics.html +++ b/modules/_libp2p_interface.metrics.html @@ -1,4 +1,4 @@ -metrics | libp2p

                                                                                                                                                                                        Index

                                                                                                                                                                                        Interfaces

                                                                                                                                                                                        CalculatedMetricOptions +metrics | libp2p

                                                                                                                                                                                        Index

                                                                                                                                                                                        Interfaces

                                                                                                                                                                                        CalculatedMetricOptions Counter CounterGroup Metric diff --git a/modules/_libp2p_interface.peer_discovery.html b/modules/_libp2p_interface.peer_discovery.html index be4a6485bc..6a01acb616 100644 --- a/modules/_libp2p_interface.peer_discovery.html +++ b/modules/_libp2p_interface.peer_discovery.html @@ -1,4 +1,4 @@ -peer-discovery | libp2p

                                                                                                                                                                                        Index

                                                                                                                                                                                        Interfaces

                                                                                                                                                                                        PeerDiscovery +peer-discovery | libp2p

                                                                                                                                                                                        Generated using TypeDoc

                                                                                                                                                                                        \ No newline at end of file diff --git a/modules/_libp2p_interface.peer_id.html b/modules/_libp2p_interface.peer_id.html index ecbab407f3..11743ae6db 100644 --- a/modules/_libp2p_interface.peer_id.html +++ b/modules/_libp2p_interface.peer_id.html @@ -1,4 +1,4 @@ -peer-id | libp2p

                                                                                                                                                                                        Index

                                                                                                                                                                                        Interfaces

                                                                                                                                                                                        Ed25519PeerId +peer-id | libp2p

                                                                                                                                                                                        Index

                                                                                                                                                                                        Interfaces

                                                                                                                                                                                        Type Aliases

                                                                                                                                                                                        PeerId diff --git a/modules/_libp2p_interface.peer_info.html b/modules/_libp2p_interface.peer_info.html index b75da05490..e5a7c00d06 100644 --- a/modules/_libp2p_interface.peer_info.html +++ b/modules/_libp2p_interface.peer_info.html @@ -1,2 +1,2 @@ -peer-info | libp2p

                                                                                                                                                                                        Index

                                                                                                                                                                                        Interfaces

                                                                                                                                                                                        PeerInfo +peer-info | libp2p

                                                                                                                                                                                        Generated using TypeDoc

                                                                                                                                                                                        \ No newline at end of file diff --git a/modules/_libp2p_interface.peer_routing.html b/modules/_libp2p_interface.peer_routing.html index a7ef322731..82c1b00340 100644 --- a/modules/_libp2p_interface.peer_routing.html +++ b/modules/_libp2p_interface.peer_routing.html @@ -1,3 +1,3 @@ -peer-routing | libp2p

                                                                                                                                                                                        Index

                                                                                                                                                                                        Interfaces

                                                                                                                                                                                        PeerRouting +peer-routing | libp2p

                                                                                                                                                                                        Generated using TypeDoc

                                                                                                                                                                                        \ No newline at end of file diff --git a/modules/_libp2p_interface.peer_store.html b/modules/_libp2p_interface.peer_store.html index 119ef3dd84..aabaf230db 100644 --- a/modules/_libp2p_interface.peer_store.html +++ b/modules/_libp2p_interface.peer_store.html @@ -1,4 +1,4 @@ -peer-store | libp2p

                                                                                                                                                                                        Index

                                                                                                                                                                                        Interfaces

                                                                                                                                                                                        Address +peer-store | libp2p

                                                                                                                                                                                        Index

                                                                                                                                                                                        Interfaces

                                                                                                                                                                                        Address Peer PeerData PeerQuery diff --git a/modules/_libp2p_interface.peer_store_tags.html b/modules/_libp2p_interface.peer_store_tags.html index f484cec892..83220ea5e9 100644 --- a/modules/_libp2p_interface.peer_store_tags.html +++ b/modules/_libp2p_interface.peer_store_tags.html @@ -1,2 +1,2 @@ -peer-store/tags | libp2p

                                                                                                                                                                                        Index

                                                                                                                                                                                        Variables

                                                                                                                                                                                        KEEP_ALIVE +peer-store/tags | libp2p

                                                                                                                                                                                        Generated using TypeDoc

                                                                                                                                                                                        \ No newline at end of file diff --git a/modules/_libp2p_interface.pubsub.html b/modules/_libp2p_interface.pubsub.html index 3ec41e41b5..35b917a1bd 100644 --- a/modules/_libp2p_interface.pubsub.html +++ b/modules/_libp2p_interface.pubsub.html @@ -1,4 +1,4 @@ -pubsub | libp2p

                                                                                                                                                                                        Index

                                                                                                                                                                                        Enumerations

                                                                                                                                                                                        TopicValidatorResult +pubsub | libp2p

                                                                                                                                                                                        Index

                                                                                                                                                                                        Enumerations

                                                                                                                                                                                        Interfaces

                                                                                                                                                                                        PeerStreamEvents PeerStreams PubSub diff --git a/modules/_libp2p_interface.record.html b/modules/_libp2p_interface.record.html index ad1ed9e5cf..8c69a22496 100644 --- a/modules/_libp2p_interface.record.html +++ b/modules/_libp2p_interface.record.html @@ -1,3 +1,3 @@ -record | libp2p

                                                                                                                                                                                        Index

                                                                                                                                                                                        Interfaces

                                                                                                                                                                                        Envelope +record | libp2p

                                                                                                                                                                                        Generated using TypeDoc

                                                                                                                                                                                        \ No newline at end of file diff --git a/modules/_libp2p_interface.startable.html b/modules/_libp2p_interface.startable.html index c8e87dc43f..fa6b46c2b9 100644 --- a/modules/_libp2p_interface.startable.html +++ b/modules/_libp2p_interface.startable.html @@ -1,4 +1,4 @@ -startable | libp2p

                                                                                                                                                                                        Index

                                                                                                                                                                                        Interfaces

                                                                                                                                                                                        Startable +startable | libp2p

                                                                                                                                                                                        Index

                                                                                                                                                                                        Interfaces

                                                                                                                                                                                        Functions

                                                                                                                                                                                        isStartable start stop diff --git a/modules/_libp2p_interface.stream_handler.html b/modules/_libp2p_interface.stream_handler.html index 88863ef319..509d3d4c8d 100644 --- a/modules/_libp2p_interface.stream_handler.html +++ b/modules/_libp2p_interface.stream_handler.html @@ -1,4 +1,4 @@ -stream-handler | libp2p

                                                                                                                                                                                        Index

                                                                                                                                                                                        Interfaces

                                                                                                                                                                                        IncomingStreamData +stream-handler | libp2p

                                                                                                                                                                                        Index

                                                                                                                                                                                        Interfaces

                                                                                                                                                                                        IncomingStreamData StreamHandler StreamHandlerOptions StreamHandlerRecord diff --git a/modules/_libp2p_interface.stream_muxer.html b/modules/_libp2p_interface.stream_muxer.html index a79be58bf9..8509f332f0 100644 --- a/modules/_libp2p_interface.stream_muxer.html +++ b/modules/_libp2p_interface.stream_muxer.html @@ -1,4 +1,4 @@ -stream-muxer | libp2p

                                                                                                                                                                                        Index

                                                                                                                                                                                        Interfaces

                                                                                                                                                                                        StreamMuxer +stream-muxer | libp2p

                                                                                                                                                                                        Generated using TypeDoc

                                                                                                                                                                                        \ No newline at end of file diff --git a/modules/_libp2p_interface.transport.html b/modules/_libp2p_interface.transport.html index 6cdb4360a5..3c80398cda 100644 --- a/modules/_libp2p_interface.transport.html +++ b/modules/_libp2p_interface.transport.html @@ -1,4 +1,4 @@ -transport | libp2p

                                                                                                                                                                                        Index

                                                                                                                                                                                        Enumerations

                                                                                                                                                                                        FaultTolerance +transport | libp2p

                                                                                                                                                                                        Index

                                                                                                                                                                                        Enumerations

                                                                                                                                                                                        Interfaces

                                                                                                                                                                                        ConnectionHandler CreateListenerOptions DialOptions diff --git a/modules/_libp2p_interface_compliance_tests.connection.html b/modules/_libp2p_interface_compliance_tests.connection.html index f8717bc80f..5fe1baa018 100644 --- a/modules/_libp2p_interface_compliance_tests.connection.html +++ b/modules/_libp2p_interface_compliance_tests.connection.html @@ -1,2 +1,2 @@ -connection | libp2p

                                                                                                                                                                                        Index

                                                                                                                                                                                        Functions

                                                                                                                                                                                        default +connection | libp2p

                                                                                                                                                                                        Generated using TypeDoc

                                                                                                                                                                                        \ No newline at end of file diff --git a/modules/_libp2p_interface_compliance_tests.connection_encryption.html b/modules/_libp2p_interface_compliance_tests.connection_encryption.html index 9325f719a2..875b7cf95f 100644 --- a/modules/_libp2p_interface_compliance_tests.connection_encryption.html +++ b/modules/_libp2p_interface_compliance_tests.connection_encryption.html @@ -1,2 +1,2 @@ -connection-encryption | libp2p

                                                                                                                                                                                        Index

                                                                                                                                                                                        Functions

                                                                                                                                                                                        default +connection-encryption | libp2p

                                                                                                                                                                                        Generated using TypeDoc

                                                                                                                                                                                        \ No newline at end of file diff --git a/modules/_libp2p_interface_compliance_tests.index.html b/modules/_libp2p_interface_compliance_tests.index.html index 0516d7edd4..a9c97817bb 100644 --- a/modules/_libp2p_interface_compliance_tests.index.html +++ b/modules/_libp2p_interface_compliance_tests.index.html @@ -1,2 +1,2 @@ -index | libp2p

                                                                                                                                                                                        Index

                                                                                                                                                                                        Interfaces

                                                                                                                                                                                        TestSetup +index | libp2p

                                                                                                                                                                                        Generated using TypeDoc

                                                                                                                                                                                        \ No newline at end of file diff --git a/modules/_libp2p_interface_compliance_tests.is_valid_tick.html b/modules/_libp2p_interface_compliance_tests.is_valid_tick.html index ca34bd6e65..71e234299c 100644 --- a/modules/_libp2p_interface_compliance_tests.is_valid_tick.html +++ b/modules/_libp2p_interface_compliance_tests.is_valid_tick.html @@ -1,2 +1,2 @@ -is-valid-tick | libp2p

                                                                                                                                                                                        Index

                                                                                                                                                                                        Functions

                                                                                                                                                                                        isValidTick +is-valid-tick | libp2p

                                                                                                                                                                                        Generated using TypeDoc

                                                                                                                                                                                        \ No newline at end of file diff --git a/modules/_libp2p_interface_compliance_tests.mocks.html b/modules/_libp2p_interface_compliance_tests.mocks.html index e43f5fa113..72ca4c8e06 100644 --- a/modules/_libp2p_interface_compliance_tests.mocks.html +++ b/modules/_libp2p_interface_compliance_tests.mocks.html @@ -1,4 +1,4 @@ -mocks | libp2p

                                                                                                                                                                                        Index

                                                                                                                                                                                        Interfaces

                                                                                                                                                                                        MockNetworkComponents +mocks | libp2p

                                                                                                                                                                                        Index

                                                                                                                                                                                        Interfaces

                                                                                                                                                                                        Variables

                                                                                                                                                                                        Functions

                                                                                                                                                                                        connectionPair diff --git a/modules/_libp2p_interface_compliance_tests.peer_discovery.html b/modules/_libp2p_interface_compliance_tests.peer_discovery.html index fb5add4b15..beaf071e7e 100644 --- a/modules/_libp2p_interface_compliance_tests.peer_discovery.html +++ b/modules/_libp2p_interface_compliance_tests.peer_discovery.html @@ -1,2 +1,2 @@ -peer-discovery | libp2p

                                                                                                                                                                                        Index

                                                                                                                                                                                        Functions

                                                                                                                                                                                        default +peer-discovery | libp2p

                                                                                                                                                                                        Generated using TypeDoc

                                                                                                                                                                                        \ No newline at end of file diff --git a/modules/_libp2p_interface_compliance_tests.peers.html b/modules/_libp2p_interface_compliance_tests.peers.html index 9b8d7444fc..53bd2cd2e0 100644 --- a/modules/_libp2p_interface_compliance_tests.peers.html +++ b/modules/_libp2p_interface_compliance_tests.peers.html @@ -1,2 +1,2 @@ -peers | libp2p

                                                                                                                                                                                        Index

                                                                                                                                                                                        Variables

                                                                                                                                                                                        default +peers | libp2p

                                                                                                                                                                                        Generated using TypeDoc

                                                                                                                                                                                        \ No newline at end of file diff --git a/modules/_libp2p_interface_compliance_tests.pubsub.html b/modules/_libp2p_interface_compliance_tests.pubsub.html index b301ff469d..7f7204ae8b 100644 --- a/modules/_libp2p_interface_compliance_tests.pubsub.html +++ b/modules/_libp2p_interface_compliance_tests.pubsub.html @@ -1,4 +1,4 @@ -pubsub | libp2p

                                                                                                                                                                                        Index

                                                                                                                                                                                        Interfaces

                                                                                                                                                                                        PubSubArgs +pubsub | libp2p

                                                                                                                                                                                        Generated using TypeDoc

                                                                                                                                                                                        \ No newline at end of file diff --git a/modules/_libp2p_interface_compliance_tests.stream_muxer.html b/modules/_libp2p_interface_compliance_tests.stream_muxer.html index eea666dc0d..f33e00df7c 100644 --- a/modules/_libp2p_interface_compliance_tests.stream_muxer.html +++ b/modules/_libp2p_interface_compliance_tests.stream_muxer.html @@ -1,2 +1,2 @@ -stream-muxer | libp2p

                                                                                                                                                                                        Index

                                                                                                                                                                                        Functions

                                                                                                                                                                                        default +stream-muxer | libp2p

                                                                                                                                                                                        Generated using TypeDoc

                                                                                                                                                                                        \ No newline at end of file diff --git a/modules/_libp2p_interface_compliance_tests.transport.html b/modules/_libp2p_interface_compliance_tests.transport.html index c726e80cc6..55c3d2232f 100644 --- a/modules/_libp2p_interface_compliance_tests.transport.html +++ b/modules/_libp2p_interface_compliance_tests.transport.html @@ -1,4 +1,4 @@ -transport | libp2p

                                                                                                                                                                                        Index

                                                                                                                                                                                        Interfaces

                                                                                                                                                                                        Connector +transport | libp2p

                                                                                                                                                                                        Generated using TypeDoc

                                                                                                                                                                                        \ No newline at end of file diff --git a/modules/_libp2p_peer_collections.html b/modules/_libp2p_peer_collections.html index f02e9637af..39730f2595 100644 --- a/modules/_libp2p_peer_collections.html +++ b/modules/_libp2p_peer_collections.html @@ -1,6 +1,12 @@ @libp2p/peer-collections | libp2p

                                                                                                                                                                                        Module @libp2p/peer-collections

                                                                                                                                                                                        We can't use PeerIds as collection keys because collection keys are compared using same-value-zero equality, so this is just a group of collections that stringifies PeerIds before storing them.

                                                                                                                                                                                        PeerIds cache stringified versions of themselves so this should be a cheap operation.

                                                                                                                                                                                        -

                                                                                                                                                                                        libp2p.io +

                                                                                                                                                                                        Example: Peer lists

                                                                                                                                                                                        import { peerList } from '@libp2p/peer-collections'

                                                                                                                                                                                        const list = peerList()
                                                                                                                                                                                        list.push(peerId) +
                                                                                                                                                                                        +

                                                                                                                                                                                        Example: Peer maps

                                                                                                                                                                                        import { peerMap } from '@libp2p/peer-collections'

                                                                                                                                                                                        const map = peerMap<string>()
                                                                                                                                                                                        map.set(peerId, 'value') +
                                                                                                                                                                                        +

                                                                                                                                                                                        Example: Peer sets

                                                                                                                                                                                        import { peerSet } from '@libp2p/peer-collections'

                                                                                                                                                                                        const set = peerSet()
                                                                                                                                                                                        set.add(peerId) +
                                                                                                                                                                                        +

                                                                                                                                                                                        libp2p.io Discuss codecov CI

                                                                                                                                                                                        @@ -9,6 +15,12 @@

                                                                                                                                                                                        About

                                                                                                                                                                                        We can't use PeerIds as collection keys because collection keys are compared using same-value-zero equality, so this is just a group of collections that stringifies PeerIds before storing them.

                                                                                                                                                                                        PeerIds cache stringified versions of themselves so this should be a cheap operation.

                                                                                                                                                                                        +

                                                                                                                                                                                        Example - Peer lists

                                                                                                                                                                                        import { peerList } from '@libp2p/peer-collections'

                                                                                                                                                                                        const list = peerList()
                                                                                                                                                                                        list.push(peerId) +
                                                                                                                                                                                        +

                                                                                                                                                                                        Example - Peer maps

                                                                                                                                                                                        import { peerMap } from '@libp2p/peer-collections'

                                                                                                                                                                                        const map = peerMap<string>()
                                                                                                                                                                                        map.set(peerId, 'value') +
                                                                                                                                                                                        +

                                                                                                                                                                                        Example - Peer sets

                                                                                                                                                                                        import { peerSet } from '@libp2p/peer-collections'

                                                                                                                                                                                        const set = peerSet()
                                                                                                                                                                                        set.add(peerId) +

                                                                                                                                                                                        Install

                                                                                                                                                                                        $ npm i @libp2p/peer-collections
                                                                                                                                                                                         

                                                                                                                                                                                        Browser <script> tag

                                                                                                                                                                                        Loading this module through a script tag will make it's exports available as Libp2pPeerCollections in the global namespace.

                                                                                                                                                                                        @@ -26,4 +38,4 @@

                                                                                                                                                                                        Index

                                                                                                                                                                                        Classes

                                                                                                                                                                                        Generated using TypeDoc

                                                                                                                                                                                        \ No newline at end of file +

                                                                                                                                                                                        Generated using TypeDoc

                                                                                                                                                                                        \ No newline at end of file diff --git a/modules/_libp2p_peer_id_factory.html b/modules/_libp2p_peer_id_factory.html index d84efb045f..a8267e6e62 100644 --- a/modules/_libp2p_peer_id_factory.html +++ b/modules/_libp2p_peer_id_factory.html @@ -1,4 +1,4 @@ -@libp2p/peer-id-factory | libp2p

                                                                                                                                                                                        Module @libp2p/peer-id-factory

                                                                                                                                                                                        Generate, import, and export PeerIDs, for use with IPFS.

                                                                                                                                                                                        +@libp2p/peer-id-factory | libp2p

                                                                                                                                                                                        Module @libp2p/peer-id-factory

                                                                                                                                                                                        Generate, import, and export PeerIDs.

                                                                                                                                                                                        A Peer ID is the SHA-256 multihash of a public key.

                                                                                                                                                                                        The public key is a base64 encoded string of a protobuf containing an RSA DER buffer. This uses a node buffer to pass the base64 encoded public key protobuf to the multihash for ID generation.

                                                                                                                                                                                        Example

                                                                                                                                                                                        import { createEd25519PeerId } from '@libp2p/peer-id-factory'

                                                                                                                                                                                        const peerId = await createEd25519PeerId()
                                                                                                                                                                                        console.log(id.toString()) @@ -12,7 +12,7 @@

                                                                                                                                                                                        Create PeerId instances

                                                                                                                                                                                        -

                                                                                                                                                                                        About

                                                                                                                                                                                        Generate, import, and export PeerIDs, for use with IPFS.

                                                                                                                                                                                        +

                                                                                                                                                                                        About

                                                                                                                                                                                        Generate, import, and export PeerIDs.

                                                                                                                                                                                        A Peer ID is the SHA-256 multihash of a public key.

                                                                                                                                                                                        The public key is a base64 encoded string of a protobuf containing an RSA DER buffer. This uses a node buffer to pass the base64 encoded public key protobuf to the multihash for ID generation.

                                                                                                                                                                                        Example

                                                                                                                                                                                        import { createEd25519PeerId } from '@libp2p/peer-id-factory'

                                                                                                                                                                                        const peerId = await createEd25519PeerId()
                                                                                                                                                                                        console.log(id.toString()) diff --git a/modules/_libp2p_peer_record.html b/modules/_libp2p_peer_record.html index d7d5cca5a7..01a6ba5818 100644 --- a/modules/_libp2p_peer_record.html +++ b/modules/_libp2p_peer_record.html @@ -2,12 +2,12 @@

                                                                                                                                                                                        Envelope

                                                                                                                                                                                        Libp2p provides an all-purpose data container called envelope. It was created to enable the distribution of verifiable records, which we can prove originated from the addressed peer itself. The envelope includes a signature of the data, so that its authenticity is verified.

                                                                                                                                                                                        This envelope stores a marshaled record implementing the interface-record. These Records are designed to be serialized to bytes and placed inside of the envelopes before being shared with other peers.

                                                                                                                                                                                        You can read further about the envelope in libp2p/specs#217.

                                                                                                                                                                                        -

                                                                                                                                                                                        Example

                                                                                                                                                                                        Create an envelope with an instance of an interface-record implementation and prepare it for being exchanged:

                                                                                                                                                                                        +

                                                                                                                                                                                        Example: Creating a peer record

                                                                                                                                                                                        Create an envelope with an instance of an interface-record implementation and prepare it for being exchanged:

                                                                                                                                                                                        // interface-record implementation example with the "libp2p-example" namespace
                                                                                                                                                                                        import { PeerRecord } from '@libp2p/peer-record'
                                                                                                                                                                                        import { fromString } from 'uint8arrays/from-string'

                                                                                                                                                                                        class ExampleRecord extends PeerRecord {
                                                                                                                                                                                        constructor () {
                                                                                                                                                                                        super ('libp2p-example', fromString('0302', 'hex'))
                                                                                                                                                                                        }

                                                                                                                                                                                        marshal () {}

                                                                                                                                                                                        equals (other) {}
                                                                                                                                                                                        }

                                                                                                                                                                                        ExampleRecord.createFromProtobuf = () => {}
                                                                                                                                                                                        import { PeerEnvelope } from '@libp2p/peer-record'
                                                                                                                                                                                        import { ExampleRecord } from './example-record.js'

                                                                                                                                                                                        const rec = new ExampleRecord()
                                                                                                                                                                                        const e = await PeerEnvelope.seal(rec, peerId)
                                                                                                                                                                                        const wireData = e.marshal()
                                                                                                                                                                                        -

                                                                                                                                                                                        Example

                                                                                                                                                                                        Consume a received envelope (wireData) and transform it back to a record:

                                                                                                                                                                                        +

                                                                                                                                                                                        Example: Consuming a peer record

                                                                                                                                                                                        Consume a received envelope (wireData) and transform it back to a record:

                                                                                                                                                                                        import { PeerEnvelope } from '@libp2p/peer-record'
                                                                                                                                                                                        import { ExampleRecord } from './example-record.js'

                                                                                                                                                                                        const domain = 'libp2p-example'
                                                                                                                                                                                        let e

                                                                                                                                                                                        try {
                                                                                                                                                                                        e = await PeerEnvelope.openAndCertify(wireData, domain)
                                                                                                                                                                                        } catch (err) {}

                                                                                                                                                                                        const rec = ExampleRecord.createFromProtobuf(e.payload)

                                                                                                                                                                                        Peer Record

                                                                                                                                                                                        All libp2p nodes keep a PeerStore, that among other information stores a set of known addresses for each peer, which can come from a variety of sources.

                                                                                                                                                                                        @@ -52,22 +52,22 @@

                                                                                                                                                                                        Example

                                                                                                                                                                                        Create a Peer Record from a protobuf

                                                                                                                                                                                        Envelope

                                                                                                                                                                                        Libp2p provides an all-purpose data container called envelope. It was created to enable the distribution of verifiable records, which we can prove originated from the addressed peer itself. The envelope includes a signature of the data, so that its authenticity is verified.

                                                                                                                                                                                        This envelope stores a marshaled record implementing the interface-record. These Records are designed to be serialized to bytes and placed inside of the envelopes before being shared with other peers.

                                                                                                                                                                                        You can read further about the envelope in libp2p/specs#217.

                                                                                                                                                                                        -

                                                                                                                                                                                        Example

                                                                                                                                                                                        Create an envelope with an instance of an interface-record implementation and prepare it for being exchanged:

                                                                                                                                                                                        +

                                                                                                                                                                                        Example - Creating a peer record

                                                                                                                                                                                        Create an envelope with an instance of an interface-record implementation and prepare it for being exchanged:

                                                                                                                                                                                        // interface-record implementation example with the "libp2p-example" namespace
                                                                                                                                                                                        import { PeerRecord } from '@libp2p/peer-record'
                                                                                                                                                                                        import { fromString } from 'uint8arrays/from-string'

                                                                                                                                                                                        class ExampleRecord extends PeerRecord {
                                                                                                                                                                                        constructor () {
                                                                                                                                                                                        super ('libp2p-example', fromString('0302', 'hex'))
                                                                                                                                                                                        }

                                                                                                                                                                                        marshal () {}

                                                                                                                                                                                        equals (other) {}
                                                                                                                                                                                        }

                                                                                                                                                                                        ExampleRecord.createFromProtobuf = () => {}
                                                                                                                                                                                        import { PeerEnvelope } from '@libp2p/peer-record'
                                                                                                                                                                                        import { ExampleRecord } from './example-record.js'

                                                                                                                                                                                        const rec = new ExampleRecord()
                                                                                                                                                                                        const e = await PeerEnvelope.seal(rec, peerId)
                                                                                                                                                                                        const wireData = e.marshal()
                                                                                                                                                                                        -

                                                                                                                                                                                        Example

                                                                                                                                                                                        Consume a received envelope (wireData) and transform it back to a record:

                                                                                                                                                                                        +

                                                                                                                                                                                        Example - Consuming a peer record

                                                                                                                                                                                        Consume a received envelope (wireData) and transform it back to a record:

                                                                                                                                                                                        import { PeerEnvelope } from '@libp2p/peer-record'
                                                                                                                                                                                        import { ExampleRecord } from './example-record.js'

                                                                                                                                                                                        const domain = 'libp2p-example'
                                                                                                                                                                                        let e

                                                                                                                                                                                        try {
                                                                                                                                                                                        e = await PeerEnvelope.openAndCertify(wireData, domain)
                                                                                                                                                                                        } catch (err) {}

                                                                                                                                                                                        const rec = ExampleRecord.createFromProtobuf(e.payload)

                                                                                                                                                                                        Peer Record

                                                                                                                                                                                        All libp2p nodes keep a PeerStore, that among other information stores a set of known addresses for each peer, which can come from a variety of sources.

                                                                                                                                                                                        Libp2p peer records were created to enable the distribution of verifiable address records, which we can prove originated from the addressed peer itself. With such guarantees, libp2p is able to prioritize addresses based on their authenticity, with the most strict strategy being to only dial certified addresses (no strategies have been implemented at the time of writing).

                                                                                                                                                                                        A peer record contains the peers' publicly reachable listen addresses, and may be extended in the future to contain additional metadata relevant to routing. It also contains a seqNumber field, a timestamp per the spec, so that we can verify the most recent record.

                                                                                                                                                                                        You can read further about the Peer Record in libp2p/specs#217.

                                                                                                                                                                                        -

                                                                                                                                                                                        Example

                                                                                                                                                                                        Create a new Peer Record

                                                                                                                                                                                        +

                                                                                                                                                                                        Example

                                                                                                                                                                                        Create a new Peer Record

                                                                                                                                                                                        import { PeerRecord } from '@libp2p/peer-record'

                                                                                                                                                                                        const pr = new PeerRecord({
                                                                                                                                                                                        peerId: node.peerId,
                                                                                                                                                                                        multiaddrs: node.multiaddrs
                                                                                                                                                                                        })
                                                                                                                                                                                        -

                                                                                                                                                                                        Example

                                                                                                                                                                                        Create a Peer Record from a protobuf

                                                                                                                                                                                        +

                                                                                                                                                                                        Example

                                                                                                                                                                                        Create a Peer Record from a protobuf

                                                                                                                                                                                        import { PeerRecord } from '@libp2p/peer-record'

                                                                                                                                                                                        const pr = PeerRecord.createFromProtobuf(data)

                                                                                                                                                                                        Libp2p Flows

                                                                                                                                                                                        Self Record

                                                                                                                                                                                        Once a libp2p node has started and is listening on a set of multiaddrs, its own peer record can be created.

                                                                                                                                                                                        @@ -109,4 +109,4 @@

                                                                                                                                                                                        Example

                                                                                                                                                                                        Create a Peer Record from a protobuf

                                                                                                                                                                                        RecordEnvelope

                                                                                                                                                                                        Interfaces

                                                                                                                                                                                        Generated using TypeDoc

                                                                                                                                                                                        \ No newline at end of file +

                                                                                                                                                                                        Generated using TypeDoc

                                                                                                                                                                                        \ No newline at end of file diff --git a/modules/_libp2p_peer_store.html b/modules/_libp2p_peer_store.html index abcf0515e3..32ca083c26 100644 --- a/modules/_libp2p_peer_store.html +++ b/modules/_libp2p_peer_store.html @@ -1,10 +1,12 @@ -@libp2p/peer-store | libp2p

                                                                                                                                                                                        Module @libp2p/peer-store

                                                                                                                                                                                        libp2p.io +@libp2p/peer-store | libp2p

                                                                                                                                                                                        Module @libp2p/peer-store

                                                                                                                                                                                        The peer store is where libp2p stores data about the peers it has encountered on the network.

                                                                                                                                                                                        +

                                                                                                                                                                                        libp2p.io Discuss codecov CI

                                                                                                                                                                                        Stores information about peers libp2p knows on the network

                                                                                                                                                                                        +

                                                                                                                                                                                        About

                                                                                                                                                                                        The peer store is where libp2p stores data about the peers it has encountered on the network.

                                                                                                                                                                                        Install

                                                                                                                                                                                        $ npm i @libp2p/peer-store
                                                                                                                                                                                         

                                                                                                                                                                                        Browser <script> tag

                                                                                                                                                                                        Loading this module through a script tag will make it's exports available as Libp2pPeerStore in the global namespace.

                                                                                                                                                                                        @@ -23,4 +25,4 @@

                                                                                                                                                                                        Interfaces

                                                                                                                                                                                        Generated using TypeDoc

                                                                                                                                                                                        \ No newline at end of file +

                                                                                                                                                                                        Generated using TypeDoc

                                                                                                                                                                                        \ No newline at end of file diff --git a/modules/_libp2p_pubsub.errors.html b/modules/_libp2p_pubsub.errors.html index 9811a9c1f2..dc817dd170 100644 --- a/modules/_libp2p_pubsub.errors.html +++ b/modules/_libp2p_pubsub.errors.html @@ -1,2 +1,2 @@ -errors | libp2p

                                                                                                                                                                                        Index

                                                                                                                                                                                        Variables

                                                                                                                                                                                        codes +errors | libp2p

                                                                                                                                                                                        Generated using TypeDoc

                                                                                                                                                                                        \ No newline at end of file diff --git a/modules/_libp2p_pubsub.index.html b/modules/_libp2p_pubsub.index.html index 1c52523e2c..b2467210c9 100644 --- a/modules/_libp2p_pubsub.index.html +++ b/modules/_libp2p_pubsub.index.html @@ -1,6 +1,6 @@ index | libp2p

                                                                                                                                                                                        A set of components to be extended in order to create a pubsub implementation.

                                                                                                                                                                                        Example

                                                                                                                                                                                        import { PubSubBaseProtocol } from '@libp2p/pubsub'

                                                                                                                                                                                        class MyPubsubImplementation extends PubSubBaseProtocol {
                                                                                                                                                                                        // .. extra methods here
                                                                                                                                                                                        }
                                                                                                                                                                                        -

                                                                                                                                                                                        Index

                                                                                                                                                                                        Classes

                                                                                                                                                                                        Index

                                                                                                                                                                                        Classes

                                                                                                                                                                                        Interfaces

                                                                                                                                                                                        Generated using TypeDoc

                                                                                                                                                                                        \ No newline at end of file diff --git a/modules/_libp2p_pubsub.peer_streams.html b/modules/_libp2p_pubsub.peer_streams.html index 482e68919d..2f73d9317f 100644 --- a/modules/_libp2p_pubsub.peer_streams.html +++ b/modules/_libp2p_pubsub.peer_streams.html @@ -1,4 +1,4 @@ -peer-streams | libp2p

                                                                                                                                                                                        Index

                                                                                                                                                                                        Classes

                                                                                                                                                                                        PeerStreams +peer-streams | libp2p

                                                                                                                                                                                        Generated using TypeDoc

                                                                                                                                                                                        \ No newline at end of file diff --git a/modules/_libp2p_pubsub.utils.html b/modules/_libp2p_pubsub.utils.html index a8007408cb..27d307d381 100644 --- a/modules/_libp2p_pubsub.utils.html +++ b/modules/_libp2p_pubsub.utils.html @@ -1,4 +1,4 @@ -utils | libp2p

                                                                                                                                                                                        Index

                                                                                                                                                                                        Functions

                                                                                                                                                                                        anyMatch +utils | libp2p

                                                                                                                                                                                        Index

                                                                                                                                                                                        Functions

                                                                                                                                                                                        anyMatch bigIntFromBytes bigIntToBytes ensureArray diff --git a/modules/_libp2p_utils.abstract_stream.html b/modules/_libp2p_utils.abstract_stream.html index 4d68888fd4..563180b3ac 100644 --- a/modules/_libp2p_utils.abstract_stream.html +++ b/modules/_libp2p_utils.abstract_stream.html @@ -1,3 +1,3 @@ -abstract-stream | libp2p

                                                                                                                                                                                        Index

                                                                                                                                                                                        Classes

                                                                                                                                                                                        AbstractStream +abstract-stream | libp2p

                                                                                                                                                                                        Generated using TypeDoc

                                                                                                                                                                                        \ No newline at end of file diff --git a/modules/_libp2p_utils.address_sort.html b/modules/_libp2p_utils.address_sort.html index 752c1ddb77..d87cd5ebeb 100644 --- a/modules/_libp2p_utils.address_sort.html +++ b/modules/_libp2p_utils.address_sort.html @@ -1,7 +1,7 @@ address-sort | libp2p

                                                                                                                                                                                        Provides strategies to sort a list of multiaddrs.

                                                                                                                                                                                        Example

                                                                                                                                                                                        import { publicAddressesFirst } from '@libp2p/utils/address-sort'
                                                                                                                                                                                        import { multiaddr } from '@multformats/multiaddr'


                                                                                                                                                                                        const addresses = [
                                                                                                                                                                                        multiaddr('/ip4/127.0.0.1/tcp/9000'),
                                                                                                                                                                                        multiaddr('/ip4/82.41.53.1/tcp/9000')
                                                                                                                                                                                        ].sort(publicAddressesFirst)

                                                                                                                                                                                        console.info(addresses)
                                                                                                                                                                                        // ['/ip4/82.41.53.1/tcp/9000', '/ip4/127.0.0.1/tcp/9000']
                                                                                                                                                                                        -

                                                                                                                                                                                        Index

                                                                                                                                                                                        Functions

                                                                                                                                                                                        Index

                                                                                                                                                                                        Functions

                                                                                                                                                                                        certifiedAddressesFirst circuitRelayAddressesLast defaultAddressSort publicAddressesFirst diff --git a/modules/_libp2p_utils.array_equals.html b/modules/_libp2p_utils.array_equals.html index 3f148f9b7e..4f1faf613d 100644 --- a/modules/_libp2p_utils.array_equals.html +++ b/modules/_libp2p_utils.array_equals.html @@ -1,5 +1,5 @@ array-equals | libp2p

                                                                                                                                                                                        Provides strategies ensure arrays are equivalent.

                                                                                                                                                                                        Example

                                                                                                                                                                                        import { arrayEquals } from '@libp2p/utils/array-equals'
                                                                                                                                                                                        import { multiaddr } from '@multformats/multiaddr'

                                                                                                                                                                                        const ma1 = multiaddr('/ip4/127.0.0.1/tcp/9000'),
                                                                                                                                                                                        const ma2 = multiaddr('/ip4/82.41.53.1/tcp/9000')

                                                                                                                                                                                        console.info(arrayEquals([ma1], [ma1])) // true
                                                                                                                                                                                        console.info(arrayEquals([ma1], [ma2])) // false
                                                                                                                                                                                        -

                                                                                                                                                                                        Index

                                                                                                                                                                                        Functions

                                                                                                                                                                                        Index

                                                                                                                                                                                        Functions

                                                                                                                                                                                        Generated using TypeDoc

                                                                                                                                                                                        \ No newline at end of file diff --git a/modules/_libp2p_utils.close_source.html b/modules/_libp2p_utils.close_source.html index 8c61bbd450..9bbc87f92e 100644 --- a/modules/_libp2p_utils.close_source.html +++ b/modules/_libp2p_utils.close_source.html @@ -1,2 +1,2 @@ -close-source | libp2p

                                                                                                                                                                                        Index

                                                                                                                                                                                        Functions

                                                                                                                                                                                        closeSource +close-source | libp2p

                                                                                                                                                                                        Generated using TypeDoc

                                                                                                                                                                                        \ No newline at end of file diff --git a/modules/_libp2p_utils.index.html b/modules/_libp2p_utils.index.html index 98f6c744d6..e906f4e922 100644 --- a/modules/_libp2p_utils.index.html +++ b/modules/_libp2p_utils.index.html @@ -7,4 +7,4 @@

                                                                                                                                                                                        Example

                                                                                                                                                                                        Each function should be imported directly.

                                                                                                                                                                                        import ipAndPortToMultiaddr from '@libp2p/utils/ip-port-to-multiaddr'

                                                                                                                                                                                        const ma = ipAndPortToMultiaddr('127.0.0.1', 9000)
                                                                                                                                                                                        -

                                                                                                                                                                                        Generated using TypeDoc

                                                                                                                                                                                        \ No newline at end of file +

                                                                                                                                                                                        Generated using TypeDoc

                                                                                                                                                                                        \ No newline at end of file diff --git a/modules/_libp2p_utils.ip_port_to_multiaddr.html b/modules/_libp2p_utils.ip_port_to_multiaddr.html index 4d0b397027..6c0e1d7de2 100644 --- a/modules/_libp2p_utils.ip_port_to_multiaddr.html +++ b/modules/_libp2p_utils.ip_port_to_multiaddr.html @@ -1,3 +1,3 @@ -ip-port-to-multiaddr | libp2p

                                                                                                                                                                                        Module ip-port-to-multiaddr

                                                                                                                                                                                        Index

                                                                                                                                                                                        Variables

                                                                                                                                                                                        Errors +ip-port-to-multiaddr | libp2p

                                                                                                                                                                                        Generated using TypeDoc

                                                                                                                                                                                        \ No newline at end of file diff --git a/modules/_libp2p_utils.is_promise.html b/modules/_libp2p_utils.is_promise.html index 16e86fe988..394371fc08 100644 --- a/modules/_libp2p_utils.is_promise.html +++ b/modules/_libp2p_utils.is_promise.html @@ -1,2 +1,2 @@ -is-promise | libp2p

                                                                                                                                                                                        Index

                                                                                                                                                                                        Functions

                                                                                                                                                                                        isPromise +is-promise | libp2p

                                                                                                                                                                                        Generated using TypeDoc

                                                                                                                                                                                        \ No newline at end of file diff --git a/modules/_libp2p_utils.multiaddr_is_loopback.html b/modules/_libp2p_utils.multiaddr_is_loopback.html index 3e1c936d7d..3afc69ef77 100644 --- a/modules/_libp2p_utils.multiaddr_is_loopback.html +++ b/modules/_libp2p_utils.multiaddr_is_loopback.html @@ -1,2 +1,2 @@ -multiaddr/is-loopback | libp2p

                                                                                                                                                                                        Module multiaddr/is-loopback

                                                                                                                                                                                        Index

                                                                                                                                                                                        Functions

                                                                                                                                                                                        isLoopback +multiaddr/is-loopback | libp2p

                                                                                                                                                                                        Generated using TypeDoc

                                                                                                                                                                                        \ No newline at end of file diff --git a/modules/_libp2p_utils.multiaddr_is_private.html b/modules/_libp2p_utils.multiaddr_is_private.html index d9c6068e00..2bea169567 100644 --- a/modules/_libp2p_utils.multiaddr_is_private.html +++ b/modules/_libp2p_utils.multiaddr_is_private.html @@ -1,2 +1,2 @@ -multiaddr/is-private | libp2p

                                                                                                                                                                                        Module multiaddr/is-private

                                                                                                                                                                                        Index

                                                                                                                                                                                        Functions

                                                                                                                                                                                        isPrivate +multiaddr/is-private | libp2p

                                                                                                                                                                                        Generated using TypeDoc

                                                                                                                                                                                        \ No newline at end of file diff --git a/modules/_libp2p_utils.peer_job_queue.html b/modules/_libp2p_utils.peer_job_queue.html index 0bf92440c1..ace2c4a7dd 100644 --- a/modules/_libp2p_utils.peer_job_queue.html +++ b/modules/_libp2p_utils.peer_job_queue.html @@ -1,3 +1,3 @@ -peer-job-queue | libp2p

                                                                                                                                                                                        Index

                                                                                                                                                                                        Classes

                                                                                                                                                                                        PeerJobQueue +peer-job-queue | libp2p

                                                                                                                                                                                        Generated using TypeDoc

                                                                                                                                                                                        \ No newline at end of file diff --git a/modules/_libp2p_utils.stream_to_ma_conn.html b/modules/_libp2p_utils.stream_to_ma_conn.html index 9c0888ce7f..6e05bbf32f 100644 --- a/modules/_libp2p_utils.stream_to_ma_conn.html +++ b/modules/_libp2p_utils.stream_to_ma_conn.html @@ -1,3 +1,3 @@ -stream-to-ma-conn | libp2p

                                                                                                                                                                                        Module stream-to-ma-conn

                                                                                                                                                                                        Index

                                                                                                                                                                                        Interfaces

                                                                                                                                                                                        StreamProperties +stream-to-ma-conn | libp2p

                                                                                                                                                                                        Generated using TypeDoc

                                                                                                                                                                                        \ No newline at end of file diff --git a/modules/_libp2p_websockets.filters.html b/modules/_libp2p_websockets.filters.html index 19223cd191..09055a66f8 100644 --- a/modules/_libp2p_websockets.filters.html +++ b/modules/_libp2p_websockets.filters.html @@ -1,4 +1,4 @@ -filters | libp2p

                                                                                                                                                                                        Index

                                                                                                                                                                                        Functions

                                                                                                                                                                                        all +filters | libp2p

                                                                                                                                                                                        Index

                                                                                                                                                                                        Functions

                                                                                                                                                                                        all dnsWsOrWss dnsWss wss diff --git a/modules/_libp2p_websockets.index.html b/modules/_libp2p_websockets.index.html index aeb446169d..042cfab533 100644 --- a/modules/_libp2p_websockets.index.html +++ b/modules/_libp2p_websockets.index.html @@ -21,7 +21,7 @@

                                                                                                                                                                                        Example

                                                                                                                                                                                        import { createLibp2pNode } from 'libp2p'
                                                                                                                                                                                        import { websockets } from '@libp2p/websockets'
                                                                                                                                                                                        import filters from '@libp2p/websockets/filters'
                                                                                                                                                                                        import { mplex } from '@libp2p/mplex'
                                                                                                                                                                                        import { noise } from '@libp2p/noise'

                                                                                                                                                                                        const transportKey = Websockets.prototype[Symbol.toStringTag]
                                                                                                                                                                                        const node = await Libp2p.create({
                                                                                                                                                                                        transport: [
                                                                                                                                                                                        websockets({
                                                                                                                                                                                        // connect to all sockets, even insecure ones
                                                                                                                                                                                        filter: filters.all
                                                                                                                                                                                        })
                                                                                                                                                                                        ],
                                                                                                                                                                                        streamMuxers: [
                                                                                                                                                                                        mplex()
                                                                                                                                                                                        ],
                                                                                                                                                                                        connectionEncryption: [
                                                                                                                                                                                        noise()
                                                                                                                                                                                        ]
                                                                                                                                                                                        })
                                                                                                                                                                                        -

                                                                                                                                                                                        Index

                                                                                                                                                                                        Interfaces

                                                                                                                                                                                        Index

                                                                                                                                                                                        Interfaces

                                                                                                                                                                                        Functions

                                                                                                                                                                                        Generated using TypeDoc

                                                                                                                                                                                        \ No newline at end of file diff --git a/types/_libp2p_crypto.keys.KeyTypes.html b/types/_libp2p_crypto.keys.KeyTypes.html index f245416541..56681d6b39 100644 --- a/types/_libp2p_crypto.keys.KeyTypes.html +++ b/types/_libp2p_crypto.keys.KeyTypes.html @@ -1 +1 @@ -KeyTypes | libp2p

                                                                                                                                                                                        Generated using TypeDoc

                                                                                                                                                                                        \ No newline at end of file +KeyTypes | libp2p

                                                                                                                                                                                        Generated using TypeDoc

                                                                                                                                                                                        \ No newline at end of file diff --git a/types/_libp2p_interface.connection.ConnectionStatus.html b/types/_libp2p_interface.connection.ConnectionStatus.html index 7259285327..66f00bca7a 100644 --- a/types/_libp2p_interface.connection.ConnectionStatus.html +++ b/types/_libp2p_interface.connection.ConnectionStatus.html @@ -1 +1 @@ -ConnectionStatus | libp2p

                                                                                                                                                                                        Generated using TypeDoc

                                                                                                                                                                                        \ No newline at end of file +ConnectionStatus | libp2p

                                                                                                                                                                                        Generated using TypeDoc

                                                                                                                                                                                        \ No newline at end of file diff --git a/types/_libp2p_interface.connection.Direction.html b/types/_libp2p_interface.connection.Direction.html index 2a6e0f46a7..411b0a9a89 100644 --- a/types/_libp2p_interface.connection.Direction.html +++ b/types/_libp2p_interface.connection.Direction.html @@ -1,2 +1,2 @@ Direction | libp2p

                                                                                                                                                                                        Generated using TypeDoc

                                                                                                                                                                                        \ No newline at end of file +

                                                                                                                                                                                        Generated using TypeDoc

                                                                                                                                                                                        \ No newline at end of file diff --git a/types/_libp2p_interface.connection.ReadStatus.html b/types/_libp2p_interface.connection.ReadStatus.html index 02ab409345..93fe23688f 100644 --- a/types/_libp2p_interface.connection.ReadStatus.html +++ b/types/_libp2p_interface.connection.ReadStatus.html @@ -2,4 +2,4 @@

                                                                                                                                                                                        ready - the readable end is ready for reading closing - the readable end is closing closed - the readable end has closed

                                                                                                                                                                                        -

                                                                                                                                                                                        Generated using TypeDoc

                                                                                                                                                                                        \ No newline at end of file +

                                                                                                                                                                                        Generated using TypeDoc

                                                                                                                                                                                        \ No newline at end of file diff --git a/types/_libp2p_interface.connection.StreamStatus.html b/types/_libp2p_interface.connection.StreamStatus.html index fdebe2956e..acbcb8ffde 100644 --- a/types/_libp2p_interface.connection.StreamStatus.html +++ b/types/_libp2p_interface.connection.StreamStatus.html @@ -1,2 +1,2 @@ StreamStatus | libp2p

                                                                                                                                                                                        Generated using TypeDoc

                                                                                                                                                                                        \ No newline at end of file +

                                                                                                                                                                                        Generated using TypeDoc

                                                                                                                                                                                        \ No newline at end of file diff --git a/types/_libp2p_interface.connection.WriteStatus.html b/types/_libp2p_interface.connection.WriteStatus.html index 3ac348f75a..2e1e9f4727 100644 --- a/types/_libp2p_interface.connection.WriteStatus.html +++ b/types/_libp2p_interface.connection.WriteStatus.html @@ -4,4 +4,4 @@ done - the source passed to the .sink function yielded all values without error closing - the writable end is closing closed - the writable end has closed

                                                                                                                                                                                        -

                                                                                                                                                                                        Generated using TypeDoc

                                                                                                                                                                                        \ No newline at end of file +

                                                                                                                                                                                        Generated using TypeDoc

                                                                                                                                                                                        \ No newline at end of file diff --git a/types/_libp2p_interface.events.EventHandler.html b/types/_libp2p_interface.events.EventHandler.html index cc44727e82..6eea1bd542 100644 --- a/types/_libp2p_interface.events.EventHandler.html +++ b/types/_libp2p_interface.events.EventHandler.html @@ -1 +1 @@ -EventHandler | libp2p

                                                                                                                                                                                        Generated using TypeDoc

                                                                                                                                                                                        \ No newline at end of file +EventHandler | libp2p

                                                                                                                                                                                        Generated using TypeDoc

                                                                                                                                                                                        \ No newline at end of file diff --git a/types/_libp2p_interface.index.Libp2pStatus.html b/types/_libp2p_interface.index.Libp2pStatus.html index 4f12142ea0..03a245fdf0 100644 --- a/types/_libp2p_interface.index.Libp2pStatus.html +++ b/types/_libp2p_interface.index.Libp2pStatus.html @@ -1 +1 @@ -Libp2pStatus | libp2p

                                                                                                                                                                                        Generated using TypeDoc

                                                                                                                                                                                        \ No newline at end of file +Libp2pStatus | libp2p

                                                                                                                                                                                        Generated using TypeDoc

                                                                                                                                                                                        \ No newline at end of file diff --git a/types/_libp2p_interface.index.PendingDialStatus.html b/types/_libp2p_interface.index.PendingDialStatus.html index de59b0f811..da8f61d187 100644 --- a/types/_libp2p_interface.index.PendingDialStatus.html +++ b/types/_libp2p_interface.index.PendingDialStatus.html @@ -1 +1 @@ -PendingDialStatus | libp2p

                                                                                                                                                                                        Generated using TypeDoc

                                                                                                                                                                                        \ No newline at end of file +PendingDialStatus | libp2p

                                                                                                                                                                                        Generated using TypeDoc

                                                                                                                                                                                        \ No newline at end of file diff --git a/types/_libp2p_interface.index.RecursivePartial.html b/types/_libp2p_interface.index.RecursivePartial.html index 168ee8fd23..e7874c72e7 100644 --- a/types/_libp2p_interface.index.RecursivePartial.html +++ b/types/_libp2p_interface.index.RecursivePartial.html @@ -1,3 +1,3 @@ RecursivePartial | libp2p

                                                                                                                                                                                        Type alias RecursivePartial<T>

                                                                                                                                                                                        RecursivePartial<T>: {
                                                                                                                                                                                            [P in keyof T]?: T[P] extends (infer I)[]
                                                                                                                                                                                                ? RecursivePartial<I>[]
                                                                                                                                                                                                : T[P] extends ((...args) => any)
                                                                                                                                                                                                    ? T[P]
                                                                                                                                                                                                    : RecursivePartial<T[P]>
                                                                                                                                                                                        }

                                                                                                                                                                                        Returns a new type with all fields marked optional.

                                                                                                                                                                                        Borrowed from the tsdef module.

                                                                                                                                                                                        -

                                                                                                                                                                                        Type Parameters

                                                                                                                                                                                        • T

                                                                                                                                                                                        Generated using TypeDoc

                                                                                                                                                                                        \ No newline at end of file +

                                                                                                                                                                                        Type Parameters

                                                                                                                                                                                        • T

                                                                                                                                                                                        Generated using TypeDoc

                                                                                                                                                                                        \ No newline at end of file diff --git a/types/_libp2p_interface.index.ServiceMap.html b/types/_libp2p_interface.index.ServiceMap.html index 6eb157d63a..236a9306c9 100644 --- a/types/_libp2p_interface.index.ServiceMap.html +++ b/types/_libp2p_interface.index.ServiceMap.html @@ -2,4 +2,4 @@ services key

                                                                                                                                                                                        Example

                                                                                                                                                                                        const node = await createLibp2p({
                                                                                                                                                                                        // ...other options
                                                                                                                                                                                        services: {
                                                                                                                                                                                        myService: myService({
                                                                                                                                                                                        // ...service options
                                                                                                                                                                                        })
                                                                                                                                                                                        }
                                                                                                                                                                                        })

                                                                                                                                                                                        // invoke methods on the service
                                                                                                                                                                                        node.services.myService.anOperation()
                                                                                                                                                                                        -

                                                                                                                                                                                        Generated using TypeDoc

                                                                                                                                                                                        \ No newline at end of file +

                                                                                                                                                                                        Generated using TypeDoc

                                                                                                                                                                                        \ No newline at end of file diff --git a/types/_libp2p_interface.keys.KeyType.html b/types/_libp2p_interface.keys.KeyType.html index d4a3791c52..86ec64cc15 100644 --- a/types/_libp2p_interface.keys.KeyType.html +++ b/types/_libp2p_interface.keys.KeyType.html @@ -1 +1 @@ -KeyType | libp2p

                                                                                                                                                                                        Generated using TypeDoc

                                                                                                                                                                                        \ No newline at end of file +KeyType | libp2p

                                                                                                                                                                                        Generated using TypeDoc

                                                                                                                                                                                        \ No newline at end of file diff --git a/types/_libp2p_interface.metrics.CalculateMetric.html b/types/_libp2p_interface.metrics.CalculateMetric.html index fde8cc3a62..a010ca8552 100644 --- a/types/_libp2p_interface.metrics.CalculateMetric.html +++ b/types/_libp2p_interface.metrics.CalculateMetric.html @@ -1,3 +1,3 @@ CalculateMetric | libp2p
                                                                                                                                                                                        CalculateMetric<T>: (() => T) | (() => Promise<T>)

                                                                                                                                                                                        A function that returns a tracked metric which may be expensive to calculate so it is only invoked when metrics are being scraped

                                                                                                                                                                                        -

                                                                                                                                                                                        Type Parameters

                                                                                                                                                                                        • T = number

                                                                                                                                                                                        Type declaration

                                                                                                                                                                                          • (): T
                                                                                                                                                                                          • Returns T

                                                                                                                                                                                        Type declaration

                                                                                                                                                                                        Generated using TypeDoc

                                                                                                                                                                                        \ No newline at end of file +

                                                                                                                                                                                        Type Parameters

                                                                                                                                                                                        • T = number

                                                                                                                                                                                        Type declaration

                                                                                                                                                                                          • (): T
                                                                                                                                                                                          • Returns T

                                                                                                                                                                                        Type declaration

                                                                                                                                                                                        Generated using TypeDoc

                                                                                                                                                                                        \ No newline at end of file diff --git a/types/_libp2p_interface.peer_id.PeerId.html b/types/_libp2p_interface.peer_id.PeerId.html index 900b9e3e70..23eacdfe0f 100644 --- a/types/_libp2p_interface.peer_id.PeerId.html +++ b/types/_libp2p_interface.peer_id.PeerId.html @@ -1 +1 @@ -PeerId | libp2p

                                                                                                                                                                                        Generated using TypeDoc

                                                                                                                                                                                        \ No newline at end of file +PeerId | libp2p

                                                                                                                                                                                        Generated using TypeDoc

                                                                                                                                                                                        \ No newline at end of file diff --git a/types/_libp2p_interface.peer_id.PeerIdType.html b/types/_libp2p_interface.peer_id.PeerIdType.html index 7497a5451d..7b205ad38e 100644 --- a/types/_libp2p_interface.peer_id.PeerIdType.html +++ b/types/_libp2p_interface.peer_id.PeerIdType.html @@ -1 +1 @@ -PeerIdType | libp2p

                                                                                                                                                                                        Generated using TypeDoc

                                                                                                                                                                                        \ No newline at end of file +PeerIdType | libp2p

                                                                                                                                                                                        Generated using TypeDoc

                                                                                                                                                                                        \ No newline at end of file diff --git a/types/_libp2p_interface.pubsub.Message.html b/types/_libp2p_interface.pubsub.Message.html index 1eb928629e..f8181fdc4d 100644 --- a/types/_libp2p_interface.pubsub.Message.html +++ b/types/_libp2p_interface.pubsub.Message.html @@ -1 +1 @@ -Message | libp2p

                                                                                                                                                                                        Generated using TypeDoc

                                                                                                                                                                                        \ No newline at end of file +Message | libp2p

                                                                                                                                                                                        Generated using TypeDoc

                                                                                                                                                                                        \ No newline at end of file diff --git a/types/_libp2p_interface.pubsub.SignaturePolicy.html b/types/_libp2p_interface.pubsub.SignaturePolicy.html index 37f4768555..a0306f64d4 100644 --- a/types/_libp2p_interface.pubsub.SignaturePolicy.html +++ b/types/_libp2p_interface.pubsub.SignaturePolicy.html @@ -1 +1 @@ -SignaturePolicy | libp2p

                                                                                                                                                                                        Generated using TypeDoc

                                                                                                                                                                                        \ No newline at end of file +SignaturePolicy | libp2p

                                                                                                                                                                                        Generated using TypeDoc

                                                                                                                                                                                        \ No newline at end of file diff --git a/types/_libp2p_kad_dht.DHTProgressEvents.html b/types/_libp2p_kad_dht.DHTProgressEvents.html index 58134f2e00..a6bea05b51 100644 --- a/types/_libp2p_kad_dht.DHTProgressEvents.html +++ b/types/_libp2p_kad_dht.DHTProgressEvents.html @@ -1 +1 @@ -DHTProgressEvents | libp2p

                                                                                                                                                                                        Generated using TypeDoc

                                                                                                                                                                                        \ No newline at end of file +DHTProgressEvents | libp2p

                                                                                                                                                                                        Generated using TypeDoc

                                                                                                                                                                                        \ No newline at end of file diff --git a/types/_libp2p_kad_dht.MessageName.html b/types/_libp2p_kad_dht.MessageName.html index 4c73e87fe3..fe49402882 100644 --- a/types/_libp2p_kad_dht.MessageName.html +++ b/types/_libp2p_kad_dht.MessageName.html @@ -1 +1 @@ -MessageName | libp2p

                                                                                                                                                                                        Generated using TypeDoc

                                                                                                                                                                                        \ No newline at end of file +MessageName | libp2p

                                                                                                                                                                                        Generated using TypeDoc

                                                                                                                                                                                        \ No newline at end of file diff --git a/types/_libp2p_kad_dht.QueryEvent.html b/types/_libp2p_kad_dht.QueryEvent.html index 8af779b999..096974e7b8 100644 --- a/types/_libp2p_kad_dht.QueryEvent.html +++ b/types/_libp2p_kad_dht.QueryEvent.html @@ -1 +1 @@ -QueryEvent | libp2p

                                                                                                                                                                                        Generated using TypeDoc

                                                                                                                                                                                        \ No newline at end of file +QueryEvent | libp2p

                                                                                                                                                                                        Generated using TypeDoc

                                                                                                                                                                                        \ No newline at end of file diff --git a/types/_libp2p_kad_dht.Selectors.html b/types/_libp2p_kad_dht.Selectors.html index 08a5ce8925..b29e4bc42e 100644 --- a/types/_libp2p_kad_dht.Selectors.html +++ b/types/_libp2p_kad_dht.Selectors.html @@ -1,2 +1,2 @@ Selectors | libp2p

                                                                                                                                                                                        Generated using TypeDoc

                                                                                                                                                                                        \ No newline at end of file +

                                                                                                                                                                                        Generated using TypeDoc

                                                                                                                                                                                        \ No newline at end of file diff --git a/types/_libp2p_kad_dht.Validators.html b/types/_libp2p_kad_dht.Validators.html index ae403af9c4..d47ed79229 100644 --- a/types/_libp2p_kad_dht.Validators.html +++ b/types/_libp2p_kad_dht.Validators.html @@ -1,2 +1,2 @@ Validators | libp2p

                                                                                                                                                                                        Generated using TypeDoc

                                                                                                                                                                                        \ No newline at end of file +

                                                                                                                                                                                        Generated using TypeDoc

                                                                                                                                                                                        \ No newline at end of file diff --git a/types/libp2p.Libp2pOptions.html b/types/libp2p.Libp2pOptions.html index 39460104a8..04559310b9 100644 --- a/types/libp2p.Libp2pOptions.html +++ b/types/libp2p.Libp2pOptions.html @@ -1 +1 @@ -Libp2pOptions | libp2p

                                                                                                                                                                                        Generated using TypeDoc

                                                                                                                                                                                        \ No newline at end of file +Libp2pOptions | libp2p

                                                                                                                                                                                        Generated using TypeDoc

                                                                                                                                                                                        \ No newline at end of file diff --git a/types/libp2p.ServiceFactoryMap.html b/types/libp2p.ServiceFactoryMap.html index 178023319d..2b8f66f81c 100644 --- a/types/libp2p.ServiceFactoryMap.html +++ b/types/libp2p.ServiceFactoryMap.html @@ -1 +1 @@ -ServiceFactoryMap | libp2p

                                                                                                                                                                                        Generated using TypeDoc

                                                                                                                                                                                        \ No newline at end of file +ServiceFactoryMap | libp2p

                                                                                                                                                                                        Generated using TypeDoc

                                                                                                                                                                                        \ No newline at end of file diff --git a/variables/_libp2p_circuit_relay_v2.RELAY_V2_HOP_CODEC.html b/variables/_libp2p_circuit_relay_v2.RELAY_V2_HOP_CODEC.html index e58571269e..b660a2016c 100644 --- a/variables/_libp2p_circuit_relay_v2.RELAY_V2_HOP_CODEC.html +++ b/variables/_libp2p_circuit_relay_v2.RELAY_V2_HOP_CODEC.html @@ -1,2 +1,2 @@ RELAY_V2_HOP_CODEC | libp2p

                                                                                                                                                                                        Generated using TypeDoc

                                                                                                                                                                                        \ No newline at end of file +

                                                                                                                                                                                        Generated using TypeDoc

                                                                                                                                                                                        \ No newline at end of file diff --git a/variables/_libp2p_circuit_relay_v2.RELAY_V2_STOP_CODEC.html b/variables/_libp2p_circuit_relay_v2.RELAY_V2_STOP_CODEC.html index 681676af18..266378f9a7 100644 --- a/variables/_libp2p_circuit_relay_v2.RELAY_V2_STOP_CODEC.html +++ b/variables/_libp2p_circuit_relay_v2.RELAY_V2_STOP_CODEC.html @@ -1,2 +1,2 @@ RELAY_V2_STOP_CODEC | libp2p

                                                                                                                                                                                        Generated using TypeDoc

                                                                                                                                                                                        \ No newline at end of file +

                                                                                                                                                                                        Generated using TypeDoc

                                                                                                                                                                                        \ No newline at end of file diff --git a/variables/_libp2p_crypto.keys.supportedKeys.html b/variables/_libp2p_crypto.keys.supportedKeys.html index d97ebc0d0b..f7452d0e5d 100644 --- a/variables/_libp2p_crypto.keys.supportedKeys.html +++ b/variables/_libp2p_crypto.keys.supportedKeys.html @@ -1 +1 @@ -supportedKeys | libp2p

                                                                                                                                                                                        Generated using TypeDoc

                                                                                                                                                                                        \ No newline at end of file +supportedKeys | libp2p

                                                                                                                                                                                        Generated using TypeDoc

                                                                                                                                                                                        \ No newline at end of file diff --git a/variables/_libp2p_dcutr.multicodec.html b/variables/_libp2p_dcutr.multicodec.html index 8c95f287d6..7ccf8e419f 100644 --- a/variables/_libp2p_dcutr.multicodec.html +++ b/variables/_libp2p_dcutr.multicodec.html @@ -1,2 +1,2 @@ multicodec | libp2p

                                                                                                                                                                                        Generated using TypeDoc

                                                                                                                                                                                        \ No newline at end of file +

                                                                                                                                                                                        Generated using TypeDoc

                                                                                                                                                                                        \ No newline at end of file diff --git a/variables/_libp2p_floodsub.multicodec.html b/variables/_libp2p_floodsub.multicodec.html index ee978d82ca..a6148062ae 100644 --- a/variables/_libp2p_floodsub.multicodec.html +++ b/variables/_libp2p_floodsub.multicodec.html @@ -1 +1 @@ -multicodec | libp2p

                                                                                                                                                                                        Generated using TypeDoc

                                                                                                                                                                                        \ No newline at end of file +multicodec | libp2p

                                                                                                                                                                                        Generated using TypeDoc

                                                                                                                                                                                        \ No newline at end of file diff --git a/variables/_libp2p_identify.multicodecs.html b/variables/_libp2p_identify.multicodecs.html index 44edcd26a5..052ed61d1f 100644 --- a/variables/_libp2p_identify.multicodecs.html +++ b/variables/_libp2p_identify.multicodecs.html @@ -1,2 +1,2 @@ multicodecs | libp2p

                                                                                                                                                                                        Variable multicodecsConst

                                                                                                                                                                                        multicodecs: {
                                                                                                                                                                                            IDENTIFY: string;
                                                                                                                                                                                            IDENTIFY_PUSH: string;
                                                                                                                                                                                        } = ...

                                                                                                                                                                                        The protocols the Identify service supports

                                                                                                                                                                                        -

                                                                                                                                                                                        Type declaration

                                                                                                                                                                                        • IDENTIFY: string
                                                                                                                                                                                        • IDENTIFY_PUSH: string

                                                                                                                                                                                        Generated using TypeDoc

                                                                                                                                                                                        \ No newline at end of file +

                                                                                                                                                                                        Type declaration

                                                                                                                                                                                        • IDENTIFY: string
                                                                                                                                                                                        • IDENTIFY_PUSH: string

                                                                                                                                                                                        Generated using TypeDoc

                                                                                                                                                                                        \ No newline at end of file diff --git a/variables/_libp2p_interface.connection.connectionSymbol.html b/variables/_libp2p_interface.connection.connectionSymbol.html index 5b8b1b7383..22083ac042 100644 --- a/variables/_libp2p_interface.connection.connectionSymbol.html +++ b/variables/_libp2p_interface.connection.connectionSymbol.html @@ -1 +1 @@ -connectionSymbol | libp2p

                                                                                                                                                                                        Generated using TypeDoc

                                                                                                                                                                                        \ No newline at end of file +connectionSymbol | libp2p

                                                                                                                                                                                        Generated using TypeDoc

                                                                                                                                                                                        \ No newline at end of file diff --git a/variables/_libp2p_interface.content_routing.contentRoutingSymbol.html b/variables/_libp2p_interface.content_routing.contentRoutingSymbol.html index 0e520acbe3..35894e649b 100644 --- a/variables/_libp2p_interface.content_routing.contentRoutingSymbol.html +++ b/variables/_libp2p_interface.content_routing.contentRoutingSymbol.html @@ -3,4 +3,4 @@ Symbol.Iterable can be used to return an Iterable from an Iterator.

                                                                                                                                                                                        Example

                                                                                                                                                                                        import { contentRoutingSymbol, ContentRouting } from '@libp2p/content-routing'

                                                                                                                                                                                        class MyContentRouter implements ContentRouting {
                                                                                                                                                                                        get [contentRoutingSymbol] () {
                                                                                                                                                                                        return this
                                                                                                                                                                                        }

                                                                                                                                                                                        // ...other methods
                                                                                                                                                                                        }
                                                                                                                                                                                        -

                                                                                                                                                                                        Generated using TypeDoc

                                                                                                                                                                                        \ No newline at end of file +

                                                                                                                                                                                        Generated using TypeDoc

                                                                                                                                                                                        \ No newline at end of file diff --git a/variables/_libp2p_interface.errors.ERR_INVALID_MESSAGE.html b/variables/_libp2p_interface.errors.ERR_INVALID_MESSAGE.html index dc4d5f804a..3fe383e386 100644 --- a/variables/_libp2p_interface.errors.ERR_INVALID_MESSAGE.html +++ b/variables/_libp2p_interface.errors.ERR_INVALID_MESSAGE.html @@ -1 +1 @@ -ERR_INVALID_MESSAGE | libp2p

                                                                                                                                                                                        Generated using TypeDoc

                                                                                                                                                                                        \ No newline at end of file +ERR_INVALID_MESSAGE | libp2p

                                                                                                                                                                                        Generated using TypeDoc

                                                                                                                                                                                        \ No newline at end of file diff --git a/variables/_libp2p_interface.errors.ERR_INVALID_PARAMETERS.html b/variables/_libp2p_interface.errors.ERR_INVALID_PARAMETERS.html index 46ea2ea57d..e288d0a751 100644 --- a/variables/_libp2p_interface.errors.ERR_INVALID_PARAMETERS.html +++ b/variables/_libp2p_interface.errors.ERR_INVALID_PARAMETERS.html @@ -1 +1 @@ -ERR_INVALID_PARAMETERS | libp2p

                                                                                                                                                                                        Generated using TypeDoc

                                                                                                                                                                                        \ No newline at end of file +ERR_INVALID_PARAMETERS | libp2p

                                                                                                                                                                                        Generated using TypeDoc

                                                                                                                                                                                        \ No newline at end of file diff --git a/variables/_libp2p_interface.errors.ERR_NOT_FOUND.html b/variables/_libp2p_interface.errors.ERR_NOT_FOUND.html index 6f175ddee8..b7def45b7c 100644 --- a/variables/_libp2p_interface.errors.ERR_NOT_FOUND.html +++ b/variables/_libp2p_interface.errors.ERR_NOT_FOUND.html @@ -1 +1 @@ -ERR_NOT_FOUND | libp2p

                                                                                                                                                                                        Generated using TypeDoc

                                                                                                                                                                                        \ No newline at end of file +ERR_NOT_FOUND | libp2p

                                                                                                                                                                                        Generated using TypeDoc

                                                                                                                                                                                        \ No newline at end of file diff --git a/variables/_libp2p_interface.errors.ERR_TIMEOUT.html b/variables/_libp2p_interface.errors.ERR_TIMEOUT.html index e4d60ed161..0c5f987508 100644 --- a/variables/_libp2p_interface.errors.ERR_TIMEOUT.html +++ b/variables/_libp2p_interface.errors.ERR_TIMEOUT.html @@ -1 +1 @@ -ERR_TIMEOUT | libp2p

                                                                                                                                                                                        Generated using TypeDoc

                                                                                                                                                                                        \ No newline at end of file +ERR_TIMEOUT | libp2p

                                                                                                                                                                                        Generated using TypeDoc

                                                                                                                                                                                        \ No newline at end of file diff --git a/variables/_libp2p_interface.events.CustomEvent.html b/variables/_libp2p_interface.events.CustomEvent.html index 202d3c46b6..c81d2babd7 100644 --- a/variables/_libp2p_interface.events.CustomEvent.html +++ b/variables/_libp2p_interface.events.CustomEvent.html @@ -1 +1 @@ -CustomEvent | libp2p
                                                                                                                                                                                        CustomEvent: {
                                                                                                                                                                                            prototype: CustomEvent<any>;
                                                                                                                                                                                            new <T>(type, eventInitDict?): CustomEvent<T>;
                                                                                                                                                                                        } = ...

                                                                                                                                                                                        Type declaration

                                                                                                                                                                                          • new <T>(type, eventInitDict?): CustomEvent<T>
                                                                                                                                                                                          • Type Parameters

                                                                                                                                                                                            • T

                                                                                                                                                                                            Parameters

                                                                                                                                                                                            • type: string
                                                                                                                                                                                            • Optional eventInitDict: CustomEventInit<T>

                                                                                                                                                                                            Returns CustomEvent<T>

                                                                                                                                                                                        • prototype: CustomEvent<any>

                                                                                                                                                                                        Generated using TypeDoc

                                                                                                                                                                                        \ No newline at end of file +CustomEvent | libp2p
                                                                                                                                                                                        CustomEvent: {
                                                                                                                                                                                            prototype: CustomEvent<any>;
                                                                                                                                                                                            new <T>(type, eventInitDict?): CustomEvent<T>;
                                                                                                                                                                                        } = ...

                                                                                                                                                                                        Type declaration

                                                                                                                                                                                          • new <T>(type, eventInitDict?): CustomEvent<T>
                                                                                                                                                                                          • Type Parameters

                                                                                                                                                                                            • T

                                                                                                                                                                                            Parameters

                                                                                                                                                                                            • type: string
                                                                                                                                                                                            • Optional eventInitDict: CustomEventInit<T>

                                                                                                                                                                                            Returns CustomEvent<T>

                                                                                                                                                                                        • prototype: CustomEvent<any>

                                                                                                                                                                                        Generated using TypeDoc

                                                                                                                                                                                        \ No newline at end of file diff --git a/variables/_libp2p_interface.keys.Ed25519.html b/variables/_libp2p_interface.keys.Ed25519.html index e42141e7d7..1e59be0b7a 100644 --- a/variables/_libp2p_interface.keys.Ed25519.html +++ b/variables/_libp2p_interface.keys.Ed25519.html @@ -1 +1 @@ -Ed25519 | libp2p

                                                                                                                                                                                        Generated using TypeDoc

                                                                                                                                                                                        \ No newline at end of file +Ed25519 | libp2p

                                                                                                                                                                                        Generated using TypeDoc

                                                                                                                                                                                        \ No newline at end of file diff --git a/variables/_libp2p_interface.keys.RSA.html b/variables/_libp2p_interface.keys.RSA.html index 31e0ca5b0a..7a91c6c507 100644 --- a/variables/_libp2p_interface.keys.RSA.html +++ b/variables/_libp2p_interface.keys.RSA.html @@ -1 +1 @@ -RSA | libp2p

                                                                                                                                                                                        Generated using TypeDoc

                                                                                                                                                                                        \ No newline at end of file +RSA | libp2p

                                                                                                                                                                                        Generated using TypeDoc

                                                                                                                                                                                        \ No newline at end of file diff --git a/variables/_libp2p_interface.keys.secp256k1.html b/variables/_libp2p_interface.keys.secp256k1.html index dd1b6ac49e..73a3e2778b 100644 --- a/variables/_libp2p_interface.keys.secp256k1.html +++ b/variables/_libp2p_interface.keys.secp256k1.html @@ -1 +1 @@ -secp256k1 | libp2p

                                                                                                                                                                                        Generated using TypeDoc

                                                                                                                                                                                        \ No newline at end of file +secp256k1 | libp2p

                                                                                                                                                                                        Generated using TypeDoc

                                                                                                                                                                                        \ No newline at end of file diff --git a/variables/_libp2p_interface.peer_discovery.peerDiscoverySymbol.html b/variables/_libp2p_interface.peer_discovery.peerDiscoverySymbol.html index c74bc386e9..50c9c66ff1 100644 --- a/variables/_libp2p_interface.peer_discovery.peerDiscoverySymbol.html +++ b/variables/_libp2p_interface.peer_discovery.peerDiscoverySymbol.html @@ -3,4 +3,4 @@ Symbol.Iterable can be used to return an Iterable from an Iterator.

                                                                                                                                                                                        Example

                                                                                                                                                                                        import { peerDiscovery, PeerDiscovery } from '@libp2p/peer-discovery'

                                                                                                                                                                                        class MyPeerDiscoverer implements PeerDiscovery {
                                                                                                                                                                                        get [peerDiscovery] () {
                                                                                                                                                                                        return this
                                                                                                                                                                                        }

                                                                                                                                                                                        // ...other methods
                                                                                                                                                                                        }
                                                                                                                                                                                        -

                                                                                                                                                                                        Generated using TypeDoc

                                                                                                                                                                                        \ No newline at end of file +

                                                                                                                                                                                        Generated using TypeDoc

                                                                                                                                                                                        \ No newline at end of file diff --git a/variables/_libp2p_interface.peer_id.peerIdSymbol.html b/variables/_libp2p_interface.peer_id.peerIdSymbol.html index 6ab4a73373..8476ea16dc 100644 --- a/variables/_libp2p_interface.peer_id.peerIdSymbol.html +++ b/variables/_libp2p_interface.peer_id.peerIdSymbol.html @@ -1 +1 @@ -peerIdSymbol | libp2p

                                                                                                                                                                                        Generated using TypeDoc

                                                                                                                                                                                        \ No newline at end of file +peerIdSymbol | libp2p

                                                                                                                                                                                        Generated using TypeDoc

                                                                                                                                                                                        \ No newline at end of file diff --git a/variables/_libp2p_interface.peer_routing.peerRoutingSymbol.html b/variables/_libp2p_interface.peer_routing.peerRoutingSymbol.html index 4bb7a92eeb..0fff42221f 100644 --- a/variables/_libp2p_interface.peer_routing.peerRoutingSymbol.html +++ b/variables/_libp2p_interface.peer_routing.peerRoutingSymbol.html @@ -3,4 +3,4 @@ Symbol.Iterable can be used to return an Iterable from an Iterator.

                                                                                                                                                                                        Example

                                                                                                                                                                                        import { peerRouting, PeerRouting } from '@libp2p/peer-routing'

                                                                                                                                                                                        class MyPeerRouter implements PeerRouting {
                                                                                                                                                                                        get [peerRouting] () {
                                                                                                                                                                                        return this
                                                                                                                                                                                        }

                                                                                                                                                                                        // ...other methods
                                                                                                                                                                                        }
                                                                                                                                                                                        -

                                                                                                                                                                                        Generated using TypeDoc

                                                                                                                                                                                        \ No newline at end of file +

                                                                                                                                                                                        Generated using TypeDoc

                                                                                                                                                                                        \ No newline at end of file diff --git a/variables/_libp2p_interface.peer_store_tags.KEEP_ALIVE.html b/variables/_libp2p_interface.peer_store_tags.KEEP_ALIVE.html index 5824ac2f05..68885bce13 100644 --- a/variables/_libp2p_interface.peer_store_tags.KEEP_ALIVE.html +++ b/variables/_libp2p_interface.peer_store_tags.KEEP_ALIVE.html @@ -1 +1 @@ -KEEP_ALIVE | libp2p

                                                                                                                                                                                        Generated using TypeDoc

                                                                                                                                                                                        \ No newline at end of file +KEEP_ALIVE | libp2p

                                                                                                                                                                                        Generated using TypeDoc

                                                                                                                                                                                        \ No newline at end of file diff --git a/variables/_libp2p_interface.pubsub.StrictNoSign.html b/variables/_libp2p_interface.pubsub.StrictNoSign.html index fdbcf23b66..5a75a34c79 100644 --- a/variables/_libp2p_interface.pubsub.StrictNoSign.html +++ b/variables/_libp2p_interface.pubsub.StrictNoSign.html @@ -9,4 +9,4 @@
                                                                                                                                                                                      • Propagate only if the fields are absent, reject otherwise.
                                                                                                                                                                                      • A message_id function will not be able to use the above fields, and should instead rely on the data field. A commonplace strategy is to calculate a hash.
                                                                                                                                                                                      • -

                                                                                                                                                                                        Generated using TypeDoc

                                                                                                                                                                                        \ No newline at end of file +

                                                                                                                                                                                        Generated using TypeDoc

                                                                                                                                                                                        \ No newline at end of file diff --git a/variables/_libp2p_interface.pubsub.StrictSign.html b/variables/_libp2p_interface.pubsub.StrictSign.html index b53db6e5f2..509accdec2 100644 --- a/variables/_libp2p_interface.pubsub.StrictSign.html +++ b/variables/_libp2p_interface.pubsub.StrictSign.html @@ -7,4 +7,4 @@
                                                                                                                                                                                      • Enforce the fields to be present, reject otherwise.
                                                                                                                                                                                      • Propagate only if the fields are valid and signature can be verified, reject otherwise.
                                                                                                                                                                                      • -

                                                                                                                                                                                        Generated using TypeDoc

                                                                                                                                                                                        \ No newline at end of file +

                                                                                                                                                                                        Generated using TypeDoc

                                                                                                                                                                                        \ No newline at end of file diff --git a/variables/_libp2p_interface.transport.transportSymbol.html b/variables/_libp2p_interface.transport.transportSymbol.html index c4fe6c7a47..07cd5be99b 100644 --- a/variables/_libp2p_interface.transport.transportSymbol.html +++ b/variables/_libp2p_interface.transport.transportSymbol.html @@ -1 +1 @@ -transportSymbol | libp2p

                                                                                                                                                                                        Generated using TypeDoc

                                                                                                                                                                                        \ No newline at end of file +transportSymbol | libp2p

                                                                                                                                                                                        Generated using TypeDoc

                                                                                                                                                                                        \ No newline at end of file diff --git a/variables/_libp2p_interface_compliance_tests.mocks.mockNetwork.html b/variables/_libp2p_interface_compliance_tests.mocks.mockNetwork.html index c761fe70e6..c9455610b6 100644 --- a/variables/_libp2p_interface_compliance_tests.mocks.mockNetwork.html +++ b/variables/_libp2p_interface_compliance_tests.mocks.mockNetwork.html @@ -1 +1 @@ -mockNetwork | libp2p

                                                                                                                                                                                        Generated using TypeDoc

                                                                                                                                                                                        \ No newline at end of file +mockNetwork | libp2p

                                                                                                                                                                                        Generated using TypeDoc

                                                                                                                                                                                        \ No newline at end of file diff --git a/variables/_libp2p_interface_compliance_tests.peers.default.html b/variables/_libp2p_interface_compliance_tests.peers.default.html index 7ed7c9d23f..6a02df8ad1 100644 --- a/variables/_libp2p_interface_compliance_tests.peers.default.html +++ b/variables/_libp2p_interface_compliance_tests.peers.default.html @@ -1 +1 @@ -default | libp2p

                                                                                                                                                                                        Generated using TypeDoc

                                                                                                                                                                                        \ No newline at end of file +default | libp2p

                                                                                                                                                                                        Generated using TypeDoc

                                                                                                                                                                                        \ No newline at end of file diff --git a/variables/_libp2p_multistream_select.PROTOCOL_ID.html b/variables/_libp2p_multistream_select.PROTOCOL_ID.html index 041c1665aa..3b672619bf 100644 --- a/variables/_libp2p_multistream_select.PROTOCOL_ID.html +++ b/variables/_libp2p_multistream_select.PROTOCOL_ID.html @@ -1 +1 @@ -PROTOCOL_ID | libp2p

                                                                                                                                                                                        Generated using TypeDoc

                                                                                                                                                                                        \ No newline at end of file +PROTOCOL_ID | libp2p

                                                                                                                                                                                        Generated using TypeDoc

                                                                                                                                                                                        \ No newline at end of file diff --git a/variables/_libp2p_ping.PING_PROTOCOL.html b/variables/_libp2p_ping.PING_PROTOCOL.html index e9a3e7ec13..67f07986ec 100644 --- a/variables/_libp2p_ping.PING_PROTOCOL.html +++ b/variables/_libp2p_ping.PING_PROTOCOL.html @@ -1 +1 @@ -PING_PROTOCOL | libp2p

                                                                                                                                                                                        Generated using TypeDoc

                                                                                                                                                                                        \ No newline at end of file +PING_PROTOCOL | libp2p

                                                                                                                                                                                        Generated using TypeDoc

                                                                                                                                                                                        \ No newline at end of file diff --git a/variables/_libp2p_pubsub.errors.codes.html b/variables/_libp2p_pubsub.errors.codes.html index 15b3fc7f09..8d078ceb94 100644 --- a/variables/_libp2p_pubsub.errors.codes.html +++ b/variables/_libp2p_pubsub.errors.codes.html @@ -10,4 +10,4 @@
                                                                                                                                                                                      • ERR_UNEXPECTED_SEQNO: string

                                                                                                                                                                                        Message expected to not have a seqno, but does

                                                                                                                                                                                      • ERR_UNEXPECTED_SIGNATURE: string

                                                                                                                                                                                        Message expected to not have a signature, but does

                                                                                                                                                                                      • ERR_UNHANDLED_SIGNATURE_POLICY: string

                                                                                                                                                                                        Signature policy is unhandled

                                                                                                                                                                                        -
                                                                                                                                                                                      • Generated using TypeDoc

                                                                                                                                                                                        \ No newline at end of file +

                                                                                                                                                                                        Generated using TypeDoc

                                                                                                                                                                                        \ No newline at end of file diff --git a/variables/_libp2p_utils.ip_port_to_multiaddr.Errors.html b/variables/_libp2p_utils.ip_port_to_multiaddr.Errors.html index 0ce044326e..8e20d9cdb0 100644 --- a/variables/_libp2p_utils.ip_port_to_multiaddr.Errors.html +++ b/variables/_libp2p_utils.ip_port_to_multiaddr.Errors.html @@ -1 +1 @@ -Errors | libp2p
                                                                                                                                                                                        Errors: {
                                                                                                                                                                                            ERR_INVALID_IP: string;
                                                                                                                                                                                            ERR_INVALID_IP_PARAMETER: string;
                                                                                                                                                                                            ERR_INVALID_PORT_PARAMETER: string;
                                                                                                                                                                                        } = ...

                                                                                                                                                                                        Type declaration

                                                                                                                                                                                        • ERR_INVALID_IP: string
                                                                                                                                                                                        • ERR_INVALID_IP_PARAMETER: string
                                                                                                                                                                                        • ERR_INVALID_PORT_PARAMETER: string

                                                                                                                                                                                        Generated using TypeDoc

                                                                                                                                                                                        \ No newline at end of file +Errors | libp2p
                                                                                                                                                                                        Errors: {
                                                                                                                                                                                            ERR_INVALID_IP: string;
                                                                                                                                                                                            ERR_INVALID_IP_PARAMETER: string;
                                                                                                                                                                                            ERR_INVALID_PORT_PARAMETER: string;
                                                                                                                                                                                        } = ...

                                                                                                                                                                                        Type declaration

                                                                                                                                                                                        • ERR_INVALID_IP: string
                                                                                                                                                                                        • ERR_INVALID_IP_PARAMETER: string
                                                                                                                                                                                        • ERR_INVALID_PORT_PARAMETER: string

                                                                                                                                                                                        Generated using TypeDoc

                                                                                                                                                                                        \ No newline at end of file