Please reach out to request an API key and start sending requests to the server.
The high-level flow is: 1) start the session, 2) send requests containing SVM transactions, 3) end the session to trigger proof generation, and 4) poll the endpoint to retrieve summary statistics.
Start Session
Request
Kick off a session and initialize the genesis accounts that should exist before transaction processing. The request will be rejected if it doesn't contain a valid access key.
Send SVM transactions that the prover should include in the ZK proof. Each element should be serialized via bincode.
POST /session/<session_id>/transactions
{ "transaction": [...]}
Response
The server will return how many transactions are remaining for the current session. There's a max cap of 50 due to memory constraints of the underlying zkVM.
{"remaining_transactions_in_session":25}
End Session
Request
End the session to trigger proof generation and select the SP1 proof type. Supported types are core, compressed, and groth16. The first is recommended for testing and the last for on-chain verification.
PUT /session/<session_id>
{"proof_type":"groth16"}
Response
Since proving is async, the response only contains a successful acknowledgement of the request and not the proof details.
There are a few limitations to keep in mind. The system currently places a hard cap of 50 transactions per session due to memory constraints of the underlying zkVM, which is around 24B cycles. The server will reject requests that send additional transactions beyond 50. Not that if you start a new session, old data from previous sessions are not persisted.
The zkSVM contains several pre-installed Solana Program Library (SPL) programs, e.g. the token and token-2022 programs, but any custom programs need to be deployed before they can be interacted with.