PHASE 2 / COMPUTE API

The compute
marketplace.

A FastAPI service in front of an SP1 host pool. Submit a job, poll for the folded proof, certify on mainnet. The marketplace publishes certified results as Pyth-style feeds.

Clustersolana mainnet
ProgramKyth3rA…vF9pX2q
AuthAPI key · per-job SOL
SLAasync · webhook callback
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, and the worker returns the final proof bytes.

FASTAPI · ASYNC
02

Mainnet 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 certifications never contend.

ANCHOR · PDA
03

Marketplace

External dApps subscribe to ProofRecord accounts by hash. Producers publish certified facts; consumers read them. The proof bytes themselves stay off-chain.

FEEDS · BY HASH
SUBMIT A JOB

Two HTTP calls,
one folded proof.

POST /api/foldREQUEST
$ curl -X POST $KYTHERA_API_URL/fold \ -H "authorization: Bearer $KEY" \ -H "content-type: application/json" \ -d '{ "circuit": "median", "input": "<base64 input bytes>", "callback": "https://you.app/hook" }' # → { "jobId": "f3c1a9", "status": "queued" }
GET /api/jobs/:idPOLL
$ curl $KYTHERA_API_URL/jobs/f3c1a9{ "status": "complete", "circuit": "median", "proofBytes": "<2.3KB base64>", "proofHash": "7Ksu9Q…aM4z", "costSol": 0.0001, "cu": 182431, "record": "<ProofRecord PDA>"}
POST/api/foldQueue a folding job
GET/api/jobs/:idPoll status & proof
GET/api/feeds/:hashRead a certified feed
SETTLE ON MAINNET

Then certify the
proof on-chain.

Hand the proof bytes to the verifier program. It checks the folded SNARK in under 200K CU and writes a permanent ProofRecord — the certificate any dApp can read.

verify_proof · anchorRUST
pub fn verify_proof( ctx: Context<VerifyProof>, proof_bytes: Vec<u8>, public_inputs: Vec<u8>, circuit_id: u16,) -> Result<()> { // 1. groth16 pairing check (< 200K CU) groth16_verify(&proof_bytes, &public_inputs)?; // 2. write the certificate PDA let rec = &mut ctx.accounts.proof_record; rec.hash = hashv(&[&proof_bytes]); rec.circuit_id = circuit_id; rec.slot = Clock::get()?.slot; Ok(())}
PROVE · FOLD · CERTIFY

Ship it from a terminal first.