Skip to main content

ProofBase

Defined in: lib/proof-system/proof.ts:25

Extended by

Type Parameters

Input

Input = any

Output

Output = any

Properties

maxProofsVerified

maxProofsVerified: 0 | 1 | 2;

Defined in: lib/proof-system/proof.ts:37


proof

proof: unknown;

Defined in: lib/proof-system/proof.ts:36


publicInput

publicInput: Input;

Defined in: lib/proof-system/proof.ts:34


publicOutput

publicOutput: Output;

Defined in: lib/proof-system/proof.ts:35


shouldVerify

shouldVerify: Bool;

Defined in: lib/proof-system/proof.ts:38

Methods

declare()

declare(): boolean;

Defined in: lib/proof-system/proof.ts:54

To verify a recursive proof inside a ZkProgram method, it has to be "declared" as part of the method. This is done by calling declare() on the proof.

Note: declare() is a low-level method that most users will not have to call directly. For proofs that are inputs to the ZkProgram, it is done automatically.

You can think of declaring a proof as a similar step as witnessing a variable, which introduces that variable to the circuit. Declaring a proof will tell Pickles to add the additional constraints for recursive proof verification.

Similar to Provable.witness(), declare() is a no-op when run outside ZkProgram compilation or proving. It returns false in that case, and true if the proof was actually declared.

Returns

boolean


publicFields()

publicFields(): {
input: Field[];
output: Field[];
};

Defined in: lib/proof-system/proof.ts:111

Returns

{
input: Field[];
output: Field[];
}
input
input: Field[];
output
output: Field[];

toJSON()

toJSON(): JsonProof;

Defined in: lib/proof-system/proof.ts:61

Returns

JsonProof