miksi-core/test/miksi.test.ts
test/miksi.test.tsRaw
1const fs = require("fs");
2
3const miksi = require("../src/miksi.ts");
4
5export {};
6
7describe("deposit test", function () {
8 this.timeout(200000);
9
10 it("Test Deposit", async () => {
11 const nLevels = 4;
12 const secret = "1234567890";
13 const key = 1;
14 const commitments = [];
15
16 const wasm = await fs.promises.readFile("./test/build/deposit.wasm");
17 console.log("w", wasm.length);
18
19 const witness = await miksi.calcDepositWitness(wasm, nLevels, key, secret, commitments);
20 // console.log("w", witness);
21
22
23 // const pk = await fs.promises.readFile("./build/deposit-proving_key.bin");
24 // const proof = await miksi.calcProof(witness, pk);
25
26 });
27});