Create an API key
Go to the "Access Keys" tab, click the Create Key
button, and give it a good name.
Upon clicking the Create
button, your key will be generated and shown. Please save your access key securely, as the key will only be shown once.
Issue a Proof Generation Request
Get your endpoint and access key ready, and type the following command in your terminal.
ENDPOINT=<your_endpoint_url>
ACCESS_KEY=<your_access_key>
Use the following curl command to issue your proof generation request against the demo prover:
curl --request POST $ENDPOINT \
--header "x-api-key: $ACCESS_KEY" \
--header "Content-Type: application/json" \
--data-raw '{
"input": {
"private_input": [0, 1, 2, 3, 4],
"public_input": "20304616028358001435806807494046171997958789835068077254356069730773893150537"
}
}
'
Requests are processed asynchronously by your prover service. You will receive a confirmation response with a PENDING
state like the following,
{
"service_id": "0872ccea325846ee9dd6f697b9af1863",
"task_id": "ec5e67fecbab4f66b5c4a1551105e795",
"service_name": "poseidon",
"creator_id": "5a5fd35f890349aea7ac9dc17d97d32b",
"result": null,
"state": "PENDING",
"input": "{\"private_input\": [0, 1, 2, 3, 4], \"public_input\": \"13037709793114148810823325920380362524528554380279235267325741570708489436263\"}",
"started": null,
"finished": null,
"created": "2023-11-04T03:14:25"
}
Please note the task_id
for the next step.
Query results
From Command Line
Get your task ID and access key ready, and type the following command in your terminal.
TASK_ID=<your_task_id>
ACCESS_KEY=<your_access_key>
The proof generation result can be queried with the following command,
curl --request GET "https://api.snarkify.io/v1/tasks/$TASK_ID" \
--header "x-api-key: $ACCESS_KEY"
Then you will see the task information like below once the task is processed:
{
"service_id": "aa143bd5b48647569720096ab7493cd2",
"task_id": "4b1fd782a0f44f499a88a8cab31f066f",
"service_name": "poseidon",
"creator_id": "e95d87b33f8f45ea9e1f845eca18031d",
"result": "\"nc/6L2N4Jo1DU1SQ5IsVJ4EnqYo0pJBr1Zfv/Reez2LvtaFnHc/GzVpb2EBfAQhWBbk3OJNr5CBgS7TIJEtpQvPzw4PokhbAsvBsS6oK5Nu/zvJwVS4xrWgHD3uPT3ZWO7/U4n6YzZHBwgSN1bAK4ofFGQl7czSsS52ROInTJyVMGLtza6/U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Fw0mj5ChBpyjSlZIQA/jj/p1pOEuOErZ7wCWHaiYL1C7rK4ag5+cNr0LR1ER5O4P/zKVookId/m03cXQRc+83SatpTGH4fb6yDJNpFI9zgHqu4XzmpLM45WRGffhCqzyBuSppY0S6/sD8ISO8Hqs7NaiSHxMFVegF81lV6y/dx4nYdsFVRyEy8QwUbCArOnGo5cMEBKkRxA6FV4q1jvTx661HoVlZTVXLAo0SYF09V4JBvJIgTYy/E/QDTOb/WQFgPM8FaS0VOiyfj0xIQV1Bi2DVRtFP5eWLtzEYIRD+/BuI2abL+tGaRQ/SJmBhy2493gBXBrW/ISxdg2KZ1UxnhegBJOT7vImz2UsdBBj71BOni2oTA21oWTSFtOrXp4nuOjwT8tH+FarKu89QD0svTzabKDbtexD/xDS9LcpKYZ5DydKjMzFbKg9ARii6n7feSnTerZdN+ip1994wl13EfCIZM1cG66OQ6888IK7UlPvZN+9r+bMXiO+6AwH1us4SEhaGmVgSbYH5iCkQfR+rzR1k0crPCsAsquUg5xnS4USskd3SMZxGBzyL0HB8JDzvzGYFIIePw/vAwvaFLrdHGwTUEDkeWN4Iir5QiBTc4ajpCnrzkVfMMwRg81HGFoOuSfQOHrUBYysCxzLcgFlz/63SClAh9CJCUzogHaLTuvn+zltCYGQ1FsjxhV1i+ZXb6wK9fXC55YVMHQGH+ve/1PFik6ta0gJoBSlKnI9BaGK/2BU6C2r8cZWxm2WtEN0jMIBvxfejgyx+0vMlc\"",
"state": "SUCCESS",
"input": "{\"private_input\": [0, 1, 2, 3, 4], \"public_input\": \"20304616028358001435806807494046171997958789835068077254356069730773893150537\"}",
"started": "2023-11-10T02:08:22",
"finished": "2023-11-10T02:08:23",
"created": "2023-11-10T02:08:22"
}
From Cloud Console
Alternatively, you can also check your task history through our UI:
Go to the Task Hisotry
page
What's Next
Following this tutorial to make your own ZK circuits cloud-ready with the snarkify-sdk
.