Serialization
Block Header
Field |
Type |
Length |
Present |
---|---|---|---|
nVersion |
signed int |
4 bytes |
Always |
hashPrevBlock |
uint256 |
32 bytes |
Always |
hashMerkleRoot |
uint256 |
32 bytes |
Always |
nTime |
unsigned int |
4 bytes |
Always |
nBits |
unsigned int |
4 bytes |
Always |
nNonce |
unsigned int |
4 bytes |
Always |
Block
Field |
Type |
Length |
Present |
---|---|---|---|
blockHeader |
70 bytes |
Always |
|
vTx |
Transaction vector |
Variable |
Always |
Bulletproof Range Proof
Field |
Type |
Length |
Present |
---|---|---|---|
V |
G1Element vector |
Variable |
Always |
L |
G1Element vector |
Variable |
Always |
R |
G1Element vector |
Variable |
Always |
A |
Always |
||
S |
Always |
||
T1 |
Always |
||
T2 |
Always |
||
taux |
Always |
||
mu |
Always |
||
a |
Always |
||
b |
Always |
||
t |
Always |
Transaction
Field |
Type |
Length |
Present |
---|---|---|---|
nVersion |
signed int |
4 bytes |
Always |
vin |
Transaction Input vector |
Variable |
Always |
flags |
unsigned char |
1 byte |
If vin.size() == 0 |
vin |
Transaction Input vector |
Variable |
If vin.size() == 0 |
vout |
Transaction Output vector |
Variable |
Always |
wit |
TxWitness vector |
Same as vin |
If flags&1 |
nLockTime |
unsigned int |
4 bytes |
Always |
vchTxSig |
If nVersion & 0x20 |
Transaction Input
Field |
Type |
Length |
Present |
---|---|---|---|
prevout |
36 bytes |
Always |
|
scriptSig |
unsigned char vector |
Variable |
Always |
nSequence |
unsigned int |
4 bytes |
Always |
Transaction Output
Field |
Type |
Length |
Present |
---|---|---|---|
nValue |
signed int |
8 bytes |
Always |
nFlags |
unsigned int |
8 bytes |
If nValue == INT64_MAX |
scriptPubKey |
unsigned char vector |
Variable |
Always |
rangeProof |
If nFlags & 0x01 |
||
spendingKey |
48 bytes |
If nFlags & 0x01 |
|
blindingKey |
48 bytes |
If nFlags & 0x01 |
|
ephemeralKey |
48 bytes |
If nFlags & 0x01 |
|
viewTag |
unsigned int |
2 bytes |
If nFlags & 0x01 |
tokenId |
If nFlags & 0x02 |
Scalar
Field |
Type |
Length |
Present |
---|---|---|---|
data |
Scalar |
32 |
Always |
G1Element
Field |
Type |
Length |
Present |
---|---|---|---|
data |
G1Element |
48 |
Always |
G2Element
Field |
Type |
Length |
Present |
---|---|---|---|
data |
G2Element |
96 |
Always |
TokenId
Field |
Type |
Length |
Present |
---|---|---|---|
tokenId |
uint256 |
32 |
Always |
nftId |
unsigned int |
8 |
Always |
OutPoint
Field |
Type |
Length |
Present |
---|---|---|---|
hash |
uint256 |
32 |
Always |
n |
unsigned int |
4 |
Always |
TxWitness
Field |
Type |
Length |
Present |
---|---|---|---|
stack |
vector of unsigned char vectors |
Variable |
Always |