Accessing the Axiom Proving API via CLI
AXIOM_API_KEY
environment variable in a .env
file.
cargo axiom register
should be run in the directory containing the .env
file.
Throughout the CLI, --config-id
is optional and defaults to the system default config id.
cargo axiom
and pressing TAB.
cargo axiom init <PROJECT_NAME>
cargo axiom download-keys --config-id <ID> --type <TYPE>
ID
is supported, and the possible options for TYPE
are:
app_pk
: Application proving key.agg_pk
: Aggregation proving key.halo2_pk
: Proving key for halo2 verifier.app_vk
: Application verification key.agg_vk
: Aggregation verification key.halo2_vk
: Verification key for halo2 verifier.cargo axiom build --config-id <ID>
Cargo.toml
and Cargo.lock
must be present and tracked by gitsrc/main.rs
file (or any other main entry point) must be tracked by git--include_dirs
flag to include them.
Note that the value of --include_dirs
should be relative to the git repository root (despite the fact that the command is run in the guest program directory).
cargo axiom build status --program-id <ID>
cargo axiom build
.
cargo axiom build logs --program-id <ID>
cargo axiom build download --program-id <ID> --program-type <TYPE>
ID
.
The accepted values for TYPE
are: elf
, source
, app_exe_commit
and exe
.
cargo axiom build list
cargo axiom prove --program-id <ID> --type <TYPE> --input <INPUT>
TYPE
for the registered program with ID
with input INPUT
.
The possible options for TYPE
are:
stark
: The final STARK proof generated by OpenVM.evm
: The halo2 proof ready for EVM verification.INPUT
field needs to either be a single hex string or a file path to a JSON file that contains the key input
and an array of hex strings. If your hex string represents a single number, it should be written in little-endian format (as this is what OpenVM expects). In addition, if you need multiple input streams, only the file path option is supported.
Each hex string (either in the JSON file or as direct input) is either:
0x01
u32
in little endian encoding) prefixed with 0x02
cargo axiom prove status --proof-id <ID>
ID
.
cargo axiom prove logs --proof-id <ID>
cargo axiom prove download --proof-id <ID> --type <TYPE> --output <FILE>
ID
. The command TYPE
identifies the artifact type and FILE
identifies the
output directory. The possible options for TYPE
are:
stark
: The final STARK proof generated by OpenVM.evm
: The halo2 proof ready for EVM verification.cargo axiom prove list --program-id <ID>
ID
.
cargo axiom run --program-id <ID> --input <INPUT>
ID
and input INPUT
.
cargo axiom run status --execution-id <ID>
ID
.
cargo axiom verify evm --config-id <ID> --proof <FILE>
ID
and the proof should be in FILE
.
cargo axiom verify stark --program-id <ID> --proof <FILE>
ID
and the proof should be in FILE
.
cargo axiom verify status --verify-id <ID> --proof-type <TYPE>
ID
and a proof type TYPE
(either “evm” or “stark”).