getdescriptoractivity

Back to blockchain

Summary

Get spend and receive activity associated with a set of descriptors for a set of blocks. This command pairs well with the relevant_blocks output of scanblocks().

Description

Get spend and receive activity associated with a set of descriptors for a set of blocks. This command pairs well with the relevant_blocks output of scanblocks(). This call may take several minutes. If you encounter timeouts, try specifying no RPC timeout (qbit-cli -rpcclienttimeout=0)

Arguments

  • blockhashes (ARR, required): The list of blockhashes to examine for activity. Order doesn't matter. Must be along main chain or an error is thrown.

  • blockhash (STR_HEX): A valid blockhash

  • scanobjects (ARR, required): The list of descriptors (scan objects) to examine for activity. Every scan object is either a string descriptor or an object:
  • descriptor (STR): An output descriptor
  • value (OBJ): An object with output descriptor and metadata
    • desc (STR, required): An output descriptor
    • range (RANGE): The range of HD chain indexes to explore (either end or [begin,end])
  • include_mempool (BOOL): Whether to include unconfirmed activity

Results

  • value (OBJ): No description.
  • activity (ARR): events
    • value (OBJ): No description.
    • type (STR): always 'spend'
    • amount (STR_AMOUNT): The total amount in QBT of the spent output
    • blockhash (STR_HEX, optional): The blockhash this spend appears in (omitted if unconfirmed)
    • height (NUM, optional): Height of the spend (omitted if unconfirmed)
    • spend_txid (STR_HEX): The txid of the spending transaction
    • spend_vin (NUM): The input index of the spend
    • prevout_txid (STR_HEX): The txid of the prevout
    • prevout_vout (NUM): The vout of the prevout
    • prevout_spk (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)
    • value (OBJ): No description.
    • type (STR): always 'receive'
    • amount (STR_AMOUNT): The total amount in QBT of the new output
    • blockhash (STR_HEX, optional): The block that this receive is in (omitted if unconfirmed)
    • height (NUM, optional): The height of the receive (omitted if unconfirmed)
    • txid (STR_HEX): The txid of the receiving transaction
    • vout (NUM): The vout of the receiving output
    • output_spk (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 getdescriptoractivity '["000000000000000000001347062c12fded7c528943c8ce133987e2e2f5a840ee"]' '["addr(qb1zqqqsyqcyq5rqwzqfpg9scrgwpugpzysnzs23v9ccrydpk8qarc0sjq57mw)"]'