Language

Choose a language

/build/rpc / model

createchallengedeposit

createchallengedeposit "block_hash" Create a challenge deposit transaction accusing a block. Arguments: 1. block_hash (string, required) Hash of the block being challenged Result: { (json object) Challenge transaction details "txid" : "hex", (string) Transaction id "hex" : "hex", (string) Raw transaction hex "block_hash" : "hex", (string) Hash of the challenged block "deposit_vout" : n, (numeric) Output index holding the challenge deposit "deposit_amount" : n (numeric) Amount committed as the challenge deposit } Examples: > bitcoin-cli createchallengedeposit "<block_hash>"

Signature

createchallengedeposit(block_hash: string) → any

Code samples

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

Parameters

NameTypeReq.Description
block_hashstringyesHash of the block being challenged

Result

Type:  any

{ (json object) Challenge transaction details "txid" : "hex", (string) Transaction id "hex" : "hex", (string) Raw transaction hex "block_hash" : "hex", (string) Hash of the challenged block "deposit_vout" : n, (numeric) Output index holding the challenge deposit "deposit_amount" : n (numeric) Amount committed as the challenge deposit }

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

C++ symbol: createchallengedeposit