forked from pwall-org/pwall
-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
130 lines (118 loc) · 7.69 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
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Dash Paper Wallet Generator</title>
<meta name="description" content="A lightweight, client-side, reliable, fast, open-source universal paper wallet generator supporting almost every major cryptocurrency">
<meta name="keywords" content="minimal, reliable, fast, universal, paper, wallet, generator, offline, pwall, dash, cryptocurrency">
<link rel="shortcut icon" href="../favicon.ico">
<!-- The MIT License (MIT)
Copyright (c) 2018 pwall.org
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE. -->
<style>
body{background-color: #f6f5f2;font-family: Arial, Helvetica, sans-serif;font-size: 14px;}
#container{margin: auto;max-width: 500px;}#titleLabel{font-weight:normal;}
.button{padding:5px 10px;text-align:center;text-decoration:none;display:inline-block;margin:4px 0;cursor:pointer;}
.button1{margin-left:2px;background-color:#f6f5f2;color:black;border:1px solid #7a7a7a;}
.button2{background-color:#4f6fff;color:#f6f5f2;border:1px solid #7a7a7a;}
.button:hover{background-color:#385cff;color:#f6f5f2;}
table{background-color: white;border-collapse: collapse;margin:10px 0;}
td,th{border: 2px solid #dedede;text-align: left;padding: 5px;}
#titlePaper{text-align: right;background-color:#dedede}a{color:black;}#secret,#public{font-family: monospace;}#secret_qr,#public_qr{height:130px;}#secret,#secretLabel,#secret_qr{float:right;}
.grayHeaders{background-color: #f6f5f2;}#shareColor{color:green;}#secretColor{color:red;}#update{display:inline-block;}#footer{font-size: 12px;}
@media only screen and (max-width: 640px){#secret, #public{font-size:10px;}}@media print{.noprint {display:none;}}
</style>
</head>
<body onload="generate()">
<div id="container">
<h3>pwall.org <span id="titleLabel">- a lightweight, open-source, universal paper wallet generator</span></h3>
<div class="noprint"><button class="button button2" onclick="generate()">Generate</button>
<button class="button button1" onclick="window.print()">Print</button>
<a href="../index.html"><input type="button" class="button button1" value="Home"/></a></div>
<table>
<tr><th id="titlePaper">Dash Paper Wallet</th></tr>
<tr><th class="grayHeaders">Public Address <span id="shareColor">(SHARE)</span></th></tr>
<tr><td><div id="public">Generating...</div></td></tr>
<tr><td><div id="public_qr"></div></td></tr>
<tr><th class="grayHeaders"><div id="secretLabel">Private Key <span id="secretColor">(SECRET)</span></div></th></tr>
<tr><td><div id="secret">Generating...</div></td></tr>
<tr><td><div id="secret_qr"></div></td></tr>
<tr><th class="grayHeaders">Instructions</th>
<tr><td><small>
<b>0. (Optional but highly recommended) Use pwall offline for maximum security</b> by downloading and extracting the zip file below and double-clicking on index.html on a secure offline computer or a Linux LiveCD.
<br><b>1. Generate a new wallet</b> by clicking on the "Generate" button.
<br><b>2. Print your new wallet</b> by clicking on the "Print" button. Keep your paper wallet in a secure location.
<br><b>3. Public Address</b> is used to receive or deposit funds to this paper wallet. You can share the address with others.
<br><b>4. Private key</b> is used to spend funds stored in this wallet. Do not share the private key!</small></td></tr>
</table>
<div id="footer" class="noprint"><b>Donations</b><br><b>BTC</b>: <a>137H4GbcDz3e3DS9ADDbee4wa1GHHdcEnW</a><br><b>ETH</b>: <a>0x0bDcBCbB9B0aCA3EAEE7a94A4fb5FB0f16681e2f</a>
<br><br>See <a href="https://github.com/pwall-org/pwall" target=_blank>Github repository</a> for more info. <a href="https://github.com/pwall-org/pwall/releases" target=_blank>(Download zip).</a>
<div id="update"></div>
<br>Copyright © 2018 pwall.org. Copyright and licensing notices included in the source code.</div></div>
<script src="../js/bitcoinjs-lib.js"></script>
<!-- The MIT License (MIT)
Copyright (c) 2011-2018 bitcoinjs-lib contributors
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE. -->
<script src="../js/qrcode.js"></script>
<!-- The MIT License (MIT)
Copyright (c) 2012 davidshimjs
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE. -->
<script>
function generate() {
const dash = bitcoin.networks.bitcoin;
dash.pubKeyHash = 0x4c; dash.wif = 0xcc; dash.scriptHash = 0x10;
const keyPair = bitcoin.ECPair.makeRandom();
const pubKey = keyPair.getAddress();
const privKey = keyPair.toWIF();
document.getElementById("public").textContent = pubKey;
document.getElementById("secret").textContent = privKey;
document.getElementById("public_qr").textContent = "";
document.getElementById("secret_qr").textContent = "";
new QRCode(document.getElementById("public_qr"), {text: pubKey, width: 128, height: 128, correctLevel : QRCode.CorrectLevel.H});
new QRCode(document.getElementById("secret_qr"), {text: privKey, width: 128, height: 128, correctLevel : QRCode.CorrectLevel.H});}
document.getElementById("update").textContent = "Latest update: " + document.lastModified;
</script>
</body>
</html>