/build/rpc / contracts / spot
spot.collect_acceptance
- workflowspot-trade·step 6 of 9Workflow: spot-trade · step 6 of 9
spot.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 spot.import_acceptance. Arguments: 1. offer_id (string, required) Spot 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) "accept_id" : "hex", (string) Acceptance identifier "acceptance" : { (json object) Imported acceptance payload "version" : n, (numeric) Acceptance payload version "contract_type" : "str", (string) Contract type (spot) "offer_id" : "hex", (string) Offer identifier "id" : "hex", (string) Acceptance identifier "sinks_ack" : { (json object) Acknowledged sink set "bob_recv_spk" : "hex" (string) Hex-encoded script acknowledged by Bob for receiving assets }, "fs_policy_ack" : { (json object) Acknowledged Fair-Sign policy "require_adaptor" : true|false, (boolean) Require adaptor signatures (Fair-Sign) "reveal_lockstep" : true|false (boolean) Enforce lock-step final signature reveal }, "fs_tx_adaptor_point" : "hex", (string) Counterparty adaptor point (x-only, hex) "salt" : "hex", (string) Acceptance salt "commitment" : "hex" (string) Acceptance commitment }, "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 spot.collect_acceptance aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa "cosign:?r=abc123&t=websocket#c=alpha-bravo-charlie"
Signature
spot.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":"spot.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 | Spot 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) "accept_id" : "hex", (string) Acceptance identifier "acceptance" : { (json object) Imported acceptance payload "version" : n, (numeric) Acceptance payload version "contract_type" : "str", (string) Contract type (spot) "offer_id" : "hex", (string) Offer identifier "id" : "hex", (string) Acceptance identifier "sinks_ack" : { (json object) Acknowledged sink set "bob_recv_spk" : "hex" (string) Hex-encoded script acknowledged by Bob for receiving assets }, "fs_policy_ack" : { (json object) Acknowledged Fair-Sign policy "require_adaptor" : true|false, (boolean) Require adaptor signatures (Fair-Sign) "reveal_lockstep" : true|false (boolean) Enforce lock-step final signature reveal }, "fs_tx_adaptor_point" : "hex", (string) Counterparty adaptor point (x-only, hex) "salt" : "hex", (string) Acceptance salt "commitment" : "hex" (string) Acceptance commitment }, "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:8192
C++ symbol: spot_collect_acceptance