Language

Choose a language

/build/rpc / assets / registry

listassetutxos

listassetutxos ( ["asset_identifier",...] minconf maxconf ) List wallet UTXOs that carry AssetTag data. Arguments: 1. assets (json array, optional, default=[]) Filter to the provided assets (asset_id or ticker) [ "asset_identifier", (string) Asset ID (hex) or ticker ... ] 2. minconf (numeric, optional, default=1) Minimum confirmations 3. maxconf (numeric, optional, default=9999999) Maximum confirmations Result: [ (json array) { (json object) "txid" : "hex", (string) Transaction id "vout" : n, (numeric) Output index "address" : "str", (string, optional) Destination address "amount" : n, (numeric) BTC amount for the output "asset_id" : "hex", (string) Asset identifier "ticker" : "str", (string, optional) Ticker if known "decimals" : n, (numeric, optional) Display decimals if known "asset_units" : n, (numeric) Raw asset units "asset_decimal" : "str", (string, optional) Formatted amount using decimals "confirmations" : n, (numeric) Confirmation count "spendable" : true|false, (boolean) Whether the wallet can spend this output "solvable" : true|false, (boolean) Whether the wallet knows how to sign this output "safe" : true|false, (boolean) Whether the output is safe to spend "locked" : true|false (boolean) Whether the output is currently locked }, ... ] Examples: > bitcoin-cli listassetutxos > bitcoin-cli listassetutxos '["GOLD","SILVER"]' 1 9999999

Signature

listassetutxos(assets?: array, minconf?: number, maxconf?: number) → any

Code samples

curl --user "$RPC_USER:$RPC_PASS" \
  --data-binary '{"jsonrpc":"1.0","id":"docs","method":"listassetutxos","params":["[]",1,9999999]}' \
  -H 'content-type: text/plain;' \
  http://127.0.0.1:8332/

Parameters

NameTypeReq.Description
assetsany[]Filter to the provided assets (asset_id or ticker) [ "asset_identifier", (string) Asset ID (hex) or ticker ... ]
minconfnumberMinimum confirmations
maxconfnumberMaximum confirmations

Result

Type:  any

[ (json array) { (json object) "txid" : "hex", (string) Transaction id "vout" : n, (numeric) Output index "address" : "str", (string, optional) Destination address "amount" : n, (numeric) BTC amount for the output "asset_id" : "hex", (string) Asset identifier "ticker" : "str", (string, optional) Ticker if known "decimals" : n, (numeric, optional) Display decimals if known "asset_units" : n, (numeric) Raw asset units "asset_decimal" : "str", (string, optional) Formatted amount using decimals "confirmations" : n, (numeric) Confirmation count "spendable" : true|false, (boolean) Whether the wallet can spend this output "solvable" : true|false, (boolean) Whether the wallet knows how to sign this output "safe" : true|false, (boolean) Whether the output is safe to spend "locked" : true|false (boolean) Whether the output is currently locked }, ... ]

Source: services/core-node/bcore/src/wallet/rpc/assets.cpp:1251

C++ symbol: listassetutxos