Docs
Supported ChainsBittensorBittensor-Specific Methods

chainSpec_v1_genesisHash - JSON-RPC Method

Return the genesis hash via the chainSpec v1 RPC on Bittensor.

Description

Read static chain specification data such as chain name, ss58 properties, and genesis hash. Use this to configure clients (address format, token info) or verify you are talking to the expected network.

Returns the genesis block hash from the ChainSpec.

Code Examples

curl -X POST https://api-bittensor-mainnet.n.dwellir.com/YOUR_API_KEY \
+  -H 'Content-Type: application/json' \
+  -d '{"jsonrpc":"2.0","method":"chainSpec_v1_genesisHash","params":[],"id":1}'
import requests, json

url = 'https://api-bittensor-mainnet.n.dwellir.com/YOUR_API_KEY'
headers = {'Content-Type': 'application/json'}
payload = {
  "jsonrpc": "2.0",
  "method": "chainSpec_v1_genesisHash",
  "params": [],
  "id": 1
}
res = requests.post(url, headers=headers, data=json.dumps(payload))
print(res.json()['result'])
const res = await fetch('https://api-bittensor-mainnet.n.dwellir.com/YOUR_API_KEY', {
  method: 'POST',
  headers: { 'Content-Type': 'application/json' },
  body: JSON.stringify({
  "jsonrpc": "2.0",
  "method": "chainSpec_v1_genesisHash",
  "params": [],
  "id": 1
})
});
const data = await res.json();
console.log(data.result);

On this page