import { CipherBalance, ProjectivePoint, GeneralPrefixData } from "../types.js"; export declare const AUDIT_CAIRO_STRING = 418581342580n; /** * Public inputs of the verifier for the audit declaration * @interface InputsAudit * @property {ProjectivePoint} y - The Tongo account that is declaring its balance * @property {ProjectivePoint} auditorPubKey - The current auditor public key * @property {CipherBalance} storedBalance - The current CipherBalance stored for the account (y) * @property {CipherBalance} auditedBalance - The balance of y encrypted under the auditor public key */ export interface InputsAudit { y: ProjectivePoint; storedBalance: CipherBalance; auditorPubKey: ProjectivePoint; auditedBalance: CipherBalance; prefix_data: GeneralPrefixData; } /** * Proof of audit declaration * @interface ProofOfAudit * @property {ProjectivePoint} Ax - The proof point Ax * @property {ProjectivePoint} AL0 - The proof point AL0 * @property {ProjectivePoint} AL1 - The proof point AL1 * @property {ProjectivePoint} AR1 - The proof point AR1 * @property {bigint} sx - The proof scalar sx * @property {bigint} sr - The proof scalar sr * @property {bigint} sb - The proof scalar sb */ export interface ProofOfAudit { Ax: ProjectivePoint; AL0: ProjectivePoint; AL1: ProjectivePoint; AR1: ProjectivePoint; sx: bigint; sr: bigint; sb: bigint; } export declare function proveAudit(private_key: bigint, initial_balance: bigint, initial_cipherbalance: CipherBalance, auditorPubKey: ProjectivePoint, prefix_data: GeneralPrefixData): { inputs: InputsAudit; proof: ProofOfAudit; }; /** * Verifies that the given ZK proof is a valid proof of the audit declaration. If the proof checks then the public * inputs check: * * - The caller knows the private key of the Tongo account. * - The provided encryption is a valid encryption for the auditor key * - The provided encryption is encrypting the same amount encrypted in the current balance of the Tongo account. * * @param {InputsAudit} inputs - The audit operation inputs * @param {ProofOfAudit} proof - The proof to verify * @returns {boolean} True if the proof is valid, false otherwise */ export declare function verifyAudit(inputs: InputsAudit, proof: ProofOfAudit): boolean;