Chain Connector plugin: Endpoint reference

This page summarizes all API endpoints specific to the Chain Connector Plugin.

All the aforementioned endpoints are invoked using the chainConnector prefix.

Endpoints can be invoked as explained in the Connecting via endpoints guide.

chainConnector_getSentCCUs

Whenever a CCU is successfully sent, it’s saved in the plugin store database. This endpoint returns all such sent CCUs.

  • Specification

  • Node CLI

  • cURL

No Parameters.

lisk-core endpoint:invoke chainConnector_getSentCCUs --pretty
curl --location 'http://127.0.0.1:7887/rpc' \
--header 'Content-Type: application/json' \
--data '{
    "jsonrpc": "2.0",
    "id": "1",
    "method": "chainConnector_getSentCCUs",
    "params": {}
}'
Response
Example output
[
    {
        "module": "interoperability",
        "command": "submitMainchainCrossChainUpdate",
        "params": "0a040400000212d4010a20fcf93d3013f1476f04cdb30bc995a277853396abf5ad339b6ebc4bce7db8c7a610892818f0d981ab062220a9e19727817d666211e3aad088c2469e9505aec58efe5627569e579a1eaa015b2a20f626be7093592d81cde5bbae150a67db52619e0fd193ee61aebe847c45dd557e3201013a60aa8903ff91f58597c788c38a0c71582dd61678ae509afe5ea46e982b4108ebe142f81b8325f0c68ebc1b693d8c22ea4b0a6ef0429d440477dbce7759ffaa431a93d28a3c83a627c9a2ac4dd314cabcb89c1b4323a86a3b1ae56fb064edc090331a021a0020012a041a020a00",
        "nonce": "298",
        "fee": "500000000",
        "senderPublicKey": "46b160b7a24b8813318eb753ef5be4c0a31fe1a3a2789d9253df1617ed4ae829",
        "signatures": [
            "82afea9eac32b35713770947fdf9ecbf8eefa6eed98acda521a9bc988b0142f323b775ddbce8bc4cbe2457b7508468cc12064abda78242b5e8acd63dde9f0803"
        ],
        "id": "6b76e94c8b63027e776e50221436f6eade746481859c29af20c43a62f90d7659"
    },
    {
        "module": "interoperability",
        "command": "submitMainchainCrossChainUpdate",
        "params": "0a040400000212d4010a20512f2bfbff698bee226d7404e01ecbe1fd45c0a69892266d86c6a73767a57f7a10882818ebd981ab06222087edc6f76d1e4848d459243abcd0f84f730c66b838c0c0ae9a18d22fcd663ebd2a20f626be7093592d81cde5bbae150a67db52619e0fd193ee61aebe847c45dd557e3201013a60817425d7bc8aca30354ac615c4a4d30b002cbd56ef2c4968f7d69cca08f7f33b0d3e08e06747fe1b3b4786c9f7fe224700028799765f71f20dfd3eea4517c6a8902d5cca08bca34393d4f652d2364e617e72e2efd2e0e2c3da4ac4d61dcb1cc51a021a0020012a041a020a00",
        "nonce": "297",
        "fee": "500000000",
        "senderPublicKey": "46b160b7a24b8813318eb753ef5be4c0a31fe1a3a2789d9253df1617ed4ae829",
        "signatures": [
            "fb55f584caa0da366d347846612f962363aa5156e34950f1298e275c22e6e5c9f5171c110dbe365ef30f755b388619abfe57dc1d6ef3555cc27ce8a1f8d75a07"
        ],
        "id": "c3b3396c08ee64eb9c38fee07b0352600c31c3b5f33050d0f76840da7f1836f3"
    }
]

chainConnector_getAggregateCommits

Returns aggregate commits from the plugin’s database.

  • Specification

  • Node CLI

  • cURL

No Parameters.

lisk-core endpoint:invoke chainConnector_getAggregateCommits --pretty
curl --location 'http://127.0.0.1:7887/rpc' \
--header 'Content-Type: application/json' \
--data '{
    "jsonrpc": "2.0",
    "id": "1",
    "method": "chainConnector_getAggregateCommits",
    "params": {}
}'
Response
Example output
[
    {
        "height": 2271,
        "aggregationBits": "01",
        "certificateSignature": "aa472620459ba955152f221a6f639a7e677515c71e390cf1a17a71fb74ebc199301656e27afed8042f6f313536789143042c1c1c7dcbf955dc161e69175c8bc4a564bc84873df1a909397ec82c3c4d1df287036783bbe41cd8e4f44ca8084557"
    },
    {
        "height": 2272,
        "aggregationBits": "01",
        "certificateSignature": "8260018b44d2627bee54fc73fbf8e9d904e94dad27a7580154c395a3690a1f0e82f796df6f65d510c8dcd40e2aae0f0e0cd83558c8940f2bb2cd8a075b2d5ea56cdeb8d3c898c1c96c5904ab579be223f36d8587ef669e4c04be7a0661d7cee4"
    }
]

chainConnector_getBlockHeaders

Returns block headers.

  • Specification

  • Node CLI

  • cURL

No Parameters.

lisk-core endpoint:invoke chainConnector_getBlockHeaders --pretty
curl --location 'http://127.0.0.1:7887/rpc' \
--header 'Content-Type: application/json' \
--data '{
    "jsonrpc": "2.0",
    "id": "1",
    "method": "chainConnector_getBlockHeaders",
    "params": {}
}'
Response
Example output
[
    {
        "version": 2,
        "timestamp": 1700824000,
        "height": 6007,
        "previousBlockID": "d7486967199ec0cc5459a5874aaa3b5d59ea814aa8500130d4e4292ec96d60e4",
        "stateRoot": "53015f6e65cd1d45d997833b2e0ec7b6e42e5e73fb24de0baad63e31afd36819",
        "assetRoot": "d6d10f6f9dcfc64442ef2fe9563ddf64d8f66b1584e0ace64c7e30b397dfc0d6",
        "eventRoot": "730dd668ec8873f705385fc4fbab6dc851dfa24bd5c4198ec391be66d491faf2",
        "transactionRoot": "6a2782e083947b5463e66da5e1e5e71c32551ba90ce9907b7d9333ed651274d9",
        "validatorsHash": "f626be7093592d81cde5bbae150a67db52619e0fd193ee61aebe847c45dd557e",
        "aggregateCommit": {
            "height": 6005,
            "aggregationBits": "01",
            "certificateSignature": "a8cd460fe6d2aa207c24d1edf09259336adaf2cd877debe9e536d5a9f4ab8ea1986991535395027415a207ded477bef410b50bd515149525926cfdd182d3e70a4cd57435d7a1616a0cfb6bd11fcf2f34e95ec087e6476b022bf8b78a86f99326"
        },
        "generatorAddress": "lskz98oaohxaw6jcfvtgdxm9sprcqzstddoqusrns",
        "maxHeightPrevoted": 6006,
        "maxHeightGenerated": 6006,
        "impliesMaxPrevotes": true,
        "signature": "f07c490d146b9786f33fd7b6e5ac424c4f80a427dbdeea2c58eb12d31b427125bd608fcbe98fdd225c56193936685022ddeb5962ea888674df6787a823f26100",
        "id": "bc426285fca5805e4f66b6e517440e8f8ef5d88a3d4c6540e7c45dab2c1f3b85"
    },
    {
        "version": 2,
        "timestamp": 1700824005,
        "height": 6008,
        "previousBlockID": "bc426285fca5805e4f66b6e517440e8f8ef5d88a3d4c6540e7c45dab2c1f3b85",
        "stateRoot": "1356755302c2dcb5413d5c07144de913c5367d2240c16bc38b6a7361a9e86b8e",
        "assetRoot": "fbe6235ae8f4d236aa5e6a1c36e0b7daa6acef17a55207952288a6c8b055cdd5",
        "eventRoot": "d8c3cf4514966bd78ad44ce3e1540e16baacd4e7080d8eaa5ce800b5b41d50c9",
        "transactionRoot": "1647abd640a2a6f0ecb31b680efe48eef7e111dca034558c4093787c91662007",
        "validatorsHash": "f626be7093592d81cde5bbae150a67db52619e0fd193ee61aebe847c45dd557e",
        "aggregateCommit": {
            "height": 6006,
            "aggregationBits": "01",
            "certificateSignature": "98e274b82689df6afda0a776b1600d2b4fc298f6d41d5cfbef0079aac358debe8976effe4e1a2af5046e0b9d7e2697cd12393345d40165983e4832b2f38a995894130436bc9bccffc400fd34b2f531631a06397026a46ec0ac7a98c7abede45b"
        },
        "generatorAddress": "lskz98oaohxaw6jcfvtgdxm9sprcqzstddoqusrns",
        "maxHeightPrevoted": 6007,
        "maxHeightGenerated": 6007,
        "impliesMaxPrevotes": true,
        "signature": "3a0c2f827f0639a20edbf1fdd01926abf10354482a73d900e81a9e19e6ab45211985d75c316119e9ad64c614ecfb18026c7af98608f1349fb3eca54913b15604",
        "id": "992fe2194387c3dfd6aede429f9ab5fd7b41d5b83fc8e68459978ccfe27f2135"
    }
]

chainConnector_getCrossChainMessages

Returns the cross-chain messages sent across chains. This includes CCMs parsed from CrossChainMessageSentSuccess and CrossChainMessageProcessed events.

  • Specification

  • Node CLI

  • cURL

No Parameters.

lisk-core endpoint:invoke chainConnector_getCrossChainMessages --pretty
curl --location 'http://127.0.0.1:7887/rpc' \
--header 'Content-Type: application/json' \
--data '{
    "jsonrpc": "2.0",
    "id": "1",
    "method": "chainConnector_getCrossChainMessages",
    "params": {}
}'
Response
Example output
[
    {
        "ccms": [
            {
                "module": "interoperability",
                "crossChainCommand": "registration",
                "nonce": "0",
                "fee": "0",
                "sendingChainID": "04000002",
                "receivingChainID": "04000000",
                "params": "0a0e6c69736b5f6d61696e636861696e1204040000001a08040000000000000020e807",
                "status": 0
            }
        ],
        "height": 4651,
        "inclusionProof": {
            "bitmap": "0100000001",
            "siblingHashes": [
                "ec73fe4b59dd71c1a815b2c12c52def1faf556230bad2a50d3d6c5bf83ebdb47",
                "3bac24ed63c16d913993d60afc72e32d55125abcc90632c49ac0cb6048d62730"
            ]
        },
        "outboxSize": 1
    },
    {
        "ccms": [],
        "height": 4652,
        "inclusionProof": {
            "bitmap": "0100000001",
            "siblingHashes": [
                "2a9d95694226444a55a710f5e6efcf4601f03d407cf0757378df967c6dfd5a63",
                "6f5655565886268010c636347e9183bf70e6d48c7468e0d46694342881710a5e"
            ]
        },
        "outboxSize": 1
    }
]

chainConnector_getLastSentCCM

Returns the last sent cross-chain message, if any, otherwise, it throws an error: "No CCM was sent so far".

  • Specification

  • Node CLI

  • cURL

No Parameters.

lisk-core endpoint:invoke chainConnector_getLastSentCCM --pretty
curl --location 'http://127.0.0.1:7887/rpc' \
--header 'Content-Type: application/json' \
--data '{
    "jsonrpc": "2.0",
    "id": "1",
    "method": "chainConnector_getLastSentCCM",
    "params": {}
}'
Response
Example output
{
    "module": "interoperability",
    "crossChainCommand": "registration",
    "nonce": "0",
    "fee": "0",
    "sendingChainID": "04000002",
    "receivingChainID": "04000000",
    "params": "0a0e6c69736b5f6d61696e636861696e1204040000001a08040000000000000020e807",
    "status": 0,
    "height": 4651
}

chainConnector_getValidatorsInfoFromPreimage

Returns validator info from validatorsHashPreimage key-value store.

  • Specification

  • Node CLI

  • cURL

No Parameters.

lisk-core endpoint:invoke chainConnector_getValidatorsInfoFromPreimage --pretty
curl --location 'http://127.0.0.1:7887/rpc' \
--header 'Content-Type: application/json' \
--data '{
    "jsonrpc": "2.0",
    "id": "1",
    "method": "chainConnector_getValidatorsInfoFromPreimage",
    "params": {}
}'
Response
Example output
[
    {
        "certificateThreshold": "1",
        "validators": [
            {
                "address": "",
                "bftWeight": "1",
                "blsKey": "811e8df1a063f94ad7746350f50956f89397a60c070b80d8c12337c0fc4f40e34635ad55c552324911b0b14c9b07c725"
            }
        ],
        "validatorsHash": "f626be7093592d81cde5bbae150a67db52619e0fd193ee61aebe847c45dd557e"
    }
]

chainConnector_authorize

Allows authorization of the Chain Connector plugin on a node.

  • Specification

  • Node CLI

  • cURL

Table 1. Parameters
Name Type Description Sample

password

string

Password used to create the encryptedPrivateKey mentioned in the Chain Connector plugin’s configuration.

lisk

enable

boolean

A Boolean flag that indicates whether or not to authorize the Chain Connector plugin.

true

lisk-core endpoint:invoke chainConnector_authorize '{"password": "lisk", "enable":true}' --pretty
curl --location 'http://127.0.0.1:7887/rpc' \
--header 'Content-Type: application/json' \
--data '{
    "jsonrpc": "2.0",
    "id": "1",
    "method": "chainConnector_authorize",
    "params": {
        "password": "lisk",
        "enable": true
    }
}'
Response
Example output
{
    "result": "Successfully enabled the chain connector plugin."
}