Constructor
new CmpctBlockPacket(block, witness)
Create a cmpctblock
packet.
Parameters:
Name | Type | Description |
---|---|---|
block |
Block | null | |
witness |
Boolean | null |
Properties:
Name | Type | Description |
---|---|---|
block |
Block | |
witness |
Boolean |
- Source:
Extends
- Packet
Methods
(static) fromRaw(data, encnullable) → {CmpctBlockPacket}
Instantiate cmpctblock packet from serialized data.
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
data |
Buffer | ||
enc |
String |
<nullable> |
- Source:
Returns:
- Type
- CmpctBlockPacket
(static) fromReader(br) → {CmpctBlockPacket}
Instantiate cmpctblock packet from buffer reader.
Parameters:
Name | Type | Description |
---|---|---|
br |
BufferReader |
- Source:
Returns:
- Type
- CmpctBlockPacket
(private) fromRaw(data)
Inject properties from serialized data.
Parameters:
Name | Type | Description |
---|---|---|
data |
Buffer |
- Source:
(private) fromReader(br)
Inject properties from buffer reader.
Parameters:
Name | Type | Description |
---|---|---|
br |
BufferReader |
- Source:
getSize() → {Buffer}
Serialize cmpctblock packet.
- Source:
Returns:
- Type
- Buffer
toRaw() → {Buffer}
Serialize cmpctblock packet.
- Source:
Returns:
- Type
- Buffer
toWriter(bw)
Serialize cmpctblock packet to writer.
Parameters:
Name | Type | Description |
---|---|---|
bw |
BufferWriter |
- Source: