Skip to main content
Two terms appear throughout these docs:
  • A source is an API definition: a URL, how to call it, and how to extract one value. It is identified by its sourceId, the hash of its canonical config.
  • A feed is a Solana Feed account holding the latest verified value that one submitter wrote for a source at one quorum.
There is no feed-creation step. A source exists as soon as you define it, and a Feed account is created the first time someone submits an attestation for it.

API config

aggregation is optional and switches the source to tolerance mode. All fields are listed in the SDK reference.

Source ID

  • The same config gives the same sourceId for everyone, on every chain. It contains no owner, payer or quorum.
  • The canonical form is not RFC 8785 (JCS). Derive it with the SDK (deriveSourceIdString(apiConfig)) or the MCP derive_source_id tool rather than hashing by hand: one differing byte gives a different source.
  • The gateway and the nodes recompute it from the apiConfig you send, and the SDK rejects a response that names a different sourceId.

Private configs

Only the sourceId reaches the chain. An API key can stay private: reference it as {{secret.<name>}} in the config and send the value encrypted for the nodes, so the gateway never sees it. Encrypted secrets work on subscription rounds only. See Private APIs.

Exact and tolerance mode

By default a round is exact: every signing node must fetch a byte-identical value. Design exact sources around settled data:
  • Prefer finalized values over live-drifting ones.
  • Avoid per-request timestamps, request IDs and unstable ordering in the response.
  • Point responseParser at exactly the field you need.
For numeric values that move between fetches, use tolerance mode. The nodes share their observations, drop outliers and sign the median:
  • aggregation is part of the sourceId, so a source’s tolerance settings cannot change without changing its identity.
  • The round needs signaturesRequired of at least 3.
  • The signed value is a two’s-complement int256 scaled by 10^decimals. Leave valueTransform empty.

Values

The signed value is always 32 bytes. Its meaning is defined by whoever designs the source:
  • Numeric sources should document their scale, for example value / 10 ** 6.
  • A value longer than 32 bytes is signed as its keccak256 hash. The submitter can pass the preimage (up to 256 bytes) to submit_attestation, which checks it and marks the feed Hash. The preimage is not stored.
  • Decode a value only after verifying the attestation or validating the Feed account address.

Solana feed account

Each submitter maintains its own account for a source and quorum, so a reader decides whose feed it reads. The program re-verifies every write, so a submitter cannot change a value. It only chooses which attestations to submit and when. Reading a feed is free and needs no subscription. Verify on Solana shows how to read one from TypeScript or from your own program.