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://go.getblock.io/<ACCESS-TOKEN>/' \
--header 'Content-Type: application/json' \
--data-raw '{
    "jsonrpc": "2.0",
    "method": "sidechain_getParams",
    "params": [],
    "id": "getblock.io"
}'

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

Field
Type
Description

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

Status Code
Error Message
Cause

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?