@nori-zk/proof-conversion
Version:
Verifying zkVM proofs inside o1js circuits, to generate Mina compatible proof
23 lines (22 loc) • 883 B
TypeScript
/**
* More efficient multiplication of sums
*/
import { AlmostForeignField, ForeignField, Gadgets } from 'o1js';
export { assertMul, UnreducedSum, AlmostReducedSum };
type ForeignFieldSum = ReturnType<typeof Gadgets.ForeignField.Sum>;
declare function assertMul(a: AlmostReducedSum | AlmostForeignField, b: AlmostReducedSum | AlmostForeignField, c: UnreducedSum | ForeignField): void;
declare class UnreducedSum {
value: ForeignFieldSum;
modulus: bigint;
type: typeof ForeignField;
constructor(input: ForeignField);
add(input: ForeignField): this;
sub(input: ForeignField): this;
toBigint(): bigint;
static from<S extends UnreducedSum>(sum: S | ForeignField): S;
}
declare class AlmostReducedSum extends UnreducedSum {
constructor(input: AlmostForeignField);
add(input: AlmostForeignField): this;
sub(input: AlmostForeignField): this;
}