Language

Choose a language

/build/rpc / contracts / forward

forward.coop_contrib

forward.coop_contrib "id" "psbt" Contribute this wallet's deliver funding inputs to a cooperative close PSBT. Use after forward.build_coop_close(split_funding=true). Adds ONLY this wallet's inputs and change for its deliver leg, without introducing unilateral builder inputs. Arguments: 1. id (string, required) Forward contract identifier 2. psbt (string, required) Base64-encoded cooperative close PSBT (base) Result: { (json object) "psbt" : "str", (string) Updated Base64-encoded PSBT with local funding inputs and change appended "inputs_added" : n, (numeric) Number of inputs added by this wallet "change_added" : n (numeric) Number of change outputs appended by this wallet } Examples: > bitcoin-cli forward.coop_contrib "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" "cHNidP8BA..."

Signature

forward.coop_contrib(id: string, psbt: string) → any

Code samples

curl --user "$RPC_USER:$RPC_PASS" \
  --data-binary '{"jsonrpc":"1.0","id":"docs","method":"forward.coop_contrib","params":["\"<id>\"","\"<psbt>\""]}' \
  -H 'content-type: text/plain;' \
  http://127.0.0.1:8332/

Parameters

NameTypeReq.Description
idstringyesForward contract identifier
psbtstringyesBase64-encoded cooperative close PSBT (base)

Result

Type:  any

{ (json object) "psbt" : "str", (string) Updated Base64-encoded PSBT with local funding inputs and change appended "inputs_added" : n, (numeric) Number of inputs added by this wallet "change_added" : n (numeric) Number of change outputs appended by this wallet }

Source: services/core-node/bcore/src/wallet/rpc/contracts.cpp:17225

C++ symbol: forward_coop_contrib