Bitcoin Module
Block
Represents a block in the Bitcoin blockchain.
Field | Type | Label | Description |
---|---|---|---|
version | uint32 | Block version number | |
prev_block_hash | bytes | Hash of the previous block | |
merkle_root | bytes | Root hash of the Merkle tree | |
timestamp | uint32 | Time when the block was created | |
bits | uint32 | Target difficulty value | |
nonce | uint32 | Value used for Proof-of-Work | |
transactions | Transaction | repeated | List of transactions included in the block |
Transaction
Represents a transaction in the Bitcoin network.
Field | Type | Label | Description |
---|---|---|---|
version | uint32 | Transaction version number. Currently 1 | |
inputs | TxInput | repeated | List of transaction inputs |
outputs | TxOutput | repeated | List of transaction outputs |
locktime | uint32 | Block height or timestamp when transaction is final | |
hash | bytes | ||
block_hash | bytes | Transactions reference their block | |
timestamp | uint32 |
TxInput
Represents an input in a Bitcoin transaction.
Field | Type | Label | Description |
---|---|---|---|
tx_id | bytes | Hash of the previous transaction output | |
script_sig | bytes | Unlocking script for spending the UTXO | |
sequence | uint32 | Used for relative timelocks | |
coinbase | bytes | Coinbase transactions have this instead of txid and scriptSig | |
witnesses | bytes | repeated |
TxOutput
Represents an output in a Bitcoin transaction.
Field | Type | Label | Description |
---|---|---|---|
value | uint64 | Amount of Bitcoin in Satoshis | |
script_pub_key | ScriptPubKey | Locking script defining spendability |
ScriptPubKey
Represents a script pub key in the output.
Field | Type | Label | Description |
---|---|---|---|
asm | bytes | Script in human-readable format | |
hex | bytes | Script in hexadecimal format | |
script_type | ScriptType | Can be ScriptHash, Multsig, etc |