export-aptos-verifier-core 0.1.1

Load Groth16 artifacts from snarkjs JSON or Arkworks bundles and generate Aptos Move verifier packages.
Documentation
1
2
3
4
5
6
7
8
9
10
11
use num_bigint::BigUint;

/// Serialize big integer to fixed little-endian vector.
pub fn to_le_padded_bytes(value: &BigUint, len: usize) -> Vec<u8> {
    let mut bytes = value.to_bytes_le();
    bytes.resize(len, 0);
    if bytes.len() > len {
        bytes.truncate(len);
    }
    bytes
}