2022-09-26 00:41:30 +00:00
|
|
|
<!DOCTYPE html>
|
2022-12-07 14:54:38 +00:00
|
|
|
<html lang="en">
|
|
|
|
<head>
|
|
|
|
<meta charset="UTF-8" />
|
|
|
|
<meta content="width=device-width, initial-scale=1.0" name="viewport" />
|
2022-09-26 00:41:30 +00:00
|
|
|
<title>JS-Waku light node example</title>
|
2022-12-07 14:54:38 +00:00
|
|
|
<link
|
|
|
|
href="https://cdn.jsdelivr.net/npm/water.css@2/out/water.css"
|
|
|
|
rel="stylesheet"
|
|
|
|
/>
|
|
|
|
<link href="style.css" rel="stylesheet" />
|
2022-12-23 21:56:24 +00:00
|
|
|
<link rel="apple-touch-icon" href="./favicon.png" />
|
|
|
|
<link rel="manifest" href="./manifest.json" />
|
|
|
|
<link rel="icon" href="./favicon.ico" />
|
2022-12-07 14:54:38 +00:00
|
|
|
</head>
|
|
|
|
|
|
|
|
<body>
|
|
|
|
<div class="row rcenter">
|
|
|
|
<h1>Waku RLN</h1>
|
|
|
|
<button id="connect-wallet" type="button">Connect Wallet</button>
|
|
|
|
</div>
|
2022-10-06 22:07:01 +00:00
|
|
|
|
2022-12-07 14:54:38 +00:00
|
|
|
<span id="status"></span>
|
2022-10-06 22:07:01 +00:00
|
|
|
|
2022-12-07 14:54:38 +00:00
|
|
|
<h2 class="mu1">Blockchain</h2>
|
|
|
|
<hr />
|
2022-10-06 22:07:01 +00:00
|
|
|
|
2022-12-07 14:54:38 +00:00
|
|
|
<div class="row rcenter">
|
|
|
|
<h4>Address</h4>
|
|
|
|
<code class="value" id="address"></code>
|
|
|
|
</div>
|
2022-10-06 22:07:01 +00:00
|
|
|
|
2022-12-07 14:54:38 +00:00
|
|
|
<div class="row mu1 rcenter">
|
|
|
|
<h4>Contract Data</h4>
|
|
|
|
<button disabled id="retrieve-rln-details" type="button">
|
2022-10-10 14:02:18 +00:00
|
|
|
Retrieve contract state from blockchain
|
2022-12-07 14:54:38 +00:00
|
|
|
</button>
|
|
|
|
</div>
|
2022-10-06 22:07:01 +00:00
|
|
|
|
2022-12-07 14:54:38 +00:00
|
|
|
<div class="row rcenter">
|
|
|
|
<h4>Latest membership id on contract</h4>
|
|
|
|
<code class="value" id="latest-membership-id">Not loaded yet</code>
|
|
|
|
</div>
|
2022-10-06 22:07:01 +00:00
|
|
|
|
2023-10-20 11:01:40 +00:00
|
|
|
<div class="row rcenter mu1">
|
|
|
|
<div>
|
|
|
|
<h2>Keystore</h2>
|
|
|
|
<span id="keystoreStatus"></span>
|
|
|
|
</div>
|
|
|
|
<div>
|
|
|
|
<button id="importKeystore" type="button">Import json</button>
|
|
|
|
<input type="file" id="importKeystoreInput" style="display: none" />
|
|
|
|
|
|
|
|
<button id="exportKeystore" type="button">Download json</button>
|
|
|
|
</div>
|
|
|
|
</div>
|
2022-12-07 14:54:38 +00:00
|
|
|
<hr />
|
2022-09-26 00:41:30 +00:00
|
|
|
|
2023-10-20 11:01:40 +00:00
|
|
|
<div class="row mu1">
|
|
|
|
<label for="keystorePassword"
|
|
|
|
>Password(used for reading/saving into Keystore):</label
|
|
|
|
>
|
|
|
|
<input
|
|
|
|
id="keystorePassword"
|
|
|
|
name="keystorePassword"
|
|
|
|
type="text"
|
|
|
|
style="width: 100%"
|
|
|
|
/>
|
|
|
|
</div>
|
|
|
|
|
2022-12-07 14:54:38 +00:00
|
|
|
<div class="row">
|
|
|
|
<div class="w50">
|
2023-10-20 11:01:40 +00:00
|
|
|
<h4>Generate new credentials from wallet:</h4>
|
2022-12-07 14:54:38 +00:00
|
|
|
<br />
|
2023-10-20 11:01:40 +00:00
|
|
|
<button
|
|
|
|
id="import-from-wallet-button"
|
|
|
|
type="button"
|
|
|
|
style="width: 100%"
|
|
|
|
>
|
|
|
|
Generate new credentials
|
|
|
|
</button>
|
2022-12-07 14:54:38 +00:00
|
|
|
<br />
|
|
|
|
<button disabled id="register-button" type="button">
|
2023-10-20 11:01:40 +00:00
|
|
|
Register credentials
|
2022-12-07 14:54:38 +00:00
|
|
|
</button>
|
|
|
|
</div>
|
|
|
|
<div class="w50">
|
2023-10-20 11:01:40 +00:00
|
|
|
<h4>Read from Keystore:</h4>
|
|
|
|
<br />
|
|
|
|
<select
|
|
|
|
id="keystoreOptions"
|
|
|
|
style="
|
|
|
|
width: 100%;
|
|
|
|
overflow: hidden;
|
|
|
|
white-space: nowrap;
|
|
|
|
text-overflow: ellipsis;
|
|
|
|
"
|
|
|
|
></select>
|
|
|
|
<br />
|
|
|
|
<button id="readKeystore" type="button">Read credentials</button>
|
2022-12-07 14:54:38 +00:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="row rcenter mu1">
|
2023-10-20 11:01:40 +00:00
|
|
|
<h4>Keystore Hash</h4>
|
|
|
|
<code class="value" id="keystoreHash">none</code>
|
|
|
|
</div>
|
|
|
|
<div class="row rcenter">
|
2022-12-07 14:54:38 +00:00
|
|
|
<h4>Membership id</h4>
|
|
|
|
<code class="value" id="id">none</code>
|
|
|
|
</div>
|
|
|
|
<div class="row rcenter">
|
2023-05-17 20:07:55 +00:00
|
|
|
<h4>Secret Hash</h4>
|
|
|
|
<code class="value" id="secret-hash">none</code>
|
2022-10-05 00:16:29 +00:00
|
|
|
</div>
|
2022-12-07 14:54:38 +00:00
|
|
|
<div class="row rcenter">
|
|
|
|
<h4>Commitment</h4>
|
|
|
|
<code class="value" id="commitment">none</code>
|
|
|
|
</div>
|
2023-05-17 20:07:55 +00:00
|
|
|
<div class="row rcenter">
|
|
|
|
<h4>Nullifier</h4>
|
|
|
|
<code class="value" id="nullifier">none</code>
|
|
|
|
</div>
|
|
|
|
<div class="row rcenter">
|
|
|
|
<h4>Trapdoor</h4>
|
|
|
|
<code class="value" id="trapdoor">none</code>
|
|
|
|
</div>
|
2022-12-07 14:54:38 +00:00
|
|
|
|
|
|
|
<h2 class="mu1">Waku</h2>
|
|
|
|
<hr />
|
|
|
|
<div id="waku-status"></div>
|
|
|
|
|
|
|
|
<div class="row rcenter mu1 mf">
|
|
|
|
<label for="remote-multiaddr">Remote peer's multiaddr</label>
|
|
|
|
<input
|
|
|
|
id="remote-multiaddr"
|
|
|
|
type="text"
|
|
|
|
value="/dns4/node-01.ac-cn-hongkong-c.wakuv2.test.statusim.net/tcp/443/wss/p2p/16Uiu2HAkvWiyFsgRhuJEb9JfjYxEkoHLgnUQmr1N5mKWnYjxYRVm"
|
|
|
|
/>
|
|
|
|
<button disabled id="dial" type="button">Dial</button>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="row rcenter mf">
|
|
|
|
<label for="nick-input">Your nickname</label>
|
|
|
|
<input
|
|
|
|
class="p100"
|
|
|
|
id="nick-input"
|
|
|
|
placeholder="Choose a nickname"
|
|
|
|
type="text"
|
|
|
|
/>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="row rcenter mf">
|
|
|
|
<label for="textInput">Message text</label>
|
|
|
|
<input
|
|
|
|
class="p100"
|
|
|
|
disabled
|
|
|
|
id="textInput"
|
|
|
|
placeholder="Type your message here"
|
|
|
|
type="text"
|
|
|
|
/>
|
|
|
|
<button disabled id="sendButton" type="button">
|
|
|
|
Send message using Light Push
|
|
|
|
</button>
|
|
|
|
</div>
|
|
|
|
<span id="sending-status"></span>
|
|
|
|
|
|
|
|
<h4 class="mu1">Messages</h4>
|
2023-04-27 23:33:25 +00:00
|
|
|
<div id="messages"><ul id="messagesList"></ul></div>
|
2022-12-07 14:54:38 +00:00
|
|
|
|
2023-04-27 23:33:25 +00:00
|
|
|
<script src="https://unpkg.com/@multiformats/multiaddr@12.1.1/dist/index.min.js"></script>
|
|
|
|
<script type="module" src="./index.js"></script>
|
2022-12-07 14:54:38 +00:00
|
|
|
</body>
|
2022-09-26 00:41:30 +00:00
|
|
|
</html>
|