You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

27 lines
656 B

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