Use when implementing or modifying the reusable prediction-market protocol layer (zkApp contract roots, wallet-signed tx flow, oracle verification policy, and non-UI market plumbing) independent of any specific demo market.
src/contract.tssrc/marketplace-server.tssrc/tlsn-verifier.ts, src/weather-attest.ts)pnpm build/api/tx/market-bet, tx-prover, /api/tx/finalize)pnpm sync-state:zeko)receiptMeta, positionMeta) across sync/import cycles. On-chain roots alone are not enough for fast wallet-facing claim UX./api/tx/finalize to persist submitted / confirmed{ marketKey, positionKey, walletPublicKey, txHash }Field.assertEquals(): <a> != <b> in the tx-prover usually means the witness was built against an older root and the live zkApp state changed before provingresolved markets, claimed receipts, or used oracle noncesIf an agent is extending this protocol toward stronger betting privacy with the smallest proving surface, use a receipt-commitment design rather than a full private-state rewrite.
Code-level changes:
/tmp/private-prediction-market-main/src/fast-contract.ts
receiptsRootclaimedReceiptsRoot/tmp/private-prediction-market-main/src/state-store.ts
receipts, claimedReceipts, and wallet-scoped receiptMeta/tmp/private-prediction-market-main/src/sync-state-zeko.ts
receiptCommitted and receiptClaimed/tmp/private-prediction-market-main/src/marketplace-server.ts
/tmp/private-prediction-market-main/src/tx-prover-server.ts
Design guidance: