Account types
MarketAccount
The central account for a prediction market. Exists at themarket PDA.
v3 markets (393-byte accounts, all markets created with the current program) store the question in a separate
MarketQuestion PDA - inlineQuestion will be "". Use fetchMarketQuestions to hydrate questions in batch.EncryptedPositionAccount
Records an encrypted bet. Exists at theposition PDA keyed by (market, user, betIndex).
GlobalStateAccount
Singleton protocol config. There is only one per deployment.LpPositionAccount
Tracks the creator’s liquidity and accumulated fees per market.MarketQuestionAccount v0.2+
Stores the question text for v0.2+ markets (separate PDA to save space inMarketAccount).
Fetchers
All fetchers are also available as methods on theCypherClient namespaces.
TypeScript
client.markets.byIds and client.marketQuestions.fetchMany were added in v0.8.8. Both chunk pubkey lists past Solana’s 100-key getMultipleAccountsInfo cap and retry transient errors. Tune via CypherClientOptions.rpcOptions or pass per-call overrides.Display helpers
TypeScript
marketPhase
Returns a human-readable phase string based on the market’s state and timestamps. Use this to drive UI state.TypeScript
cancelEligibility
Pre-flight check before showing a cancel button.TypeScript
parseEmbeddedOptions
Extracts option labels from a[A|B|C] question suffix.
TypeScript
marketFormatVersion
Detects the market account layout version from byte length.TypeScript
MarketQuestion PDA.