UNPKG

@nori-zk/proof-conversion

Version:

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

1,211 lines (1,210 loc) 35.6 kB
import { Field } from 'o1js'; import { G1Affine, G2Affine } from '../../ec/index.js'; import { Fp12 } from '../../towers/index.js'; declare const RecursionProof_base: (new (value: { negA: G1Affine; B: G2Affine; C: G1Affine; PI: G1Affine; c: Fp12; c_inv: Fp12; shift_power: import("node_modules/o1js/dist/node/lib/provable/field.js").Field; }) => { negA: G1Affine; B: G2Affine; C: G1Affine; PI: G1Affine; c: Fp12; c_inv: Fp12; shift_power: import("node_modules/o1js/dist/node/lib/provable/field.js").Field; }) & { _isStruct: true; } & Omit<import("node_modules/o1js/dist/node/lib/provable/types/provable-intf.js").Provable<{ negA: G1Affine; B: G2Affine; C: G1Affine; PI: G1Affine; c: Fp12; c_inv: Fp12; shift_power: import("node_modules/o1js/dist/node/lib/provable/field.js").Field; }, { negA: { x: bigint; y: bigint; }; B: { x: { c0: bigint; c1: bigint; }; y: { c0: bigint; c1: bigint; }; }; C: { x: bigint; y: bigint; }; PI: { x: bigint; y: bigint; }; c: { c0: { c0: { c0: bigint; c1: bigint; }; c1: { c0: bigint; c1: bigint; }; c2: { c0: bigint; c1: bigint; }; }; c1: { c0: { c0: bigint; c1: bigint; }; c1: { c0: bigint; c1: bigint; }; c2: { c0: bigint; c1: bigint; }; }; }; c_inv: { c0: { c0: { c0: bigint; c1: bigint; }; c1: { c0: bigint; c1: bigint; }; c2: { c0: bigint; c1: bigint; }; }; c1: { c0: { c0: bigint; c1: bigint; }; c1: { c0: bigint; c1: bigint; }; c2: { c0: bigint; c1: bigint; }; }; }; shift_power: bigint; }>, "fromFields"> & { fromFields: (fields: import("node_modules/o1js/dist/node/lib/provable/field.js").Field[]) => { negA: G1Affine; B: G2Affine; C: G1Affine; PI: G1Affine; c: Fp12; c_inv: Fp12; shift_power: import("node_modules/o1js/dist/node/lib/provable/field.js").Field; }; } & { fromValue: (value: { negA: G1Affine | { x: bigint | import("o1js").AlmostForeignField; y: bigint | import("o1js").AlmostForeignField; }; B: G2Affine | { x: import("../../towers/fp2.js").Fp2 | { c0: bigint | import("o1js").AlmostForeignField; c1: bigint | import("o1js").AlmostForeignField; }; y: import("../../towers/fp2.js").Fp2 | { c0: bigint | import("o1js").AlmostForeignField; c1: bigint | import("o1js").AlmostForeignField; }; }; C: G1Affine | { x: bigint | import("o1js").AlmostForeignField; y: bigint | import("o1js").AlmostForeignField; }; PI: G1Affine | { x: bigint | import("o1js").AlmostForeignField; y: bigint | import("o1js").AlmostForeignField; }; c: Fp12 | { c0: import("../../towers/fp6.js").Fp6 | { c0: import("../../towers/fp2.js").Fp2 | { c0: bigint | import("o1js").AlmostForeignField; c1: bigint | import("o1js").AlmostForeignField; }; c1: import("../../towers/fp2.js").Fp2 | { c0: bigint | import("o1js").AlmostForeignField; c1: bigint | import("o1js").AlmostForeignField; }; c2: import("../../towers/fp2.js").Fp2 | { c0: bigint | import("o1js").AlmostForeignField; c1: bigint | import("o1js").AlmostForeignField; }; }; c1: import("../../towers/fp6.js").Fp6 | { c0: import("../../towers/fp2.js").Fp2 | { c0: bigint | import("o1js").AlmostForeignField; c1: bigint | import("o1js").AlmostForeignField; }; c1: import("../../towers/fp2.js").Fp2 | { c0: bigint | import("o1js").AlmostForeignField; c1: bigint | import("o1js").AlmostForeignField; }; c2: import("../../towers/fp2.js").Fp2 | { c0: bigint | import("o1js").AlmostForeignField; c1: bigint | import("o1js").AlmostForeignField; }; }; }; c_inv: Fp12 | { c0: import("../../towers/fp6.js").Fp6 | { c0: import("../../towers/fp2.js").Fp2 | { c0: bigint | import("o1js").AlmostForeignField; c1: bigint | import("o1js").AlmostForeignField; }; c1: import("../../towers/fp2.js").Fp2 | { c0: bigint | import("o1js").AlmostForeignField; c1: bigint | import("o1js").AlmostForeignField; }; c2: import("../../towers/fp2.js").Fp2 | { c0: bigint | import("o1js").AlmostForeignField; c1: bigint | import("o1js").AlmostForeignField; }; }; c1: import("../../towers/fp6.js").Fp6 | { c0: import("../../towers/fp2.js").Fp2 | { c0: bigint | import("o1js").AlmostForeignField; c1: bigint | import("o1js").AlmostForeignField; }; c1: import("../../towers/fp2.js").Fp2 | { c0: bigint | import("o1js").AlmostForeignField; c1: bigint | import("o1js").AlmostForeignField; }; c2: import("../../towers/fp2.js").Fp2 | { c0: bigint | import("o1js").AlmostForeignField; c1: bigint | import("o1js").AlmostForeignField; }; }; }; shift_power: string | number | bigint | import("node_modules/o1js/dist/node/lib/provable/field.js").Field; }) => { negA: G1Affine; B: G2Affine; C: G1Affine; PI: G1Affine; c: Fp12; c_inv: Fp12; shift_power: import("node_modules/o1js/dist/node/lib/provable/field.js").Field; }; toInput: (x: { negA: G1Affine; B: G2Affine; C: G1Affine; PI: G1Affine; c: Fp12; c_inv: Fp12; shift_power: import("node_modules/o1js/dist/node/lib/provable/field.js").Field; }) => { fields?: Field[] | undefined; packed?: [Field, number][] | undefined; }; toJSON: (x: { negA: G1Affine; B: G2Affine; C: G1Affine; PI: G1Affine; c: Fp12; c_inv: Fp12; shift_power: import("node_modules/o1js/dist/node/lib/provable/field.js").Field; }) => { negA: { x: string; y: string; }; B: { x: { c0: string; c1: string; }; y: { c0: string; c1: string; }; }; C: { x: string; y: string; }; PI: { x: string; y: string; }; c: { c0: { c0: { c0: string; c1: string; }; c1: { c0: string; c1: string; }; c2: { c0: string; c1: string; }; }; c1: { c0: { c0: string; c1: string; }; c1: { c0: string; c1: string; }; c2: { c0: string; c1: string; }; }; }; c_inv: { c0: { c0: { c0: string; c1: string; }; c1: { c0: string; c1: string; }; c2: { c0: string; c1: string; }; }; c1: { c0: { c0: string; c1: string; }; c1: { c0: string; c1: string; }; c2: { c0: string; c1: string; }; }; }; shift_power: string; }; fromJSON: (x: { negA: { x: string; y: string; }; B: { x: { c0: string; c1: string; }; y: { c0: string; c1: string; }; }; C: { x: string; y: string; }; PI: { x: string; y: string; }; c: { c0: { c0: { c0: string; c1: string; }; c1: { c0: string; c1: string; }; c2: { c0: string; c1: string; }; }; c1: { c0: { c0: string; c1: string; }; c1: { c0: string; c1: string; }; c2: { c0: string; c1: string; }; }; }; c_inv: { c0: { c0: { c0: string; c1: string; }; c1: { c0: string; c1: string; }; c2: { c0: string; c1: string; }; }; c1: { c0: { c0: string; c1: string; }; c1: { c0: string; c1: string; }; c2: { c0: string; c1: string; }; }; }; shift_power: string; }) => { negA: G1Affine; B: G2Affine; C: G1Affine; PI: G1Affine; c: Fp12; c_inv: Fp12; shift_power: import("node_modules/o1js/dist/node/lib/provable/field.js").Field; }; empty: () => { negA: G1Affine; B: G2Affine; C: G1Affine; PI: G1Affine; c: Fp12; c_inv: Fp12; shift_power: import("node_modules/o1js/dist/node/lib/provable/field.js").Field; }; }; declare class RecursionProof extends RecursionProof_base { deepClone(): RecursionProof; } declare const State_base: (new (value: { T: G2Affine; f: Fp12; g_digest: import("node_modules/o1js/dist/node/lib/provable/field.js").Field; }) => { T: G2Affine; f: Fp12; g_digest: import("node_modules/o1js/dist/node/lib/provable/field.js").Field; }) & { _isStruct: true; } & Omit<import("node_modules/o1js/dist/node/lib/provable/types/provable-intf.js").Provable<{ T: G2Affine; f: Fp12; g_digest: import("node_modules/o1js/dist/node/lib/provable/field.js").Field; }, { T: { x: { c0: bigint; c1: bigint; }; y: { c0: bigint; c1: bigint; }; }; f: { c0: { c0: { c0: bigint; c1: bigint; }; c1: { c0: bigint; c1: bigint; }; c2: { c0: bigint; c1: bigint; }; }; c1: { c0: { c0: bigint; c1: bigint; }; c1: { c0: bigint; c1: bigint; }; c2: { c0: bigint; c1: bigint; }; }; }; g_digest: bigint; }>, "fromFields"> & { fromFields: (fields: import("node_modules/o1js/dist/node/lib/provable/field.js").Field[]) => { T: G2Affine; f: Fp12; g_digest: import("node_modules/o1js/dist/node/lib/provable/field.js").Field; }; } & { fromValue: (value: { T: G2Affine | { x: import("../../towers/fp2.js").Fp2 | { c0: bigint | import("o1js").AlmostForeignField; c1: bigint | import("o1js").AlmostForeignField; }; y: import("../../towers/fp2.js").Fp2 | { c0: bigint | import("o1js").AlmostForeignField; c1: bigint | import("o1js").AlmostForeignField; }; }; f: Fp12 | { c0: import("../../towers/fp6.js").Fp6 | { c0: import("../../towers/fp2.js").Fp2 | { c0: bigint | import("o1js").AlmostForeignField; c1: bigint | import("o1js").AlmostForeignField; }; c1: import("../../towers/fp2.js").Fp2 | { c0: bigint | import("o1js").AlmostForeignField; c1: bigint | import("o1js").AlmostForeignField; }; c2: import("../../towers/fp2.js").Fp2 | { c0: bigint | import("o1js").AlmostForeignField; c1: bigint | import("o1js").AlmostForeignField; }; }; c1: import("../../towers/fp6.js").Fp6 | { c0: import("../../towers/fp2.js").Fp2 | { c0: bigint | import("o1js").AlmostForeignField; c1: bigint | import("o1js").AlmostForeignField; }; c1: import("../../towers/fp2.js").Fp2 | { c0: bigint | import("o1js").AlmostForeignField; c1: bigint | import("o1js").AlmostForeignField; }; c2: import("../../towers/fp2.js").Fp2 | { c0: bigint | import("o1js").AlmostForeignField; c1: bigint | import("o1js").AlmostForeignField; }; }; }; g_digest: string | number | bigint | import("node_modules/o1js/dist/node/lib/provable/field.js").Field; }) => { T: G2Affine; f: Fp12; g_digest: import("node_modules/o1js/dist/node/lib/provable/field.js").Field; }; toInput: (x: { T: G2Affine; f: Fp12; g_digest: import("node_modules/o1js/dist/node/lib/provable/field.js").Field; }) => { fields?: Field[] | undefined; packed?: [Field, number][] | undefined; }; toJSON: (x: { T: G2Affine; f: Fp12; g_digest: import("node_modules/o1js/dist/node/lib/provable/field.js").Field; }) => { T: { x: { c0: string; c1: string; }; y: { c0: string; c1: string; }; }; f: { c0: { c0: { c0: string; c1: string; }; c1: { c0: string; c1: string; }; c2: { c0: string; c1: string; }; }; c1: { c0: { c0: string; c1: string; }; c1: { c0: string; c1: string; }; c2: { c0: string; c1: string; }; }; }; g_digest: string; }; fromJSON: (x: { T: { x: { c0: string; c1: string; }; y: { c0: string; c1: string; }; }; f: { c0: { c0: { c0: string; c1: string; }; c1: { c0: string; c1: string; }; c2: { c0: string; c1: string; }; }; c1: { c0: { c0: string; c1: string; }; c1: { c0: string; c1: string; }; c2: { c0: string; c1: string; }; }; }; g_digest: string; }) => { T: G2Affine; f: Fp12; g_digest: import("node_modules/o1js/dist/node/lib/provable/field.js").Field; }; empty: () => { T: G2Affine; f: Fp12; g_digest: import("node_modules/o1js/dist/node/lib/provable/field.js").Field; }; }; declare class State extends State_base { deepClone(): State; } declare const Accumulator_base: (new (value: { proof: RecursionProof; state: State; }) => { proof: RecursionProof; state: State; }) & { _isStruct: true; } & Omit<import("node_modules/o1js/dist/node/lib/provable/types/provable-intf.js").Provable<{ proof: RecursionProof; state: State; }, { proof: { negA: { x: bigint; y: bigint; }; B: { x: { c0: bigint; c1: bigint; }; y: { c0: bigint; c1: bigint; }; }; C: { x: bigint; y: bigint; }; PI: { x: bigint; y: bigint; }; c: { c0: { c0: { c0: bigint; c1: bigint; }; c1: { c0: bigint; c1: bigint; }; c2: { c0: bigint; c1: bigint; }; }; c1: { c0: { c0: bigint; c1: bigint; }; c1: { c0: bigint; c1: bigint; }; c2: { c0: bigint; c1: bigint; }; }; }; c_inv: { c0: { c0: { c0: bigint; c1: bigint; }; c1: { c0: bigint; c1: bigint; }; c2: { c0: bigint; c1: bigint; }; }; c1: { c0: { c0: bigint; c1: bigint; }; c1: { c0: bigint; c1: bigint; }; c2: { c0: bigint; c1: bigint; }; }; }; shift_power: bigint; }; state: { T: { x: { c0: bigint; c1: bigint; }; y: { c0: bigint; c1: bigint; }; }; f: { c0: { c0: { c0: bigint; c1: bigint; }; c1: { c0: bigint; c1: bigint; }; c2: { c0: bigint; c1: bigint; }; }; c1: { c0: { c0: bigint; c1: bigint; }; c1: { c0: bigint; c1: bigint; }; c2: { c0: bigint; c1: bigint; }; }; }; g_digest: bigint; }; }>, "fromFields"> & { fromFields: (fields: import("node_modules/o1js/dist/node/lib/provable/field.js").Field[]) => { proof: RecursionProof; state: State; }; } & { fromValue: (value: { proof: RecursionProof | { negA: G1Affine | { x: bigint | import("o1js").AlmostForeignField; y: bigint | import("o1js").AlmostForeignField; }; B: G2Affine | { x: import("../../towers/fp2.js").Fp2 | { c0: bigint | import("o1js").AlmostForeignField; c1: bigint | import("o1js").AlmostForeignField; }; y: import("../../towers/fp2.js").Fp2 | { c0: bigint | import("o1js").AlmostForeignField; c1: bigint | import("o1js").AlmostForeignField; }; }; C: G1Affine | { x: bigint | import("o1js").AlmostForeignField; y: bigint | import("o1js").AlmostForeignField; }; PI: G1Affine | { x: bigint | import("o1js").AlmostForeignField; y: bigint | import("o1js").AlmostForeignField; }; c: Fp12 | { c0: import("../../towers/fp6.js").Fp6 | { c0: import("../../towers/fp2.js").Fp2 | { c0: bigint | import("o1js").AlmostForeignField; c1: bigint | import("o1js").AlmostForeignField; }; c1: import("../../towers/fp2.js").Fp2 | { c0: bigint | import("o1js").AlmostForeignField; c1: bigint | import("o1js").AlmostForeignField; }; c2: import("../../towers/fp2.js").Fp2 | { c0: bigint | import("o1js").AlmostForeignField; c1: bigint | import("o1js").AlmostForeignField; }; }; c1: import("../../towers/fp6.js").Fp6 | { c0: import("../../towers/fp2.js").Fp2 | { c0: bigint | import("o1js").AlmostForeignField; c1: bigint | import("o1js").AlmostForeignField; }; c1: import("../../towers/fp2.js").Fp2 | { c0: bigint | import("o1js").AlmostForeignField; c1: bigint | import("o1js").AlmostForeignField; }; c2: import("../../towers/fp2.js").Fp2 | { c0: bigint | import("o1js").AlmostForeignField; c1: bigint | import("o1js").AlmostForeignField; }; }; }; c_inv: Fp12 | { c0: import("../../towers/fp6.js").Fp6 | { c0: import("../../towers/fp2.js").Fp2 | { c0: bigint | import("o1js").AlmostForeignField; c1: bigint | import("o1js").AlmostForeignField; }; c1: import("../../towers/fp2.js").Fp2 | { c0: bigint | import("o1js").AlmostForeignField; c1: bigint | import("o1js").AlmostForeignField; }; c2: import("../../towers/fp2.js").Fp2 | { c0: bigint | import("o1js").AlmostForeignField; c1: bigint | import("o1js").AlmostForeignField; }; }; c1: import("../../towers/fp6.js").Fp6 | { c0: import("../../towers/fp2.js").Fp2 | { c0: bigint | import("o1js").AlmostForeignField; c1: bigint | import("o1js").AlmostForeignField; }; c1: import("../../towers/fp2.js").Fp2 | { c0: bigint | import("o1js").AlmostForeignField; c1: bigint | import("o1js").AlmostForeignField; }; c2: import("../../towers/fp2.js").Fp2 | { c0: bigint | import("o1js").AlmostForeignField; c1: bigint | import("o1js").AlmostForeignField; }; }; }; shift_power: string | number | bigint | import("node_modules/o1js/dist/node/lib/provable/field.js").Field; }; state: State | { T: G2Affine | { x: import("../../towers/fp2.js").Fp2 | { c0: bigint | import("o1js").AlmostForeignField; c1: bigint | import("o1js").AlmostForeignField; }; y: import("../../towers/fp2.js").Fp2 | { c0: bigint | import("o1js").AlmostForeignField; c1: bigint | import("o1js").AlmostForeignField; }; }; f: Fp12 | { c0: import("../../towers/fp6.js").Fp6 | { c0: import("../../towers/fp2.js").Fp2 | { c0: bigint | import("o1js").AlmostForeignField; c1: bigint | import("o1js").AlmostForeignField; }; c1: import("../../towers/fp2.js").Fp2 | { c0: bigint | import("o1js").AlmostForeignField; c1: bigint | import("o1js").AlmostForeignField; }; c2: import("../../towers/fp2.js").Fp2 | { c0: bigint | import("o1js").AlmostForeignField; c1: bigint | import("o1js").AlmostForeignField; }; }; c1: import("../../towers/fp6.js").Fp6 | { c0: import("../../towers/fp2.js").Fp2 | { c0: bigint | import("o1js").AlmostForeignField; c1: bigint | import("o1js").AlmostForeignField; }; c1: import("../../towers/fp2.js").Fp2 | { c0: bigint | import("o1js").AlmostForeignField; c1: bigint | import("o1js").AlmostForeignField; }; c2: import("../../towers/fp2.js").Fp2 | { c0: bigint | import("o1js").AlmostForeignField; c1: bigint | import("o1js").AlmostForeignField; }; }; }; g_digest: string | number | bigint | import("node_modules/o1js/dist/node/lib/provable/field.js").Field; }; }) => { proof: RecursionProof; state: State; }; toInput: (x: { proof: RecursionProof; state: State; }) => { fields?: Field[] | undefined; packed?: [Field, number][] | undefined; }; toJSON: (x: { proof: RecursionProof; state: State; }) => { proof: { negA: { x: string; y: string; }; B: { x: { c0: string; c1: string; }; y: { c0: string; c1: string; }; }; C: { x: string; y: string; }; PI: { x: string; y: string; }; c: { c0: { c0: { c0: string; c1: string; }; c1: { c0: string; c1: string; }; c2: { c0: string; c1: string; }; }; c1: { c0: { c0: string; c1: string; }; c1: { c0: string; c1: string; }; c2: { c0: string; c1: string; }; }; }; c_inv: { c0: { c0: { c0: string; c1: string; }; c1: { c0: string; c1: string; }; c2: { c0: string; c1: string; }; }; c1: { c0: { c0: string; c1: string; }; c1: { c0: string; c1: string; }; c2: { c0: string; c1: string; }; }; }; shift_power: string; }; state: { T: { x: { c0: string; c1: string; }; y: { c0: string; c1: string; }; }; f: { c0: { c0: { c0: string; c1: string; }; c1: { c0: string; c1: string; }; c2: { c0: string; c1: string; }; }; c1: { c0: { c0: string; c1: string; }; c1: { c0: string; c1: string; }; c2: { c0: string; c1: string; }; }; }; g_digest: string; }; }; fromJSON: (x: { proof: { negA: { x: string; y: string; }; B: { x: { c0: string; c1: string; }; y: { c0: string; c1: string; }; }; C: { x: string; y: string; }; PI: { x: string; y: string; }; c: { c0: { c0: { c0: string; c1: string; }; c1: { c0: string; c1: string; }; c2: { c0: string; c1: string; }; }; c1: { c0: { c0: string; c1: string; }; c1: { c0: string; c1: string; }; c2: { c0: string; c1: string; }; }; }; c_inv: { c0: { c0: { c0: string; c1: string; }; c1: { c0: string; c1: string; }; c2: { c0: string; c1: string; }; }; c1: { c0: { c0: string; c1: string; }; c1: { c0: string; c1: string; }; c2: { c0: string; c1: string; }; }; }; shift_power: string; }; state: { T: { x: { c0: string; c1: string; }; y: { c0: string; c1: string; }; }; f: { c0: { c0: { c0: string; c1: string; }; c1: { c0: string; c1: string; }; c2: { c0: string; c1: string; }; }; c1: { c0: { c0: string; c1: string; }; c1: { c0: string; c1: string; }; c2: { c0: string; c1: string; }; }; }; g_digest: string; }; }) => { proof: RecursionProof; state: State; }; empty: () => { proof: RecursionProof; state: State; }; }; declare class Accumulator extends Accumulator_base { deepClone(): Accumulator; } export { RecursionProof, State, Accumulator };