Chains
List every chain
Every Gray3 chain, with capabilities and whether it is on for your project.
Endpoint
GET/v1/chains/all
Returns every chain Gray3 supports, whether or not your project can use it, with its capabilities and an access object that says if it is on or off for you. Use it for settings screens, plan comparison, or to explain why a chain is missing from GET /v1/chains.
Request
No query parameters.
Request
curl -sS "https://blockchain.gray3.io/v1/chains/all" \
-H "X-Gray-Project-Id: proj_your_project_id" \
-H "Authorization: Bearer gray_sk_your_secret"Response
HTTP 200 — success envelope wraps the payload in data.
json
{
"data": {
"items": [
{
"id": "ethereum",
"name": "Ethereum",
"family": "evm",
"pathSlots": 2,
"native": { "symbol": "ETH", "name": "Ether", "decimals": 18 },
"explorer": { "url": "https://etherscan.io" },
"capabilities": { … },
"access": { "inPlan": true, "enabled": true, "usable": true }
},
{
"id": "solana",
"name": "Solana",
"family": "solana",
"pathSlots": 2,
"native": { "symbol": "SOL", "name": "Solana", "decimals": 9 },
"explorer": { "url": "https://solscan.io" },
"capabilities": { … },
"access": { "inPlan": false, "enabled": true, "usable": false }
}
]
}
}Each chain has the same fields and capabilities object as Include capabilities, plus access.
The access object
| Field | Required | Description |
|---|---|---|
| inPlan | Yes | The chain is included in your plan. |
| enabled | Yes | The chain is switched on for your account and this project in Console › Networks. |
| usable | Yes | Both of the above. Exactly the chains returned by GET /v1/chains. |
Calls to other routes with a chain that is not usable fail with plan_chain_denied (not in plan) or chain_disabled (switched off).
Compared with GET /v1/chains
/v1/chainsreturns only usable chains, and capabilities only when you ask for them. Use it to build the chain picker in your app./v1/chains/allreturns every chain, always with capabilities andaccess. Use it to show what exists and what is turned off.
Errors
Errors use HTTP { "error": { "code", "message", "retryable" } }. Branch on code, not the message text.
| Code | HTTP | When |
|---|---|---|
| unauthorized | 401 | Missing or invalid project id / secret |
| revoked_secret | 401 | Secret was rotated or revoked |
json
{
"error": {
"code": "unauthorized",
"message": "Human-readable detail (may be sanitized).",
"retryable": false
}
}