arnaucube
arnaucube/miksi-corePublic Self-hosted repository
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 secret = "1234567890";
12	const key = 1;
13	const commitments = [];
14
15	const wasm = await fs.promises.readFile("./build/deposit.wasm");
16	console.log("w", wasm.length);
17
18	const witness = await miksi.calcDepositWitness(wasm, key, secret, commitments);
19	// console.log("w", witness);
20
21
22	// const pk = await fs.promises.readFile("./build/deposit-proving_key.bin");
23	// const proof = await miksi.calcProof(witness, pk);
24
25    });
26});