Unichain

Step 1: To access Unichain, use the following native access endpoints:

  • Network: Unichain Mainnet
  • Request Type: POST
https://svc.blockdaemon.com/unichain/mainnet/native
  • Network: Unichain Testnet
  • Request Type: POST
https://svc.blockdaemon.com/unichain/testnet/native

Step 2: Authenticate your request using your API key. You can include the API key using either of the following headers:

Authorization: Bearer YOUR_API_KEY
X-API-Key: YOUR_API_KEY

Step 3: Specify a Unichain method in the request body:

Learn more about Unichain RPC Methods here.

{
    "jsonrpc": "2.0",
    "method": "YOUR_METHOD",
    "params": [],
    "id": 1
}

Example Request

Here is a cURL example for using eth_blockNumber to get the current block height:

curl -X POST https://svc.blockdaemon.com/unichain/mainnet/native \
  -H 'Authorization: Bearer YOUR_API_KEY' \
  -H 'Content-Type: application/json' \
  -d '{"jsonrpc":"2.0","id":1,"method":"eth_blockNumber","params":[]}'
curl -X POST https://svc.blockdaemon.com/unichain/testnet/native \
  -H 'Authorization: Bearer YOUR_API_KEY' \
  -H 'Content-Type: application/json' \
  -d '{"jsonrpc":"2.0","id":1,"method":"eth_blockNumber","params":[]}'

The following is a typical response you will get:

{
    "jsonrpc": "2.0",
    "id": 1,
    "result": "0x6a3e04"
}

👋 Need Help?

Contact us through email or our support page for any issues, bugs, or assistance you may need.