@nori-zk/proof-conversion
Version:
Verifying zkVM proofs inside o1js circuits, to generate Mina compatible proof
94 lines (93 loc) • 5.71 kB
TypeScript
import { Field, VerificationKey } from 'o1js';
import { NodeProofLeft, NodeProofRight, SubtreeCarry } from '../structs.js';
declare const node: {
name: string;
maxProofsVerified(): Promise<0 | 1 | 2>;
compile: (options?: {
cache?: import("o1js").Cache;
forceRecompile?: boolean;
proofsEnabled?: boolean;
}) => Promise<{
verificationKey: {
data: string;
hash: Field;
};
}>;
verify: (proof: import("o1js").Proof<undefined, SubtreeCarry>) => Promise<boolean>;
digest: () => Promise<string>;
analyzeMethods: () => Promise<{
compute: {
proofs: import("node_modules/o1js/dist/node/lib/proof-system/proof.js").ProofClass[];
rows: number;
digest: string;
gates: import("node_modules/o1js/dist/node/snarky.js").Gate[];
publicInputSize: number;
print(): void;
summary(): Partial<Record<import("node_modules/o1js/dist/node/snarky.js").GateType | "Total rows", number>>;
};
}>;
publicInputType: import("node_modules/o1js/dist/node/lib/provable/types/struct.js").ProvablePureExtended<undefined, undefined, null>;
publicOutputType: typeof SubtreeCarry;
privateInputTypes: {
compute: [typeof NodeProofLeft, typeof VerificationKey, typeof NodeProofRight, typeof VerificationKey, typeof import("node_modules/o1js/dist/node/lib/provable/field.js").Field & ((x: string | number | bigint | import("node_modules/o1js/dist/node/lib/provable/core/fieldvar.js").FieldConst | import("node_modules/o1js/dist/node/lib/provable/core/fieldvar.js").FieldVar | import("node_modules/o1js/dist/node/lib/provable/field.js").Field) => import("node_modules/o1js/dist/node/lib/provable/field.js").Field)];
};
auxiliaryOutputTypes: {
compute: undefined;
};
rawMethods: {
compute: (args_0: NodeProofLeft, args_1: VerificationKey, args_2: NodeProofRight, args_3: VerificationKey, args_4: import("node_modules/o1js/dist/node/lib/provable/field.js").Field) => Promise<{
publicOutput: SubtreeCarry;
}>;
};
Proof: {
new ({ proof, publicInput, publicOutput, maxProofsVerified, }: {
proof: import("node_modules/o1js/dist/node/snarky.js").Pickles.Proof;
publicInput: undefined;
publicOutput: SubtreeCarry;
maxProofsVerified: 0 | 1 | 2;
}): import("o1js").Proof<undefined, SubtreeCarry>;
fromJSON<S extends import("node_modules/o1js/dist/node/lib/util/types.js").Subclass<typeof import("o1js").Proof>>(this: S, { maxProofsVerified, proof: proofString, publicInput: publicInputJson, publicOutput: publicOutputJson, }: import("o1js").JsonProof): Promise<import("o1js").Proof<import("o1js").InferProvable<S["publicInputType"]>, import("o1js").InferProvable<S["publicOutputType"]>>>;
dummy<Input, OutPut>(publicInput: Input, publicOutput: OutPut, maxProofsVerified: 0 | 1 | 2, domainLog2?: number): Promise<import("o1js").Proof<Input, OutPut>>;
readonly provable: {
toFields: (value: import("o1js").Proof<any, any>) => import("node_modules/o1js/dist/node/lib/provable/field.js").Field[];
toAuxiliary: (value?: import("o1js").Proof<any, any> | undefined) => any[];
fromFields: (fields: import("node_modules/o1js/dist/node/lib/provable/field.js").Field[], aux: any[]) => import("o1js").Proof<any, any>;
sizeInFields(): number;
check: (value: import("o1js").Proof<any, any>) => void;
toValue: (x: import("o1js").Proof<any, any>) => import("node_modules/o1js/dist/node/lib/proof-system/proof.js").ProofValue<any, any>;
fromValue: (x: import("node_modules/o1js/dist/node/lib/proof-system/proof.js").ProofValue<any, any> | import("o1js").Proof<any, any>) => import("o1js").Proof<any, any>;
toCanonical?: ((x: import("o1js").Proof<any, any>) => import("o1js").Proof<any, any>) | undefined;
};
publicInputType: import("o1js").FlexibleProvable<any>;
publicOutputType: import("o1js").FlexibleProvable<any>;
tag: () => {
name: string;
};
publicFields(value: import("o1js").ProofBase): {
input: import("node_modules/o1js/dist/node/lib/provable/field.js").Field[];
output: import("node_modules/o1js/dist/node/lib/provable/field.js").Field[];
};
_proofFromBase64(proofString: import("node_modules/o1js/dist/node/snarky.js").Base64ProofString, maxProofsVerified: 0 | 1 | 2): unknown;
_proofToBase64(proof: import("node_modules/o1js/dist/node/snarky.js").Pickles.Proof, maxProofsVerified: 0 | 1 | 2): string;
};
proofsEnabled: boolean;
setProofsEnabled(proofsEnabled: boolean): void;
} & {
compute: (args_0: import("o1js").DynamicProof<any, any> | import("node_modules/o1js/dist/node/lib/proof-system/proof.js").ProofValue<any, any>, args_1: VerificationKey | {
data: string;
hash: import("node_modules/o1js/dist/node/lib/provable/field.js").Field;
} | {
data: string;
hash: bigint;
}, args_2: import("o1js").DynamicProof<any, any> | import("node_modules/o1js/dist/node/lib/proof-system/proof.js").ProofValue<any, any>, args_3: VerificationKey | {
data: string;
hash: import("node_modules/o1js/dist/node/lib/provable/field.js").Field;
} | {
data: string;
hash: bigint;
}, args_4: string | number | bigint | import("node_modules/o1js/dist/node/lib/provable/field.js").Field) => Promise<{
proof: import("o1js").Proof<undefined, SubtreeCarry>;
auxiliaryOutput: undefined;
}>;
};
export { node };