tornado-scripts/dist/websnark.d.ts
tornadocontrib 8b6887108f
Use simplified websnark & snarkjs
* Use simplified websnark & snarkjs
* Added Base & Blast pools
* Added additional pools for optimism & arbitrum
* Added token transfer events
2024-12-04 03:30:35 +00:00

28 lines
725 B
TypeScript
Vendored

import type { Element } from 'fixed-merkle-tree';
export interface snarkInputs {
root: Element;
nullifierHex: string;
recipient: string;
relayer: string;
fee: bigint;
refund: bigint;
nullifier: bigint;
secret: bigint;
pathElements: Element[];
pathIndices: Element[];
}
export type snarkArgs = [
_root: string,
_nullifierHash: string,
_recipient: string,
_relayer: string,
_fee: string,
_refund: string
];
export interface snarkProofs {
proof: string;
args: snarkArgs;
}
export declare function initGroth16(): Promise<void>;
export declare function calculateSnarkProof(input: snarkInputs, circuit: object, provingKey: ArrayBuffer): Promise<snarkProofs>;