/build/rpc / contracts / forward
forward.collect_acceptance
- workflowforward-lifecycle·step 4 of 10Workflow: forward-lifecycle · step 4 of 10
forward.collect_acceptance "offer_id" "invite_link" ( timeout_ms ) Join a cosign session via invite link and collect acceptance data from counterparty. This is a convenience wrapper that combines cosign.join with cosign.recv and forward.import_acceptance. Arguments: 1. offer_id (string, required) Forward contract offer identifier 2. invite_link (string, required) Cosign invite link (cosign:?r=...) 3. timeout_ms (numeric, optional) Timeout for receiving acceptance (default: 30000ms) Result: { (json object) "offer_id" : "hex", (string) Forward contract offer identifier "state" : "str", (string) Contract state after import "cosign" : { (json object) Cosign session details "session_id" : "str", (string) Cosign session identifier "peer_sas" : "str", (string) Peer Short Authentication String "messages_received" : n (numeric) Number of messages received } } Examples: > bitcoin-cli forward.collect_acceptance aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa "cosign:?r=abc123&t=websocket#c=alpha-bravo-charlie"
Signature
forward.collect_acceptance(offer_id: string, invite_link: string, timeout_ms?: number) → any Code samples
curl --user "$RPC_USER:$RPC_PASS" \
--data-binary '{"jsonrpc":"1.0","id":"docs","method":"forward.collect_acceptance","params":["\"<offer_id>\"","\"<invite_link>\"",0]}' \
-H 'content-type: text/plain;' \
http://127.0.0.1:8332/ Parameters
| Name | Type | Req. | Description |
|---|---|---|---|
| offer_id | string | yes | Forward contract offer identifier |
| invite_link | string | yes | Cosign invite link (cosign:?r=...) |
| timeout_ms | number | — | Timeout for receiving acceptance (default: 30000ms) |
Result
Type: any
{ (json object) "offer_id" : "hex", (string) Forward contract offer identifier "state" : "str", (string) Contract state after import "cosign" : { (json object) Cosign session details "session_id" : "str", (string) Cosign session identifier "peer_sas" : "str", (string) Peer Short Authentication String "messages_received" : n (numeric) Number of messages received } }
Source: services/core-node/bcore/src/wallet/rpc/contracts.cpp:14312
C++ symbol: forward_collect_acceptance