@ethereumjs/devp2p / ENR
Defined in: packages/devp2p/src/dns/enr.ts:31
new ENR():
ENR
ENR
readonly
static
BRANCH_PREFIX:"enrtree-branch:"
='enrtree-branch:'
Defined in: packages/devp2p/src/dns/enr.ts:34
readonly
static
RECORD_PREFIX:"enr:"
='enr:'
Defined in: packages/devp2p/src/dns/enr.ts:32
readonly
static
ROOT_PREFIX:"enrtree-root:"
='enrtree-root:'
Defined in: packages/devp2p/src/dns/enr.ts:35
readonly
static
TREE_PREFIX:"enrtree:"
='enrtree:'
Defined in: packages/devp2p/src/dns/enr.ts:33
static
parseAndVerifyRecord(enr
,common?
):PeerInfo
Defined in: packages/devp2p/src/dns/enr.ts:50
Converts an Ethereum Name Record (EIP-778) string into a PeerInfo object after validating its signature component with the public key encoded in the record itself.
The record components are:
signature: cryptographic signature of record contents seq: The sequence number, a 64-bit unsigned integer which increases whenever the record changes and is republished. A set of arbitrary key/value pairs
string
Common
static
parseAndVerifyRoot(root
,publicKey
,common?
):string
Defined in: packages/devp2p/src/dns/enr.ts:99
Extracts the branch subdomain referenced by a DNS tree root string after verifying the root record signature with its base32 compressed public key. Geth’s top level DNS domains and their public key can be found in: go-ethereum/params/bootnodes
string
(See EIP-1459 for encoding details)
string
Common
string
subdomain subdomain to retrieve branch records from.
static
parseBranch(branch
):string
[]
Defined in: packages/devp2p/src/dns/enr.ts:178
Returns subdomains listed in an ENR branch entry. These in turn lead to either further branch entries or ENR records.
string
string
[]
static
parseTree(tree
):ENRTreeValues
Defined in: packages/devp2p/src/dns/enr.ts:153
Returns the public key and top level domain of an ENR tree entry. The domain is the starting point for traversing a set of linked DNS TXT records and the public key is used to verify the root entry record
string
(See EIP-1459 )
ENRTreeValues