adaptor.complete
adaptor.complete "psbt" ( [{"index":n,"secret":"hex"},...] [{"index":n,"commitment":"hex"},...] ) Finalize adaptor signatures using revealed adaptor secrets. SECURITY: Enforces lock-step reveal protocol by requiring peer_commitments to prevent free option attacks (FINANCING_PRIMITIVES.md §4.5). Pass empty array [] for peer_commitments ONLY in automated Phase 4 cosign.adaptor_roundtrip flows. Arguments: 1. psbt (string, required) Base64-encoded PSBT 2. secrets (json array, optional) Adaptor secrets keyed by input index [ { (json object, required) "index": n, (numeric, required) Input index "secret": "hex", (string, required) Adaptor secret (32-byte hex) }, ... ] 3. peer_commitments (json array, optional) Commitments from counterparty for lock-step reveal verification [ { (json object, required) "index": n, (numeric, required) Input index "commitment": "hex", (string, required) SHA256(final_sig_64) commitment from peer }, ... ] Result: { (json object) "psbt" : "str", (string) Updated PSBT "complete" : true|false, (boolean) Whether all inputs now have final taproot signatures "hex" : "hex", (string, optional) Final transaction hex (present when complete=true and extraction succeeded) "txid" : "hex" (string, optional) Transaction id (present when hex is returned) } Examples: > bitcoin-cli adaptor.prepare "psbt_base64"
Signature
adaptor.complete(psbt: string, secrets?: array, peer_commitments?: array) → any Code samples
curl --user "$RPC_USER:$RPC_PASS" \
--data-binary '{"jsonrpc":"1.0","id":"docs","method":"adaptor.complete","params":["\"<psbt>\"",[],[]]}' \
-H 'content-type: text/plain;' \
http://127.0.0.1:8332/ Parameters
| Name | Type | Req. | Description |
|---|---|---|---|
| psbt | string | yes | Base64-encoded PSBT |
| secrets | any[] | — | Adaptor secrets keyed by input index [ { (json object, required) "index": n, (numeric, required) Input index "secret": "hex", (string, required) Adaptor secret (32-byte hex) }, ... ] |
| peer_commitments | any[] | — | Commitments from counterparty for lock-step reveal verification [ { (json object, required) "index": n, (numeric, required) Input index "commitment": "hex", (string, required) SHA256(final_sig_64) commitment from peer }, ... ] |
Result
Type: any
{ (json object) "psbt" : "str", (string) Updated PSBT "complete" : true|false, (boolean) Whether all inputs now have final taproot signatures "hex" : "hex", (string, optional) Final transaction hex (present when complete=true and extraction succeeded) "txid" : "hex" (string, optional) Transaction id (present when hex is returned) }
Source: services/core-node/bcore/src/wallet/rpc/adaptor.cpp:3090
C++ symbol: adaptor_complete