-
Notifications
You must be signed in to change notification settings - Fork 18
/
Copy pathmonero.html
112 lines (95 loc) · 3.65 KB
/
monero.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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Monero 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, monero, xmr, cryptocurrency">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="css/style2.css">
</head>
<body onload="generate()">
<div id="container">
<br>
<div class="noprint">
<button onclick="generate()">Generate</button>
<button onclick="window.print()">Print</button>
<a href="index.html">
<input type="button" value="Home"/>
</a>
</div>
<table>
<tr>
<h1 id="titlePaper">Monero Paper Wallet</h1>
</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>
</table>
<span class="noprint">
<b>Hint:</b> Choose bigger than A4 and print into pdf file. Best result comes with A3 size. After created pdf file, you can edit with a pdf editor and cut the blank areas. It will be suitable for A4 print size.
</span>
</div>
<script src="js/monero.js"></script>
<script src="js/qrcode.js"></script>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script>
<script type="text/javascript">
$(function(){
generate();
});
var account, keyPair, pubKey, privKey;
function generate(){
var current_lang = "english";
var seed = cnUtil.sc_reduce32(cnUtil.rand_32());
var keys = cnUtil.create_address(seed);
privKey = mn_encode(seed, current_lang);
pubKey = cnUtil.pubkeys_to_string(keys.spend.pub, keys.view.pub);
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
});
}
</script>
</body>
</html>