Language

Choose a language

/build/rpc / contracts / crosschain

crosschain.get

crosschain.get "swap_id" Get a specific cross-chain execution record. Arguments: 1. swap_id (string, required) Swap identifier Result: { (json object) "swap_id" : "str", (string) Swap identifier "offer_id" : "str", (string) Bulletin board offer ID "state" : n, (numeric) Current state (numeric) "payload_json" : "str", (string) Full agreed payload "local_role" : "str", (string) Our role "counterparty_pubkey" : "str", (string) Counterparty Nostr pubkey "external_chain" : "str" (string) External chain } Examples: > bitcoin-cli crosschain.get "swap-uuid-1234"

Signature

crosschain.get(swap_id: string) → any

Code samples

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

Parameters

NameTypeReq.Description
swap_idstringyesSwap identifier

Result

Type:  any

{ (json object) "swap_id" : "str", (string) Swap identifier "offer_id" : "str", (string) Bulletin board offer ID "state" : n, (numeric) Current state (numeric) "payload_json" : "str", (string) Full agreed payload "local_role" : "str", (string) Our role "counterparty_pubkey" : "str", (string) Counterparty Nostr pubkey "external_chain" : "str" (string) External chain }

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

C++ symbol: crosschain_get