decoderawtransaction

Back to rawtransactions

Summary

Return a JSON object representing the serialized, hex-encoded transaction.

Description

Return a JSON object representing the serialized, hex-encoded transaction.

Arguments

  • hexstring (STR_HEX, required): The transaction hex string
  • iswitness (BOOL): Whether the transaction hex is a serialized witness transaction. If iswitness is not present, heuristic tests will be used in decoding. If true, only witness deserialization will be tried. If false, only non-witness deserialization will be tried. This boolean should reflect whether the transaction has inputs (e.g. fully valid, or on-chain transactions), if known by the caller.

Results

  • value (OBJ): No description.
  • txid (STR_HEX): The transaction id
  • hash (STR_HEX): The transaction hash (differs from txid for witness transactions)
  • size (NUM): The serialized transaction size
  • vsize (NUM): The virtual transaction size
  • weight (NUM): The transaction's weight; qbit fully counts witness data
  • version (NUM): The version
  • locktime (NUM_TIME): The lock time
  • vin (ARR): No description.
    • value (OBJ): No description.
    • coinbase (STR_HEX, optional): The coinbase value (only if coinbase transaction)
    • txid (STR_HEX, optional): The transaction id (if not coinbase transaction)
    • vout (NUM, optional): The output number (if not coinbase transaction)
    • scriptSig (OBJ, optional): The script (if not coinbase transaction)
      • asm (STR): Disassembly of the signature script
      • hex (STR_HEX): The raw signature script bytes, hex-encoded
    • txinwitness (ARR, optional): No description.
      • hex (STR_HEX): hex-encoded witness data (if any)
    • sequence (NUM): The script sequence number
  • vout (ARR): No description.
    • value (OBJ): No description.
    • value (STR_AMOUNT): The value in QBT
    • n (NUM): index
    • 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
      • address (STR, optional): The qbit address (only if a well-defined address exists)
      • type (STR): The type (one of: nonstandard, anchor, pubkey, pubkeyhash, scripthash, multisig, nulldata, witness_v0_scripthash, witness_v0_keyhash, witness_v1_taproot, witness_v2_p2mr, witness_unknown)

Examples

qbit-cli decoderawtransaction "hexstring"
curl --user myusername --data-binary '{"jsonrpc": "2.0", "id": "curltest", "method": "decoderawtransaction", "params": ["hexstring"]}' -H 'content-type: application/json' http://127.0.0.1:8352/