Module: net/packets

Classes

AddrPacket
AirdropPacket
BlockPacket
BlockTxnPacket
ClaimPacket
CmpctBlockPacket
FeeFilterPacket
FilterAddPacket
FilterClearPacket
FilterLoadPacket
GetAddrPacket
GetBlocksPacket
GetBlockTxnPacket
GetDataPacket
GetHeadersPacket
GetProofPacket
HeadersPacket
InvPacket
MempoolPacket
MerkleBlockPacket
NotFoundPacket
Packet
PingPacket
PongPacket
ProofPacket
RejectPacket
SendCmpctPacket
SendHeadersPacket
TXPacket
UnknownPacket
VerackPacket
VersionPacket

Members

(static) types :Number

Packet types.

Type:
  • Number
Properties:
Name Type Description
VERSION Number
VERACK Number
PING Number
PONG Number
GETADDR Number
ADDR Number
INV Number
GETDATA Number
NOTFOUND Number
GETBLOCKS Number
GETHEADERS Number
HEADERS Number
SENDHEADERS Number
BLOCK Number
TX Number
REJECT Number
MEMPOOL Number
FILTERLOAD Number
FILTERADD Number
FILTERCLEAR Number
MERKLEBLOCK Number
FEEFILTER Number
SENDCMPCT Number
CMPCTBLOCK Number
GETBLOCKTXN Number
BLOCKTXN Number
GETPROOF Number
PROOF Number
CLAIM Number
AIRDROP Number
UNKNOWN Number
INTERNAL Number
DATA Number
Default Value:
  • {"VERSION":0,"VERACK":1,"PING":2,"PONG":3,"GETADDR":4,"ADDR":5,"INV":6,"GETDATA":7,"NOTFOUND":8,"GETBLOCKS":9,"GETHEADERS":10,"HEADERS":11,"SENDHEADERS":12,"BLOCK":13,"TX":14,"REJECT":15,"MEMPOOL":16,"FILTERLOAD":17,"FILTERADD":18,"FILTERCLEAR":19,"MERKLEBLOCK":20,"FEEFILTER":21,"SENDCMPCT":22,"CMPCTBLOCK":23,"GETBLOCKTXN":24,"BLOCKTXN":25,"GETPROOF":26,"PROOF":27,"CLAIM":28,"AIRDROP":29,"UNKNOWN":30,"INTERNAL":31,"DATA":32}
Source:

(static, constant) typesByVal :Object

Packet types by value.

Type:
  • Object
Default Value:
  • ["VERSION","VERACK","PING","PONG","GETADDR","ADDR","INV","GETDATA","NOTFOUND","GETBLOCKS","GETHEADERS","HEADERS","SENDHEADERS","BLOCK","TX","REJECT","MEMPOOL","FILTERLOAD","FILTERADD","FILTERCLEAR","MERKLEBLOCK","FEEFILTER","SENDCMPCT","CMPCTBLOCK","GETBLOCKTXN","BLOCKTXN","GETPROOF","PROOF","CLAIM","AIRDROP","UNKNOWN","INTERNAL","DATA"]
Source:

Methods

(static) decode(type, data) → {Packet}

Parse a payload.

Parameters:
Name Type Description
type Number
data Buffer
Source:
Returns:
Type
Packet