API / THE MARKETPLACE SURFACE

Submit a job.
Get a folded proof.

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.

01

Compute API

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.

02

On-chain verifier

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.

03

Marketplace

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.

SUBMIT A JOB

Two HTTP calls,
one folded proof.

POST /api/foldREQUEST
$ 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" }
GET /api/jobs/:idPOLL
$ curl $PROOFRA_API/jobs/f3c1{ "status": "complete", "proofBytes": "<2.3KB base64>", "proofHash": "0x9af3…21be", "costSol": 0.0001, "record": "Gh7x…Qf · ProofRecord PDA"}
REFERENCE / ENDPOINTS

The whole surface.

METHODPATHRETURNSDESCRIPTION
POST/api/foldjobId Queue a folding job for a circuit + input blob.
GET/api/jobs/:idjob Poll job status, proof bytes and settled record.
GET/api/circuitscircuit[] List available circuits, inputs and test counts.
GET/api/proofs/:hashrecord Read a verified ProofRecord by proof hash.
POST/api/verifytx Settle a folded proof on mainnet; returns the signature.
CIRCUIT CATALOG

Drop-in circuits,
shipping today.

Bring your own host or use ours. The folding adapter is identical across every circuit.

015 TESTS

scoring

Weighted average over a fixed-length score vector.

IN ScoringInput · scores[64]
024 TESTS

aggregation

SUM, AVG, MIN, MAX in one pass, all committed.

IN Vec<u64> · up to 4096
035 TESTS

median

Median with a sortedness witness over the input multiset.

IN MedianInput · raw[256]
044 TESTS

sort

Permutation proof — output monotonic, multiset matches input.

IN SortInput · input[256]
054 TESTS

ml-inference

Two-layer MLP forward pass, ReLU, fixed-point i32.

IN MlInput · features[32]
ADD YOUR OWN

your circuit

Add a guest program under circuits/<name>, register the builder. SDK + verifier auto-pick it up.