@ethereumjs/devp2p / SNAP
Protocol
↳ SNAP
• new SNAP(version
, peer
, send
)
Name | Type |
---|---|
version |
number |
peer |
Peer |
send |
SendMethod |
Protocol.constructor
packages/devp2p/src/protocol/snap.ts:14
▪ Static
snap: Object
Name | Type |
---|---|
constructor |
typeof SNAP |
length |
number |
name |
string |
version |
number |
packages/devp2p/src/protocol/snap.ts:18
▸ _handleMessage(code
, data
): void
Name | Type |
---|---|
code |
MESSAGE_CODES |
data |
Uint8Array |
void
Protocol._handleMessage
packages/devp2p/src/protocol/snap.ts:20
▸ getMsgPrefix(msgCode
): string
Name | Type |
---|---|
msgCode |
MESSAGE_CODES |
string
packages/devp2p/src/protocol/snap.ts:95
▸ getVersion(): number
number
packages/devp2p/src/protocol/snap.ts:99
▸ sendMessage(code
, payload
): void
Name | Type | Description |
---|---|---|
code |
MESSAGE_CODES |
Message code |
payload |
any |
Payload (including reqId, e.g. [1, [437000, 1, 0, 0]] ) |
void
packages/devp2p/src/protocol/snap.ts:59
▸ sendStatus(): void
void