Module: net/packets

Classes

AddrPacket
BlockPacket
BlockTxnPacket
CmpctBlockPacket
FeeFilterPacket
FilterAddPacket
FilterClearPacket
FilterLoadPacket
GetAddrPacket
GetBlocksPacket
GetBlockTxnPacket
GetDataPacket
GetHeadersPacket
HeadersPacket
InvPacket
MempoolPacket
MerkleBlockPacket
NotFoundPacket
Packet
PingPacket
PongPacket
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
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,"UNKNOWN":26,"INTERNAL":27,"DATA":28}
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","UNKNOWN","INTERNAL","DATA"]
Source:

Methods

(static) fromRaw(cmd, data) → {Packet}

Parse a payload.

Parameters:
Name Type Description
cmd String
data Buffer
Source:
Returns:
Type
Packet