import { Fr } from '@aztec-labs/foundation/curves/bn254'; import { Buffer } from 'buffer'; import type { ACVMField, ACVMWitness } from './acvm_types.js'; /** * Converts a Noir BoundedVec of Fields into an Fr array. Note that BoundedVecs are structs, and therefore translated as * two separate ACVMField values (an array and a single field). * * @param storage The array with the BoundedVec's storage (i.e. BoundedVec::storage()) * @param length The length of the BoundedVec (i.e. BoundedVec::len()) * @returns An array with the same content as the Noir version. Elements past the length are discarded. */ export declare function fromBoundedVec(storage: ACVMField[], length: ACVMField): Fr[]; /** * Converts a Noir BoundedVec of unsigned integers into a Buffer. Note that BoundedVecs are structs, and therefore * translated as two separate ACVMField values (an array and a single field). * * @param storage The array with the BoundedVec's storage (i.e. BoundedVec::storage()) * @param length The length of the BoundedVec (i.e. BoundedVec::len()) * @param uintBitSize If it's an array of Noir u8's, put `8`, etc. * @returns A buffer containing the unsigned integers tightly packed */ export declare function fromUintBoundedVec(storage: ACVMField[], length: ACVMField, uintBitSize: number): Buffer; /** * Transforms a witness map to its field elements. * @param witness - The witness to extract from. * @returns The return values. */ export declare function witnessMapToFields(witness: ACVMWitness): Fr[]; /** * Converts an array of Noir unsigned integers to a single tightly-packed buffer. * @param uintBitSize If it's an array of Noir u8's, put `8`, etc. * @returns A buffer where each byte is correctly represented as a single byte in the buffer. * Copy of the function in txe/src/util/encoding.ts. */ export declare function fromUintArray(obj: ACVMField[], uintBitSize: number): Buffer; //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZGVzZXJpYWxpemUuZC50cyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uL3NyYy9wcml2YXRlL2Fjdm0vZGVzZXJpYWxpemUudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsT0FBTyxFQUFFLEVBQUUsRUFBRSxNQUFNLHFDQUFxQyxDQUFDO0FBRXpELE9BQU8sRUFBRSxNQUFNLEVBQUUsTUFBTSxRQUFRLENBQUM7QUFFaEMsT0FBTyxLQUFLLEVBQUUsU0FBUyxFQUFFLFdBQVcsRUFBRSxNQUFNLGlCQUFpQixDQUFDO0FBRTlEOzs7Ozs7O0dBT0c7QUFDSCx3QkFBZ0IsY0FBYyxDQUFDLE9BQU8sRUFBRSxTQUFTLEVBQUUsRUFBRSxNQUFNLEVBQUUsU0FBUyxHQUFHLEVBQUUsRUFBRSxDQUU1RTtBQUVEOzs7Ozs7OztHQVFHO0FBQ0gsd0JBQWdCLGtCQUFrQixDQUFDLE9BQU8sRUFBRSxTQUFTLEVBQUUsRUFBRSxNQUFNLEVBQUUsU0FBUyxFQUFFLFdBQVcsRUFBRSxNQUFNLEdBQUcsTUFBTSxDQU92RztBQUVEOzs7O0dBSUc7QUFDSCx3QkFBZ0Isa0JBQWtCLENBQUMsT0FBTyxFQUFFLFdBQVcsR0FBRyxFQUFFLEVBQUUsQ0FHN0Q7QUFFRDs7Ozs7R0FLRztBQUNILHdCQUFnQixhQUFhLENBQUMsR0FBRyxFQUFFLFNBQVMsRUFBRSxFQUFFLFdBQVcsRUFBRSxNQUFNLEdBQUcsTUFBTSxDQU0zRSJ9