adaptor.commit_final
adaptor.commit_final "psbt" Compute final signature commitments for lock-step reveal protocol (FINANCING_PRIMITIVES.md §4.5). This prevents 'free option' attacks by ensuring neither party can see the counterparty's final signature before revealing their own. Returns commitments that should be exchanged with the counterparty before calling adaptor.complete. Arguments: 1. psbt (string, required) Base64-encoded PSBT with adaptor partials Result: { (json object) "commitments" : [ (json array) Per-input commitments to final signatures { (json object) "index" : n, (numeric) Input index "commitment" : "hex" (string) SHA256(final_sig_64) commitment }, ... ] } Examples: > bitcoin-cli adaptor.commit_final "psbt_base64"
Signature
adaptor.commit_final(psbt: string) → any Code samples
curl --user "$RPC_USER:$RPC_PASS" \
--data-binary '{"jsonrpc":"1.0","id":"docs","method":"adaptor.commit_final","params":["\"<psbt>\""]}' \
-H 'content-type: text/plain;' \
http://127.0.0.1:8332/ Parameters
| Name | Type | Req. | Description |
|---|---|---|---|
| psbt | string | yes | Base64-encoded PSBT with adaptor partials |
Result
Type: any
{ (json object) "commitments" : [ (json array) Per-input commitments to final signatures { (json object) "index" : n, (numeric) Input index "commitment" : "hex" (string) SHA256(final_sig_64) commitment }, ... ] }
Source: services/core-node/bcore/src/wallet/rpc/adaptor.cpp:2977
C++ symbol: adaptor_commit_final