Core
Capabilities
Catalog hints plus client helpers; live Cloud capabilities are plan-filtered.
Overview
Catalog entries describe each chain: family, path slots, and testnet siblings. Live Cloud capability flags (portfolio, nfts, swap, …) come from GET /v1/chains?include=capabilities and are plan-filtered. Client-side helpers expose a subset for wallet UX.
Signature
js
import { /* catalog fields */ } from "@gray3/core";
import {
supportsNft,
supportsDefi,
supportsSwap,
isTestnetChain,
getMainnetSibling,
getTestnetSibling,
} from "@gray3/client";Parameters
| Field | Required | Description |
|---|---|---|
| chainId | Yes | `GrayChainId` — mainnet or testnet id |
Response
ts
supportsNft("ethereum") // boolean (catalog/client helper)
supportsDefi("ethereum")
supportsSwap("ethereum")
isTestnetChain("ethereum-sepolia") // true
getMainnetSibling("ethereum-sepolia") // "ethereum"
getTestnetSibling("ethereum") // testnet id if mappedUsage
js
if (isTestnetChain(chainId)) {
// hide prices / nfts / defi / swap in UI
}
if (!supportsNft(chainId)) {
// disable NFT tab
}
// Authoritative runtime matrix for Cloud:
// GET /v1/chains?include=capabilities
const chains = await gray.chains.list({ include: "capabilities" });Where to read the full matrix
- Supported chains — Capability matrix
- Testnet ids — testnet capability summary
- Custom EVM networks — native transfer only; see checklist
Throws
| Field | Required | Description |
|---|---|---|
| unsupported_capability | No | Raised by client/cloud when an operation is not offered (e.g. watch Monero, signPrepared UTXO/Monero, testnet prices). |