API reference
Two complementary surfaces:
- Runtime metadata — every pallet, call, event, error, storage item, and constant, derived directly from on-chain runtime metadata captured from live TRN nodes. Authoritative for the runtime version at capture.
- GraphQL asset indexer — Relay-spec multi-chain (TRN + EVM) indexer covering accounts, NFTs (ERC-721 + ERC-1155), and fungible tokens, derived from a live introspection of the indexer endpoint. For prose-style narrative reference, see Build · Substrate.
Substrate runtime — networks
| Network | Spec version | Pallets | Captured |
|---|---|---|---|
| root | 84 (impl ?) | 56 | 2026-05-02 |
GraphQL asset indexer
Multi-chain read-only API exposing accounts, NFTs (ERC-721 + ERC-1155), generic fungible tokens, and metadata. See GraphQL asset indexer for the schema, worked examples, and stability notes.
How this is generated
docs/_collect/scripts/dump-metadata.mjs connects to each TRN node via WebSocket using @polkadot/api with the @therootnetwork/api-types lookup bundle, walks the Metadata vN tree, and serialises every pallet to JSON. docs/scripts/build-api-reference.mjs turns that JSON into the per-pallet pages here. docs/_collect/scripts/introspect-asm-graphql.mjs runs an introspection query against the GraphQL endpoint and saves both JSON and SDL. docs/scripts/build-graphql-reference.mjs turns that into the per-type pages under /api/graphql/. The full pipeline runs as part of make build-docs.
Notes
- Storage hashers are quoted for each map (
Blake2_128Concat,Twox64Concat,Identity). Use this to compute storage keys offline. - SCALE type names here use the polkadot.js type-def shorthand. Most map directly to runtime types defined in
@therootnetwork/api-types. - Constants show their SCALE-encoded hex value. Decode using
api.consts.<pallet>.<name>at runtime, or with the@polkadot/types-codeclibrary against the printed type.