tornado-core/dist/websnark.d.ts
tornadocontrib 69faa7a974
tornado-core 1.0.15
use more universal type defs for snark proofs
2024-09-26 12:23:55 +00:00

20 lines
569 B
TypeScript
Vendored

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