gettxout

Back to blockchain

Summary

Returns details about an unspent transaction output.

Description

Returns details about an unspent transaction output.

Arguments

  • txid (STR, required): The transaction id
  • n (NUM, required): vout number
  • include_mempool (BOOL): Whether to include the mempool. Note that an unspent output that is spent in the mempool won't appear.

Results

  • value (NONE): No description.
  • value (OBJ): No description.
  • bestblock (STR_HEX): The hash of the block at the tip of the chain
  • confirmations (NUM): The number of confirmations
  • value (STR_AMOUNT): The transaction value in QBT
  • scriptPubKey (OBJ): No description.
    • asm (STR): Disassembly of the output script
    • desc (STR): Inferred descriptor for the output
    • hex (STR_HEX): The raw output script bytes, hex-encoded
    • type (STR): The type, eg pubkeyhash
    • address (STR, optional): The qbit address (only if a well-defined address exists)
  • coinbase (BOOL): Coinbase or not

Examples

Get unspent transactions
qbit-cli listunspent
View the details
qbit-cli gettxout "txid" 1
As a JSON-RPC call
curl --user myusername --data-binary '{"jsonrpc": "2.0", "id": "curltest", "method": "gettxout", "params": ["txid", 1]}' -H 'content-type: application/json' http://127.0.0.1:8352/