]>
Commit | Line | Data |
---|---|---|
1 | <!DOCTYPE html> | |
2 | <html> | |
3 | <head lang="en"> | |
4 | <meta charset="utf-8" /> | |
5 | <title>BIP39 - Mnemonic Code</title> | |
6 | <link rel="stylesheet" href="css/bootstrap.min.css"> | |
7 | <meta content="Mnemonic code for generating deterministic keys" name="description"/> | |
8 | <meta content="width=device-width, initial-scale=1.0" name="viewport" /> | |
9 | <meta content="bitcoin mnemonic converter" name="description" /> | |
10 | <meta content="DC POS" name="author" /> | |
11 | ||
12 | <style> | |
13 | body { | |
14 | padding-bottom: 32px; | |
15 | } | |
16 | .form-control[readonly] { | |
17 | cursor: text; | |
18 | } | |
19 | .feedback-container { | |
20 | position: fixed; | |
21 | top: 0; | |
22 | width: 100%; | |
23 | text-align: center; | |
24 | z-index: 4; | |
25 | } | |
26 | .feedback { | |
27 | display: table; | |
28 | padding: 0.5em 1em; | |
29 | background-color: orange; | |
30 | margin: 0 auto; | |
31 | font-size: 2em; | |
32 | color: #444; | |
33 | border: 2px solid #555; | |
34 | border-top: 0; | |
35 | border-bottom-left-radius: 20px 20px; | |
36 | border-bottom-right-radius: 20px 20px; | |
37 | } | |
38 | .no-border { | |
39 | border: 0; | |
40 | box-shadow: inset 0 1px 1px rgba(0,0,0,.0); | |
41 | -webkit-box-shadow: inset 0 1px 1px rgba(0,0,0,.0); | |
42 | } | |
43 | </style> | |
44 | </head> | |
45 | <body> | |
46 | <div class="container"> | |
47 | ||
48 | <h1 class="text-center">Mnemonic Code Converter</h1> | |
49 | <hr> | |
50 | <div class="row"> | |
51 | <div class="col-md-12"> | |
52 | <h2>Mnemonic</h2> | |
53 | <form class="form-horizontal" role="form"> | |
54 | <div class="col-sm-2"></div> | |
55 | <div class="col-sm-10"> | |
56 | <p>You can enter an existing BIP39 mnemonic, or generate a new random one. Typing your own twelve words will probably not work how you expect, since the words require a particular structure (the last word is a checksum)</p> | |
57 | <p>For more info see the <a href="https://github.com/bitcoin/bips/blob/master/bip-0039.mediawiki" target="_blank">BIP39 spec</a></p> | |
58 | </div> | |
59 | <div class="form-group"> | |
60 | <label for="phrase" class="col-sm-2 control-label">BIP39 Mnemonic</label> | |
61 | <div class="col-sm-10"> | |
62 | <textarea id="phrase" class="phrase form-control"></textarea> | |
63 | </div> | |
64 | </div> | |
65 | <div class="form-group"> | |
66 | <label for="strength" class="col-sm-2 control-label">Number of words</label> | |
67 | <div class="col-sm-10"> | |
68 | <div class="input-group"> | |
69 | <select id="strength" class="strength form-control"> | |
70 | <option val="3">3</option> | |
71 | <option val="6">6</option> | |
72 | <option val="9">9</option> | |
73 | <option val="12">12</option> | |
74 | <option val="15" selected>15</option> | |
75 | <option val="18">18</option> | |
76 | <option val="21">21</option> | |
77 | <option val="24">24</option> | |
78 | </select> | |
79 | <span class="input-group-btn"> | |
80 | <button class="btn generate">Generate Random Mnemonic</button> | |
81 | </span> | |
82 | </div> | |
83 | </div> | |
84 | </div> | |
85 | <div class="form-group"> | |
86 | <label for="passphrase" class="col-sm-2 control-label">BIP39 Passphrase (optional)</label> | |
87 | <div class="col-sm-10"> | |
88 | <textarea id="passphrase" class="passphrase form-control"></textarea> | |
89 | </div> | |
90 | </div> | |
91 | <div class="form-group"> | |
92 | <label for="network-phrase" class="col-sm-2 control-label">Coin</label> | |
93 | <div class="col-sm-10"> | |
94 | <select id="network-phrase" class="network form-control"> | |
95 | <!-- populated by javascript --> | |
96 | </select> | |
97 | </div> | |
98 | </div> | |
99 | <div class="form-group"> | |
100 | <label for="root-key" class="col-sm-2 control-label">BIP32 Root Key</label> | |
101 | <div class="col-sm-10"> | |
102 | <textarea id="root-key" class="root-key form-control" readonly="readonly"></textarea> | |
103 | </div> | |
104 | </div> | |
105 | </form> | |
106 | </div> | |
107 | </div> | |
108 | ||
109 | <hr> | |
110 | ||
111 | <div class="row"> | |
112 | <div class="col-md-12"> | |
113 | <h2>Derivation Path</h2> | |
114 | <ul class="derivation-type nav nav-tabs" role="tablist"> | |
115 | <li id="bip44-tab" class="active"> | |
116 | <a href="#bip44" role="tab" data-toggle="tab">BIP44</a> | |
117 | </li> | |
118 | <li id="bip32-tab"> | |
119 | <a href="#bip32" role="tab" data-toggle="tab">BIP32</a> | |
120 | </li> | |
121 | </ul> | |
122 | <div class="derivation-type tab-content"> | |
123 | <div id="bip44" class="tab-pane active"> | |
124 | <form class="form-horizontal" role="form"> | |
125 | <br> | |
126 | <div class="col-sm-2"></div> | |
127 | <div class="col-sm-10"> | |
128 | <p>For more info see the <a href="https://github.com/bitcoin/bips/blob/master/bip-0044.mediawiki" target="_blank">BIP44 spec</a></p> | |
129 | </div> | |
130 | <div class="form-group"> | |
131 | <label for="purpose" class="col-sm-2 control-label"> | |
132 | <a href="https://github.com/bitcoin/bips/blob/master/bip-0044.mediawiki#purpose" target="_blank">Purpose</a> | |
133 | </label> | |
134 | <div class="col-sm-10"> | |
135 | <input id="purpose" type="text" class="purpose form-control" value="44"> | |
136 | </div> | |
137 | </div> | |
138 | <div class="form-group"> | |
139 | <label for="coin" class="col-sm-2 control-label"> | |
140 | <a href="https://github.com/bitcoin/bips/blob/master/bip-0044.mediawiki#registered-coin-types" target="_blank">Coin</a> | |
141 | </label> | |
142 | <div class="col-sm-10"> | |
143 | <input id="coin" type="text" class="coin form-control" value="0"> | |
144 | </div> | |
145 | </div> | |
146 | <div class="form-group"> | |
147 | <label for="account" class="col-sm-2 control-label"> | |
148 | <a href="https://github.com/bitcoin/bips/blob/master/bip-0044.mediawiki#account" target="_blank">Account</a> | |
149 | </label> | |
150 | <div class="col-sm-10"> | |
151 | <input id="account" type="text" class="account form-control" value="0"> | |
152 | </div> | |
153 | </div> | |
154 | <div class="form-group"> | |
155 | <label for="change" class="col-sm-2 control-label"> | |
156 | <a href="https://github.com/bitcoin/bips/blob/master/bip-0044.mediawiki#change" target="_blank">External / Internal</a> | |
157 | </label> | |
158 | <div class="col-sm-10"> | |
159 | <input id="change" type="text" class="change form-control" value="0"> | |
160 | </div> | |
161 | </div> | |
162 | <div class="form-group"> | |
163 | <label for="bip44-path" class="col-sm-2 control-label">BIP32 Derivation Path</label> | |
164 | <div class="col-sm-10"> | |
165 | <input id="bip44-path" type="text" class="path form-control" value="m/44'/0'/0'/0" readonly="readonly"> | |
166 | </div> | |
167 | </div> | |
168 | </form> | |
169 | </div> | |
170 | <div id="bip32" class="tab-pane"> | |
171 | <form class="form-horizontal" role="form"> | |
172 | <br> | |
173 | <div class="col-sm-2"></div> | |
174 | <div class="col-sm-10"> | |
175 | <p>For more info see the <a href="https://github.com/bitcoin/bips/blob/master/bip-0032.mediawiki" target="_blank">BIP32 spec</a></p> | |
176 | </div> | |
177 | <div class="form-group"> | |
178 | <label for="bip32-path" class="col-sm-2 control-label">BIP32 Derivation Path</label> | |
179 | <div class="col-sm-10"> | |
180 | <input id="bip32-path" type="text" class="path form-control" value="m/0"> | |
181 | </div> | |
182 | </div> | |
183 | <div class="form-group"> | |
184 | <label class="col-sm-2 control-label">Hive Wallet</label> | |
185 | <div class="col-sm-10"> | |
186 | <p class="form-control no-border"> | |
187 | Use path <code>m/0'/0</code>. | |
188 | For more info see the <a href="https://www.hivewallet.com/" target="_blank">Hive Wallet homepage</a> | |
189 | </p> | |
190 | </div> | |
191 | </div> | |
192 | <div class="form-group"> | |
193 | <label for="mycelium-path" class="col-sm-2 control-label">Mycelium Wallet</label> | |
194 | <div class="col-sm-10"> | |
195 | <p class="form-control no-border"> | |
196 | Use path <code>m/44'/0'/0'/0</code>. | |
197 | For more info see the <a href="http://www.mycelium.com/" target="_blank">Mycelium Wallet homepage</a> | |
198 | </p> | |
199 | </div> | |
200 | </div> | |
201 | </form> | |
202 | </div> | |
203 | </div> | |
204 | <form class="form-horizontal" role="form"> | |
205 | <div class="form-group"> | |
206 | <label for="extended-priv-key" class="col-sm-2 control-label">BIP32 Extended Key</label> | |
207 | <div class="col-sm-10"> | |
208 | <textarea id="extended-priv-key" class="extended-priv-key form-control" readonly="readonly"></textarea> | |
209 | </div> | |
210 | </div> | |
211 | <div class="form-group"> | |
212 | <label for="extended-pub-key" class="col-sm-2 control-label">BIP32 Extended Key (addresses only)</label> | |
213 | <div class="col-sm-10"> | |
214 | <textarea id="extended-pub-key" class="extended-pub-key form-control" readonly="readonly"></textarea> | |
215 | </div> | |
216 | </div> | |
217 | </form> | |
218 | </div> | |
219 | </div> | |
220 | ||
221 | <hr> | |
222 | ||
223 | <div class="row"> | |
224 | <div class="col-md-12"> | |
225 | <h2>Derived Addresses</h2> | |
226 | <p>Note these addreses are derived from the <strong>BIP32 Extended Key</strong></p> | |
227 | <table class="table table-striped"> | |
228 | <thead> | |
229 | <th> | |
230 | <div class="input-group"> | |
231 | Path | |
232 | <button class="index-toggle">Toggle</button> | |
233 | </div> | |
234 | </th> | |
235 | <th> | |
236 | <div class="input-group"> | |
237 | Address | |
238 | <button class="address-toggle">Toggle</button> | |
239 | </div> | |
240 | </th> | |
241 | <th> | |
242 | <div class="input-group"> | |
243 | Private Key | |
244 | <button class="private-key-toggle">Toggle</button> | |
245 | </div> | |
246 | </th> | |
247 | </thead> | |
248 | <tbody class="addresses"> | |
249 | <tr><td> </td><td> </td><td> </td></tr> | |
250 | <tr><td> </td><td> </td><td> </td></tr> | |
251 | <tr><td> </td><td> </td><td> </td></tr> | |
252 | <tr><td> </td><td> </td><td> </td></tr> | |
253 | <tr><td> </td><td> </td><td> </td></tr> | |
254 | </tbody> | |
255 | </table> | |
256 | </div> | |
257 | </div> | |
258 | <span>Show next </button> | |
259 | <input type="number" class="rows-to-add" value="20"> | |
260 | <button class="more">Show</button> | |
261 | ||
262 | <hr> | |
263 | ||
264 | <div class="row"> | |
265 | <div class="col-md-12"> | |
266 | <h2>More info</h2> | |
267 | <h3>BIP39 <span class="small">Mnemonic code for generating deterministic keys</span></h3> | |
268 | <p> | |
269 | Read more at the | |
270 | <a href="https://github.com/bitcoin/bips/blob/master/bip-0039.mediawiki">official BIP39 spec</a> | |
271 | </p> | |
272 | <h3>BIP32 <span class="small">Hierarchical Deterministic Wallets</span></h3> | |
273 | <p> | |
274 | Read more at the | |
275 | <a href="https://github.com/bitcoin/bips/blob/master/bip-0032.mediawiki" target="_blank">official BIP32 spec</a> | |
276 | and see the demo at | |
277 | <a href="http://bip32.org/" target="_blank">bip32.org</a> | |
278 | </p> | |
279 | <h3>BIP44 <span class="small">Multi-Account Hierarchy for Deterministic Wallets</span></h3> | |
280 | <p> | |
281 | Read more at the | |
282 | <a href="https://github.com/bitcoin/bips/blob/master/bip-0044.mediawiki" target="_blank">official BIP44 spec</a> | |
283 | </p> | |
284 | <h3>Private Keys</h3> | |
285 | <p> | |
286 | Use private keys at | |
287 | <a href="https://web.archive.org/web/20150707020924/https://brainwallet.org/" target="_blank">brainwallet.org</a>, | |
288 | but be careful - it can be easy to make mistakes if you | |
289 | don't know what you're doing | |
290 | </p> | |
291 | </div> | |
292 | </div> | |
293 | ||
294 | <hr> | |
295 | ||
296 | <div class="row"> | |
297 | <div class="col-md-12"> | |
298 | ||
299 | <h2>Offline Usage</h2> | |
300 | ||
301 | <p> | |
302 | You can use this tool without having to be online. | |
303 | </p> | |
304 | <p> | |
305 | In your browser, select file save-as, and save this page | |
306 | as a file. | |
307 | </p> | |
308 | <p> | |
309 | Double-click that file to open it in a browser | |
310 | on any offline computer. | |
311 | </p> | |
312 | <p> | |
313 | Alternatively, download it from | |
314 | <a href="https://github.com/dcpos/bip39"> | |
315 | https://github.com/dcpos/bip39 | |
316 | </a> | |
317 | ||
318 | </div> | |
319 | </div> | |
320 | ||
321 | <hr> | |
322 | ||
323 | <div class="row"> | |
324 | <div class="col-md-12"> | |
325 | ||
326 | <h2>This project is 100% open-source code</h2> | |
327 | ||
328 | <p> | |
329 | <span>Get the source code at - </span> | |
330 | <a href="https://github.com/dcpos/bip39" target="_blank"> | |
331 | https://github.com/dcpos/bip39 | |
332 | </a> | |
333 | </p> | |
334 | ||
335 | <h3>Libraries</h3> | |
336 | ||
337 | <p> | |
338 | <span>BitcoinJS - </span> | |
339 | <a href="https://github.com/bitcoinjs/bitcoinjs-lib" target="_blank"> | |
340 | https://github.com/bitcoinjs/bitcoinjs-lib | |
341 | </a> | |
342 | </p> | |
343 | ||
344 | <p> | |
345 | <span>jsBIP39 - </span> | |
346 | <a href="https://github.com/iancoleman/jsbip39" target="_blank"> | |
347 | https://github.com/iancoleman/jsbip39 | |
348 | </a> | |
349 | </p> | |
350 | ||
351 | <p> | |
352 | <span>sjcl - </span> | |
353 | <a href="https://github.com/bitwiseshiftleft/sjcl" target="_blank"> | |
354 | https://github.com/bitwiseshiftleft/sjcl | |
355 | </a> | |
356 | </p> | |
357 | ||
358 | <p> | |
359 | <span>jQuery - </span> | |
360 | <a href="https://jquery.com/" target="_blank"> | |
361 | https://jquery.com/ | |
362 | </a> | |
363 | </p> | |
364 | ||
365 | <p> | |
366 | <span>Twitter Bootstrap - </span> | |
367 | <a href="http://getbootstrap.com/" target="_blank"> | |
368 | http://getbootstrap.com/ | |
369 | </a> | |
370 | </p> | |
371 | ||
372 | </div> | |
373 | </div> | |
374 | ||
375 | </div> | |
376 | ||
377 | <div class="feedback-container"> | |
378 | <div class="feedback">Loading...</div> | |
379 | </div> | |
380 | ||
381 | <script type="text/template" id="address-row-template"> | |
382 | <tr> | |
383 | <td class="index"><span></span></td> | |
384 | <td class="address"><span></span></td> | |
385 | <td class="privkey"><span></span></td> | |
386 | </tr> | |
387 | </script> | |
388 | <script src="js/jquery.min.js"></script> | |
389 | <script src="js/bootstrap.min.js"></script> | |
390 | <script src="js/bitcoinjs-1-5-7.js"></script> | |
391 | <script src="js/bitcoinjs-extensions.js"></script> | |
392 | <script src="js/sjcl-bip39.js"></script> | |
393 | <script src="js/wordlist_english.js"></script> | |
394 | <script src="js/jsbip39.js"></script> | |
395 | <script src="js/index.js"></script> | |
396 | </body> | |
397 | </html> |