ProofBase
Defined in: lib/proof-system/proof.ts:25
Extended by
Type Parameters
• Input = any
• Output = any
Constructors
new ProofBase()
new ProofBase<Input, Output>(__namedParameters: {
maxProofsVerified: 0 | 1 | 2;
proof: unknown;
publicInput: Input;
publicOutput: Output;
}): ProofBase<Input, Output>
Defined in: lib/proof-system/proof.ts:71
Parameters
__namedParameters
maxProofsVerified
0
| 1
| 2
proof
unknown
publicInput
Input
publicOutput
Output
Returns
ProofBase
<Input
, Output
>
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
publicInputType
static publicInputType: FlexibleProvable<any>;
Defined in: lib/proof-system/proof.ts:26
publicOutputType
static publicOutputType: FlexibleProvable<any>;
Defined in: lib/proof-system/proof.ts:27
tag()
static tag: () => {
name: string;
};
Defined in: lib/proof-system/proof.ts:28
Returns
{
name: string;
}
name
name: string;
Accessors
provable
Get Signature
get static provable(): Provable<any>
Defined in: lib/proof-system/proof.ts:88
Returns
Provable
<any
>
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
_proofFromBase64()
static _proofFromBase64(proofString: string, maxProofsVerified: 0 | 1 | 2): unknown
Defined in: lib/proof-system/proof.ts:115
Parameters
proofString
string
maxProofsVerified
0
| 1
| 2
Returns
unknown
_proofToBase64()
static _proofToBase64(proof: unknown, maxProofsVerified: 0 | 1 | 2): string
Defined in: lib/proof-system/proof.ts:119
Parameters
proof
unknown
maxProofsVerified
0
| 1
| 2
Returns
string
publicFields()
static publicFields(value: ProofBase): {
input: Field[];
output: Field[];
}
Defined in: lib/proof-system/proof.ts:103
Parameters
value
Returns
{
input: Field[];
output: Field[];
}
input
input: Field[];
output
output: Field[];