Mainchain Interoperability module: Endpoint reference
This page summarizes all API endpoints specific to the Mainchain Interoperability module.
The Mainchain Interoperability module includes the base Base Interoperability endpoints, in addition to the endpoints documented on this page.
Endpoints can be invoked as explained in the Connecting via endpoints guide. |
interoperability_getRegistrationFee
Returns the required command fee for sending a Sidechain Registration transaction.
No parameters.
klayr-core endpoint:invoke interoperability_getRegistrationFee
curl --location --request POST 'http://localhost:7887/rpc' \
--header 'Content-Type: application/json' \
--data-raw '{
"jsonrpc": "2.0",
"id": "1",
"method": "interoperability_getRegistrationFee",
"params": {}
}'
Response
Example output
{"fee":"1000000000"}
interoperability_getMinimumMessageFee
Returns the minimum fee per byte for CCMs.
No parameters.
klayr-core endpoint:invoke interoperability_getMinimumMessageFee
curl --location --request POST 'http://localhost:7887/rpc' \
--header 'Content-Type: application/json' \
--data-raw '{
"jsonrpc": "2.0",
"id": "1",
"method": "interoperability_getMinimumMessageFee",
"params": {}
}'
Response
Example output
{"fee":"1000"}
interoperability_isChainIDAvailable
Checks if a given chainID for a sidechain is still available to register on the mainchain.
Name | Type | Description | Sample |
---|---|---|---|
|
string |
The chain ID of a sidechain. |
00000001 |
klayr-core endpoint:invoke interoperability_isChainIDAvailable '{ "chainID": "00000001" }'
curl --location --request POST 'http://localhost:7887/rpc' \
--header 'Content-Type: application/json' \
--data-raw '{
"jsonrpc": "2.0",
"id": "1",
"method": "interoperability_isChainIDAvailable",
"params": { "chainID": "00000001" }
}'
Response
Example output
{"result":true}
interoperability_isChainNameAvailable
Checks if a given chain name for a sidechain is still available to register on the mainchain.
Name | Type | Description | Sample |
---|---|---|---|
|
string |
Name of the sidechain. |
sidechain_1 |
klayr-core endpoint:invoke interoperability_isChainNameAvailable '{ "name": "sidechain_1" }'
curl --location --request POST 'http://localhost:7887/rpc' \
--header 'Content-Type: application/json' \
--data-raw '{
"jsonrpc": "2.0",
"id": "1",
"method": "interoperability_isChainNameAvailable",
"params": { "name": "sidechain_1" }
}'
Response
Example output
{"result":true}