export-aptos-verifier-core 0.1.1

Load Groth16 artifacts from snarkjs JSON or Arkworks bundles and generate Aptos Move verifier packages.
Documentation
pub fn readme_content(package_name: &str, account_address: &str) -> String {
    format!(
        r#"# {package_name}

## What it does
This package contains an Aptos Move Groth16 verifier generated from checked Groth16 artifacts.
It was generated by `export-aptos-verifier` and performs strict field validation and local proof verification before generating Move code.
The generated verifier code is not audited. Use at your own risk.

## Supported curves
- BN254 / bn128
- BLS12-381 / bls12-381

## Installation
Build the package from sources and run `export-aptos-verifier`.

## CLI usage
Use the `generate` subcommand with:
- `--vk`
- `--proof`
- `--public` when public inputs are stored separately
- or `--bundle` for compact one-file artifacts
- `--out`
- `--package-name`
- `--module-name`
- `--account-address`

By default BN254 uses uncompressed points and `entry` mode.

## Known limitations
- Prepared verification mode is not implemented in this version (`--prepared` returns ERR_PREPARED_NOT_IMPLEMENTED).
- This tool does not verify cryptographic assumptions beyond local Arkworks checks.

Account: {account_address}
"#,
        package_name = package_name,
        account_address = account_address
    )
}

pub fn vector_of_hex(values: &[String]) -> String {
    if values.is_empty() {
        return "vector[]".to_string();
    }
    let body = values
        .iter()
        .map(|value| format!("        {value},"))
        .collect::<Vec<_>>()
        .join("\n");
    format!("vector[\n{body}\n    ]")
}