Language

Choose a language

/build/rpc / btc

listdescriptors

listdescriptors ( private ) List descriptors imported into a descriptor-enabled wallet. Arguments: 1. private (boolean, optional, default=false) Show private descriptors. Result: { (json object) "wallet_name" : "str", (string) Name of wallet this operation was performed on "descriptors" : [ (json array) Array of descriptor objects (sorted by descriptor string representation) { (json object) "desc" : "str", (string) Descriptor string representation "timestamp" : n, (numeric) The creation time of the descriptor "active" : true|false, (boolean) Whether this descriptor is currently used to generate new addresses "internal" : true|false, (boolean, optional) True if this descriptor is used to generate change addresses. False if this descriptor is used to generate receiving addresses; defined only for active descriptors "range" : [ (json array, optional) Defined only for ranged descriptors n, (numeric) Range start inclusive n (numeric) Range end inclusive ], "next" : n, (numeric, optional) Same as next_index field. Kept for compatibility reason. "next_index" : n (numeric, optional) The next index to generate addresses from; defined only for ranged descriptors }, ... ] } Examples: > bitcoin-cli listdescriptors > curl --user myusername --data-binary '{"jsonrpc": "2.0", "id": "curltest", "method": "listdescriptors", "params": []}' -H 'content-type: application/json' http://127.0.0.1:8332/ > bitcoin-cli listdescriptors true > curl --user myusername --data-binary '{"jsonrpc": "2.0", "id": "curltest", "method": "listdescriptors", "params": [true]}' -H 'content-type: application/json' http://127.0.0.1:8332/

Signature

listdescriptors(private?: boolean) → any

Code samples

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

Parameters

NameTypeReq.Description
privatebooleanShow private descriptors.

Result

Type:  any

{ (json object) "wallet_name" : "str", (string) Name of wallet this operation was performed on "descriptors" : [ (json array) Array of descriptor objects (sorted by descriptor string representation) { (json object) "desc" : "str", (string) Descriptor string representation "timestamp" : n, (numeric) The creation time of the descriptor "active" : true|false, (boolean) Whether this descriptor is currently used to generate new addresses "internal" : true|false, (boolean, optional) True if this descriptor is used to generate change addresses. False if this descriptor is used to generate receiving addresses; defined only for active descriptors "range" : [ (json array, optional) Defined only for ranged descriptors n, (numeric) Range start inclusive n (numeric) Range end inclusive ], "next" : n, (numeric, optional) Same as next_index field. Kept for compatibility reason. "next_index" : n (numeric, optional) The next index to generate addresses from; defined only for ranged descriptors }, ... ] }

Source: services/core-node/bcore/src/wallet/rpc/backup.cpp:462

C++ symbol: listdescriptors