Documentation
Integration notes
Jupiter Predict (market data)
- Source:
https://api.jup.ag/prediction/v1per developers.jup.ag/docs/prediction. Endpoints used:GET /events,/events/search,/events/{id},/orderbook/{marketId}. - Same-origin, typed server functions; only those four path shapes are allowlisted. IDs are validated before any request.
- Keyless reads are supported by Jupiter (0.5 req/s) and verified by a smoke test. An optional server secret
JUPITER_API_KEYis sent asx-api-keywhen set. - Rate limits: requests are spaced 2.1 s apart when keyless; HTTP 429 triggers a 10 s back-off. Public market lists, events and books are cached 20 s; search results are never cached. Nothing is logged.
- Failure states are explicit: Live, Stale (last good copy up to 5 min, labelled), Rate limited, Restricted, Unavailable. No data is invented.
- Jupiter blocks US and South Korea IPs. This app shows public data only and never trades; trading eligibility is decided by Jupiter after a user-chosen handoff.
- Handoff: offered only for live event IDs, after our server confirms
https://jup.ag/prediction/{eventId}serves a Jupiter page. Example markets never get a link. - Fee estimate:
ceil_cent(0.07 × contracts × p × (1 − p)), which reproduces every row of Jupiter's published table. Illustrative only. - Remote market images are not rendered, so browsing does not ping third-party hosts.
Helius Solana Privacy Rings (devnet reserve)
- Package:
@heliuslabs/spr@0.9.0-alpha(the version the official examples use) with@solana/kit. Exports used were checked in the installed package:createSprClient,initializePoseidon,LocalShieldedKeys.fromDerivationSeed,ed25519DerivationMessage,fetchUserRecord,buildRegistrationTransaction. - Server read path:
getGenesisHashandgetMultipleAccountson api.devnet.solana.com verify the privacy program and registry program are executable, and the state tree and SOL interface PDA exist. - Wallet path, on request only, through Wallet Standard: the wallet signs the SDK's fixed off-chain derivation message. The SDK checks the signature and derives the nullifier and viewing keys in the browser. Keys stay in memory, are wiped on disconnect or Clear session, and are never exported or sent.
- Devnet write: user-registry registration built by the SDK, signed by the wallet, sent only after the RPC's genesis hash matches devnet.
- Limitation: encrypted balance sync, deposit, Ring transfer and withdraw need the Helius indexer and prover, which require a Helius API key from the browser. We don't embed a key and don't proxy witnesses or notes, so these run through the official examples instead.
- Devnet and Jupiter mainnet are separate; nothing bridges them.
Privacy of this app
- No analytics SDK, no third-party fonts, no remote images on market pages.
referreris set to no-referrer. - Drafts exist only in component memory. Watchlist and ideas use sessionStorage. Optional notes are AES-GCM encrypted with a PBKDF2 key from your passphrase.
- No mainnet transactions, no automatic spending, no seed phrases, no viewing-key export.
Test results
Recorded 2 Dec 2026 in the development preview.
- Unit tests (vitest): 5 files, 23 tests passed — fee table (every published row), visibility rules, encrypted notes, Jupiter normalization, routing.
- Typecheck and production build: passed.
- Smoke: keyless
GET /events,/events/search,/events/{id},/orderbook/{id}returned live data;jup.ag/prediction/POLY-30829serves a Jupiter page. - Devnet: genesis hash matched; privacy and registry programs executable; tree and SOL interface present. In Node, the SDK derived keys from a signature seed, read registration and built a 316-byte registration transaction (not sent).
- Browser (desktop 1280 and mobile 390): markets, category filter, event detail, ticket math, order book, verified handoff link, example mode, reserve verification, wallet discovery, notebook, encrypted notes and Clear session all worked. The SDK with its Poseidon hasher loaded in the browser. No horizontal scroll on mobile.
- Network during the run: browser requests went to this app only; zero
sendTransactioncalls. - Not tested: signing with a real wallet extension (none in the headless browser), and the devnet registration submit.
Preview limitations
- Keyless Jupiter reads are shared at 0.5 req/s; busy moments show Rate limited or Stale. Adding
JUPITER_API_KEYin project secrets lifts this. - Our server's region decides whether Jupiter answers; if blocked, the app shows Restricted rather than routing around it.
- Encrypted balance, deposit, transfer and withdraw are not in-app (see above). The SDK is an alpha release.