/build/rpc / contracts / repo
repo.sign_default_sweep
- workflowrepo-lifecycle·step 10 of 10Workflow: repo-lifecycle · step 10 of 10
repo.sign_default_sweep "id" "psbt" Sign a repo default sweep PSBT using the wallet's vault registry. This RPC produces the tapscript witness for the lender's default path and returns both the signed PSBT and the final transaction hex for broadcast. Arguments: 1. id (string, required) Repo offer identifier 2. psbt (string, required) Partially Signed Bitcoin Transaction (base64) Result: { (json object) "psbt" : "str", (string) Signed PSBT (base64) including the final witness "hex" : "hex", (string) Fully signed transaction ready for broadcast "txid" : "hex", (string) Transaction identifier "vault_input_index" : n, (numeric) Index of the covenant input that was signed "complete" : true|false (boolean) Always true once the vault path is signed } Examples: > bitcoin-cli repo.sign_default_sweep "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" "cHNidP8BA..."
Signature
repo.sign_default_sweep(id: string, psbt: string) → any Code samples
curl --user "$RPC_USER:$RPC_PASS" \
--data-binary '{"jsonrpc":"1.0","id":"docs","method":"repo.sign_default_sweep","params":["\"<id>\"","\"<psbt>\""]}' \
-H 'content-type: text/plain;' \
http://127.0.0.1:8332/ Parameters
| Name | Type | Req. | Description |
|---|---|---|---|
| id | string | yes | Repo offer identifier |
| psbt | string | yes | Partially Signed Bitcoin Transaction (base64) |
Result
Type: any
{ (json object) "psbt" : "str", (string) Signed PSBT (base64) including the final witness "hex" : "hex", (string) Fully signed transaction ready for broadcast "txid" : "hex", (string) Transaction identifier "vault_input_index" : n, (numeric) Index of the covenant input that was signed "complete" : true|false (boolean) Always true once the vault path is signed }
Source: services/core-node/bcore/src/wallet/rpc/contracts.cpp:6773
C++ symbol: repo_sign_default_sweep