Accessing the Axiom Proving API via CLI
AXIOM_API_KEY
environment variable in a .env
file.
cargo axiom init
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 keygen download --config-id <ID> --key-type <TYPE>
ID
is supported, and the possible options for TYPE
are:
app_vm
: Proving key for application VM.leaf_vm
: Proving key for leaf VM.internal_vm
: Proving key for internal aggregation VM.root_verifier
: Proving key for root verifier VM.halo2_outer
: Proving key for outer halo2 verifier.halo2_wrapper
: Proving key for final halo2 verifier.app_vm_commit
: The application VM commitment for the given VM configuration, as bytes.evm_verifier
: The EVM verifier for the given VM configuration, as a .json
file.config
: The complete config as a .toml
file.app_vm_commit
, evm_verifier
, and config
types, the response will be a direct
file download.
cargo axiom build --config-id <ID>
Cargo.toml
and Cargo.lock
must be present and 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
, and exe
.
cargo axiom build list
cargo axiom prove --program-id <ID> --input <INPUT>
ID
with input INPUT
.
The 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 verify --config-id <ID> --proof <FILE>
ID
and the proof should be in FILE
.
cargo axiom verify status --verify-id <ID>
ID
.