Language

Choose a language

/build/rpc / contracts / crosschain

crosschain.start_manager

crosschain.start_manager "eth_rpc_url" ( "eth_rpc_url_secondary" "oracle_pubkey" "eth_derivation_seed" ) Start the cross-chain swap manager with an ETH HTLC backend. v1 uses trusted-RPC mode: the wallet verifies HTLC state directly against the configured ETH provider(s). If a secondary RPC URL is provided, critical state transitions require both providers to agree on on-chain facts before advancing. Oracle mode (phase 3) is available by providing an oracle_pubkey, but is not required for v1 operation. Arguments: 1. eth_rpc_url (string, required) Primary Ethereum JSON-RPC endpoint URL (e.g. Infura, Alchemy, local node) 2. eth_rpc_url_secondary (string, optional) Secondary ETH RPC endpoint for dual-provider verification 3. oracle_pubkey (string, optional) Oracle x-only pubkey (32-byte hex) — only needed for oracle mode (phase 3) 4. eth_derivation_seed (string, optional) 32-byte hex seed for derived:auto ETH key derivation. If omitted, derived:auto signer refs will not work (raw hex keys only). Result: { (json object) "success" : true|false, (boolean) Whether the manager started "active_swaps" : n, (numeric) Number of active swaps loaded "mode" : "str", (string) Verification mode: trusted_rpc or oracle "dual_provider" : true|false (boolean) Whether dual-provider mode is active } Examples: > bitcoin-cli crosschain.start_manager "https://mainnet.infura.io/v3/KEY" > bitcoin-cli crosschain.start_manager "https://mainnet.infura.io/v3/KEY" "https://eth-mainnet.g.alchemy.com/v2/KEY"

Signature

crosschain.start_manager(eth_rpc_url: string, eth_rpc_url_secondary?: string, oracle_pubkey?: string, eth_derivation_seed?: string) → any

Code samples

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

Parameters

NameTypeReq.Description
eth_rpc_urlstringyesPrimary Ethereum JSON-RPC endpoint URL (e.g. Infura, Alchemy, local node)
eth_rpc_url_secondarystringSecondary ETH RPC endpoint for dual-provider verification
oracle_pubkeystringOracle x-only pubkey (32-byte hex) — only needed for oracle mode (phase 3)
eth_derivation_seedstring32-byte hex seed for derived:auto ETH key derivation. If omitted, derived:auto signer refs will not work (raw hex keys only).

Result

Type:  any

{ (json object) "success" : true|false, (boolean) Whether the manager started "active_swaps" : n, (numeric) Number of active swaps loaded "mode" : "str", (string) Verification mode: trusted_rpc or oracle "dual_provider" : true|false (boolean) Whether dual-provider mode is active }

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

C++ symbol: crosschain_start_manager