verifyOffChain
Description
The verifyOffChain
static method verifies an off-chain ZPass proof locally without accessing the blockchain.
Parameters
options
(VerifyOffChainOptions): An object containing:execution
(string): The execution trace to verify, output ofproveOffChain
program
(string): The Aleo program source codefunctionName
(string): Name of the function that was executedinputs
(string[], optional): Array of input parameters used, must be provided ifverifyingKey
is not providedverifyingKey
(string, optional): The verifying key for the proof, must be provided ifinputs
is not providedurl
(string, optional): Custom API endpoint URL, for keys synthesizing purpose
Returns
Returns a Promise that resolves to a boolean indicating whether the proof is valid.
Example
Notes
Either inputs
or verifyingKey
must be provided. If both are provided, verifyingKey
takes precedence.
If verifyingKey
is not provided, the SDK will synthesize the verifying key from the inputs and the program.
Synthesizing the verifying key is a computationally expensive operation, so it is recommended to provide the verifying key if possible.
Last updated