UNPKG

@nori-zk/proof-conversion

Version:

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

97 lines (96 loc) 2.42 kB
import { G1Affine, G2Affine } from '../ec/index.js'; import { Fp2, Fp12, Fp2JSON } from '../towers/index.js'; import { computeLineCoeffs } from './coeffs.js'; import { AffineCache } from './precompute.js'; interface G2LineJSON { lambda: Fp2JSON; neg_mu: Fp2JSON; } declare const G2Line_base: (new (value: { lambda: Fp2; neg_mu: Fp2; }) => { lambda: Fp2; neg_mu: Fp2; }) & { _isStruct: true; } & Omit<import("node_modules/o1js/dist/node/lib/provable/types/provable-intf.js").Provable<{ lambda: Fp2; neg_mu: Fp2; }, { lambda: { c0: bigint; c1: bigint; }; neg_mu: { c0: bigint; c1: bigint; }; }>, "fromFields"> & { fromFields: (fields: import("node_modules/o1js/dist/node/lib/provable/field.js").Field[]) => { lambda: Fp2; neg_mu: Fp2; }; } & { fromValue: (value: { lambda: Fp2 | { c0: bigint | import("o1js").AlmostForeignField; c1: bigint | import("o1js").AlmostForeignField; }; neg_mu: Fp2 | { c0: bigint | import("o1js").AlmostForeignField; c1: bigint | import("o1js").AlmostForeignField; }; }) => { lambda: Fp2; neg_mu: Fp2; }; toInput: (x: { lambda: Fp2; neg_mu: Fp2; }) => { fields?: import("o1js").Field[] | undefined; packed?: [import("o1js").Field, number][] | undefined; }; toJSON: (x: { lambda: Fp2; neg_mu: Fp2; }) => { lambda: { c0: string; c1: string; }; neg_mu: { c0: string; c1: string; }; }; fromJSON: (x: { lambda: { c0: string; c1: string; }; neg_mu: { c0: string; c1: string; }; }) => { lambda: Fp2; neg_mu: Fp2; }; empty: () => { lambda: Fp2; neg_mu: Fp2; }; }; declare class G2Line extends G2Line_base { constructor(lambda: Fp2, neg_mu: Fp2); static fromJSON(json: G2LineJSON): G2Line; static fromPoints(lhs: G2Affine, rhs: G2Affine): G2Line; psi(cache: AffineCache): Fp12; evaluate(p: G2Affine): Fp2; assert_is_line(t: G2Affine, q: G2Affine): void; assert_is_tangent(p: G2Affine): void; evaluate_g1(p: G1Affine): Fp2; } export { G2Line, G2LineJSON, computeLineCoeffs };