DataUpdateResult. It derives the feed identity, checks authorization or payment, dispatches a node round, validates the aggregate signature, and returns a payload that can be submitted to Solana or verified on EVM/Starknet.
Base URL
The SDK default (DEFAULT_GATEWAY_ENDPOINT) is:
Endpoint overview
Agent endpoints require
agent.enabled: true and a configured gateway keypair (settlement.gateway_keypair_path).
Feed ID derivation
Clients do not send an on-chain create transaction. The gateway and SDK derive the feed identity from the caller, config hash, and quorum:- Subscription path:
ownerisconsumerAuthority. - Agent path:
owneris the payer. signatures_requiredis appended as a single byte.
feedId and echoes it in successful responses. The Solana Feed account is created lazily on first successful submit_data_update. Settlement creates a round receipt; it does not write the feed.
Subscription-backed rounds
POST /v1/round/execute
Runs a signing round for a subscription owner or active delegate.
consumerAuthority signs:
timestamp must be within ~300s of the gateway clock. registryVersion must equal the current on-chain registry version. The signature is single-use per (feed_id, timestamp) — retries need a fresh timestamp and signature. An all-zero authSig is rejected.
x402 agent rounds
POST /v1/agent/execute
Runs a self-funded pay-per-request round. Agent-specific fields use snake_case; apiConfig matches the subscription execute shape.
The payer funds a per-gateway escrow ATA, locks an exact USDC amount equal to the computed round price, signs AgentRequestAuth, and receives the signed result. Settlement via settle_agent_round is asynchronous.
amount must equal that price exactly. agent_request_auth_sig may be omitted on the unfunded first request of the 402 discovery flow.
AgentRequestAuth hash:
- Call execute (signature optional) → receive 402.
- Create/fund
payTowith at leastmaxAmountRequiredUSDC. - Sign
AgentRequestAuthover theextrafields. - Retry with the same
canonical_timestampand the signature.
GET /v1/agent/{payer}/status
Advisory read of escrow state. Optional query signatures_required (default 1) controls the price quote. The escrow is per (payer, gateway) — the gateway derives and returns both addresses.
exists: false is normal before the first successful settlement.
Data response
Successful round responses return the same signed payload shape. Live rounds always setfresh: true.
Serve lifecycle
- Validate JSON, pubkeys, timestamps, and API config.
- Derive
api_config_hashandfeed_id. - Verify request auth or x402 funding +
AgentRequestAuth. - Read advisory on-chain state.
- Reserve the round in the settlement outbox.
- Dispatch to nodes.
- Validate returned aggregate signature identity.
- Complete the outbox record (
pending). - Return the signed payload.
pending rows into settle_round_receipt or settle_agent_round when settlement.enabled is true.
Round-record PDAs
Replay protection is the unique round-record PDAinit:
Self-hosting
The gateway is a Go service configured by YAML and environment variables. There is no separate operator “run-gateway” guide — use this section and the gateway repository config.agent.enabled is true, settlement.gateway_keypair_path is required because AgentRequestAuth binds the gateway PDA. If settlement is disabled, served rounds can remain pending indefinitely.
Settlement uses the on-chain protocol_config.usdc_mint; solana.usdc_mint only overrides serve-time ATA derivation and must match on-chain.
Operational notes
- Use durable storage for the settlement outbox.
- Monitor pending outbox records and round timeout rates.
- Keep Solana RPC latency low for escrow and subscription reads.
- Verify returned payloads before application use.