Language

Choose a language

/build/rpc / model

createmodelreclaim

createmodelreclaim "model_hash" ( broadcast ) Create and optionally broadcast a reclaim transaction for a mature registered model deposit owned by this wallet. Arguments: 1. model_hash (string, required) Model hash 2. broadcast (boolean, optional, default=true) Broadcast transaction Result: { (json object) Reclaim transaction "txid" : "str", (string) Transaction id "hex" : "str", (string) Raw transaction hex "model_hash" : "str", (string) Model hash "reclaim_address" : "str", (string) Wallet destination receiving the reclaimed funds "reclaim_amount" : n, (numeric) Value sent back to the wallet after fee "deposit_unlock_height" : n, (numeric) Height where reclaim becomes allowed "current_height" : n, (numeric) Current chain height "broadcast" : true|false (boolean) Whether the transaction was broadcast } Examples: > bitcoin-cli createmodelreclaim "<model_hash>"

Signature

createmodelreclaim(model_hash: string, broadcast?: boolean) → any

Code samples

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

Parameters

NameTypeReq.Description
model_hashstringyesModel hash
broadcastbooleanBroadcast transaction

Result

Type:  any

{ (json object) Reclaim transaction "txid" : "str", (string) Transaction id "hex" : "str", (string) Raw transaction hex "model_hash" : "str", (string) Model hash "reclaim_address" : "str", (string) Wallet destination receiving the reclaimed funds "reclaim_amount" : n, (numeric) Value sent back to the wallet after fee "deposit_unlock_height" : n, (numeric) Height where reclaim becomes allowed "current_height" : n, (numeric) Current chain height "broadcast" : true|false (boolean) Whether the transaction was broadcast }

Source: services/core-node/bcore/src/wallet/rpc/transactions.cpp:1306

C++ symbol: createmodelreclaim