Language

Choose a language

/build/rpc / btc

listlockunspent

listlockunspent Returns list of temporarily unspendable outputs. See the lockunspent call to lock and unlock transactions for spending. Result: [ (json array) { (json object) "txid" : "hex", (string) The transaction id locked "vout" : n (numeric) The vout value }, ... ] Examples: List the unspent transactions > bitcoin-cli listunspent Lock an unspent transaction > bitcoin-cli lockunspent false "[{\"txid\":\"a08e6907dbbd3d809776dbfc5d82e371b764ed838b5655e72f463568df1aadf0\",\"vout\":1}]" List the locked transactions > bitcoin-cli listlockunspent Unlock the transaction again > bitcoin-cli lockunspent true "[{\"txid\":\"a08e6907dbbd3d809776dbfc5d82e371b764ed838b5655e72f463568df1aadf0\",\"vout\":1}]" As a JSON-RPC call > curl --user myusername --data-binary '{"jsonrpc": "2.0", "id": "curltest", "method": "listlockunspent", "params": []}' -H 'content-type: application/json' http://127.0.0.1:8332/

Signature

listlockunspent() → any

Code samples

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

Parameters

No parameters.

Result

Type:  any

[ (json array) { (json object) "txid" : "hex", (string) The transaction id locked "vout" : n (numeric) The vout value }, ... ]

Source: services/core-node/bcore/src/wallet/rpc/coins.cpp:373

C++ symbol: listlockunspent