Table description
Thebitcoin.inputs table represents the inputs of a transaction. An input is a reference to an output of a previous transaction. It is the source of the funds for the transaction. The input contains the hash of the transaction that contains the output, the index of the output in the transaction, the script that unlocks the output, and the sequence number.
Table Schema
| Column | Type | Description |
|---|---|---|
block_time | TIMESTAMP | Timestamp of the block containing this transaction |
block_date | DATE | Date of the block for daily aggregations |
block_height | BIGINT | Height of the block containing this transaction |
block_hash | VARBINARY | Hash of the block containing this transaction |
tx_id | VARBINARY | Hash of the transaction this input belongs to |
index | INTEGER | Position of this input within the transaction’s input list |
spent_block_height | BIGINT | Block height of the transaction whose output is being spent |
spent_tx_id | VARBINARY | Transaction ID of the previously created output being spent |
spent_output_number | BIGINT | Index of the output being spent in the source transaction |
value | DOUBLE | Amount of BTC provided by this input |
address | VARCHAR | Bitcoin address that owned the spent output |
type | VARCHAR | Address/script type of the spent output (e.g. pubkeyhash, scripthash, witness_v0_keyhash) |
coinbase | VARBINARY | Coinbase data if this is a coinbase input, otherwise empty |
is_coinbase | BOOLEAN | Whether this input is a coinbase input (block reward) |
script_asm | VARCHAR | Script public key of the spent output in human-readable ASM format |
script_hex | VARBINARY | Script public key of the spent output in raw hex |
script_desc | VARCHAR | Output descriptor of the spent output’s script |
script_signature_asm | VARCHAR | Unlocking script (scriptSig) in human-readable ASM format |
script_signature_hex | VARBINARY | Unlocking script (scriptSig) in raw hex |
sequence | BIGINT | Sequence number, used for relative time locks and replace-by-fee signaling |
witness_data | ARRAY(VARBINARY) | Segregated witness data stack for this input |