Hierarchy

Implements

Constructors

Properties

peerId?: PeerId
seq: bigint
signature?: Uint8Array
RECORD_PREFIX: "enr:" = "enr:"

Accessors

  • get multiaddrs(): undefined | Multiaddr[]
  • Get the multiaddrs field from ENR.

    This field is used to store multiaddresses that cannot be stored with the current ENR pre-defined keys. These can be a multiaddresses that include encapsulation (e.g. wss) or do not use ip4 nor ip6 for the host address (e.g. dns4, dnsaddr, etc)..

    If the peer information only contains information that can be represented with the ENR pre-defined keys (ip, tcp, etc) then the usage of getLocationMultiaddr should be preferred.

    The multiaddresses stored in this field are expected to be location multiaddresses, ie, peer id less.

    Returns undefined | Multiaddr[]

  • set multiaddrs(multiaddrs: undefined | Multiaddr[]): void
  • Set the multiaddrs field on the ENR.

    This field is used to store multiaddresses that cannot be stored with the current ENR pre-defined keys. These can be a multiaddresses that include encapsulation (e.g. wss) or do not use ip4 nor ip6 for the host address (e.g. dns4, dnsaddr, etc)..

    If the peer information only contains information that can be represented with the ENR pre-defined keys (ip, tcp, etc) then the usage of setLocationMultiaddr should be preferred. The multiaddresses stored in this field must be location multiaddresses, ie, without a peer id.

    Parameters

    • multiaddrs: undefined | Multiaddr[]

    Returns void

Methods

  • Returns the full multiaddr from the ENR fields matching the provided protocol parameter. To return full multiaddrs from the multiaddrs ENR field, use getFullMultiaddrs.

    Parameters

    • protocol: "tcp" | "udp" | "tcp6" | "udp6" | "udp4" | "tcp4"

    Returns undefined | Multiaddr

  • Parameters

    • protocol: "tcp" | "udp" | "tcp6" | "udp6" | "udp4" | "tcp4"

    Returns undefined | Multiaddr

Generated using TypeDoc