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

Namespace enr

Index

Type aliases

ENRKey: string
ENRValue: Uint8Array
NodeId: string

We represent NodeId as a hex string, since node equality is used very heavily and it is convenient to index data by NodeId

SequenceNumber: bigint

Variables

ERR_INVALID_ID: "Invalid record id" = "Invalid record id"
ERR_NO_SIGNATURE: "No valid signature found" = "No valid signature found"
ERR_TYPE_NOT_IMPLEMENTED: "Keypair type not implemented" = "Keypair type not implemented"
MAX_RECORD_SIZE: 300 = 300
MULTIADDR_LENGTH_SIZE: 2 = 2
v4: __module = v4Crypto

Functions

  • Parameters

    • type: KeypairType
    • Optional privateKey: Uint8Array
    • Optional publicKey: Uint8Array

    Returns IKeypair

  • createKeypairFromPeerId(peerId: PeerId): IKeypair
  • Parameters

    • peerId: PeerId

    Returns IKeypair

  • createPeerIdFromKeypair(keypair: IKeypair): Promise<PeerId>
  • Parameters

    Returns Promise<PeerId>

  • decodeWaku2(byte: number): Waku2
  • Parameters

    • byte: number

    Returns Waku2

  • encodeWaku2(protocols: Waku2): number
  • Parameters

    Returns number

Generated using