scoring
Weighted average over a fixed-length score vector.
A FastAPI service in front of an SP1 host pool. The marketplace publishes verified results as Pyth-style feeds — proof bytes stay off-chain, the verified fact settles on Solana mainnet.
POST /fold accepts a circuit id, an input blob and a callback. The handler queues the job, the
host produces the sub-proofs, the folding adapter compresses them, the worker returns the final proof bytes.
The Anchor program exposes verify_proof(proof_bytes, public_inputs, circuit_id). On success it
writes a ProofRecord PDA seeded by [b"proof", &proof_hash]. Distinct verifications never contend.
External dApps subscribe to ProofRecord accounts by hash. Producers publish verified facts; consumers read them. The proof bytes themselves stay off-chain — only the verified result lives on Solana.
$ curl -X POST $PROOFRA_API/fold \ -H "content-type: application/json" \ -d '{ "circuit": "median", "input": "<base64 input bytes>", "callback": "https://app.xyz/hook" }' # → { "jobId": "f3c1", "status": "queued" }$ curl $PROOFRA_API/jobs/f3c1{ "status": "complete", "proofBytes": "<2.3KB base64>", "proofHash": "0x9af3…21be", "costSol": 0.0001, "record": "Gh7x…Qf · ProofRecord PDA"}Bring your own host or use ours. The folding adapter is identical across every circuit.
Weighted average over a fixed-length score vector.
SUM, AVG, MIN, MAX in one pass, all committed.
Median with a sortedness witness over the input multiset.
Permutation proof — output monotonic, multiset matches input.
Two-layer MLP forward pass, ReLU, fixed-point i32.
Add a guest program under circuits/<name>, register the builder. SDK + verifier auto-pick it up.