@ethereumjs/devp2p / DNS
Defined in: packages/devp2p/src/dns/dns.ts:18
new DNS(
options
):DNS
Defined in: packages/devp2p/src/dns/dns.ts:26
DNSOptions
= {}
DNS
__setNativeDNSModuleResolve(
mock
):void
Defined in: packages/devp2p/src/dns/dns.ts:216
Only used for testing. A stopgap to enable successful
TestDouble mocking of the native dns
module.
any
TestDouble fn
void
getPeers(
maxQuantity
,dnsNetworks
):Promise
<PeerInfo
[]>
Defined in: packages/devp2p/src/dns/dns.ts:49
Returns a list of verified peers listed in an EIP-1459 DNS tree. Method may
return fewer peers than requested if maxQuantity
is larger than the number
of ENR records or the number of errors/duplicate peers encountered by randomized
search exceeds maxQuantity
plus the errorTolerance
factor.
number
max number to get
string
[]
enrTree strings (See EIP-1459 for format)
Promise
<PeerInfo
[]>