How To Access Karura via Substrate Sidecar API

Learn how to access Karura via Substrate Sidecar API.

Step 1: To access the available Substrate Sidecar methods, use the native access endpoint with /parachain at the end:

  • Network: Karura Mainnet
  • Request Type: GET / POST
https://svc.blockdaemon.com/karura/mainnet/native/parachain

Step 3: Add a Substrate Sidecar method at the end of the query:

https://svc.blockdaemon.com/karura/mainnet/native/parachain/YOUR_METHOD

Step 4: For POST requests, specify the data required by the method in the request body.

Example Request for Substrate Sidecar API

Here is a cURL example for using GET /blocks/head/header to get the header of the most recently finalized block in Karura Mainnet:

curl -X GET \
https://svc.blockdaemon.com/karura/mainnet/native/parachain/blocks/head/header \
-H 'Authorization: Bearer YOUR_API_KEY'

The following is a typical response you will get:

{
    "parentHash": "0x46a11082a6696153f35414e2f62d2258d4509d6ab6ca7a03728dcc707efa053e",
    "number": "2461599",
    "stateRoot": "0xd14cbc39637c61537f54f759ef2b5450250cf171901858ae23a2cb1f9ada7d1c",
    "extrinsicsRoot": "0xca110fe695be5a5b2878508e2faadf82bbcdf117f06e5432334d262bdfb5091b",
    "digest": {
        "logs": [
            {
                "preRuntime": [
                    "0x61757261",
                    "0x659d3f0800000000"
                ]
            },
            {
                "seal": [
                    "0x61757261",
                    "0x3e30c6cc4394f19535ff198997e886f745e813ea9ba025403d27797d39a0356e8af719a793e58698441abbc1214df4ed81fb7194d01846af2aaf430c25513083"
                ]
            }
        ]
    }
}