@nori-zk/proof-conversion
Version:
Verifying zkVM proofs inside o1js circuits, to generate Mina compatible proof
1,031 lines (1,030 loc) • 31.6 kB
TypeScript
import { Field } from 'o1js';
import { Fp12 } from '../towers/index.js';
import { G1Affine } from '../ec/index.js';
declare const KzgProof_base: (new (value: {
A: G1Affine;
negB: G1Affine;
shift_power: import("node_modules/o1js/dist/node/lib/provable/field.js").Field;
c: Fp12;
c_inv: Fp12;
pi0: import("o1js").CanonicalForeignField;
pi1: import("o1js").CanonicalForeignField;
}) => {
A: G1Affine;
negB: G1Affine;
shift_power: import("node_modules/o1js/dist/node/lib/provable/field.js").Field;
c: Fp12;
c_inv: Fp12;
pi0: import("o1js").CanonicalForeignField;
pi1: import("o1js").CanonicalForeignField;
}) & {
_isStruct: true;
} & Omit<import("node_modules/o1js/dist/node/lib/provable/types/provable-intf.js").Provable<{
A: G1Affine;
negB: G1Affine;
shift_power: import("node_modules/o1js/dist/node/lib/provable/field.js").Field;
c: Fp12;
c_inv: Fp12;
pi0: import("o1js").CanonicalForeignField;
pi1: import("o1js").CanonicalForeignField;
}, {
A: {
x: bigint;
y: bigint;
};
negB: {
x: bigint;
y: bigint;
};
shift_power: 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;
};
};
};
pi0: bigint;
pi1: bigint;
}>, "fromFields"> & {
fromFields: (fields: import("node_modules/o1js/dist/node/lib/provable/field.js").Field[]) => {
A: G1Affine;
negB: G1Affine;
shift_power: import("node_modules/o1js/dist/node/lib/provable/field.js").Field;
c: Fp12;
c_inv: Fp12;
pi0: import("o1js").CanonicalForeignField;
pi1: import("o1js").CanonicalForeignField;
};
} & {
fromValue: (value: {
A: G1Affine | {
x: bigint | import("o1js").AlmostForeignField;
y: bigint | import("o1js").AlmostForeignField;
};
negB: G1Affine | {
x: bigint | import("o1js").AlmostForeignField;
y: bigint | import("o1js").AlmostForeignField;
};
shift_power: string | number | bigint | import("node_modules/o1js/dist/node/lib/provable/field.js").Field;
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;
};
};
};
pi0: bigint | import("o1js").CanonicalForeignField;
pi1: bigint | import("o1js").CanonicalForeignField;
}) => {
A: G1Affine;
negB: G1Affine;
shift_power: import("node_modules/o1js/dist/node/lib/provable/field.js").Field;
c: Fp12;
c_inv: Fp12;
pi0: import("o1js").CanonicalForeignField;
pi1: import("o1js").CanonicalForeignField;
};
toInput: (x: {
A: G1Affine;
negB: G1Affine;
shift_power: import("node_modules/o1js/dist/node/lib/provable/field.js").Field;
c: Fp12;
c_inv: Fp12;
pi0: import("o1js").CanonicalForeignField;
pi1: import("o1js").CanonicalForeignField;
}) => {
fields?: Field[] | undefined;
packed?: [Field, number][] | undefined;
};
toJSON: (x: {
A: G1Affine;
negB: G1Affine;
shift_power: import("node_modules/o1js/dist/node/lib/provable/field.js").Field;
c: Fp12;
c_inv: Fp12;
pi0: import("o1js").CanonicalForeignField;
pi1: import("o1js").CanonicalForeignField;
}) => {
A: {
x: string;
y: string;
};
negB: {
x: string;
y: string;
};
shift_power: 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;
};
};
};
pi0: string;
pi1: string;
};
fromJSON: (x: {
A: {
x: string;
y: string;
};
negB: {
x: string;
y: string;
};
shift_power: 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;
};
};
};
pi0: string;
pi1: string;
}) => {
A: G1Affine;
negB: G1Affine;
shift_power: import("node_modules/o1js/dist/node/lib/provable/field.js").Field;
c: Fp12;
c_inv: Fp12;
pi0: import("o1js").CanonicalForeignField;
pi1: import("o1js").CanonicalForeignField;
};
empty: () => {
A: G1Affine;
negB: G1Affine;
shift_power: import("node_modules/o1js/dist/node/lib/provable/field.js").Field;
c: Fp12;
c_inv: Fp12;
pi0: import("o1js").CanonicalForeignField;
pi1: import("o1js").CanonicalForeignField;
};
};
declare class KzgProof extends KzgProof_base {
}
declare const KzgState_base: (new (value: {
f: Fp12;
lines_hashes_digest: import("node_modules/o1js/dist/node/lib/provable/field.js").Field;
}) => {
f: Fp12;
lines_hashes_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<{
f: Fp12;
lines_hashes_digest: import("node_modules/o1js/dist/node/lib/provable/field.js").Field;
}, {
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;
};
};
};
lines_hashes_digest: bigint;
}>, "fromFields"> & {
fromFields: (fields: import("node_modules/o1js/dist/node/lib/provable/field.js").Field[]) => {
f: Fp12;
lines_hashes_digest: import("node_modules/o1js/dist/node/lib/provable/field.js").Field;
};
} & {
fromValue: (value: {
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;
};
};
};
lines_hashes_digest: string | number | bigint | import("node_modules/o1js/dist/node/lib/provable/field.js").Field;
}) => {
f: Fp12;
lines_hashes_digest: import("node_modules/o1js/dist/node/lib/provable/field.js").Field;
};
toInput: (x: {
f: Fp12;
lines_hashes_digest: import("node_modules/o1js/dist/node/lib/provable/field.js").Field;
}) => {
fields?: Field[] | undefined;
packed?: [Field, number][] | undefined;
};
toJSON: (x: {
f: Fp12;
lines_hashes_digest: import("node_modules/o1js/dist/node/lib/provable/field.js").Field;
}) => {
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;
};
};
};
lines_hashes_digest: string;
};
fromJSON: (x: {
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;
};
};
};
lines_hashes_digest: string;
}) => {
f: Fp12;
lines_hashes_digest: import("node_modules/o1js/dist/node/lib/provable/field.js").Field;
};
empty: () => {
f: Fp12;
lines_hashes_digest: import("node_modules/o1js/dist/node/lib/provable/field.js").Field;
};
};
declare class KzgState extends KzgState_base {
deepClone(): KzgState;
}
declare const KzgAccumulator_base: (new (value: {
proof: KzgProof;
state: KzgState;
}) => {
proof: KzgProof;
state: KzgState;
}) & {
_isStruct: true;
} & Omit<import("node_modules/o1js/dist/node/lib/provable/types/provable-intf.js").Provable<{
proof: KzgProof;
state: KzgState;
}, {
proof: {
A: {
x: bigint;
y: bigint;
};
negB: {
x: bigint;
y: bigint;
};
shift_power: 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;
};
};
};
pi0: bigint;
pi1: bigint;
};
state: {
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;
};
};
};
lines_hashes_digest: bigint;
};
}>, "fromFields"> & {
fromFields: (fields: import("node_modules/o1js/dist/node/lib/provable/field.js").Field[]) => {
proof: KzgProof;
state: KzgState;
};
} & {
fromValue: (value: {
proof: KzgProof | {
A: G1Affine | {
x: bigint | import("o1js").AlmostForeignField;
y: bigint | import("o1js").AlmostForeignField;
};
negB: G1Affine | {
x: bigint | import("o1js").AlmostForeignField;
y: bigint | import("o1js").AlmostForeignField;
};
shift_power: string | number | bigint | import("node_modules/o1js/dist/node/lib/provable/field.js").Field;
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;
};
};
};
pi0: bigint | import("o1js").CanonicalForeignField;
pi1: bigint | import("o1js").CanonicalForeignField;
};
state: KzgState | {
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;
};
};
};
lines_hashes_digest: string | number | bigint | import("node_modules/o1js/dist/node/lib/provable/field.js").Field;
};
}) => {
proof: KzgProof;
state: KzgState;
};
toInput: (x: {
proof: KzgProof;
state: KzgState;
}) => {
fields?: Field[] | undefined;
packed?: [Field, number][] | undefined;
};
toJSON: (x: {
proof: KzgProof;
state: KzgState;
}) => {
proof: {
A: {
x: string;
y: string;
};
negB: {
x: string;
y: string;
};
shift_power: 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;
};
};
};
pi0: string;
pi1: string;
};
state: {
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;
};
};
};
lines_hashes_digest: string;
};
};
fromJSON: (x: {
proof: {
A: {
x: string;
y: string;
};
negB: {
x: string;
y: string;
};
shift_power: 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;
};
};
};
pi0: string;
pi1: string;
};
state: {
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;
};
};
};
lines_hashes_digest: string;
};
}) => {
proof: KzgProof;
state: KzgState;
};
empty: () => {
proof: KzgProof;
state: KzgState;
};
};
declare class KzgAccumulator extends KzgAccumulator_base {
deepClone(): KzgAccumulator;
}
declare class ArrayListHasher {
static n: number;
static empty(): Field;
static hash(arr: Array<Field>): Field;
static open(lhs: Array<Field>, opening: Array<Fp12>, rhs: Array<Field>): Field;
}
export { KzgProof, KzgState, KzgAccumulator, ArrayListHasher };