Language

Choose a language

/build/rpc / contracts / crosschain

crosschain.register_swap

crosschain.register_swap "swap_id" Register an existing cross-chain record with the swap manager. The record must already exist (via crosschain.create_record). The manager will begin monitoring this swap in its background loop. Arguments: 1. swap_id (string, required) Swap identifier Result: true|false (boolean) Whether the swap was registered Examples: > bitcoin-cli crosschain.register_swap "swap-uuid"

Signature

crosschain.register_swap(swap_id: string) → any

Code samples

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

Parameters

NameTypeReq.Description
swap_idstringyesSwap identifier

Result

Type:  any

true|false (boolean) Whether the swap was registered

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

C++ symbol: crosschain_register_swap