• /v1/l1/atlantic-query
  • /v1/l2/atlantic-query

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.

Additionally, in case of L1, Sharp prover has to be used, while in case of L2, prover can be customized and layout has to be specified.

Also in all cases cairoVersion and mockFactHash are required.

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
      • mockFactHash (boolean, required) - If true the fact hash will be mocked, bypassing actual verification for testing purposes.
    • In addition for L2 case
      • 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 program. Available layouts are:
        • auto - automatically detect layout based on builtins usage
        • recursive
        • recursive_with_poseidon
        • small
        • dex
        • starknet
        • starknet_with_keccak
        • dynamic

Example Requests

L1, using programHash:

curl -X 'POST' \
  'https://atlantic.api.herodotus.cloud/v1/l1/atlantic-query?apiKey=<your-api-key>' \
  -H 'accept: application/json' \
  -H 'Content-Type: multipart/form-data' \
  -F 'programHash=string' \
  -F 'programFile=@sha_test.json;type=application/json' \
  -F 'cairoVersion=0' \
  -F 'mockFactHash=false'

L2, using programFile:

curl -X 'POST' \
  'https://atlantic.api.herodotus.cloud/v1/l2/atlantic-query?apiKey=<your-api-key>' \
  -H 'accept: application/json' \
  -H 'Content-Type: multipart/form-data' \
  -F 'programHash=string' \
  -F 'programFile=@sha_test.json;type=application/json' \
  -F 'cairoVersion=0' \
  -F 'mockFactHash=false' \
  -F 'layout=auto'