]>
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="Ian Coleman" 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 | .phrase { | |
44 | word-break: keep-all; | |
45 | } | |
46 | .strength { | |
47 | /* override mobile width from bootstrap */ | |
48 | width: auto!important; | |
49 | display: inline-block; | |
50 | } | |
51 | .languages * { | |
52 | padding-left: 10px; | |
53 | } | |
54 | </style> | |
55 | </head> | |
56 | <body> | |
57 | <div class="container"> | |
58 | ||
59 | <h1 class="text-center">Mnemonic Code Converter</h1> | |
60 | <hr> | |
61 | <div class="row"> | |
62 | <div class="col-md-12"> | |
63 | <h2>Mnemonic</h2> | |
64 | <form class="form-horizontal" role="form"> | |
65 | <div class="col-sm-2"></div> | |
66 | <div class="col-sm-10"> | |
67 | <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> | |
68 | <p>For more info see the <a href="https://github.com/bitcoin/bips/blob/master/bip-0039.mediawiki" target="_blank">BIP39 spec</a></p> | |
69 | </div> | |
70 | <div class="form-group"> | |
71 | <label class="col-sm-2 control-label"></label> | |
72 | <div class="col-sm-10"> | |
73 | <div class="form-inline"> | |
74 | <div class="input-group-inline"> | |
75 | <button class="btn generate">Generate</button> | |
76 | <span>a random</span> | |
77 | <select id="strength" class="strength form-control"> | |
78 | <option value="3">3</option> | |
79 | <option value="6">6</option> | |
80 | <option value="9">9</option> | |
81 | <option value="12">12</option> | |
82 | <option value="15" selected>15</option> | |
83 | <option value="18">18</option> | |
84 | <option value="21">21</option> | |
85 | <option value="24">24</option> | |
86 | </select> | |
87 | word mnemonic, or enter your own below. | |
88 | </div> | |
89 | </div> | |
90 | </div> | |
91 | </div> | |
92 | <div class="form-group"> | |
93 | <label class="col-sm-2 control-label"></label> | |
94 | <div class="col-sm-10 languages"> | |
95 | <a href="#english">English</a> | |
96 | <a href="#japanese" title="Japanese">日本語</a> | |
97 | <a href="#spanish" title="Spanish">Español</a> | |
98 | <a href="#chinese_simplified" title="Chinese (Simplified)">中文(简体)</a> | |
99 | <a href="#chinese_traditional" title="Chinese (Traditional)">中文(繁體)</a> | |
100 | <a href="#french" title="French">Français</a> | |
101 | <a href="#italian" title="Italian">Italiano</a> | |
102 | </div> | |
103 | </div> | |
104 | <div class="form-group"> | |
105 | <label for="phrase" class="col-sm-2 control-label">BIP39 Mnemonic</label> | |
106 | <div class="col-sm-10"> | |
107 | <textarea id="phrase" class="phrase form-control"></textarea> | |
108 | </div> | |
109 | </div> | |
110 | <div class="form-group"> | |
111 | <label for="passphrase" class="col-sm-2 control-label">BIP39 Passphrase (optional)</label> | |
112 | <div class="col-sm-10"> | |
113 | <textarea id="passphrase" class="passphrase form-control"></textarea> | |
114 | </div> | |
115 | </div> | |
116 | <div class="form-group"> | |
117 | <label for="seed" class="col-sm-2 control-label">BIP39 Seed</label> | |
118 | <div class="col-sm-10"> | |
119 | <textarea id="seed" class="seed form-control" readonly="readonly"></textarea> | |
120 | </div> | |
121 | </div> | |
122 | <div class="form-group"> | |
123 | <label for="network-phrase" class="col-sm-2 control-label">Coin</label> | |
124 | <div class="col-sm-10"> | |
125 | <select id="network-phrase" class="network form-control"> | |
126 | <!-- populated by javascript --> | |
127 | </select> | |
128 | </div> | |
129 | </div> | |
130 | <div class="form-group"> | |
131 | <label for="root-key" class="col-sm-2 control-label">BIP32 Root Key</label> | |
132 | <div class="col-sm-10"> | |
133 | <textarea id="root-key" class="root-key form-control"></textarea> | |
134 | </div> | |
135 | </div> | |
136 | </form> | |
137 | </div> | |
138 | </div> | |
139 | ||
140 | <hr> | |
141 | ||
142 | <div class="row"> | |
143 | <div class="col-md-12"> | |
144 | <h2>Derivation Path</h2> | |
145 | <ul class="derivation-type nav nav-tabs" role="tablist"> | |
146 | <li id="bip44-tab" class="active"> | |
147 | <a href="#bip44" role="tab" data-toggle="tab">BIP44</a> | |
148 | </li> | |
149 | <li id="bip32-tab"> | |
150 | <a href="#bip32" role="tab" data-toggle="tab">BIP32</a> | |
151 | </li> | |
152 | </ul> | |
153 | <div class="derivation-type tab-content"> | |
154 | <div id="bip44" class="tab-pane active"> | |
155 | <form class="form-horizontal" role="form"> | |
156 | <br> | |
157 | <div class="col-sm-2"></div> | |
158 | <div class="col-sm-10"> | |
159 | <p>For more info see the <a href="https://github.com/bitcoin/bips/blob/master/bip-0044.mediawiki" target="_blank">BIP44 spec</a></p> | |
160 | </div> | |
161 | <div class="form-group"> | |
162 | <label for="purpose" class="col-sm-2 control-label"> | |
163 | <a href="https://github.com/bitcoin/bips/blob/master/bip-0044.mediawiki#purpose" target="_blank">Purpose</a> | |
164 | </label> | |
165 | <div class="col-sm-10"> | |
166 | <input id="purpose" type="text" class="purpose form-control" value="44"> | |
167 | </div> | |
168 | </div> | |
169 | <div class="form-group"> | |
170 | <label for="coin" class="col-sm-2 control-label"> | |
171 | <a href="https://github.com/bitcoin/bips/blob/master/bip-0044.mediawiki#registered-coin-types" target="_blank">Coin</a> | |
172 | </label> | |
173 | <div class="col-sm-10"> | |
174 | <input id="coin" type="text" class="coin form-control" value="0"> | |
175 | </div> | |
176 | </div> | |
177 | <div class="form-group"> | |
178 | <label for="account" class="col-sm-2 control-label"> | |
179 | <a href="https://github.com/bitcoin/bips/blob/master/bip-0044.mediawiki#account" target="_blank">Account</a> | |
180 | </label> | |
181 | <div class="col-sm-10"> | |
182 | <input id="account" type="text" class="account form-control" value="0"> | |
183 | </div> | |
184 | </div> | |
185 | <div class="form-group"> | |
186 | <label for="change" class="col-sm-2 control-label"> | |
187 | <a href="https://github.com/bitcoin/bips/blob/master/bip-0044.mediawiki#change" target="_blank">External / Internal</a> | |
188 | </label> | |
189 | <div class="col-sm-10"> | |
190 | <input id="change" type="text" class="change form-control" value="0"> | |
191 | </div> | |
192 | </div> | |
193 | <div class="form-group"> | |
194 | <label for="bip44-path" class="col-sm-2 control-label">BIP32 Derivation Path</label> | |
195 | <div class="col-sm-10"> | |
196 | <input id="bip44-path" type="text" class="path form-control" value="m/44'/0'/0'/0" readonly="readonly"> | |
197 | </div> | |
198 | </div> | |
199 | </form> | |
200 | </div> | |
201 | <div id="bip32" class="tab-pane"> | |
202 | <form class="form-horizontal" role="form"> | |
203 | <br> | |
204 | <div class="col-sm-2"></div> | |
205 | <div class="col-sm-10"> | |
206 | <p>For more info see the <a href="https://github.com/bitcoin/bips/blob/master/bip-0032.mediawiki" target="_blank">BIP32 spec</a></p> | |
207 | </div> | |
208 | <div class="form-group"> | |
209 | <label for="bip32-path" class="col-sm-2 control-label">BIP32 Derivation Path</label> | |
210 | <div class="col-sm-10"> | |
211 | <input id="bip32-path" type="text" class="path form-control" value="m/0"> | |
212 | </div> | |
213 | </div> | |
214 | <div class="form-group"> | |
215 | <div class="col-sm-2"></div> | |
216 | <label class="col-sm-10"> | |
217 | <input class="hardened-addresses" type="checkbox"> | |
218 | Use hardened addresses | |
219 | </label> | |
220 | </div> | |
221 | <div class="form-group"> | |
222 | <label class="col-sm-2 control-label">Hive Wallet</label> | |
223 | <div class="col-sm-10"> | |
224 | <p class="form-control no-border"> | |
225 | Use path <code>m/0'/0</code>. | |
226 | For more info see the <a href="https://www.hivewallet.com/" target="_blank">Hive Wallet homepage</a> | |
227 | </p> | |
228 | </div> | |
229 | </div> | |
230 | <div class="form-group"> | |
231 | <label for="mycelium-path" class="col-sm-2 control-label">Mycelium Wallet</label> | |
232 | <div class="col-sm-10"> | |
233 | <p class="form-control no-border"> | |
234 | Use path <code>m/44'/0'/0'/0</code>. | |
235 | For more info see the <a href="http://www.mycelium.com/" target="_blank">Mycelium Wallet homepage</a> | |
236 | </p> | |
237 | </div> | |
238 | </div> | |
239 | <div class="form-group"> | |
240 | <label for="core-path" class="col-sm-2 control-label">Bitcoin Core</label> | |
241 | <div class="col-sm-10"> | |
242 | <p class="form-control no-border"> | |
243 | Use path <code>m/0'/0'</code> with hardened addresses. | |
244 | For more info see the <a href="https://github.com/bitcoin/bitcoin/pull/8035" target="_blank">Bitcoin Core BIP32 implementation</a> | |
245 | </p> | |
246 | </div> | |
247 | </div> | |
248 | <div class="form-group"> | |
249 | <label class="col-sm-2 control-label">Block Explorers</label> | |
250 | <div class="col-sm-10"> | |
251 | <p class="form-control no-border"> | |
252 | Use path <code>m/44'/0'/0'</code>. | |
253 | Only enter the <code>xpub</code> extended key into block explorer search fields, never the <code>xpriv</code> key. | |
254 | </p> | |
255 | </div> | |
256 | </div> | |
257 | </form> | |
258 | </div> | |
259 | </div> | |
260 | <form class="form-horizontal" role="form"> | |
261 | <div class="form-group"> | |
262 | <label for="extended-priv-key" class="col-sm-2 control-label">BIP32 Extended Key</label> | |
263 | <div class="col-sm-10"> | |
264 | <textarea id="extended-priv-key" class="extended-priv-key form-control" readonly="readonly"></textarea> | |
265 | </div> | |
266 | </div> | |
267 | <div class="form-group"> | |
268 | <label for="extended-pub-key" class="col-sm-2 control-label">BIP32 Extended Key (addresses only)</label> | |
269 | <div class="col-sm-10"> | |
270 | <textarea id="extended-pub-key" class="extended-pub-key form-control" readonly="readonly"></textarea> | |
271 | </div> | |
272 | </div> | |
273 | </form> | |
274 | </div> | |
275 | </div> | |
276 | ||
277 | <hr> | |
278 | ||
279 | <div class="row"> | |
280 | <div class="col-md-12"> | |
281 | <h2>Derived Addresses</h2> | |
282 | <p>Note these addreses are derived from the <strong>BIP32 Extended Key</strong></p> | |
283 | <table class="table table-striped"> | |
284 | <thead> | |
285 | <th> | |
286 | <div class="input-group"> | |
287 | Path | |
288 | <button class="index-toggle">Toggle</button> | |
289 | </div> | |
290 | </th> | |
291 | <th> | |
292 | <div class="input-group"> | |
293 | Address | |
294 | <button class="address-toggle">Toggle</button> | |
295 | </div> | |
296 | </th> | |
297 | <th> | |
298 | <div class="input-group"> | |
299 | Private Key | |
300 | <button class="private-key-toggle">Toggle</button> | |
301 | </div> | |
302 | </th> | |
303 | </thead> | |
304 | <tbody class="addresses"> | |
305 | <tr><td> </td><td> </td><td> </td></tr> | |
306 | <tr><td> </td><td> </td><td> </td></tr> | |
307 | <tr><td> </td><td> </td><td> </td></tr> | |
308 | <tr><td> </td><td> </td><td> </td></tr> | |
309 | <tr><td> </td><td> </td><td> </td></tr> | |
310 | </tbody> | |
311 | </table> | |
312 | </div> | |
313 | </div> | |
314 | <span>Show next </button> | |
315 | <input type="number" class="rows-to-add" value="20"> | |
316 | <button class="more">Show</button> | |
317 | ||
318 | <hr> | |
319 | ||
320 | <div class="row"> | |
321 | <div class="col-md-12"> | |
322 | <h2>More info</h2> | |
323 | <h3>BIP39 <span class="small">Mnemonic code for generating deterministic keys</span></h3> | |
324 | <p> | |
325 | Read more at the | |
326 | <a href="https://github.com/bitcoin/bips/blob/master/bip-0039.mediawiki">official BIP39 spec</a> | |
327 | </p> | |
328 | <h3>BIP32 <span class="small">Hierarchical Deterministic Wallets</span></h3> | |
329 | <p> | |
330 | Read more at the | |
331 | <a href="https://github.com/bitcoin/bips/blob/master/bip-0032.mediawiki" target="_blank">official BIP32 spec</a> | |
332 | and see the demo at | |
333 | <a href="http://bip32.org/" target="_blank">bip32.org</a> | |
334 | </p> | |
335 | <h3>BIP44 <span class="small">Multi-Account Hierarchy for Deterministic Wallets</span></h3> | |
336 | <p> | |
337 | Read more at the | |
338 | <a href="https://github.com/bitcoin/bips/blob/master/bip-0044.mediawiki" target="_blank">official BIP44 spec</a> | |
339 | </p> | |
340 | <h3>Private Keys</h3> | |
341 | <p> | |
342 | Use private keys at | |
343 | <a href="https://web.archive.org/web/20150707020924/https://brainwallet.org/" target="_blank">brainwallet.org</a>, | |
344 | but be careful - it can be easy to make mistakes if you | |
345 | don't know what you're doing | |
346 | </p> | |
347 | </div> | |
348 | </div> | |
349 | ||
350 | <hr> | |
351 | ||
352 | <div class="row"> | |
353 | <div class="col-md-12"> | |
354 | ||
355 | <h2>Offline Usage</h2> | |
356 | ||
357 | <p> | |
358 | You can use this tool without having to be online. | |
359 | </p> | |
360 | <p> | |
361 | In your browser, select file save-as, and save this page | |
362 | as a file. | |
363 | </p> | |
364 | <p> | |
365 | Double-click that file to open it in a browser | |
366 | on any offline computer. | |
367 | </p> | |
368 | <p> | |
369 | Alternatively, download it from | |
370 | <a href="https://github.com/iancoleman/bip39"> | |
371 | https://github.com/iancoleman/bip39 | |
372 | </a> | |
373 | ||
374 | </div> | |
375 | </div> | |
376 | ||
377 | <hr> | |
378 | ||
379 | <div class="row"> | |
380 | <div class="col-md-12"> | |
381 | ||
382 | <h2>This project is 100% open-source code</h2> | |
383 | ||
384 | <p> | |
385 | <span>Get the source code at - </span> | |
386 | <a href="https://github.com/iancoleman/bip39" target="_blank"> | |
387 | https://github.com/iancoleman/bip39 | |
388 | </a> | |
389 | </p> | |
390 | ||
391 | <h3>Libraries</h3> | |
392 | ||
393 | <p> | |
394 | <span>BitcoinJS - </span> | |
395 | <a href="https://github.com/bitcoinjs/bitcoinjs-lib" target="_blank"> | |
396 | https://github.com/bitcoinjs/bitcoinjs-lib | |
397 | </a> | |
398 | </p> | |
399 | ||
400 | <p> | |
401 | <span>jsBIP39 - </span> | |
402 | <a href="https://github.com/iancoleman/jsbip39" target="_blank"> | |
403 | https://github.com/iancoleman/jsbip39 | |
404 | </a> | |
405 | </p> | |
406 | ||
407 | <p> | |
408 | <span>sjcl - </span> | |
409 | <a href="https://github.com/bitwiseshiftleft/sjcl" target="_blank"> | |
410 | https://github.com/bitwiseshiftleft/sjcl | |
411 | </a> | |
412 | </p> | |
413 | ||
414 | <p> | |
415 | <span>jQuery - </span> | |
416 | <a href="https://jquery.com/" target="_blank"> | |
417 | https://jquery.com/ | |
418 | </a> | |
419 | </p> | |
420 | ||
421 | <p> | |
422 | <span>Twitter Bootstrap - </span> | |
423 | <a href="http://getbootstrap.com/" target="_blank"> | |
424 | http://getbootstrap.com/ | |
425 | </a> | |
426 | </p> | |
427 | ||
428 | </div> | |
429 | </div> | |
430 | ||
431 | </div> | |
432 | ||
433 | <div class="feedback-container"> | |
434 | <div class="feedback">Loading...</div> | |
435 | </div> | |
436 | ||
437 | <script type="text/template" id="address-row-template"> | |
438 | <tr> | |
439 | <td class="index"><span></span></td> | |
440 | <td class="address"><span></span></td> | |
441 | <td class="privkey"><span></span></td> | |
442 | </tr> | |
443 | </script> | |
444 | <script src="js/jquery.min.js"></script> | |
445 | <script src="js/bootstrap.min.js"></script> | |
446 | <script src="js/levenshtein.js"></script> | |
447 | <script src="js/bitcoinjs-1-5-7.js"></script> | |
448 | <script src="js/bitcoinjs-extensions.js"></script> | |
449 | <script src="js/sjcl-bip39.js"></script> | |
450 | <script src="js/wordlist_english.js"></script> | |
451 | <script src="js/wordlist_japanese.js"></script> | |
452 | <script src="js/wordlist_spanish.js"></script> | |
453 | <script src="js/wordlist_chinese_simplified.js"></script> | |
454 | <script src="js/wordlist_chinese_traditional.js"></script> | |
455 | <script src="js/wordlist_french.js"></script> | |
456 | <script src="js/wordlist_italian.js"></script> | |
457 | <script src="js/jsbip39.js"></script> | |
458 | <script src="js/index.js"></script> | |
459 | </body> | |
460 | </html> |