@ethereumjs/devp2p / DPT
• new DPT(privateKey
, options
)
Name | Type |
---|---|
privateKey |
Uint8Array |
options |
DPTOptions |
packages/devp2p/src/dpt/dpt.ts:35
• events: EventEmitter
packages/devp2p/src/dpt/dpt.ts:18
• Readonly
id: undefined
| Uint8Array
packages/devp2p/src/dpt/dpt.ts:24
▸ _addPeerBatch(peers
): void
Name | Type |
---|---|
peers |
PeerInfo [] |
void
packages/devp2p/src/dpt/dpt.ts:105
▸ _onKBucketPing(oldPeers
, newPeer
): void
Name | Type |
---|---|
oldPeers |
PeerInfo [] |
newPeer |
PeerInfo |
void
packages/devp2p/src/dpt/dpt.ts:84
▸ addPeer(obj
): Promise
<PeerInfo
>
Name | Type |
---|---|
obj |
PeerInfo |
Promise
<PeerInfo
>
packages/devp2p/src/dpt/dpt.ts:131
▸ banPeer(obj
, maxAge?
): void
Name | Type |
---|---|
obj |
string | Uint8Array | PeerInfo |
maxAge? |
number |
void
packages/devp2p/src/dpt/dpt.ts:167
▸ bind(…args
): void
Name | Type |
---|---|
...args |
any [] |
void
packages/devp2p/src/dpt/dpt.ts:75
▸ bootstrap(peer
): Promise
<void
>
Name | Type |
---|---|
peer |
PeerInfo |
Promise
<void
>
packages/devp2p/src/dpt/dpt.ts:118
▸ destroy(…args
): void
Name | Type |
---|---|
...args |
any [] |
void
packages/devp2p/src/dpt/dpt.ts:79
▸ getClosestPeers(id
): PeerInfo
[]
Name | Type |
---|---|
id |
Uint8Array |
PeerInfo
[]
packages/devp2p/src/dpt/dpt.ts:159
▸ getDnsPeers(): Promise
<PeerInfo
[]>
Promise
<PeerInfo
[]>
packages/devp2p/src/dpt/dpt.ts:172
▸ getPeer(obj
): null
| PeerInfo
Name | Type |
---|---|
obj |
string | Uint8Array | PeerInfo |
null
| PeerInfo
packages/devp2p/src/dpt/dpt.ts:151
▸ getPeers(): PeerInfo
[]
PeerInfo
[]
packages/devp2p/src/dpt/dpt.ts:155
▸ refresh(): Promise
<void
>
Promise
<void
>
packages/devp2p/src/dpt/dpt.ts:176
▸ removePeer(obj
): void
Name | Type |
---|---|
obj |
string | Uint8Array | PeerInfo |
void