Skip to main content
A template is a named, versioned recipe for one source. Its parameters are typed (a chain, an address, an enum, a date), validated and normalized before anything is read, and the source it builds is fixed by the template’s version. The catalog below lists the templates https://gateway.molpha.io served on 2026-11-30. The live list is GET /v1/data/catalog; each template’s page in the API reference has its parameters, return type and caveats, and lets you try the free /source route.

Reading a catalog entry

GET /v1/data/catalog/token.supply returns:

Parameters

  • chain takes an alias (ethereum, base, solana) or a CAIP-2 ID (eip155:1). The source always names the CAIP-2 ID, so both give the same sourceId.
  • finality is final (default), fast, or a raw mode. It is part of the source: see Chains and finality.
  • mode, where a template offers it, picks exact (every node must read the same 32 bytes) or tolerance (nodes sign the median of their reads within a band). Where a value moves between the nodes’ reads, such as a Solana mint’s supply, the template defaults to tolerance. A tolerance round needs signaturesRequired of at least 3. See Exact and tolerance mode.
  • Templates check what they can when the source is derived (422 PARAM_INVALID: an unknown market, a pool of the wrong kind, a chain the template does not run on) and write assertions into the source for the rest, so a wrong address fails the round instead of signing zero.
  • Each choice of parameters is its own feed. Two values of access, field or unit are two sourceIds.

Snapshots

token.snapshot and dex.pool.snapshot sign several fields under one signature. Their output is keccak256: the signed value is the hash of a fixed-length preimage, the round’s response carries the preimage as data.valuePreimage, and /source returns its layout (each field’s name, offset, length and type). Hash the preimage, compare it with the signed value, then decode the fields with the layout. On Solana, pass the preimage as the raw value when you submit, as for any keccak256 source.

Web API templates

Templates of kind http read a public publisher (central banks, U.S. statistics agencies, GLEIF, drand, Hyperliquid). They take no chain or finality. Some publishers need a key: there the template’s source names a secret placeholder that the gateway fills with Molpha’s own key inside the round, so you need none. Such a source is private: /dry-run cannot run it, since the key travels only inside a round. The template’s caveats say so, and name the publisher’s request budget the gateway keeps under.

Catalog

Token

Wallet

DEX

Lending

Position

Yield

Oracle

Derived

Perps

Reference data

Chain

Raw state