sidechain_getParams - Midnight
Example code for the sidechain_getParams JSON-RPC method. Complete guide on how to use sidechain_getParams JSON-RPC in GetBlock Web3 documentation.
This method returns the current sidechain configuration parameters, including genesis information, the connected Cardano network, and protocol parameters.
Parameters
None
Request Example
curl --location --request POST 'https://shared.eu-central-1.getblock.io/<ACCESS-TOKEN>/' \
--header 'Content-Type: application/json' \
--data-raw '{
"jsonrpc": "2.0",
"method": "sidechain_getParams",
"params": [],
"id": "getblock.io"
}'import axios from 'axios';
const data = JSON.stringify({
"jsonrpc": "2.0",
"method": "sidechain_getParams",
"params": [],
"id": "getblock.io"
});
const config = {
method: 'post',
url: 'https://shared.eu-central-1.getblock.io/<ACCESS-TOKEN>/',
headers: {
'Content-Type': 'application/json'
},
data: data
};
axios(config)
.then(response => console.log(JSON.stringify(response.data, null, 2)))
.catch(error => console.log(error));Response Example
{
"jsonrpc": "2.0",
"id": "getblock.io",
"result": {
"genesisCommitteeUtxo": "1234abcd\u2026#0",
"sidechainId": "testnet-02",
"genesisHash": "0xa3e8c2e3\u2026",
"thresholdNumerator": 2,
"thresholdDenominator": 3
}
}Response Parameters
result.genesisCommitteeUtxo
string
Cardano UTXO that anchors the genesis committee
result.sidechainId
string
Identifier of the sidechain
result.genesisHash
string
Genesis block hash of the sidechain
result.thresholdNumerator
integer
Numerator of the consensus threshold
result.thresholdDenominator
integer
Denominator of the consensus threshold
Use Cases
Reading current sidechain protocol parameters
Bootstrapping clients that need genesis-level information
Auditing parameter changes between releases
Error Handling
403
Forbidden
Missing or invalid <ACCESS-TOKEN>
-32602
Invalid params
Request parameters are missing or malformed
429
Too Many Requests
Rate limit exceeded for your plan
SDK Integration
Last updated
Was this helpful?