archive-monorepo/@tornado/circomlib/index.d.ts
T-Hax 6006120e60
Set up monorepo
Signed-off-by: T-Hax <>
2023-05-03 20:35:27 +00:00

329 lines
9.5 KiB
TypeScript

declare module "circomlib/src/babyjub" {
export const Generator: any[];
export const Base8: any[];
export const order: any;
export const subOrder: any;
export const A: any;
export const D: any;
export function addPoint(a: any, b: any): any[];
export function mulPointEscalar(base: any, e: any): any[];
export function inCurve(P: any): boolean;
export function inSubgroup(P: any): any;
export function packPoint(P: any): any;
export function unpackPoint(_buff: any): any[];
export { unknown as p };
}
declare module "circomlib/src/pedersenHash" {
function pedersenHash(msg: any): any;
export function getBasePoint(pointIdx: any): any;
export { pedersenHash as hash };
}
declare module "circomlib/src/mimc7" {
export function getIV(seed: any): any;
export function getConstants(seed: any, nRounds: any): any[];
export function hash(_x_in: any, _k: any): any;
export function multiHash(arr: any, key: any): any;
}
declare module "circomlib/src/poseidon" {
export function getMatrix(t: any, seed: any, nRounds: any): any[];
export function getConstants(t: any, seed: any, nRounds: any): any[];
export function createHash(t: any, nRoundsF: any, nRoundsP: any, seed: any): (inputs: any) => any;
}
declare module "circomlib/src/mimcsponge" {
export function getIV(seed: any): any;
export function getConstants(seed: any, nRounds: any): any[];
export function hash(_xL_in: any, _xR_in: any, _k: any): {
xL: any;
xR: any;
};
export function multiHash(arr: any, key: any, numOutputs: any): any;
}
declare module "circomlib/src/eddsa" {
export function prv2pub(prv: any): any[];
export function sign(prv: any, msg: any): {
R8: any[];
S: any;
};
export function signMiMC(prv: any, msg: any): {
R8: any[];
S: any;
};
export function signPoseidon(prv: any, msg: any): {
R8: any[];
S: any;
};
export function signMiMCSponge(prv: any, msg: any): {
R8: any[];
S: any;
};
export function verify(msg: any, sig: any, A: any): boolean;
export function verifyMiMC(msg: any, sig: any, A: any): boolean;
export function verifyPoseidon(msg: any, sig: any, A: any): boolean;
export function verifyMiMCSponge(msg: any, sig: any, A: any): boolean;
export function packSignature(sig: any): Buffer;
export function unpackSignature(sigBuff: any): {
R8: any[];
S: any;
};
export function pruneBuffer(_buff: any): Buffer;
}
declare module "circomlib/src/evmasm" {
export = Contract;
export class Contract {
code: any[];
labels: {};
pendingLabels: {};
createTxData(): string;
stop(): void;
add(): void;
mul(): void;
sub(): void;
div(): void;
sdiv(): void;
mod(): void;
smod(): void;
addmod(): void;
mulmod(): void;
exp(): void;
signextend(): void;
lt(): void;
gt(): void;
slt(): void;
sgt(): void;
eq(): void;
iszero(): void;
and(): void;
or(): void;
shor(): void;
not(): void;
byte(): void;
keccak(): void;
sha3(): void;
address(): void;
balance(): void;
origin(): void;
caller(): void;
callvalue(): void;
calldataload(): void;
calldatasize(): void;
calldatacopy(): void;
codesize(): void;
codecopy(): void;
gasprice(): void;
extcodesize(): void;
extcodecopy(): void;
returndatasize(): void;
returndatacopy(): void;
blockhash(): void;
coinbase(): void;
timestamp(): void;
number(): void;
difficulty(): void;
gaslimit(): void;
pop(): void;
mload(): void;
mstore(): void;
mstore8(): void;
sload(): void;
sstore(): void;
_pushLabel(label: any): void;
_fillLabel(label: any): void;
jmp(label: any): void;
jmpi(label: any): void;
pc(): void;
msize(): void;
gas(): void;
label(name: any): void;
push(data: any): void;
dup(n: any): void;
swap(n: any): void;
log0(): void;
log1(): void;
log2(): void;
log3(): void;
log4(): void;
create(): void;
call(): void;
callcode(): void;
return(): void;
delegatecall(): void;
staticcall(): void;
revert(): void;
invalid(): void;
selfdestruct(): void;
}
}
declare module "circomlib/src/g2_gencontract" {
export const abi: {
constant: boolean;
inputs: {
name: string;
type: string;
}[];
name: string;
outputs: {
name: string;
type: string;
}[];
payable: boolean;
stateMutability: string;
type: string;
}[];
export function createCode(P: any, w: any): string;
}
declare module "circomlib/src/mimc_gencontract" {
export const abi: {
constant: boolean;
inputs: {
name: string;
type: string;
}[];
name: string;
outputs: {
name: string;
type: string;
}[];
payable: boolean;
stateMutability: string;
type: string;
}[];
export function createCode(seed: any, n: any): string;
}
declare module "circomlib/src/mimc_print_iv" {
export {};
}
declare module "circomlib/src/mimc_printconstants" {
export {};
}
declare module "circomlib/src/mimc_printcontract" {
export {};
}
declare module "circomlib/src/mimcsponge_gencontract" {
export const abi: {
constant: boolean;
inputs: {
name: string;
type: string;
}[];
name: string;
outputs: {
name: string;
type: string;
}[];
payable: boolean;
stateMutability: string;
type: string;
}[];
export function createCode(seed: any, n: any): string;
}
declare module "circomlib/src/mimcsponge_printconstants" {
export {};
}
declare module "circomlib/src/mimcsponge_printcontract" {
export {};
}
declare module "circomlib/src/pedersen_printbases" {
export {};
}
declare module "circomlib/src/poseidon_gencontract" {
export const abi: {
constant: boolean;
inputs: {
name: string;
type: string;
}[];
name: string;
outputs: {
name: string;
type: string;
}[];
payable: boolean;
stateMutability: string;
type: string;
}[];
export function createCode(t: any, nRoundsF: any, nRoundsP: any, seed: any): string;
}
declare module "circomlib/src/poseidon_printconstants" {
export {};
}
declare module "circomlib/src/poseidon_printcontract" {
export {};
}
declare module "circomlib/src/poseidon_printmatrix" {
export {};
}
declare module "circomlib/src/smt_memdb" {
export = SMTMemDb;
export class SMTMemDb {
nodes: {};
root: any;
getRoot(): Promise<any>;
_key2str(k: any): any;
_normalize(n: any): void;
get(key: any): Promise<any>;
multiGet(keys: any): Promise<any[]>;
setRoot(rt: any): Promise<void>;
multiIns(inserts: any): Promise<void>;
multiDel(dels: any): Promise<void>;
}
}
declare module "circomlib/src/smt_hashes_poseidon" {
export function hash0(left: any, right: any): any;
export function hash1(key: any, value: any): any;
}
declare module "circomlib/src/smt" {
export function loadFromFile(fileName: any): Promise<void>;
export function newMemEmptyTrie(): Promise<SMT>;
export class SMT {
constructor(db: any, root: any);
db: any;
root: any;
_splitBits(_key: any): boolean[];
update(_key: any, _newValue: any): Promise<{
oldRoot: any;
oldKey: any;
oldValue: any;
newKey: any;
newValue: any;
siblings: any;
newRoot: any;
}>;
delete(_key: any): Promise<{
siblings: any[];
delKey: any;
delValue: any;
}>;
insert(_key: any, _value: any): Promise<{
oldRoot: any;
siblings: any;
oldKey: any;
oldValue: any;
newRoot: any;
isOld0: any;
}>;
find(key: any): Promise<any>;
_find(key: any, keyBits: any, root: any, level: any): any;
}
import SMTMemDB = require("circomlib/src/smt_memdb");
export { SMTMemDB };
}
declare module "circomlib/src/smt_hashes_mimc" {
export function hash0(left: any, right: any): any;
export function hash1(key: any, value: any): any;
}
declare module "circomlib/calcpedersenbases/calcpedersenbases" {
export {};
}
declare module "circomlib" {
export const smt: typeof import("circomlib/src/smt");
export const eddsa: typeof import("circomlib/src/eddsa");
export const mimc7: typeof import("circomlib/src/mimc7");
export const mimcsponge: typeof import("circomlib/src/mimcsponge");
export const babyJub: typeof import("circomlib/src/babyjub");
export const pedersenHash: typeof import("circomlib/src/pedersenHash");
export const SMT: typeof import("circomlib/src/smt").SMT;
export const SMTMemDB: typeof import("circomlib/src/smt_memdb");
export const poseidon: typeof import("circomlib/src/poseidon");
}
//# sourceMappingURL=index.d.ts.map