forked from tornado-packages/archive-monorepo
514 lines
14 KiB
TypeScript
514 lines
14 KiB
TypeScript
|
declare module "snarkjs/src/bigint" {
|
||
|
export = wBigInt;
|
||
|
export class wBigInt {
|
||
|
private constructor();
|
||
|
isOdd(): boolean;
|
||
|
isNegative(): boolean;
|
||
|
and(m: any): number;
|
||
|
div(c: any): number;
|
||
|
mod(c: any): number;
|
||
|
pow(c: any): number;
|
||
|
abs(): any;
|
||
|
modPow(e: any, m: any): any;
|
||
|
greaterOrEquals(b: any): boolean;
|
||
|
greater(b: any): boolean;
|
||
|
gt: any;
|
||
|
lesserOrEquals(b: any): boolean;
|
||
|
lesser(b: any): boolean;
|
||
|
lt: any;
|
||
|
equals(b: any): boolean;
|
||
|
eq: any;
|
||
|
neq(b: any): boolean;
|
||
|
toJSNumber(): number;
|
||
|
affine(q: any): any;
|
||
|
inverse(q: any): any;
|
||
|
add(a: any, q: any): any;
|
||
|
sub(a: any, q: any): any;
|
||
|
neg(q: any): any;
|
||
|
mul(a: any, q: any): any;
|
||
|
shr(a: any, q: any): any;
|
||
|
shl(a: any, q: any): any;
|
||
|
square(q: any): any;
|
||
|
double(q: any): any;
|
||
|
isZero(q: any): any;
|
||
|
leInt2Buff(len: any): any;
|
||
|
beInt2Buff(len: any): any;
|
||
|
}
|
||
|
}
|
||
|
declare module "snarkjs/src/futils" {
|
||
|
export function mulScalar(F: any, base: any, e: any): any;
|
||
|
export function exp(F: any, base: any, e: any): any;
|
||
|
}
|
||
|
declare module "snarkjs/src/zqfield" {
|
||
|
export = ZqField;
|
||
|
export class ZqField {
|
||
|
constructor(q: any);
|
||
|
q: any;
|
||
|
zero: any;
|
||
|
one: any;
|
||
|
minusone: any;
|
||
|
add: any;
|
||
|
double: any;
|
||
|
sub: any;
|
||
|
neg: any;
|
||
|
mul: any;
|
||
|
inverse: any;
|
||
|
square: any;
|
||
|
equals: any;
|
||
|
affine: any;
|
||
|
isZero: any;
|
||
|
two: any;
|
||
|
twoinv: any;
|
||
|
nqr: any;
|
||
|
s: any;
|
||
|
t: any;
|
||
|
nqr_to_t: any;
|
||
|
copy(a: any): any;
|
||
|
div(a: any, b: any): any;
|
||
|
mulScalar(base: any, e: any): any;
|
||
|
exp(base: any, e: any): any;
|
||
|
toString(a: any): string;
|
||
|
random(): any;
|
||
|
sqrt(n: any): any;
|
||
|
}
|
||
|
}
|
||
|
declare module "snarkjs/src/f2field" {
|
||
|
export = F2Field;
|
||
|
export class F2Field {
|
||
|
constructor(F: any, nonResidue: any);
|
||
|
F: any;
|
||
|
zero: any[];
|
||
|
one: any[];
|
||
|
nonResidue: any;
|
||
|
_mulByNonResidue(a: any): any;
|
||
|
copy(a: any): any[];
|
||
|
add(a: any, b: any): any[];
|
||
|
double(a: any): any[];
|
||
|
sub(a: any, b: any): any[];
|
||
|
neg(a: any): any[];
|
||
|
mul(a: any, b: any): any[];
|
||
|
inverse(a: any): any[];
|
||
|
div(a: any, b: any): any[];
|
||
|
square(a: any): any[];
|
||
|
isZero(a: any): any;
|
||
|
equals(a: any, b: any): any;
|
||
|
affine(a: any): any[];
|
||
|
mulScalar(base: any, e: any): any;
|
||
|
exp(base: any, e: any): any;
|
||
|
toString(a: any): string;
|
||
|
}
|
||
|
}
|
||
|
declare module "snarkjs/src/f3field" {
|
||
|
export = F3Field;
|
||
|
export class F3Field {
|
||
|
constructor(F: any, nonResidue: any);
|
||
|
F: any;
|
||
|
zero: any[];
|
||
|
one: any[];
|
||
|
nonResidue: any;
|
||
|
_mulByNonResidue(a: any): any;
|
||
|
copy(a: any): any[];
|
||
|
add(a: any, b: any): any[];
|
||
|
double(a: any): any[];
|
||
|
sub(a: any, b: any): any[];
|
||
|
neg(a: any): any[];
|
||
|
mul(a: any, b: any): any[];
|
||
|
inverse(a: any): any[];
|
||
|
div(a: any, b: any): any[];
|
||
|
square(a: any): any[];
|
||
|
isZero(a: any): any;
|
||
|
equals(a: any, b: any): any;
|
||
|
affine(a: any): any[];
|
||
|
mulScalar(base: any, e: any): any;
|
||
|
exp(base: any, e: any): any;
|
||
|
toString(a: any): string;
|
||
|
}
|
||
|
}
|
||
|
declare module "snarkjs/src/gcurve" {
|
||
|
export = GCurve;
|
||
|
export class GCurve {
|
||
|
constructor(F: any, g: any);
|
||
|
F: any;
|
||
|
g: any[];
|
||
|
zero: any[];
|
||
|
isZero(p: any): any;
|
||
|
add(p1: any, p2: any): any;
|
||
|
neg(p: any): any[];
|
||
|
sub(a: any, b: any): any;
|
||
|
double(p: any): any;
|
||
|
mulScalar(base: any, e: any): any;
|
||
|
affine(p: any): any[];
|
||
|
equals(p1: any, p2: any): any;
|
||
|
toString(p: any): string;
|
||
|
}
|
||
|
}
|
||
|
declare module "snarkjs/src/bn128" {
|
||
|
export = BN128;
|
||
|
export class BN128 {
|
||
|
q: any;
|
||
|
r: any;
|
||
|
g1: any[];
|
||
|
g2: any[][];
|
||
|
nonResidueF2: any;
|
||
|
nonResidueF6: any[];
|
||
|
F1: F1Field;
|
||
|
F2: F2Field;
|
||
|
G1: GCurve;
|
||
|
G2: GCurve;
|
||
|
F6: F3Field;
|
||
|
F12: F2Field;
|
||
|
Fr: F1Field;
|
||
|
_preparePairing(): void;
|
||
|
loopCount: any;
|
||
|
loopCountNeg: boolean;
|
||
|
loop_count_bits: any[];
|
||
|
two_inv: any;
|
||
|
coef_b: any;
|
||
|
twist: any[];
|
||
|
twist_coeff_b: any;
|
||
|
frobenius_coeffs_c1_1: any;
|
||
|
twist_mul_by_q_X: any[];
|
||
|
twist_mul_by_q_Y: any[];
|
||
|
final_exponent: any;
|
||
|
pairing(p1: any, p2: any): any;
|
||
|
precomputeG1(p: any): {
|
||
|
PX: any;
|
||
|
PY: any;
|
||
|
};
|
||
|
precomputeG2(p: any): {
|
||
|
QX: any;
|
||
|
QY: any;
|
||
|
coeffs: any[];
|
||
|
};
|
||
|
millerLoop(pre1: any, pre2: any): any[];
|
||
|
finalExponentiation(elt: any): any;
|
||
|
_doubleStep(current: any): {
|
||
|
ell_0: any[];
|
||
|
ell_VW: any[];
|
||
|
ell_VV: any[];
|
||
|
};
|
||
|
_addStep(base: any, current: any): {
|
||
|
ell_0: any[];
|
||
|
ell_VV: any[];
|
||
|
ell_VW: any[];
|
||
|
};
|
||
|
_mul_by_024(a: any, ell_0: any, ell_VW: any, ell_VV: any): any[][];
|
||
|
_g2MulByQ(p: any): any[][];
|
||
|
}
|
||
|
import F1Field = require("snarkjs/src/zqfield");
|
||
|
import F2Field = require("snarkjs/src/f2field");
|
||
|
import GCurve = require("snarkjs/src/gcurve");
|
||
|
import F3Field = require("snarkjs/src/f3field");
|
||
|
}
|
||
|
declare module "snarkjs/src/calculateWitness" {
|
||
|
export = calculateWitness;
|
||
|
function calculateWitness(circuit: any, inputSignals: any, options: any): any[];
|
||
|
}
|
||
|
declare module "snarkjs/src/circuit" {
|
||
|
export = Circuit;
|
||
|
export class Circuit {
|
||
|
constructor(circuitDef: any);
|
||
|
nPubInputs: any;
|
||
|
nPrvInputs: any;
|
||
|
nInputs: any;
|
||
|
nOutputs: any;
|
||
|
nVars: any;
|
||
|
nSignals: any;
|
||
|
nConstants: any;
|
||
|
nConstraints: any;
|
||
|
signalName2Idx: any;
|
||
|
components: any;
|
||
|
componentName2Idx: any;
|
||
|
signals: any;
|
||
|
constraints: any;
|
||
|
templates: {};
|
||
|
functions: {};
|
||
|
calculateWitness(input: any, log: any): any[];
|
||
|
checkWitness(w: any): boolean;
|
||
|
printCostraint(c: any): void;
|
||
|
printConstraints(): void;
|
||
|
getSignalIdx(name: any): any;
|
||
|
outputIdx(i: any): any;
|
||
|
inputIdx(i: any): any;
|
||
|
pubInputIdx(i: any): any;
|
||
|
prvInputIdx(i: any): any;
|
||
|
varIdx(i: any): any;
|
||
|
constantIdx(i: any): any;
|
||
|
signalIdx(i: any): any;
|
||
|
signalNames(i: any): any;
|
||
|
a(constraint: any, signalIdx: any): any;
|
||
|
b(constraint: any, signalIdx: any): any;
|
||
|
c(constraint: any, signalIdx: any): any;
|
||
|
}
|
||
|
}
|
||
|
declare module "snarkjs/src/polfield" {
|
||
|
export = PolField;
|
||
|
export class PolField {
|
||
|
constructor(F: any);
|
||
|
F: any;
|
||
|
w: any[];
|
||
|
wi: any[];
|
||
|
roots: any[];
|
||
|
_setRoots(n: any): void;
|
||
|
add(a: any, b: any): any;
|
||
|
double(a: any): any;
|
||
|
sub(a: any, b: any): any;
|
||
|
mulScalar(p: any, b: any): any;
|
||
|
mul(a: any, b: any): any;
|
||
|
mulNormal(a: any, b: any): any;
|
||
|
mulFFT(a: any, b: any): any;
|
||
|
square(a: any): any;
|
||
|
scaleX(p: any, n: any): any;
|
||
|
eval2(p: any, x: any): any;
|
||
|
eval(p: any, x: any): any;
|
||
|
lagrange(points: any): any;
|
||
|
fft(p: any): any;
|
||
|
ifft(p: any): any;
|
||
|
_fft(pall: any, bits: any, offset: any, step: any): any[];
|
||
|
extend(p: any, e: any): any;
|
||
|
reduce(p: any): any;
|
||
|
affine(p: any): any;
|
||
|
equals(a: any, b: any): boolean;
|
||
|
ruffini(p: any, r: any): any[];
|
||
|
_next2Power(v: any): any;
|
||
|
toString(p: any): string;
|
||
|
_reciprocal(p: any, bits: any): any;
|
||
|
_div2(m: any, v: any): any;
|
||
|
div(_u: any, _v: any): any;
|
||
|
oneRoot(n: any, i: any): any;
|
||
|
computeVanishingPolinomial(bits: any, t: any): any;
|
||
|
evaluateLagrangePolynomials(bits: any, t: any): any;
|
||
|
log2(V: any): number;
|
||
|
}
|
||
|
}
|
||
|
declare module "snarkjs/src/prover_groth" {
|
||
|
function _exports(vk_proof: any, witness: any): {
|
||
|
proof: {
|
||
|
pi_a: any;
|
||
|
pi_b: any;
|
||
|
pi_c: any;
|
||
|
protocol: string;
|
||
|
};
|
||
|
publicSignals: any;
|
||
|
};
|
||
|
export = _exports;
|
||
|
}
|
||
|
declare module "snarkjs/src/prover_kimleeoh" {
|
||
|
function _exports(vk_proof: any, witness: any): {
|
||
|
proof: {
|
||
|
pi_a: any;
|
||
|
pi_b: any;
|
||
|
pi_c: any;
|
||
|
protocol: string;
|
||
|
};
|
||
|
publicSignals: any;
|
||
|
};
|
||
|
export = _exports;
|
||
|
}
|
||
|
declare module "snarkjs/src/prover_original" {
|
||
|
function _exports(vk_proof: any, witness: any): {
|
||
|
proof: {
|
||
|
pi_a: any;
|
||
|
pi_ap: any;
|
||
|
pi_b: any;
|
||
|
pi_bp: any;
|
||
|
pi_c: any;
|
||
|
pi_cp: any;
|
||
|
pi_kp: any;
|
||
|
pi_h: any;
|
||
|
protocol: string;
|
||
|
};
|
||
|
publicSignals: any;
|
||
|
};
|
||
|
export = _exports;
|
||
|
}
|
||
|
declare module "snarkjs/src/ratfield" {
|
||
|
export = RatField;
|
||
|
export class RatField {
|
||
|
constructor(F: any);
|
||
|
F: any;
|
||
|
zero: any[];
|
||
|
one: any[];
|
||
|
two: any[];
|
||
|
twoinv: any[];
|
||
|
q: any;
|
||
|
add(a: any, b: any): any[];
|
||
|
double(a: any): any[];
|
||
|
sub(a: any, b: any): any[];
|
||
|
neg(a: any): any[];
|
||
|
mul(a: any, b: any): any[];
|
||
|
copy(a: any): any[];
|
||
|
div(a: any, b: any): any[];
|
||
|
inverse(a: any): any[];
|
||
|
square(a: any): any[];
|
||
|
mulScalar(base: any, e: any): any[];
|
||
|
exp(base: any, e: any): any;
|
||
|
equals(a: any, b: any): any;
|
||
|
isZero(a: any): any;
|
||
|
affine(a: any): any[];
|
||
|
toString(a: any): string;
|
||
|
random(): any[];
|
||
|
fromF(a: any): any[];
|
||
|
toF(a: any): any;
|
||
|
}
|
||
|
}
|
||
|
declare module "src/setup_groth" {
|
||
|
function _exports(circuit: any): {
|
||
|
vk_proof: {
|
||
|
protocol: string;
|
||
|
nVars: any;
|
||
|
nPublic: any;
|
||
|
};
|
||
|
vk_verifier: {
|
||
|
protocol: string;
|
||
|
nPublic: any;
|
||
|
};
|
||
|
toxic: {};
|
||
|
};
|
||
|
export = _exports;
|
||
|
}
|
||
|
declare module "snarkjs/src/setup_kimleeoh" {
|
||
|
function _exports(circuit: any): {
|
||
|
vk_proof: {
|
||
|
protocol: string;
|
||
|
nVars: any;
|
||
|
nPublic: any;
|
||
|
};
|
||
|
vk_verifier: {
|
||
|
protocol: string;
|
||
|
nPublic: any;
|
||
|
};
|
||
|
toxic: {};
|
||
|
};
|
||
|
export = _exports;
|
||
|
}
|
||
|
declare module "snarkjs/src/setup_original" {
|
||
|
function _exports(circuit: any): {
|
||
|
vk_proof: {
|
||
|
protocol: string;
|
||
|
nVars: any;
|
||
|
nPublic: any;
|
||
|
};
|
||
|
vk_verifier: {
|
||
|
protocol: string;
|
||
|
nPublic: any;
|
||
|
};
|
||
|
toxic: {};
|
||
|
};
|
||
|
export = _exports;
|
||
|
}
|
||
|
declare module "snarkjs/src/stringifybigint" {
|
||
|
export function stringifyBigInts(o: any): any;
|
||
|
export function unstringifyBigInts(o: any): any;
|
||
|
}
|
||
|
declare module "snarkjs/src/verifier" {
|
||
|
function _exports(vk_verifier: any, proof: any, publicSignals: any): boolean;
|
||
|
export = _exports;
|
||
|
}
|
||
|
declare module "snarkjs/src/verifier_groth" {
|
||
|
function _exports(vk_verifier: any, proof: any, publicSignals: any): boolean;
|
||
|
export = _exports;
|
||
|
}
|
||
|
declare module "snarkjs/src/verifier_kimleeoh" {
|
||
|
function _exports(vk_verifier: any, proof: any, publicSignals: any): boolean;
|
||
|
export = _exports;
|
||
|
}
|
||
|
declare module "snarkjs/src/verifier_original" {
|
||
|
function _exports(vk_verifier: any, proof: any, publicSignals: any): boolean;
|
||
|
export = _exports;
|
||
|
}
|
||
|
declare module "snarkjs" {
|
||
|
export const Circuit: {
|
||
|
new (circuitDef: any): import("snarkjs/src/circuit");
|
||
|
};
|
||
|
export namespace original {
|
||
|
const setup: (circuit: any) => {
|
||
|
vk_proof: {
|
||
|
protocol: string;
|
||
|
nVars: any;
|
||
|
nPublic: any;
|
||
|
};
|
||
|
vk_verifier: {
|
||
|
protocol: string;
|
||
|
nPublic: any;
|
||
|
};
|
||
|
toxic: {};
|
||
|
};
|
||
|
const genProof: (vk_proof: any, witness: any) => {
|
||
|
proof: {
|
||
|
pi_a: any;
|
||
|
pi_ap: any;
|
||
|
pi_b: any;
|
||
|
pi_bp: any;
|
||
|
pi_c: any;
|
||
|
pi_cp: any;
|
||
|
pi_kp: any;
|
||
|
pi_h: any;
|
||
|
protocol: string;
|
||
|
};
|
||
|
publicSignals: any;
|
||
|
};
|
||
|
const isValid: (vk_verifier: any, proof: any, publicSignals: any) => boolean;
|
||
|
}
|
||
|
export namespace groth {
|
||
|
const setup_1: (circuit: any) => {
|
||
|
vk_proof: {
|
||
|
protocol: string;
|
||
|
nVars: any;
|
||
|
nPublic: any;
|
||
|
};
|
||
|
vk_verifier: {
|
||
|
protocol: string;
|
||
|
nPublic: any;
|
||
|
};
|
||
|
toxic: {};
|
||
|
};
|
||
|
export { setup_1 as setup };
|
||
|
const genProof_1: (vk_proof: any, witness: any) => {
|
||
|
proof: {
|
||
|
pi_a: any;
|
||
|
pi_b: any;
|
||
|
pi_c: any;
|
||
|
protocol: string;
|
||
|
};
|
||
|
publicSignals: any;
|
||
|
};
|
||
|
export { genProof_1 as genProof };
|
||
|
const isValid_1: (vk_verifier: any, proof: any, publicSignals: any) => boolean;
|
||
|
export { isValid_1 as isValid };
|
||
|
}
|
||
|
export namespace kimleeoh {
|
||
|
const setup_2: (circuit: any) => {
|
||
|
vk_proof: {
|
||
|
protocol: string;
|
||
|
nVars: any;
|
||
|
nPublic: any;
|
||
|
};
|
||
|
vk_verifier: {
|
||
|
protocol: string;
|
||
|
nPublic: any;
|
||
|
};
|
||
|
toxic: {};
|
||
|
};
|
||
|
export { setup_2 as setup };
|
||
|
const genProof_2: (vk_proof: any, witness: any) => {
|
||
|
proof: {
|
||
|
pi_a: any;
|
||
|
pi_b: any;
|
||
|
pi_c: any;
|
||
|
protocol: string;
|
||
|
};
|
||
|
publicSignals: any;
|
||
|
};
|
||
|
export { genProof_2 as genProof };
|
||
|
const isValid_2: (vk_verifier: any, proof: any, publicSignals: any) => boolean;
|
||
|
export { isValid_2 as isValid };
|
||
|
}
|
||
|
export const bigInt: typeof import("snarkjs/src/bigint");
|
||
|
export const ZqField: typeof import("snarkjs/src/zqfield");
|
||
|
export const stringifyBigInts: typeof import("snarkjs/src/stringifybigint").stringifyBigInts;
|
||
|
export const unstringifyBigInts: typeof import("snarkjs/src/stringifybigint").unstringifyBigInts;
|
||
|
export const bn128: Bn128;
|
||
|
import Bn128 = require("snarkjs/src/bn128");
|
||
|
}
|
||
|
//# sourceMappingURL=index.d.ts.map
|