Skip to main content
A subscription lets a wallet, and the delegates it adds, request signed rounds through a gateway. The owner pays the plan price in USDC on Solana; the gateway counts rounds against the plan’s quota for each 30-day term.

Use a subscription when

  • You publish a feed that other users or contracts consume.
  • You need ongoing quota instead of one-off payments.
  • You want agents or services to spend one plan through delegates.
  • You operate a backend or keeper that updates Solana feed accounts.

Plans

On devnet one plan is open, Basic: These are the values of the on-chain Plan account. Read them before you pay: getPlan returns the live terms, and the program charges the price stored on chain at the moment you subscribe.

Subscribe

  1. Fund the owner wallet with devnet SOL and devnet USDC from Circle’s faucet (select USDC on Solana Devnet). The devnet USDC mint is 4zMMC9srt5Ri5X14GAgXhaHii3GnPAEERYPJgZJDncDU.
  2. Read the plan price.
  3. Subscribe with an explicit maxPriceUsdc bound. The SDK aborts before sending the transaction if the live price is higher.
sdk is a MolphaSDK built with the owner’s wallet (see the SDK overview). subscribe and extendSubscription transfer the plan price from the owner’s USDC account to the protocol treasury. Then request rounds through the gateway: see the SDK gateway client.

Terms and quota

  • subscribe sets valid_until to 30 days from now and copies max_rounds, max_signers and max_delegates from the plan onto the Subscription account.
  • extendSubscription adds 30 days to valid_until, or sets it to 30 days from now when the subscription has lapsed. It does not copy the plan limits again.
  • The program records no usage. The gateway counts rounds per term: the 30-day steps counted back from valid_until. The counter resets when a new term begins, and prepaying more months does not add quota to the current term.
  • Every round reserves one unit when the gateway stamps it. A round that fails gives its unit back; a 409, 429 or capacity 503 never takes one. Requests from several callers that share one round each spend their own unit.
  • When the quota is used up, or the subscription has lapsed, the gateway answers 403.
GET /v1/session shows the current term’s usage, owner-wide and for the signed-in key, and when the term ends.

Authenticate rounds

A subscription caller (the owner or a delegate) authenticates each round on POST /v1/round/execute with either:
  • RequestAuth: an Ed25519 signature by the caller’s key in every request (authSig, with authTimestamp in unix seconds). The SDK signs it for you.
  • A sign-in session: sign one Sign-In-With-Solana message, then send Authorization: Bearer <token> until the token expires. This suits wallets and hosted agents.
See Authentication.

Consumer note

Consumers do not need a subscription to read an existing feed or verify a signed payload. They need the payload, the verifier address or program, and their own freshness policy.

Next steps

Delegates

Authorize a hot agent key under this subscription.

Maintain a feed

Producer walkthrough for subscriptions and feed updates.