Skip to main content

Table description

The bitcoin.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

ColumnTypeDescription
block_timeTIMESTAMPTimestamp of the block containing this transaction
block_dateDATEDate of the block for daily aggregations
block_heightBIGINTHeight of the block containing this transaction
block_hashVARBINARYHash of the block containing this transaction
tx_idVARBINARYHash of the transaction this input belongs to
indexINTEGERPosition of this input within the transaction’s input list
spent_block_heightBIGINTBlock height of the transaction whose output is being spent
spent_tx_idVARBINARYTransaction ID of the previously created output being spent
spent_output_numberBIGINTIndex of the output being spent in the source transaction
valueDOUBLEAmount of BTC provided by this input
addressVARCHARBitcoin address that owned the spent output
typeVARCHARAddress/script type of the spent output (e.g. pubkeyhash, scripthash, witness_v0_keyhash)
coinbaseVARBINARYCoinbase data if this is a coinbase input, otherwise empty
is_coinbaseBOOLEANWhether this input is a coinbase input (block reward)
script_asmVARCHARScript public key of the spent output in human-readable ASM format
script_hexVARBINARYScript public key of the spent output in raw hex
script_descVARCHAROutput descriptor of the spent output’s script
script_signature_asmVARCHARUnlocking script (scriptSig) in human-readable ASM format
script_signature_hexVARBINARYUnlocking script (scriptSig) in raw hex
sequenceBIGINTSequence number, used for relative time locks and replace-by-fee signaling
witness_dataARRAY(VARBINARY)Segregated witness data stack for this input

Table Sample