@proto-kit/sequencer • Docs
Documentation / @proto-kit/sequencer / SomeProofSubclass
Class: SomeProofSubclass
Extends
Proof<Field,Void>
Constructors
new SomeProofSubclass()
new SomeProofSubclass(
__namedParameters):SomeProofSubclass
Parameters
• __namedParameters
• __namedParameters.maxProofsVerified: 0 | 1 | 2
• __namedParameters.proof: unknown
• __namedParameters.publicInput: Field
• __namedParameters.publicOutput: undefined
Returns
Inherited from
Proof<Field, Void>.constructor
Defined in
node_modules/o1js/dist/node/lib/proof-system/proof.d.ts:40
Properties
maxProofsVerified
maxProofsVerified:
0|1|2
Inherited from
Proof.maxProofsVerified
Defined in
node_modules/o1js/dist/node/lib/proof-system/proof.d.ts:22
proof
proof:
unknown
Inherited from
Proof.proof
Defined in
node_modules/o1js/dist/node/lib/proof-system/proof.d.ts:21
publicInput
publicInput:
Field
Inherited from
Proof.publicInput
Defined in
node_modules/o1js/dist/node/lib/proof-system/proof.d.ts:19
publicOutput
publicOutput:
undefined
Inherited from
Proof.publicOutput
Defined in
node_modules/o1js/dist/node/lib/proof-system/proof.d.ts:20
shouldVerify
shouldVerify:
Bool
Inherited from
Proof.shouldVerify
Defined in
node_modules/o1js/dist/node/lib/proof-system/proof.d.ts:23
publicInputType
staticpublicInputType: typeofField& (x) =>Field=Field
Overrides
Proof.publicInputType
Defined in
packages/sequencer/src/settlement/tasks/SettlementProvingTask.ts:66
publicOutputType
staticpublicOutputType:ProvablePureExtended<void,void,null> =Void
Overrides
Proof.publicOutputType
Defined in
packages/sequencer/src/settlement/tasks/SettlementProvingTask.ts:68
tag()
statictag: () =>object
Returns
object
name
name:
string
Inherited from
Proof.tag
Defined in
node_modules/o1js/dist/node/lib/proof-system/proof.d.ts:16
Accessors
provable
Get Signature
get
staticprovable():ProvableProof<Proof<any,any>,any,any>
Returns
ProvableProof<Proof<any, any>, any, any>
Inherited from
Proof.provable
Defined in
node_modules/o1js/dist/node/lib/proof-system/proof.d.ts:97
Methods
declare()
declare():
boolean
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
Inherited from
Proof.declare
Defined in
node_modules/o1js/dist/node/lib/proof-system/proof.d.ts:38
publicFields()
publicFields():
object
Returns
object
input
input:
Field[]
output
output:
Field[]
Inherited from
Proof.publicFields
Defined in
node_modules/o1js/dist/node/lib/proof-system/proof.d.ts:51
toJSON()
toJSON():
JsonProof
Returns
JsonProof
Inherited from
Proof.toJSON
Defined in
node_modules/o1js/dist/node/lib/proof-system/proof.d.ts:39
verify()
verify():
void
Sets the shouldVerify flag to true
The downstream effect of this is that the proof will be verified when the circuit is run
Returns
void
Note
This method is meant to be called in a circuit. Executing it outside of a circuit will have no effect.
Inherited from
Proof.verify
Defined in
node_modules/o1js/dist/node/lib/proof-system/proof.d.ts:65
verifyIf()
verifyIf(
condition):void
Sets the shouldVerify flag to the given condition param
If set to Bool(true), the proof will be verified when the circuit is run
If set to Bool(false), the proof will not be verified when the circuit is run
Parameters
• condition: Bool
Returns
void
Note
This method is meant to be called in a circuit. Executing it outside of a circuit will have no effect.
Inherited from
Proof.verifyIf
Defined in
node_modules/o1js/dist/node/lib/proof-system/proof.d.ts:73
_proofFromBase64()
static_proofFromBase64(proofString,maxProofsVerified):unknown
Parameters
• proofString: string
• maxProofsVerified: 0 | 1 | 2
Returns
unknown
Inherited from
Proof._proofFromBase64
Defined in
node_modules/o1js/dist/node/lib/proof-system/proof.d.ts:55
_proofToBase64()
static_proofToBase64(proof,maxProofsVerified):string
Parameters
• proof: unknown
• maxProofsVerified: 0 | 1 | 2
Returns
string
Inherited from
Proof._proofToBase64
Defined in
node_modules/o1js/dist/node/lib/proof-system/proof.d.ts:56
dummy()
staticdummy<Input,OutPut>(publicInput,publicOutput,maxProofsVerified,domainLog2?):Promise<Proof<Input,OutPut>>
Dummy proof. This can be useful for ZkPrograms that handle the base case in the same method as the inductive case, using a pattern like this:
method(proof: SelfProof<I, O>, isRecursive: Bool) {
proof.verifyIf(isRecursive);
// ...
}To use such a method in the base case, you need a dummy proof:
let dummy = await MyProof.dummy(publicInput, publicOutput, 1);
await myProgram.myMethod(dummy, Bool(false));Note: The types of publicInput and publicOutput, as well as the maxProofsVerified parameter,
must match your ZkProgram. maxProofsVerified is the maximum number of proofs that any of your methods take as arguments.
Type Parameters
• Input
• OutPut
Parameters
• publicInput: Input
• publicOutput: OutPut
• maxProofsVerified: 0 | 1 | 2
• domainLog2?: number
Returns
Promise<Proof<Input, OutPut>>
Inherited from
Proof.dummy
Defined in
node_modules/o1js/dist/node/lib/proof-system/proof.d.ts:96
fromJSON()
staticfromJSON<S>(this,__namedParameters):Promise<Proof<InferProvable<S["publicInputType"]>,InferProvable<S["publicOutputType"]>>>
Type Parameters
• S extends Subclass<typeof Proof>
Parameters
• this: S
• __namedParameters: JsonProof
Returns
Promise<Proof<InferProvable<S["publicInputType"]>, InferProvable<S["publicOutputType"]>>>
Inherited from
Proof.fromJSON
Defined in
node_modules/o1js/dist/node/lib/proof-system/proof.d.ts:74
publicFields()
staticpublicFields(value):object
Parameters
• value: ProofBase<any, any>
Returns
object
input
input:
Field[]
output
output:
Field[]
Inherited from
Proof.publicFields
Defined in
node_modules/o1js/dist/node/lib/proof-system/proof.d.ts:47