-
Notifications
You must be signed in to change notification settings - Fork 0
/
wallet.html
85 lines (76 loc) · 3.2 KB
/
wallet.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Wallets</title>
<link rel="stylesheet" href="./main.css">
</head>
<body>
<div style="border-style: solid; background: yellow; color: red;">This wallet app is insecure! Use only for testnet testing. There may be data that are stored in the browser's local storage.
</div>
<button id="button-generate-key">Generate Key</button>
<span id="output-private-key" style="font-family:monospace;">Generated key: </span> </br>
<details>
<summary>ECDSA secp256k1 Private key in hex</summary>
<label for="input-private-key">Enter Private Key:</label>
<input id="input-private-key" size="70">
</details>
<button id="button-set-key">Set Key</button>
<h1>Bitcoin Wallet</h1>
<pre id="key-info">Address: </pre>
<div id="balance-info"></div>
<div id="address-info"></div>
<div id="txs-info"></div>
<br>
<div>
<label for="input-recipient">Recipient:</label>
<input id="input-recipient" size="70"></input>
</br>
<label for="input-amount">Amount (in sats)</label>
<input id="input-amount" size="10"></input>
</br>
<label for="input-memo-hex">Memo(hex)</label>
<input id="input-memo-hex" size="80"></input>
</br>
<button id="button-send">Build & Sign Transaction</button>
<div style="font-family: monospace; width: 600px; word-wrap: break-word;"><div id="transaction-hex"></div></div>
</br>
<button id="button-decode">Decode</button>
<div id="decoded-tx"></div>
</br>
<button id="button-broadcast">Broadcast</button>
<div id="broadcast-result"></div>
<div id="explorer-link"></div>
</div>
<h1>Ethereum Wallet</h1>
<div id="eth-address-info"></div>
<div id="zrc20-balances"></div>
<hr>
<div>
<h2>zEVM Send Ether(ZETA) and Withdraw ZRC20</h2>
<div id="eth-balance-info"></div>
<label for="input-eth-recipient">Recipient:</label>
<input id="input-eth-recipient" size="70"></input>
</br>
<label for="input-eth-amount">Amount (in Ether/ZETA/BTC)</label>
<input id="input-eth-amount" size="10"></input>
</br>
<button id="button-eth-send">Build & Sign Transaction to send ZETA</button>
<button id="button-withdraw-geth">Build & Sign Transaction to withdraw gETH</button>
<button id="button-withdraw-tbnb">Build & Sign Transaction to withdraw tBNB</button>
<button id="button-withdraw-tmatic">Build & Sign Transaction to withdraw tMATIC</button>
<button id="button-withdraw-tbtc">Build & Sign Transaction to withdraw tBTC</button>
<button id="button-send-tbtc">Build & Sign Transaction to send tBTC</button>
<div id="eth-transaction-receipt"></div>
</div>
<div id="trade">
<button id="mysterious-button">Mysterious Button</button>
</div>
<!-- <script src="https://cdn.jsdelivr.net/gh/ethereum/web3.js/dist/web3.min.js"></script> -->
<!-- <script src="./common.js"></script> -->
<!-- <script src="./utils.js"></script> -->
<script src="./tag.js"></script>
<script src="./utils.js"></script>
<script type="module" src="./wallet.js"></script>
</body>
</html>