Skip to main content

prove

Function prove 

Source
pub fn prove(
    amount: BigInt,
    public_inputs: JsCompliancePublicInputs,
    policy_type: String,
    policy_limit: BigInt,
) -> Result<JsComplianceProof>
Expand description

Generate a STARK compliance proof for the provided amount witness.

@param amount - The amount to prove compliance for (must satisfy the policy constraint) @param publicInputs - Public inputs including event metadata and policy info @param policyType - Policy type: “aml.threshold”, “order_total.cap”, or “agent.authorization.v1” @param policyLimit - The policy limit (threshold, cap, or maxTotal value) @returns ComplianceProof containing proof bytes and metadata

Note: this proves a statement about the supplied amount witness. Binding that witness back to encrypted payload contents is the responsibility of the surrounding pipeline, not this library.