-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathindex.html
504 lines (412 loc) · 19.1 KB
/
index.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
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
<!DOCTYPE html>
<html lang="en">
<head>
<title>Bitcoin Wallet by Coinb.in</title>
<meta http-equiv="content-type" content="text/html;charset=utf-8" />
<meta name="keywords"
content="bitcoin, wallet, multisig, multisignature, address, browser, segwit, javascript, js, broadcast, transaction, verify, decode" />
<meta name="description"
content="A Bitcoin Wallet written in Javascript. Supports Multisig, SegWit, Custom Transactions, nLockTime and more!" />
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="stylesheet" href="css/bootstrap.min.css" media="screen">
<link rel="stylesheet" href="css/bootstrap-datetimepicker.min.css">
<link rel="stylesheet" href="css/style.css" media="screen">
<script type="text/javascript" src="js/jquery-1.9.1.min.js"></script>
<script type="text/javascript" src="js/moment.min.js"></script>
<script type="text/javascript" src="js/transition.js"></script>
<script type="text/javascript" src="js/collapse.js"></script>
<script type="text/javascript" src="js/bootstrap.min.js"></script>
<script type="text/javascript" src="js/bootstrap-datetimepicker.min.js"></script>
<script type="text/javascript" src="js/crypto-min.js"></script>
<script type="text/javascript" src="js/crypto-sha256.js"></script>
<script type="text/javascript" src="js/crypto-sha256-hmac.js"></script>
<script type="text/javascript" src="js/sha512.js"></script>
<script type="text/javascript" src="js/ripemd160.js"></script>
<script type="text/javascript" src="js/aes.js"></script>
<script type="text/javascript" src="js/qrcode.js"></script>
<script type="text/javascript" src="js/qcode-decoder.min.js"></script>
<script type="text/javascript" src="js/jsbn.js"></script>
<script type="text/javascript" src="js/ellipticcurve.js"></script>
<script type="text/javascript" src="js/coin.js"></script>
<script type="text/javascript" src="js/coinbin.js"></script>
<script src="https://cdn.jsdelivr.net/npm/gun/examples/jquery.js"></script>
<script src="https://cdn.jsdelivr.net/npm/gun/gun.js"></script>
<script src="https://cdn.jsdelivr.net/npm/gun/sea.js"></script>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/tailwindcss/2.2.19/tailwind.min.css"
integrity="sha512-wnea99uKIC3TJF7v4eKk4Y+lMz2Mklv18+r4na2Gn1abDRPPOeef95xTzdwGD9e6zXJBteMIhZ1+68QC5byJZw=="
crossorigin="anonymous" referrerpolicy="no-referrer" />
</head>
<body>
<div id="wrap">
<!-- Fixed navbar -->
<div id="header" class="navbar " role="navigation">
<div class="container">
<div class="navbar-header">
<div href="#" class="navbar-brand" id="">
<h2 class="text-3xl font-bold">G A T L I N G </h2>
</div>
</div>
</div>
</div>
<style>
input:focus {
outline: none
}
</style>
<div id="content" class="container">
<noscript class="alert alert-danger center-block"><span class="glyphicon glyphicon-exclamation-sign"></span>
This page uses javascript, please enable it to continue!</noscript>
<div class="tab-content">
<div class="tab-pane tab-content active" id="wallet">
<div class="flex">
<div class="w-6/12">
<div class="pt-20" style="width: 100%;">
<div class="p-4 max-w-xl bg-white rounded-lg border border-gray-200 shadow-md sm:p-6 lg:p-8 dark:bg-gray-800 dark:border-gray-700" style="margin: auto;">
<form class="space-y-6 pt-10" action="/login" method="POST">
<div class="">
<label for="username" class="block mb-2 text-2xl font-medium text-gray-900 dark:text-gray-300">Username</label>
<input class="bg-gray-50 border border-gray-300 text-gray-900 text-3xl rounded-lg focus:ring-blue-500 focus:border-blue-500 block w-full p-2.5 dark:bg-gray-600 dark:border-gray-500 dark:placeholder-gray-400 dark:text-white" placeholder="john_doe" id="email" name="username" required>
</div>
<div>
<label for="password" class="block mb-2 text-2xl font-medium text-gray-900 dark:text-gray-300">Your password</label>
<input type="password" id="password" name="password" placeholder="Password" placeholder="••••••••" class="bg-gray-50 border border-gray-300 text-gray-900 text-3xl rounded-lg focus:ring-blue-500 focus:border-blue-500 block w-full p-2.5 dark:bg-gray-600 dark:border-gray-500 dark:placeholder-gray-400 dark:text-white" required>
</div>
<div class="flex items-start">
<div class="flex items-start">
<div class="flex items-center h-5">
</div>
<div class="ml-3 text-sm">
</div>
</div>
<a href="#" class="ml-auto text-sm text-blue-700 hover:underline dark:text-blue-500">How does Login work?</a>
</div>
<button type="submit" class="w-full text-white bg-blue-700 hover:bg-blue-800 focus:ring-4 focus:outline-none focus:ring-blue-300 font-medium rounded-lg text-md px-5 py-2.5 text-center dark:bg-blue-600 dark:hover:bg-blue-700 dark:focus:ring-blue-800">Login</button>
<button type="submit" class="w-full text-white bg-blue-700 hover:bg-blue-800 focus:ring-4 focus:outline-none focus:ring-blue-300 font-medium rounded-lg text-md px-5 py-2.5 text-center dark:bg-blue-600 dark:hover:bg-blue-700 dark:focus:ring-blue-800">Sign Up</button>
<div class="text-sm font-medium text-gray-500 dark:text-gray-300">
</div>
</form>
</div>
</div>
<!-- <h2 class="text-9xl bold">Log In</h2>
<div id="openLogin">
<form class="form-signin pt-10" role="form" action="javascript:;">
<input id="openUser" style="color: white; background-color: #ffffff00; border: none"
class="form-control" placeholder="Useranme" required>
<input id="openPass" style="color: white; background-color: #ffffff00; border: none"
type="password" class="form-control" placeholder="Password" required>
<br>
<div id="openLoginStatus" class="alert alert-danger hidden"></div>
<input class="px-5 py-1 bg-white text-3xl text-gray-800 rounded" id="openBtn"
type="submit" value="Sign in">
<input class="px-5 py-1 bg-white text-3xl text-gray-800 rounded" id="up"
type="button" value="Sign up">
</form>
<h2 class="text-4xl bold text-green-400 pt-4">If your a new user press Sign Up, then
Sign in. If nothing happens press Sign In again.</h2>
<h2 class="text-4xl bold text-green-400 pt-4">Else press Sign In.</h2>
<h2 class="text-2xl pt-4">Experimental, non-production hack for using Gun.js's user
auth system to generate keys. See lines 22-32 ./js/coinbin.js</h2>
<h2 class="text-2xl pt-4">A different user/password pair will generate a new pair of
keys. </h2>
<h2 class="text-2xl pt-4">This is not a place to store crypto, just somthing to fiddle
with, and develop for your own purposes.</h2>
<h2 class="text-2xl pt-4">PLEASE test before integrating. No package installation
required, just: </h2>
<br>
<code class="mt-5">
npx serve
</code> -->
</div>
<div id="openWallet" class="hidden">
<div class="row">
<div class="col-md-12 py-5">
<p><span style="float:right;"><a href="javascript:;" id="walletLogout"><span
class="glyphicon glyphicon-log-out"></span> Logout</a></span>
</p>
</div>
<div class="col-md-12" align="center">
<div id="walletQrCode"></div> <br>
<div>
<span id="walletLoader" class="hidden"><img src="images/loader.gif"></span>
<span id="walletAddress"></span>
<div class="btn-group">
<button type="button" class="btn btn-default btn-xs dropdown-toggle"
data-toggle="dropdown" id="walletToBtn">SegWit <span
class="caret"></span></button>
<ul class="dropdown-menu">
<li><a href="javascript:;" id="walletToSegWit">SegWit</a></li>
<li><a href="javascript:;"
id="walletToSegWitBech32">SegWit/Bech32</a></li>
<li><a href="javascript:;" id="walletToLegacy">Legacy</a></li>
</ul>
</div>
</div>
<br>
<div style="text-align:center; width:350px;">
<ul class="nav nav-pills" role="tablist">
<li role="presentation" class="active"><a href="javascript:;"
id="walletBalance">0.00 BTC</a></li>
<li role="presentation"><a href="javascript:;"
id="walletShowSpend">Spend</a></li>
<li role="presentation"><a href="javascript:;" id="walletHistory"
target="_blank">History</a></li>
<li role="presentation"><a href="javascript:;"
id="walletShowBuy">Buy</a></li>
<li role="presentation"><a href="javascript:;"
id="walletShowKeys">Keys</a></li>
</ul>
<br>
<div id="walletBuy" class="row walletOptions hidden">
<div class="col-md-6">
<label>Exchanges</label>
<p><b><a href="https://hodlhodl.com/join/XD4F" target="_bank"><img
src="images/hodlehodle.png" width="32" height="32"
style="padding:2;">HodlHodl</a></b><br>Multisig p2p
exchange
</p>
<p><b><a href="https://changelly.com/buy?from=usd&to=btc&amount=150&ref_id=wdo6tcw9bn9yrd91"
target="_blank"><img
src="images/changelly-logo-freelogovectors.net_-768x768.png"
width="32" height="32" style="padding:2;">
Changelly</a></b> <br>Instant
crypto
exchange</p>
</div>
<div class="col-md-6">
<label>Services</label>
<p><b><a href="https://www.bitrefill.com/signup/?code=zwuxxhbo"
target="_bank"><img src="images/bitrefill_icon.svg"
width="32" height="32" style="padding:2;">
style="padding:2;"> Bitrefill</a></b><br>Coupons and
vouchers
</p>
</div>
</div>
<div id="walletKeys" class="walletOptions hidden">
<label>Public Key</label>
<input class="form-control pubkey" type="text" readonly>
<div class="walletSegWitRS hidden">
<label>Redeem Script <i>(SegWit)</i></label>
<input class="form-control" type="text" readonly>
</div>
<label>Private key</label>
<div class="input-group">
<input class="form-control privkey" type="password" readonly>
<span class="input-group-btn">
<button class="showKey btn btn-default"
type="button">Show</button>
</span>
</div>
<label>Private Key (AES256 encrypted key)</label>
<input class="form-control privkeyaes" type="text" readonly>
</div>
<div id="walletSpend" class="walletOptions hidden">
<div class="row">
<div class="form-inline output">
<div class="col-xs-8">
<label>Address</label>
</div>
<div class="col-xs-3">
<label>Amount</label>
</div>
</div>
</div>
<div class="row" id="walletSpendTo">
<div class="form-horizontal output">
<div class="col-xs-8">
<input type="text" class="form-control addressTo"
data-original-title="" title="">
</div>
<div class="col-xs-3">
<input type="text" class="form-control amount"
data-original-title="" title="" placeholder="0.00">
</div>
<a href="javascript:;" class="addressAdd"><span
class="glyphicon glyphicon-plus"></span></a>
<br><br>
</div>
</div>
<div class="row">
<div class="col-xs-6">
<label><abbr
title="the amount to pay in network miner fee">Transaction
Fee</abbr> <a href="javascript:;"
id="feesestwallet"><span
class="glyphicon glyphicon-question-sign"></span></a></label>
<input type="text" class="form-control" value="0.00001000"
id="txFee">
</div>
<div class="col-xs-5">
<label><abbr
title="the amount to donate to coinb.in">Donation</abbr></label>
<input type="text" class="form-control" value="0.001"
id="developerDonation">
</div>
</div>
<br>
<div id="walletSendStatus" class="alert alert-danger hidden"></div>
<button class="btn btn-primary" type="button"
id="walletSendBtn">Send</button>
<button class="btn btn-default" type="button">Reset</button>
</div>
</div>
</div>
</div>
</div>
</div>
<div class="w-6/12 p-10 ">
</div>
</div>
</div>
</div>
</div>
</div>
<div id="footer">
<div class="container text-right">
<p class="text-muted">Made with <span class="pr-2">❤️️</span> for Mark and the Gun community. Built with
CoinBin.js & Gun.js. Github - <a href="https://github.com/itsvetobaby/gatling/"
class="text-blue-400">Gatling</a></p>
</div>
</div>
<!-- wallet confirm send modal -->
<div class="modal fade" id="modalWalletConfirm" tabindex="-1" role="dialog" aria-labelledby="myModalLabel"
aria-hidden="true">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
<h4 class="modal-title">Please confirm</h4>
</div>
<div class="modal-body">
<p>You are about to send a transaction to the value of <span id="spendAmount">0.00</span> BTC</p>
<br>
<div id="walletSendConfirmStatus" class="alert alert-danger hidden"></div>
<div id="walletSendFailTransaction" class="alert alert-info hidden">
<b>Raw Transaction:</b>
<p>Below is a copy of the transaction we tried to submit</p>
<textarea class="form-control" readonly></textarea>
</div>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-primary" id="walletConfirmSend">Send</button>
<button type="button" class="btn btn-default" data-dismiss="modal" id="confirmClose">Close</button>
</div>
</div>
</div>
</div>
<!-- wallet confirm send modal -->
<!-- qrcode modal -->
<div class="modal fade" id="modalQrcode" tabindex="-1" role="dialog" aria-labelledby="myModalLabel"
aria-hidden="true">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
<h4 class="modal-title">qrcode</h4>
</div>
<div class="modal-body" align="center">
<div id="qrcode"></div>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-default" data-dismiss="modal" id="qrCodeClose">Close</button>
</div>
</div>
</div>
</div>
<!-- qrcode modal -->
<!-- qrcode scanner modal -->
<div class="modal fade" id="modalQrcodeScanner" tabindex="-1" role="dialog" aria-labelledby="myModalLabel"
aria-hidden="true">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
<h4 class="modal-title">qrcode scanner</h4>
</div>
<div class="modal-body" align="center">
<select id="videoSource" class="form-control"></select>
<div id="videoReaderError" class="hidden">Your browser does not offer camera support</div>
<video id="videoReader" muted autoplay style="width:100%;height:100%"></video>
<div id="qrcode-scanner-callback-to" class="hidden"></div>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-default" data-dismiss="modal" id="qrScanClose">Close</button>
</div>
</div>
</div>
</div>
<!-- qrcode scanner modal -->
<!-- mediator modal -->
<div class="modal fade" id="modalMediator" tabindex="-1" role="dialog" aria-labelledby="myModalLabel"
aria-hidden="true">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
<h4 class="modal-title">Transaction Mediation</h4>
</div>
<div class="modal-body">
<p>You can add a public key when creating a <i>2-of-3 multi signature address</i> and for a low fee
your mediator will help with the recovery of the funds should any disputes arise.</p>
<p>Should a dispute arise please contact the below address for further information</p>
<div class="row">
<div class="col-md-5">
<label>Mediator:</label>
<!--
You need to contact us before adding your pubkey
and submitting a pull request on github.
format is: pubkey;email;fee
-->
<select id="mediatorList" class="form-control">
<option
value="02b6231cc602740c29436eafbb6448880f4058cc3d2745c709deee313104678277;[email protected];1">
Coinb.in</option>
</select>
</div>
<div class="col-md-5">
<label>Address:</label> <span class="text-muted">(for disputes)</span>
<input id="mediatorEmail" type="text" class="form-control address" value="" readonly>
</div>
<div class="col-md-2">
<label>Fee (%):</label>
<input id="mediatorFee" type="text" class="form-control address" value="" readonly>
</div>
</div>
<br>
<label>Public Key:</label>
<input id="mediatorPubkey" type="text" class="form-control address" value="" readonly>
<br>
</div>
<div class="modal-footer">
<button class="btn btn-primary" type="button" id="mediatorAddKey">Add Public Key</button>
<button type="button" class="btn btn-default" data-dismiss="modal" id="mediatorClose">Close</button>
</div>
</div>
</div>
</div>
<!-- mediator modal -->
<!-- warning (fee) modal -->
<div class="modal fade" id="modalWarningFee" tabindex="-1" role="dialog" aria-labelledby="myModalLabel"
aria-hidden="true">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
<h4 class="modal-title"><b>Warning High Fee!</b></h4>
</div>
<div class="modal-body">
Please be aware that you have created a transaction with what seems to be a very high fee of <span
id="modalWarningFeeAmount"></span> BTC!
</div>
<div class="modal-footer">
<button type="button" class="btn btn-primary" data-dismiss="modal" id="warningFeeClose">OK, I've got
it!</button>
</div>
</div>
</div>
</div>
<!-- warning (fee) modal -->
<div class="hidden" id="entropybucket"></div>
</body>
</html>