createmodelcommit
- workflowrun-a-miner·step 2 of 6Workflow: run-a-miner · step 2 of 6
createmodelcommit "deposit_txid" deposit_vout ( tx_count [{"txid":"hex","vout":n},...] ) Create and broadcast model registration commit transaction(s) for a model that is still in the registration window. Arguments: 1. deposit_txid (string, required) Deposit transaction id 2. deposit_vout (numeric, required) Deposit output index 3. tx_count (numeric, optional, default=50) Number of commit transactions to create (min 1, max 100) 4. funding_utxos (json array, optional) Optional list of wallet UTXOs to prioritize for paying commit fees [ { (json object) "txid": "hex", (string, required) Transaction id "vout": n, (numeric, required) Output index }, ... ] Result: { (json object) Commit transaction details "transactions" : [ (json array) Commit transactions created by the wallet { (json object) "txid" : "hex", (string) Transaction id of the commit "hex" : "hex" (string) Raw transaction hex }, ... ], "txid" : "hex", (string) Transaction id of the first commit (deprecated; use transactions array) "count" : n, (numeric) Number of commit transactions created "verdict" : "str", (string) Commit verdict: success or failure "refund_amount" : n, (numeric) Refund amount immediately returned to the owner (zero until unlock) "model_hash" : "str", (string) Model hash associated with the deposit "failure_reason" : n (numeric, optional) Verification failure code (present only on failure) } Examples: > bitcoin-cli createmodelcommit "<txid>" 0
Signature
createmodelcommit(deposit_txid: string, deposit_vout: number, tx_count?: number, funding_utxos?: array) → any Code samples
curl --user "$RPC_USER:$RPC_PASS" \
--data-binary '{"jsonrpc":"1.0","id":"docs","method":"createmodelcommit","params":["\"<deposit_txid>\"",0,50,[]]}' \
-H 'content-type: text/plain;' \
http://127.0.0.1:8332/ Parameters
| Name | Type | Req. | Description |
|---|---|---|---|
| deposit_txid | string | yes | Deposit transaction id |
| deposit_vout | number | yes | Deposit output index |
| tx_count | number | — | Number of commit transactions to create (min 1, max 100) |
| funding_utxos | any[] | — | Optional list of wallet UTXOs to prioritize for paying commit fees [ { (json object) "txid": "hex", (string, required) Transaction id "vout": n, (numeric, required) Output index }, ... ] |
Result
Type: any
{ (json object) Commit transaction details "transactions" : [ (json array) Commit transactions created by the wallet { (json object) "txid" : "hex", (string) Transaction id of the commit "hex" : "hex" (string) Raw transaction hex }, ... ], "txid" : "hex", (string) Transaction id of the first commit (deprecated; use transactions array) "count" : n, (numeric) Number of commit transactions created "verdict" : "str", (string) Commit verdict: success or failure "refund_amount" : n, (numeric) Refund amount immediately returned to the owner (zero until unlock) "model_hash" : "str", (string) Model hash associated with the deposit "failure_reason" : n (numeric, optional) Verification failure code (present only on failure) }
Source: services/core-node/bcore/src/wallet/rpc/transactions.cpp:1444
C++ symbol: createmodelcommit