getdefaultctvhash
New since v30.2
Summary
Compute the BIP119-style default OP_CHECKTEMPLATEVERIFY hash for a serialized transaction input.
Description
Compute the BIP119-style default OP_CHECKTEMPLATEVERIFY hash for a serialized transaction input. This helper is protocol-neutral: it does not construct transactions, sign inputs, or interpret application-specific fields.
Change Buckets
- New since v30.2
Arguments
hexstring(STR_HEX, required): The serialized transaction hex stringinput_index(NUM, required): The zero-based input index to commit toverbose(BOOL): Return the committed field breakdown
Results
ctvhash(STR_HEX): The default CTV hash, hex-encoded in script byte ordervalue(OBJ): No description.ctvhash(STR_HEX): The default CTV hash, hex-encoded in script byte orderversion(NUM): The transaction versionlocktime(NUM): The transaction lock timescript_sigs_hash_included(BOOL): Whether the scriptSig hash is includedscript_sigs_hash(STR_HEX, optional): Single-SHA256 of all serialized scriptSigsinput_count(NUM): The number of inputs committed as uint32sequences_hash(STR_HEX): Single-SHA256 of all input nSequence valuesoutput_count(NUM): The number of outputs committed as uint32outputs_hash(STR_HEX): Single-SHA256 of all serialized outputsinput_index(NUM): The committed input index
Examples
qbit-cli getdefaultctvhash "hexstring" 0
qbit-cli getdefaultctvhash "hexstring" 0 true
curl --user myusername --data-binary '{"jsonrpc": "2.0", "id": "curltest", "method": "getdefaultctvhash", "params": ["hexstring", 0, true]}' -H 'content-type: application/json' http://127.0.0.1:8352/