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.

187 lines
9.5 KiB

  1. <!DOCTYPE html>
  2. <html lang="en">
  3. <head>
  4. <meta charset="utf-8">
  5. <title>miksi-app</title>
  6. <link rel="icon" type="image/png" href="img/web-wallet-icon.png">
  7. <meta name="viewport" content="width=device-width, initial-scale=1">
  8. <meta name="viewport" content="width=device-width, user-scalable=no" />
  9. <link rel="manifest" href="manifest.json" />
  10. <link rel="stylesheet" href="css/style.css">
  11. <link rel="stylesheet" href="css/utils.css">
  12. <link rel="stylesheet" href="css/dark-theme.css">
  13. <!-- <link rel="stylesheet" href="node_modules/bootstrap/dist/css/bootstrap.min.css"> -->
  14. <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/css/bootstrap.min.css" integrity="sha384-Gn5384xqQ1aoWXA+058RXPxPg6fy4IWvTNh0E263XmFcJlSAwiGgFAW/dAiS6JXm" crossorigin="anonymous">
  15. <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.css"
  16. integrity="sha256-NuCn4IvuZXdBaFKJOAcsU2Q3ZpwbdFisd5dux4jkQ5w=" crossorigin="anonymous" />
  17. <!-- toastr -->
  18. <!-- <link href="node_modules/toastr/build/toastr.css" rel="stylesheet" /> -->
  19. <link href="https://cdnjs.cloudflare.com/ajax/libs/toastr.js/latest/css/toastr.min.css" rel="stylesheet" />
  20. <!-- to delete and use another in the future -->
  21. </head>
  22. <body class="dark-theme">
  23. <br>
  24. <a target="_blank" href="https://github.com/miksi-labs/miksi-app" class="github-corner" aria-label="View source on GitHub"><svg width="80" height="80" viewBox="0 0 250 250" style="fill:#fff; color:#151513; position: absolute; top: 0; border: 0; right: 0;" aria-hidden="true"><path d="M0,0 L115,115 L130,115 L142,142 L250,250 L250,0 Z"></path><path d="M128.3,109.0 C113.8,99.7 119.0,89.6 119.0,89.6 C122.0,82.7 120.5,78.6 120.5,78.6 C119.2,72.0 123.4,76.3 123.4,76.3 C127.3,80.9 125.5,87.3 125.5,87.3 C122.9,97.6 130.6,101.9 134.4,103.2" fill="currentColor" style="transform-origin: 130px 106px;" class="octo-arm"></path><path d="M115.0,115.0 C114.9,115.1 118.7,116.5 119.8,115.4 L133.7,101.6 C136.9,99.2 139.9,98.4 142.2,98.6 C133.8,88.0 127.5,74.4 143.8,58.0 C148.5,53.4 154.0,51.2 159.7,51.0 C160.3,49.4 163.2,43.6 171.4,40.1 C171.4,40.1 176.1,42.5 178.8,56.2 C183.1,58.6 187.2,61.8 190.9,65.4 C194.5,69.0 197.7,73.2 200.1,77.6 C213.8,80.2 216.3,84.9 216.3,84.9 C212.7,93.1 206.9,96.0 205.4,96.6 C205.1,102.4 203.0,107.8 198.3,112.5 C181.9,128.9 168.3,122.5 157.7,114.1 C157.9,116.9 156.7,120.9 152.7,124.9 L141.0,136.5 C139.8,137.7 141.6,141.9 141.8,141.8 Z" fill="currentColor" class="octo-body"></path></svg></a><style>.github-corner:hover .octo-arm{animation:octocat-wave 560ms ease-in-out}@keyframes octocat-wave{0%,100%{transform:rotate(0)}20%,60%{transform:rotate(-25deg)}40%,80%{transform:rotate(10deg)}}@media (max-width:500px){.github-corner:hover .octo-arm{animation:none}.github-corner .octo-arm{animation:octocat-wave 560ms ease-in-out}}</style>
  25. <div id="wallet-maincard" class="card mainBox">
  26. <!-- menu -->
  27. <ul class="nav nav-tabs nav-fill" id="myTab" role="tablist">
  28. <li class="nav-item">
  29. <a class="nav-link active" id="deposit-tab" data-toggle="tab" href="#deposit" role="tab" aria-controls="deposit"
  30. aria-selected="false" onclick="onHistoryTabActivated()" title="Deposit">
  31. <i class="fa fa-lock fa-2x" aria-hidden="true"></i>
  32. </a>
  33. </li>
  34. <li class="nav-item">
  35. <a class="nav-link " onclick="onConfigTabActivated()" id="config-tab" data-toggle="tab" href="#config"
  36. role="tab" aria-controls="receive" aria-selected="true">
  37. <i class="fa fa-cog fa-2x" aria-hidden="true"></i>
  38. </a>
  39. </li>
  40. </ul>
  41. <div class="card-body">
  42. <!-- menu -->
  43. <div class="tab-content" id="myTabContent">
  44. <button onclick="connectMetamask()" class="btn color_primary-o float-right">Connect Metamask</button>
  45. <h2><i>miksi</i></h2>
  46. <i>From Esperanto, <b>miksi</b> (miks·i): to mingle, to blend, to mix, to shuffle</i>
  47. <br>
  48. Ethereum trustless <b>zk-mixer</b>.
  49. <br><br>
  50. <div class="alertBox"><b>WARNING</b>: experimental code, use only in Göerli testnet, without any real value.</div>
  51. <br><br>
  52. <!-- deposit -->
  53. <div class="tab-pane fade show active" id="deposit" role="tabpanel" aria-labelledby="deposit-tab">
  54. <div class="row">
  55. <div class="col-md">
  56. <h5 class="card-title">Deposit</h5>
  57. <hr>
  58. a
  59. Quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit.
  60. <br><br>
  61. <button onclick="deposit('deposit')" class="btn color_primary float-right">Deposit 1 ETH</button>
  62. <br>
  63. <div id="depositRes"></div>
  64. <br><br>
  65. </div>
  66. <div class="col-md">
  67. <h5 class="card-title">Withdraw</h5>
  68. <hr>
  69. Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore.
  70. <br><br>
  71. <input id="secret" type="text" class="form-control" placeholder="secret" value="1234567890"></input>
  72. <br>
  73. <input id="nullifier" type="text" class="form-control" placeholder="nullifier" value="567891234"></input>
  74. <br>
  75. <button onclick="withdraw('withdraw')" class="btn color_primary float-right">Withdraw 1 ETH</button>
  76. <br>
  77. <div id="withdrawRes"></div>
  78. </div>
  79. </div>
  80. <br><br>
  81. <h5 class="card-title">Stats</h5>
  82. <hr>
  83. Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum
  84. </div>
  85. <!-- config -->
  86. <div class="tab-pane fade" id="config" role="tabpanel" aria-labelledby="config-tab">
  87. <h5><i class="fa fa-info" aria-hidden="true"></i> Info</h5>
  88. <hr>
  89. Spec & core code: <a href="https://github.com/miksi-labs/miksi-core" target="_blank">https://github.com/miksi-labs/miksi-core</a>
  90. <br>
  91. What is a <a href="https://en.wikipedia.org/wiki/Cryptocurrency_tumbler" target="_blank">mixer</a>?
  92. <br><br><br>
  93. <h5><i class="fa fa-sliders" aria-hidden="true"></i> Config</h5>
  94. <hr>
  95. Theme:
  96. <div class="onoffswitch" style="display:inline-block;margin: 10px;" title="change theme">
  97. <input onclick="switchThemeClick()" type="checkbox" name="onoffswitch" class="onoffswitch-checkbox"
  98. id="themeSwitcher" checked>
  99. <label class="onoffswitch-label" for="themeSwitcher"></label>
  100. </div>
  101. </div>
  102. <br><br>
  103. </div>
  104. </div>
  105. </div>
  106. </div>
  107. <!-- <script src="node_modules/jquery/dist/jquery.min.js"></script> -->
  108. <script src="https://code.jquery.com/jquery-3.2.1.slim.min.js" integrity="sha384-KJ3o2DKtIkvYIK3UENzmM7KCkRr/rE9/Qpg6aAZGJwFDMVNA/GpGFF93hXpG5KkN" crossorigin="anonymous"></script>
  109. <!-- <script src="node_modules/toastr/build/toastr.min.js"></script> -->
  110. <script src="https://cdnjs.cloudflare.com/ajax/libs/toastr.js/latest/js/toastr.min.js"></script>
  111. <script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.6/umd/popper.min.js"
  112. integrity="sha384-wHAiFfRlMFy6i5SRaxvfOCifBUQy1xHdJ/yoi7FRNXMRBu5WHdZYu1hA6ZOblgut"
  113. crossorigin="anonymous"></script>
  114. <!-- <script src="node_modules/bootstrap/dist/js/bootstrap.min.js"></script> -->
  115. <script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/js/bootstrap.min.js" integrity="sha384-JZR6Spejh4U02d8jOt6vLEHfe/JQGiRRSQQxSfFWpi1MquVdAyjUar5+76PVCmYl" crossorigin="anonymous"></script>
  116. <script>
  117. let theme = localStorage.getItem("theme");
  118. if (theme === "light") {
  119. document.getElementById("themeSwitcher").checked = false;
  120. document.body.className = theme;
  121. }
  122. function switchThemeClick() {
  123. theme = localStorage.getItem("theme");
  124. if (theme === "light") {
  125. document.getElementById("themeSwitcher").checked = true;
  126. theme = "dark-theme";
  127. localStorage.setItem("theme", theme);
  128. } else {
  129. document.getElementById("themeSwitcher").checked = false;
  130. theme = "light";
  131. localStorage.setItem("theme", theme);
  132. }
  133. document.body.className = theme;
  134. }
  135. toastr.options = {
  136. "closeButton": false,
  137. "debug": false,
  138. "newestOnTop": false,
  139. "progressBar": true,
  140. "positionClass": "toast-bottom-right",
  141. "preventDuplicates": false,
  142. "onclick": null,
  143. "showDuration": "300",
  144. "hideDuration": "1000",
  145. "timeOut": "5000",
  146. "extendedTimeOut": "1000",
  147. "showEasing": "swing",
  148. "hideEasing": "linear",
  149. "showMethod": "fadeIn",
  150. "hideMethod": "fadeOut"
  151. };
  152. </script>
  153. <!-- <script src="node_modules/axios/dist/axios.min.js"></script> -->
  154. <script src="https://cdn.jsdelivr.net/npm/axios/dist/axios.min.js"></script>
  155. <!-- <script src="https://cdnjs.cloudflare.com/ajax/libs/Chart.js/2.7.3/Chart.bundle.min.js"></script> -->
  156. <script src="lib/wasmsnark_bn128.js"></script>
  157. <script src="lib/snarkjs.js"></script>
  158. <script src="node_modules/web3/dist/web3.min.js"></script>
  159. <script src="lib/miksi-browser.js"></script>
  160. <script src="index.js"></script>
  161. </body>
  162. </html>