/build/rpc / cosign / cross_chain
cosign.eth_init
- workflowcross-chain-swap·step 3 of 7Workflow: cross-chain-swap · step 3 of 7
cosign.eth_init "rpc_url" Initialize the ETH JSON-RPC client in the cosign bridge. Arguments: 1. rpc_url (string, required) Ethereum JSON-RPC endpoint URL Result: { (json object) "success" : true|false, (boolean) Whether initialization succeeded "rpc_url" : "str" (string) Configured endpoint } Examples: > bitcoin-cli cosign.eth_init "http://localhost:8545"
Signature
cosign.eth_init(rpc_url: string) → any Code samples
curl --user "$RPC_USER:$RPC_PASS" \
--data-binary '{"jsonrpc":"1.0","id":"docs","method":"cosign.eth_init","params":["\"<rpc_url>\""]}' \
-H 'content-type: text/plain;' \
http://127.0.0.1:8332/ Parameters
| Name | Type | Req. | Description |
|---|---|---|---|
| rpc_url | string | yes | Ethereum JSON-RPC endpoint URL |
Result
Type: any
{ (json object) "success" : true|false, (boolean) Whether initialization succeeded "rpc_url" : "str" (string) Configured endpoint }
Source: services/core-node/bcore/src/rpc/cosign.cpp:3352
C++ symbol: cosign_eth_init