- 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
Feedaccount holding the latest verified value that one submitter wrote for a source at one quorum.
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
sourceIdfor 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 MCPderive_source_idtool rather than hashing by hand: one differing byte gives a different source. - The gateway and the nodes recompute it from the
apiConfigyou send, and the SDK rejects a response that names a differentsourceId.
Private configs
Only thesourceId 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
responseParserat exactly the field you need.
aggregationis part of thesourceId, so a source’s tolerance settings cannot change without changing its identity.- The round needs
signaturesRequiredof at least 3. - The signed value is a two’s-complement
int256scaled by10^decimals. LeavevalueTransformempty.
Values
The signedvalue 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
keccak256hash. The submitter can pass the preimage (up to 256 bytes) tosubmit_attestation, which checks it and marks the feedHash. The preimage is not stored. - Decode a value only after verifying the attestation or validating the
Feedaccount address.
Solana feed account
Reading a feed is free and needs no subscription. Verify on Solana shows how to read one from TypeScript or from your own program.