• /v1/trace-generation-proof-generation

This endpoint combines /trace-generation and /proof-generation endpoints. It runs trace generation and passes its output (pie.zip file) to proof generation to get proof.json file.

How to use?

There are two paths you can follow, as described in more detail in the /trace-generation endpoint documentation:

  1. Using programFile: For new or modified programs, upload the compiled programFile.
  2. Using programHash: If the Cairo program is already registered, provide its unique programHash.

In both cases, specify the Cairo layout and prover for proof generation which is described in more details in /proof-generation endpoint section as well as cairoVersion parameter. You can also specify inputFile parameter which is private input data for the Cairo program.

Sending Request

  • Query Parameters
    • apiKey (string, required)
  • Request Body
    • For Option 1 (programFile)
      • programFile (file - .json, required) - A compiled Cairo program in JSON format.
    • For Option 2 (programHash)
      • programHash (string, required) - A unique hash representing Cairo program, which has been previously registered in program registry.
    • In addition for both options
      • inputFile (file - .json, optional) - Input data for Cairo program if used.
      • cairoVersion (string, required, default: 0) - For now only version 0 is supported
      • prover (string, required, default: starkware_sharp) - Prover to be used. If you want to use our stone instance - contact us.
      • layout (string, required, default: auto) - Cairo layout of your pie file. Available layouts are:
        • auto - automatically detect layout based on builtins usage
        • recursive
        • recursive_with_poseidon
        • small
        • dex
        • starknet
        • starknet_with_keccak
        • dynamic

Example Request

  1. using programFile
curl -X 'POST' \
  'https://atlantic.api.herodotus.cloud/v1/trace-generation-proof-generation?apiKey=<your-api-key>' \
  -H 'accept: application/json' \
  -H 'Content-Type: multipart/form-data' \
  -F 'programFile=@sha_test.json;type=application/json' \
  -F 'inputFile=@input.json;type=application/json' \
  -F 'cairoVersion=0' \
  -F 'prover=starkware_sharp' \
  -F 'layout=auto'
  1. using programHash
curl -X 'POST' \
  'https://atlantic.api.herodotus.cloud/trace-generation-proof-generation?apiKey=<your-api-key>' \
  -H 'accept: application/json' \
  -H 'Content-Type: multipart/form-data' \
  -F 'programHash=0x6f07b23ab2a11d0f06735180ed774fac02932dfaca1d0836a8bf65a1cd142d3' \
  -F 'inputFile=@input.json;type=application/json' \
  -F 'cairoVersion=0' \
  -F 'prover=starkware_sharp' \
  -F 'layout=auto'