@ethereumjs/devp2p / KBucket
• new KBucket(localNodeId)
| Name | Type |
|---|---|
localNodeId |
Uint8Array |
packages/devp2p/src/dpt/kbucket.ts:15
• events: EventEmitter
packages/devp2p/src/dpt/kbucket.ts:12
▸ add(peer): void | KBucket
| Name | Type |
|---|---|
peer |
PeerInfo |
void | KBucket
packages/devp2p/src/dpt/kbucket.ts:53
▸ closest(id): PeerInfo[]
| Name | Type |
|---|---|
id |
Uint8Array |
PeerInfo[]
packages/devp2p/src/dpt/kbucket.ts:71
▸ get(obj): null | PeerInfo
| Name | Type |
|---|---|
obj |
string | Uint8Array | PeerInfo |
null | PeerInfo
packages/devp2p/src/dpt/kbucket.ts:58
▸ getAll(): PeerInfo[]
PeerInfo[]
packages/devp2p/src/dpt/kbucket.ts:67
▸ remove(obj): void
| Name | Type |
|---|---|
obj |
string | Uint8Array | PeerInfo |
void
packages/devp2p/src/dpt/kbucket.ts:75
▸ Static getKeys(obj): string[]
| Name | Type |
|---|---|
obj |
string | Uint8Array | PeerInfo |
string[]