UNPKG

@nori-zk/proof-conversion

Version:

Verifying zkVM proofs inside o1js circuits, to generate Mina compatible proof

199 lines (198 loc) 13.3 kB
import { Field } from 'o1js'; import { Accumulator } from '../accumulator.js'; declare const zkp6: { 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<import("node_modules/o1js/dist/node/lib/provable/field.js").Field, import("node_modules/o1js/dist/node/lib/provable/field.js").Field>) => 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: 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); publicOutputType: 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); privateInputTypes: { compute: [typeof Accumulator]; }; auxiliaryOutputTypes: { compute: undefined; }; rawMethods: { compute: (publicInput: import("node_modules/o1js/dist/node/lib/provable/field.js").Field, args_0: Accumulator) => Promise<{ publicOutput: import("node_modules/o1js/dist/node/lib/provable/field.js").Field; }>; }; Proof: { new ({ proof, publicInput, publicOutput, maxProofsVerified, }: { proof: import("node_modules/o1js/dist/node/snarky.js").Pickles.Proof; publicInput: import("node_modules/o1js/dist/node/lib/provable/field.js").Field; publicOutput: import("node_modules/o1js/dist/node/lib/provable/field.js").Field; maxProofsVerified: 0 | 1 | 2; }): import("o1js").Proof<import("node_modules/o1js/dist/node/lib/provable/field.js").Field, import("node_modules/o1js/dist/node/lib/provable/field.js").Field>; 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: (publicInput: string | number | bigint | import("node_modules/o1js/dist/node/lib/provable/field.js").Field, args_0: Accumulator | { proof: import("../proof.js").Sp1PlonkProof | { l_com_x: bigint | import("o1js").CanonicalForeignField; l_com_y: bigint | import("o1js").CanonicalForeignField; r_com_x: bigint | import("o1js").CanonicalForeignField; r_com_y: bigint | import("o1js").CanonicalForeignField; o_com_x: bigint | import("o1js").CanonicalForeignField; o_com_y: bigint | import("o1js").CanonicalForeignField; h0_x: bigint | import("o1js").CanonicalForeignField; h0_y: bigint | import("o1js").CanonicalForeignField; h1_x: bigint | import("o1js").CanonicalForeignField; h1_y: bigint | import("o1js").CanonicalForeignField; h2_x: bigint | import("o1js").CanonicalForeignField; h2_y: bigint | import("o1js").CanonicalForeignField; l_at_zeta: bigint | import("o1js").CanonicalForeignField; r_at_zeta: bigint | import("o1js").CanonicalForeignField; o_at_zeta: bigint | import("o1js").CanonicalForeignField; s1_at_zeta: bigint | import("o1js").CanonicalForeignField; s2_at_zeta: bigint | import("o1js").CanonicalForeignField; grand_product_x: bigint | import("o1js").CanonicalForeignField; grand_product_y: bigint | import("o1js").CanonicalForeignField; grand_product_at_omega_zeta: bigint | import("o1js").CanonicalForeignField; batch_opening_at_zeta_x: bigint | import("o1js").CanonicalForeignField; batch_opening_at_zeta_y: bigint | import("o1js").CanonicalForeignField; batch_opening_at_zeta_omega_x: bigint | import("o1js").CanonicalForeignField; batch_opening_at_zeta_omega_y: bigint | import("o1js").CanonicalForeignField; qcp_0_at_zeta: bigint | import("o1js").CanonicalForeignField; qcp_0_wire_x: bigint | import("o1js").CanonicalForeignField; qcp_0_wire_y: bigint | import("o1js").CanonicalForeignField; }; fs: import("../fiat-shamir/index.js").Sp1PlonkFiatShamir | { gamma_digest: import("node_modules/o1js/dist/node/lib/provable/bytes.js").Bytes | { bytes: { value: bigint; }[]; }; gamma: bigint | import("o1js").CanonicalForeignField; beta_digest: import("node_modules/o1js/dist/node/lib/provable/bytes.js").Bytes | { bytes: { value: bigint; }[]; }; beta: bigint | import("o1js").CanonicalForeignField; alpha_digest: import("node_modules/o1js/dist/node/lib/provable/bytes.js").Bytes | { bytes: { value: bigint; }[]; }; alpha: bigint | import("o1js").CanonicalForeignField; zeta_digest: import("node_modules/o1js/dist/node/lib/provable/bytes.js").Bytes | { bytes: { value: bigint; }[]; }; zeta: bigint | import("o1js").CanonicalForeignField; gamma_kzg_digest: import("node_modules/o1js/dist/node/lib/provable/bytes.js").Bytes | { bytes: { value: bigint; }[]; }; gamma_kzg: bigint | import("o1js").CanonicalForeignField; }; state: import("../state.js").StateUntilPairing | { pi0: bigint | import("o1js").CanonicalForeignField; pi1: bigint | import("o1js").CanonicalForeignField; zeta_pow_n: bigint | import("o1js").CanonicalForeignField; zh_eval: bigint | import("o1js").CanonicalForeignField; alpha_2_l0: bigint | import("o1js").CanonicalForeignField; hx: bigint | import("o1js").CanonicalForeignField; hy: bigint | import("o1js").CanonicalForeignField; pi: bigint | import("o1js").CanonicalForeignField; linearized_opening: bigint | import("o1js").CanonicalForeignField; lcm_x: bigint | import("o1js").CanonicalForeignField; lcm_y: bigint | import("o1js").CanonicalForeignField; cm_x: bigint | import("o1js").CanonicalForeignField; cm_y: bigint | import("o1js").CanonicalForeignField; cm_opening: bigint | import("o1js").CanonicalForeignField; kzg_random: bigint | import("o1js").CanonicalForeignField; kzg_cm_x: bigint | import("o1js").CanonicalForeignField; kzg_cm_y: bigint | import("o1js").CanonicalForeignField; neg_fq_x: bigint | import("o1js").CanonicalForeignField; neg_fq_y: bigint | import("o1js").CanonicalForeignField; H: import("o1js").UInt32[] | bigint[]; }; }) => Promise<{ proof: import("o1js").Proof<import("node_modules/o1js/dist/node/lib/provable/field.js").Field, import("node_modules/o1js/dist/node/lib/provable/field.js").Field>; auxiliaryOutput: undefined; }>; }; declare const ZKP6Proof: { new ({ proof, publicInput, publicOutput, maxProofsVerified, }: { proof: unknown; publicInput: import("node_modules/o1js/dist/node/lib/provable/field.js").Field; publicOutput: import("node_modules/o1js/dist/node/lib/provable/field.js").Field; maxProofsVerified: 0 | 2 | 1; }): import("o1js").Proof<import("node_modules/o1js/dist/node/lib/provable/field.js").Field, import("node_modules/o1js/dist/node/lib/provable/field.js").Field>; 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 | 2 | 1, 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("o1js").Proof<any, any> | import("node_modules/o1js/dist/node/lib/proof-system/proof.js").ProofValue<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<any, any>): { 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: string, maxProofsVerified: 0 | 2 | 1): unknown; _proofToBase64(proof: unknown, maxProofsVerified: 0 | 2 | 1): string; } & { provable: import("o1js").Provable<import("o1js").Proof<import("node_modules/o1js/dist/node/lib/provable/field.js").Field, import("node_modules/o1js/dist/node/lib/provable/field.js").Field>, import("node_modules/o1js/dist/node/lib/proof-system/proof.js").ProofValue<bigint, bigint>>; }; export { ZKP6Proof, zkp6 };