diff options
author | Ian Coleman <coleman.ian@gmail.com> | 2017-10-02 14:09:32 +1100 |
---|---|---|
committer | Ian Coleman <coleman.ian@gmail.com> | 2017-10-02 14:09:32 +1100 |
commit | fb00a22d3fbce70c8694419a7378ece7dd93e283 (patch) | |
tree | 24ff9af46576a7b00af8a991401fa0ba98ab6f3c /src | |
parent | 73b8724a6f83b597e4003b4bdd8f395fb94eda79 (diff) | |
download | BIP39-fb00a22d3fbce70c8694419a7378ece7dd93e283.tar.gz BIP39-fb00a22d3fbce70c8694419a7378ece7dd93e283.tar.zst BIP39-fb00a22d3fbce70c8694419a7378ece7dd93e283.zip |
Remove hand-rolled translation library
Diffstat (limited to 'src')
-rw-r--r-- | src/index.html | 258 | ||||
-rw-r--r-- | src/js/phrases_en.js | 94 | ||||
-rw-r--r-- | src/js/translate.js | 153 |
3 files changed, 128 insertions, 377 deletions
diff --git a/src/index.html b/src/index.html index 5c96704..59b0c91 100644 --- a/src/index.html +++ b/src/index.html | |||
@@ -123,8 +123,8 @@ | |||
123 | <div class="form-group"> | 123 | <div class="form-group"> |
124 | <div class="col-sm-2"></div> | 124 | <div class="col-sm-2"></div> |
125 | <div class="col-sm-10"> | 125 | <div class="col-sm-10"> |
126 | <p data-translate>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> | 126 | <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> |
127 | <p data-translate-html> | 127 | <p> |
128 | For more info see the | 128 | For more info see the |
129 | <a href="https://github.com/bitcoin/bips/blob/master/bip-0039.mediawiki" target="_blank">BIP39 spec</a>. | 129 | <a href="https://github.com/bitcoin/bips/blob/master/bip-0039.mediawiki" target="_blank">BIP39 spec</a>. |
130 | </p> | 130 | </p> |
@@ -135,7 +135,7 @@ | |||
135 | <div class="col-sm-10"> | 135 | <div class="col-sm-10"> |
136 | <div class="form-inline"> | 136 | <div class="form-inline"> |
137 | <div class="input-group-inline"> | 137 | <div class="input-group-inline"> |
138 | <span data-translate>Generate a random mnemonic, or enter your own below</span>: | 138 | <span>Generate a random mnemonic, or enter your own below</span>: |
139 | <button class="btn generate">Generate</button> | 139 | <button class="btn generate">Generate</button> |
140 | <select id="strength" class="strength form-control"> | 140 | <select id="strength" class="strength form-control"> |
141 | <option value="3">3</option> | 141 | <option value="3">3</option> |
@@ -147,23 +147,23 @@ | |||
147 | <option value="21">21</option> | 147 | <option value="21">21</option> |
148 | <option value="24">24</option> | 148 | <option value="24">24</option> |
149 | </select> | 149 | </select> |
150 | <span data-translate>words</span> | 150 | <span>words</span> |
151 | </div> | 151 | </div> |
152 | </div> | 152 | </div> |
153 | </div> | 153 | </div> |
154 | </div> | 154 | </div> |
155 | <div class="entropy-container hidden"> | 155 | <div class="entropy-container hidden"> |
156 | <div class="form-group text-danger"> | 156 | <div class="form-group text-danger"> |
157 | <label class="col-sm-2 control-label" data-translate>Warning</label> | 157 | <label class="col-sm-2 control-label">Warning</label> |
158 | <div class="col-sm-10 form-control-static"> | 158 | <div class="col-sm-10 form-control-static"> |
159 | <span data-translate>Entropy is an advanced feature. Your mnemonic may be insecure if this feature is used incorrectly.</span> | 159 | <span>Entropy is an advanced feature. Your mnemonic may be insecure if this feature is used incorrectly.</span> |
160 | <a href="#entropy-notes" data-translate>Read more</a> | 160 | <a href="#entropy-notes">Read more</a> |
161 | </div> | 161 | </div> |
162 | </div> | 162 | </div> |
163 | <div class="form-group"> | 163 | <div class="form-group"> |
164 | <label for="entropy" class="col-sm-2 control-label" data-translate>Entropy</label> | 164 | <label for="entropy" class="col-sm-2 control-label">Entropy</label> |
165 | <div class="col-sm-7"> | 165 | <div class="col-sm-7"> |
166 | <textarea id="entropy" rows="2" class="entropy form-control" placeholder="Accepts either binary, base 6, 6-sided dice, base 10, hexadecimal or cards" data-translate-placeholder></textarea> | 166 | <textarea id="entropy" rows="2" class="entropy form-control" placeholder="Accepts either binary, base 6, 6-sided dice, base 10, hexadecimal or cards"></textarea> |
167 | <div class="row filter-warning text-danger hidden"> | 167 | <div class="row filter-warning text-danger hidden"> |
168 | <p class="col-sm-12"> | 168 | <p class="col-sm-12"> |
169 | <strong> | 169 | <strong> |
@@ -172,48 +172,48 @@ | |||
172 | </p> | 172 | </p> |
173 | </div> | 173 | </div> |
174 | <div class="row"> | 174 | <div class="row"> |
175 | <label class="col-sm-3 control-label" data-translate><span class="more-info" data-translate-title title="Based on estimates from zxcvbn using Filtered Entropy">Time To Crack</span></label> | 175 | <label class="col-sm-3 control-label"><span class="more-info" title="Based on estimates from zxcvbn using Filtered Entropy">Time To Crack</span></label> |
176 | <div class="crack-time col-sm-3 form-control-static"></div> | 176 | <div class="crack-time col-sm-3 form-control-static"></div> |
177 | <label class="col-sm-3 control-label" data-translate>Event Count</label> | 177 | <label class="col-sm-3 control-label">Event Count</label> |
178 | <div class="event-count col-sm-3 form-control-static"></div> | 178 | <div class="event-count col-sm-3 form-control-static"></div> |
179 | </div> | 179 | </div> |
180 | <div class="row"> | 180 | <div class="row"> |
181 | <label class="col-sm-3 control-label" data-translate>Entropy Type</label> | 181 | <label class="col-sm-3 control-label">Entropy Type</label> |
182 | <div class="type col-sm-3 form-control-static"></div> | 182 | <div class="type col-sm-3 form-control-static"></div> |
183 | <label class="col-sm-3 control-label" data-translate>Bits Per Event</label> | 183 | <label class="col-sm-3 control-label">Bits Per Event</label> |
184 | <div class="bits-per-event col-sm-3 form-control-static"></div> | 184 | <div class="bits-per-event col-sm-3 form-control-static"></div> |
185 | </div> | 185 | </div> |
186 | <div class="row"> | 186 | <div class="row"> |
187 | <label class="col-sm-3 control-label" data-translate>Raw Entropy Words</label> | 187 | <label class="col-sm-3 control-label">Raw Entropy Words</label> |
188 | <div class="word-count col-sm-3 form-control-static"></div> | 188 | <div class="word-count col-sm-3 form-control-static"></div> |
189 | <label class="col-sm-3 control-label" data-translate><span class="more-info" data-translate-title title="Total bits of entropy may be less than indicated if any entropy event uses a weak source.">Total Bits</span></label> | 189 | <label class="col-sm-3 control-label"><span class="more-info" title="Total bits of entropy may be less than indicated if any entropy event uses a weak source.">Total Bits</span></label> |
190 | <div class="bits col-sm-3 form-control-static"></div> | 190 | <div class="bits col-sm-3 form-control-static"></div> |
191 | </div> | 191 | </div> |
192 | <label class="col-sm-3 control-label" data-translate>Filtered Entropy</label> | 192 | <label class="col-sm-3 control-label">Filtered Entropy</label> |
193 | <div class="filtered col-sm-9 form-control-static"></div> | 193 | <div class="filtered col-sm-9 form-control-static"></div> |
194 | <label class="col-sm-3 control-label" data-translate>Raw Binary</label> | 194 | <label class="col-sm-3 control-label">Raw Binary</label> |
195 | <div class="binary col-sm-9 form-control-static"></div> | 195 | <div class="binary col-sm-9 form-control-static"></div> |
196 | <label class="col-sm-3 control-label" data-translate>Mnemonic Length</label> | 196 | <label class="col-sm-3 control-label">Mnemonic Length</label> |
197 | <div class="col-sm-9"> | 197 | <div class="col-sm-9"> |
198 | <select class="mnemonic-length form-control"> | 198 | <select class="mnemonic-length form-control"> |
199 | <option value="raw" selected data-translate>Use Raw Entropy (3 words per 32 bits)</option> | 199 | <option value="raw" selected>Use Raw Entropy (3 words per 32 bits)</option> |
200 | <option value="12">12 <span data-translate>Words</span></option> | 200 | <option value="12">12 <span>Words</span></option> |
201 | <option value="15">15 <span data-translate>Words</option> | 201 | <option value="15">15 <span>Words</option> |
202 | <option value="18">18 <span data-translate>Words</span></option> | 202 | <option value="18">18 <span>Words</span></option> |
203 | <option value="21">21 <span data-translate>Words</span></option> | 203 | <option value="21">21 <span>Words</span></option> |
204 | <option value="24">24 <span data-translate>Words</span></option> | 204 | <option value="24">24 <span>Words</span></option> |
205 | </select> | 205 | </select> |
206 | </div> | 206 | </div> |
207 | </div> | 207 | </div> |
208 | <div class="col-sm-3"> | 208 | <div class="col-sm-3"> |
209 | <p data-translate>Valid entropy values include:</p> | 209 | <p>Valid entropy values include:</p> |
210 | <ul> | 210 | <ul> |
211 | <li><strong data-translate>Binary</strong> [0-1]<br>101010011</li> | 211 | <li><strong>Binary</strong> [0-1]<br>101010011</li> |
212 | <li><strong data-translate>Base 6</strong> [0-5]<br>123434014</li> | 212 | <li><strong>Base 6</strong> [0-5]<br>123434014</li> |
213 | <li><strong data-translate>Dice</strong> [1-6]<br>62535634</li> | 213 | <li><strong>Dice</strong> [1-6]<br>62535634</li> |
214 | <li><strong data-translate>Base 10</strong> [0-9]<br>90834528</li> | 214 | <li><strong>Base 10</strong> [0-9]<br>90834528</li> |
215 | <li><strong data-translate>Hex</strong> [0-9A-F]<br>4187a8bfd9</li> | 215 | <li><strong>Hex</strong> [0-9A-F]<br>4187a8bfd9</li> |
216 | <li><strong data-translate>Card</strong> [A2-9TJQK][CDHS]<br>ahqs9dtc</li> | 216 | <li><strong>Card</strong> [A2-9TJQK][CDHS]<br>ahqs9dtc</li> |
217 | </ul> | 217 | </ul> |
218 | </div> | 218 | </div> |
219 | </div> | 219 | </div> |
@@ -223,12 +223,12 @@ | |||
223 | <div class="col-sm-10 checkbox"> | 223 | <div class="col-sm-10 checkbox"> |
224 | <label> | 224 | <label> |
225 | <input type="checkbox" class="use-entropy"> | 225 | <input type="checkbox" class="use-entropy"> |
226 | <span data-translate>Supply my own source of entropy</span> | 226 | <span>Supply my own source of entropy</span> |
227 | </label> | 227 | </label> |
228 | </div> | 228 | </div> |
229 | </div> | 229 | </div> |
230 | <div class="form-group"> | 230 | <div class="form-group"> |
231 | <label class="col-sm-2 control-label" data-translate>Mnemonic Language</label> | 231 | <label class="col-sm-2 control-label">Mnemonic Language</label> |
232 | <div class="col-sm-10 languages"> | 232 | <div class="col-sm-10 languages"> |
233 | <div class="form-control no-border"> | 233 | <div class="form-control no-border"> |
234 | <a href="#english">English</a> | 234 | <a href="#english">English</a> |
@@ -242,25 +242,25 @@ | |||
242 | </div> | 242 | </div> |
243 | </div> | 243 | </div> |
244 | <div class="form-group"> | 244 | <div class="form-group"> |
245 | <label for="phrase" class="col-sm-2 control-label" data-translate>BIP39 Mnemonic</label> | 245 | <label for="phrase" class="col-sm-2 control-label">BIP39 Mnemonic</label> |
246 | <div class="col-sm-10"> | 246 | <div class="col-sm-10"> |
247 | <textarea id="phrase" class="phrase form-control" data-show-qr></textarea> | 247 | <textarea id="phrase" class="phrase form-control" data-show-qr></textarea> |
248 | </div> | 248 | </div> |
249 | </div> | 249 | </div> |
250 | <div class="form-group"> | 250 | <div class="form-group"> |
251 | <label for="passphrase" class="col-sm-2 control-label" data-translate>BIP39 Passphrase (optional)</label> | 251 | <label for="passphrase" class="col-sm-2 control-label">BIP39 Passphrase (optional)</label> |
252 | <div class="col-sm-10"> | 252 | <div class="col-sm-10"> |
253 | <textarea id="passphrase" class="passphrase form-control"></textarea> | 253 | <textarea id="passphrase" class="passphrase form-control"></textarea> |
254 | </div> | 254 | </div> |
255 | </div> | 255 | </div> |
256 | <div class="form-group"> | 256 | <div class="form-group"> |
257 | <label for="seed" class="col-sm-2 control-label" data-translate>BIP39 Seed</label> | 257 | <label for="seed" class="col-sm-2 control-label">BIP39 Seed</label> |
258 | <div class="col-sm-10"> | 258 | <div class="col-sm-10"> |
259 | <textarea id="seed" class="seed form-control" readonly="readonly" data-show-qr></textarea> | 259 | <textarea id="seed" class="seed form-control" readonly="readonly" data-show-qr></textarea> |
260 | </div> | 260 | </div> |
261 | </div> | 261 | </div> |
262 | <div class="form-group"> | 262 | <div class="form-group"> |
263 | <label for="network-phrase" class="col-sm-2 control-label" data-translate>Coin</label> | 263 | <label for="network-phrase" class="col-sm-2 control-label">Coin</label> |
264 | <div class="col-sm-10"> | 264 | <div class="col-sm-10"> |
265 | <select id="network-phrase" class="network form-control"> | 265 | <select id="network-phrase" class="network form-control"> |
266 | <!-- populated by javascript --> | 266 | <!-- populated by javascript --> |
@@ -268,13 +268,13 @@ | |||
268 | </div> | 268 | </div> |
269 | </div> | 269 | </div> |
270 | <div class="form-group"> | 270 | <div class="form-group"> |
271 | <label for="root-key" class="col-sm-2 control-label" data-translate>BIP32 Root Key</label> | 271 | <label for="root-key" class="col-sm-2 control-label">BIP32 Root Key</label> |
272 | <div class="col-sm-10"> | 272 | <div class="col-sm-10"> |
273 | <textarea id="root-key" class="root-key form-control" data-show-qr></textarea> | 273 | <textarea id="root-key" class="root-key form-control" data-show-qr></textarea> |
274 | </div> | 274 | </div> |
275 | </div> | 275 | </div> |
276 | <div class="form-group litecoin-ltub-container hidden"> | 276 | <div class="form-group litecoin-ltub-container hidden"> |
277 | <label for="litecoin-use-ltub" class="col-sm-2 control-label" data-translate>Prefixes</label> | 277 | <label for="litecoin-use-ltub" class="col-sm-2 control-label">Prefixes</label> |
278 | <div class="col-sm-10 checkbox"> | 278 | <div class="col-sm-10 checkbox"> |
279 | <label> | 279 | <label> |
280 | <input type="checkbox" id="litecoin-use-ltub" class="litecoin-use-ltub"> | 280 | <input type="checkbox" id="litecoin-use-ltub" class="litecoin-use-ltub"> |
@@ -308,14 +308,14 @@ | |||
308 | <br> | 308 | <br> |
309 | <div class="col-sm-2"></div> | 309 | <div class="col-sm-2"></div> |
310 | <div class="col-sm-10"> | 310 | <div class="col-sm-10"> |
311 | <p data-translate-html> | 311 | <p> |
312 | For more info see the | 312 | For more info see the |
313 | <a href="https://github.com/bitcoin/bips/blob/master/bip-0044.mediawiki" target="_blank">BIP44 spec</a>. | 313 | <a href="https://github.com/bitcoin/bips/blob/master/bip-0044.mediawiki" target="_blank">BIP44 spec</a>. |
314 | </p> | 314 | </p> |
315 | </div> | 315 | </div> |
316 | <div class="form-group"> | 316 | <div class="form-group"> |
317 | <label for="purpose" class="col-sm-2 control-label"> | 317 | <label for="purpose" class="col-sm-2 control-label"> |
318 | <a href="https://github.com/bitcoin/bips/blob/master/bip-0044.mediawiki#purpose" target="_blank" data-translate>Purpose</a> | 318 | <a href="https://github.com/bitcoin/bips/blob/master/bip-0044.mediawiki#purpose" target="_blank">Purpose</a> |
319 | </label> | 319 | </label> |
320 | <div class="col-sm-10"> | 320 | <div class="col-sm-10"> |
321 | <input id="purpose" type="text" class="purpose form-control" value="44" readonly> | 321 | <input id="purpose" type="text" class="purpose form-control" value="44" readonly> |
@@ -323,7 +323,7 @@ | |||
323 | </div> | 323 | </div> |
324 | <div class="form-group"> | 324 | <div class="form-group"> |
325 | <label for="coin" class="col-sm-2 control-label"> | 325 | <label for="coin" class="col-sm-2 control-label"> |
326 | <a href="https://github.com/bitcoin/bips/blob/master/bip-0044.mediawiki#registered-coin-types" target="_blank" data-translate>Coin</a> | 326 | <a href="https://github.com/bitcoin/bips/blob/master/bip-0044.mediawiki#registered-coin-types" target="_blank">Coin</a> |
327 | </label> | 327 | </label> |
328 | <div class="col-sm-10"> | 328 | <div class="col-sm-10"> |
329 | <input id="coin" type="text" class="coin form-control" value="0" readonly> | 329 | <input id="coin" type="text" class="coin form-control" value="0" readonly> |
@@ -331,7 +331,7 @@ | |||
331 | </div> | 331 | </div> |
332 | <div class="form-group"> | 332 | <div class="form-group"> |
333 | <label for="account" class="col-sm-2 control-label"> | 333 | <label for="account" class="col-sm-2 control-label"> |
334 | <a href="https://github.com/bitcoin/bips/blob/master/bip-0044.mediawiki#account" target="_blank" data-translate>Account</a> | 334 | <a href="https://github.com/bitcoin/bips/blob/master/bip-0044.mediawiki#account" target="_blank">Account</a> |
335 | </label> | 335 | </label> |
336 | <div class="col-sm-10"> | 336 | <div class="col-sm-10"> |
337 | <input id="account" type="text" class="account form-control" value="0"> | 337 | <input id="account" type="text" class="account form-control" value="0"> |
@@ -339,7 +339,7 @@ | |||
339 | </div> | 339 | </div> |
340 | <div class="form-group"> | 340 | <div class="form-group"> |
341 | <label for="change" class="col-sm-2 control-label"> | 341 | <label for="change" class="col-sm-2 control-label"> |
342 | <a href="https://github.com/bitcoin/bips/blob/master/bip-0044.mediawiki#change" target="_blank" data-translate>External / Internal</a> | 342 | <a href="https://github.com/bitcoin/bips/blob/master/bip-0044.mediawiki#change" target="_blank">External / Internal</a> |
343 | </label> | 343 | </label> |
344 | <div class="col-sm-10"> | 344 | <div class="col-sm-10"> |
345 | <input id="change" type="text" class="change form-control" value="0"> | 345 | <input id="change" type="text" class="change form-control" value="0"> |
@@ -349,12 +349,12 @@ | |||
349 | <label class="col-sm-2 control-label"> | 349 | <label class="col-sm-2 control-label"> |
350 | </label> | 350 | </label> |
351 | <div class="col-sm-10"> | 351 | <div class="col-sm-10"> |
352 | <p data-translate>The account extended keys can be used for importing to most BIP44 compatible wallets, such as mycelium or electrum.</p> | 352 | <p>The account extended keys can be used for importing to most BIP44 compatible wallets, such as mycelium or electrum.</p> |
353 | </div> | 353 | </div> |
354 | </div> | 354 | </div> |
355 | <div class="form-group"> | 355 | <div class="form-group"> |
356 | <label for="account-xprv" class="col-sm-2 control-label"> | 356 | <label for="account-xprv" class="col-sm-2 control-label"> |
357 | <span data-translate>Account Extended Private Key</span> | 357 | <span>Account Extended Private Key</span> |
358 | </label> | 358 | </label> |
359 | <div class="col-sm-10"> | 359 | <div class="col-sm-10"> |
360 | <textarea id="account-xprv" type="text" class="account-xprv form-control" readonly data-show-qr></textarea> | 360 | <textarea id="account-xprv" type="text" class="account-xprv form-control" readonly data-show-qr></textarea> |
@@ -362,7 +362,7 @@ | |||
362 | </div> | 362 | </div> |
363 | <div class="form-group"> | 363 | <div class="form-group"> |
364 | <label for="account-xpub" class="col-sm-2 control-label"> | 364 | <label for="account-xpub" class="col-sm-2 control-label"> |
365 | <span data-translate>Account Extended Public Key</span> | 365 | <span>Account Extended Public Key</span> |
366 | </label> | 366 | </label> |
367 | <div class="col-sm-10"> | 367 | <div class="col-sm-10"> |
368 | <textarea id="account-xpub" type="text" class="account-xpub form-control" readonly data-show-qr></textarea> | 368 | <textarea id="account-xpub" type="text" class="account-xpub form-control" readonly data-show-qr></textarea> |
@@ -372,11 +372,11 @@ | |||
372 | <label class="col-sm-2 control-label"> | 372 | <label class="col-sm-2 control-label"> |
373 | </label> | 373 | </label> |
374 | <div class="col-sm-10"> | 374 | <div class="col-sm-10"> |
375 | <p data-translate>The BIP32 derivation path and extended keys are the basis for the derived addresses.</p> | 375 | <p>The BIP32 derivation path and extended keys are the basis for the derived addresses.</p> |
376 | </div> | 376 | </div> |
377 | </div> | 377 | </div> |
378 | <div class="form-group"> | 378 | <div class="form-group"> |
379 | <label for="bip44-path" class="col-sm-2 control-label" data-translate>BIP32 Derivation Path</label> | 379 | <label for="bip44-path" class="col-sm-2 control-label">BIP32 Derivation Path</label> |
380 | <div class="col-sm-10"> | 380 | <div class="col-sm-10"> |
381 | <input id="bip44-path" type="text" class="path form-control" value="m/44'/0'/0'/0" readonly="readonly"> | 381 | <input id="bip44-path" type="text" class="path form-control" value="m/44'/0'/0'/0" readonly="readonly"> |
382 | </div> | 382 | </div> |
@@ -388,13 +388,13 @@ | |||
388 | <br> | 388 | <br> |
389 | <div class="col-sm-2"></div> | 389 | <div class="col-sm-2"></div> |
390 | <div class="col-sm-10"> | 390 | <div class="col-sm-10"> |
391 | <p data-translate> | 391 | <p> |
392 | For more info see the | 392 | For more info see the |
393 | <a href="https://github.com/bitcoin/bips/blob/master/bip-0032.mediawiki" target="_blank">BIP32 spec</a> | 393 | <a href="https://github.com/bitcoin/bips/blob/master/bip-0032.mediawiki" target="_blank">BIP32 spec</a> |
394 | </p> | 394 | </p> |
395 | </div> | 395 | </div> |
396 | <div class="form-group"> | 396 | <div class="form-group"> |
397 | <label for="bip32-client" class="col-sm-2 control-label" data-translate>Client</label> | 397 | <label for="bip32-client" class="col-sm-2 control-label">Client</label> |
398 | <div class="col-sm-10"> | 398 | <div class="col-sm-10"> |
399 | <select id="bip32-client" class="client form-control"> | 399 | <select id="bip32-client" class="client form-control"> |
400 | <option value="custom">Custom derivation path</option> | 400 | <option value="custom">Custom derivation path</option> |
@@ -403,7 +403,7 @@ | |||
403 | </div> | 403 | </div> |
404 | </div> | 404 | </div> |
405 | <div class="form-group"> | 405 | <div class="form-group"> |
406 | <label for="bip32-path" class="col-sm-2 control-label" data-translate>BIP32 Derivation Path</label> | 406 | <label for="bip32-path" class="col-sm-2 control-label">BIP32 Derivation Path</label> |
407 | <div class="col-sm-10"> | 407 | <div class="col-sm-10"> |
408 | <input id="bip32-path" type="text" class="path form-control" value="m/0"> | 408 | <input id="bip32-path" type="text" class="path form-control" value="m/0"> |
409 | </div> | 409 | </div> |
@@ -412,49 +412,49 @@ | |||
412 | <div class="col-sm-2"></div> | 412 | <div class="col-sm-2"></div> |
413 | <label class="col-sm-10"> | 413 | <label class="col-sm-10"> |
414 | <input class="hardened-addresses" type="checkbox"> | 414 | <input class="hardened-addresses" type="checkbox"> |
415 | <span data-translate>Use hardened addresses</span> | 415 | <span>Use hardened addresses</span> |
416 | </label> | 416 | </label> |
417 | </div> | 417 | </div> |
418 | <div class="form-group"> | 418 | <div class="form-group"> |
419 | <div class="col-sm-2"></div> | 419 | <div class="col-sm-2"></div> |
420 | <label class="col-sm-10"> | 420 | <label class="col-sm-10"> |
421 | <input class="p2wpkh-nested-in-p2sh" type="checkbox"> | 421 | <input class="p2wpkh-nested-in-p2sh" type="checkbox"> |
422 | <span data-translate>Use SegWit addresses (ie P2WPKH Nested In P2SH)</span> | 422 | <span>Use SegWit addresses (ie P2WPKH Nested In P2SH)</span> |
423 | </label> | 423 | </label> |
424 | </div> | 424 | </div> |
425 | <div class="form-group"> | 425 | <div class="form-group"> |
426 | <label for="core-path" class="col-sm-2 control-label" data-translate>Bitcoin Core</label> | 426 | <label for="core-path" class="col-sm-2 control-label">Bitcoin Core</label> |
427 | <div class="col-sm-10"> | 427 | <div class="col-sm-10"> |
428 | <p class="form-control no-border" data-translate-html> | 428 | <p class="form-control no-border"> |
429 | Use path <code>m/0'/0'</code> with hardened addresses. | 429 | Use path <code>m/0'/0'</code> with hardened addresses. |
430 | </p> | 430 | </p> |
431 | <p class="form-control no-border" data-translate-html> | 431 | <p class="form-control no-border"> |
432 | For more info see the | 432 | For more info see the |
433 | <a href="https://github.com/bitcoin/bitcoin/pull/8035" target="_blank">Bitcoin Core BIP32 implementation</a> | 433 | <a href="https://github.com/bitcoin/bitcoin/pull/8035" target="_blank">Bitcoin Core BIP32 implementation</a> |
434 | </p> | 434 | </p> |
435 | </div> | 435 | </div> |
436 | </div> | 436 | </div> |
437 | <div class="form-group"> | 437 | <div class="form-group"> |
438 | <label for="core-path" class="col-sm-2 control-label" data-translate>Multibit</label> | 438 | <label for="core-path" class="col-sm-2 control-label">Multibit</label> |
439 | <div class="col-sm-10"> | 439 | <div class="col-sm-10"> |
440 | <p class="form-control no-border"> | 440 | <p class="form-control no-border"> |
441 | <span data-translate-html>Use path <code>m/0'/0</code>.</span> | 441 | <span>Use path <code>m/0'/0</code>.</span> |
442 | </p> | 442 | </p> |
443 | <p class="form-control no-border"> | 443 | <p class="form-control no-border"> |
444 | <span data-translate>For more info see</span> | 444 | <span>For more info see</span> |
445 | <a href="https://multibit.org/" target="_blank">MultiBit HD</a> | 445 | <a href="https://multibit.org/" target="_blank">MultiBit HD</a> |
446 | </p> | 446 | </p> |
447 | </div> | 447 | </div> |
448 | </div> | 448 | </div> |
449 | <div class="form-group"> | 449 | <div class="form-group"> |
450 | <label class="col-sm-2 control-label" data-translate>Block Explorers</label> | 450 | <label class="col-sm-2 control-label">Block Explorers</label> |
451 | <div class="col-sm-10"> | 451 | <div class="col-sm-10"> |
452 | <p class="form-control no-border"> | 452 | <p class="form-control no-border"> |
453 | <span data-translate-html>Use path <code>m/44'/0'/0'</code>.</span> | 453 | <span>Use path <code>m/44'/0'/0'</code>.</span> |
454 | <span data-translate-html>Only enter the <code>xpub</code> extended key into block explorer search fields, never the <code>xprv</code> key.</span> | 454 | <span>Only enter the <code>xpub</code> extended key into block explorer search fields, never the <code>xprv</code> key.</span> |
455 | </p> | 455 | </p> |
456 | <p class="form-control no-border"> | 456 | <p class="form-control no-border"> |
457 | <span data-translate>Can be used with</span>: | 457 | <span>Can be used with</span>: |
458 | <a href="https://blockchain.info/" target="_blank">blockchain.info</a> | 458 | <a href="https://blockchain.info/" target="_blank">blockchain.info</a> |
459 | </p> | 459 | </p> |
460 | </div> | 460 | </div> |
@@ -468,21 +468,21 @@ | |||
468 | <div class="form-group"> | 468 | <div class="form-group"> |
469 | <div class="col-sm-2"></div> | 469 | <div class="col-sm-2"></div> |
470 | <div class="col-sm-10"> | 470 | <div class="col-sm-10"> |
471 | <p data-translate>BIP49 is unavailable for this coin.</p> | 471 | <p>BIP49 is unavailable for this coin.</p> |
472 | </div> | 472 | </div> |
473 | </div> | 473 | </div> |
474 | </div> | 474 | </div> |
475 | <div class="available"> | 475 | <div class="available"> |
476 | <div class="col-sm-2"></div> | 476 | <div class="col-sm-2"></div> |
477 | <div class="col-sm-10"> | 477 | <div class="col-sm-10"> |
478 | <p data-translate-html> | 478 | <p> |
479 | For more info see the | 479 | For more info see the |
480 | <a href="https://github.com/bitcoin/bips/blob/master/bip-0049.mediawiki" target="_blank">BIP49 spec</a>. | 480 | <a href="https://github.com/bitcoin/bips/blob/master/bip-0049.mediawiki" target="_blank">BIP49 spec</a>. |
481 | </p> | 481 | </p> |
482 | </div> | 482 | </div> |
483 | <div class="form-group"> | 483 | <div class="form-group"> |
484 | <label for="purpose" class="col-sm-2 control-label"> | 484 | <label for="purpose" class="col-sm-2 control-label"> |
485 | <a href="https://github.com/bitcoin/bips/blob/master/bip-0044.mediawiki#purpose" target="_blank" data-translate>Purpose</a> | 485 | <a href="https://github.com/bitcoin/bips/blob/master/bip-0044.mediawiki#purpose" target="_blank">Purpose</a> |
486 | </label> | 486 | </label> |
487 | <div class="col-sm-10"> | 487 | <div class="col-sm-10"> |
488 | <input id="purpose" type="text" class="purpose form-control" value="49" readonly> | 488 | <input id="purpose" type="text" class="purpose form-control" value="49" readonly> |
@@ -490,7 +490,7 @@ | |||
490 | </div> | 490 | </div> |
491 | <div class="form-group"> | 491 | <div class="form-group"> |
492 | <label for="coin" class="col-sm-2 control-label"> | 492 | <label for="coin" class="col-sm-2 control-label"> |
493 | <a href="https://github.com/bitcoin/bips/blob/master/bip-0044.mediawiki#registered-coin-types" target="_blank" data-translate>Coin</a> | 493 | <a href="https://github.com/bitcoin/bips/blob/master/bip-0044.mediawiki#registered-coin-types" target="_blank">Coin</a> |
494 | </label> | 494 | </label> |
495 | <div class="col-sm-10"> | 495 | <div class="col-sm-10"> |
496 | <input id="coin" type="text" class="coin form-control" value="0" readonly> | 496 | <input id="coin" type="text" class="coin form-control" value="0" readonly> |
@@ -498,7 +498,7 @@ | |||
498 | </div> | 498 | </div> |
499 | <div class="form-group"> | 499 | <div class="form-group"> |
500 | <label for="account" class="col-sm-2 control-label"> | 500 | <label for="account" class="col-sm-2 control-label"> |
501 | <a href="https://github.com/bitcoin/bips/blob/master/bip-0044.mediawiki#account" target="_blank" data-translate>Account</a> | 501 | <a href="https://github.com/bitcoin/bips/blob/master/bip-0044.mediawiki#account" target="_blank">Account</a> |
502 | </label> | 502 | </label> |
503 | <div class="col-sm-10"> | 503 | <div class="col-sm-10"> |
504 | <input id="account" type="text" class="account form-control" value="0"> | 504 | <input id="account" type="text" class="account form-control" value="0"> |
@@ -506,7 +506,7 @@ | |||
506 | </div> | 506 | </div> |
507 | <div class="form-group"> | 507 | <div class="form-group"> |
508 | <label for="change" class="col-sm-2 control-label"> | 508 | <label for="change" class="col-sm-2 control-label"> |
509 | <a href="https://github.com/bitcoin/bips/blob/master/bip-0044.mediawiki#change" target="_blank" data-translate>External / Internal</a> | 509 | <a href="https://github.com/bitcoin/bips/blob/master/bip-0044.mediawiki#change" target="_blank">External / Internal</a> |
510 | </label> | 510 | </label> |
511 | <div class="col-sm-10"> | 511 | <div class="col-sm-10"> |
512 | <input id="change" type="text" class="change form-control" value="0"> | 512 | <input id="change" type="text" class="change form-control" value="0"> |
@@ -516,12 +516,12 @@ | |||
516 | <label class="col-sm-2 control-label"> | 516 | <label class="col-sm-2 control-label"> |
517 | </label> | 517 | </label> |
518 | <div class="col-sm-10"> | 518 | <div class="col-sm-10"> |
519 | <p data-translate>The account extended keys can be used for importing to most BIP49 compatible wallets.</p> | 519 | <p>The account extended keys can be used for importing to most BIP49 compatible wallets.</p> |
520 | </div> | 520 | </div> |
521 | </div> | 521 | </div> |
522 | <div class="form-group"> | 522 | <div class="form-group"> |
523 | <label for="account-xprv" class="col-sm-2 control-label"> | 523 | <label for="account-xprv" class="col-sm-2 control-label"> |
524 | <span data-translate>Account Extended Private Key</span> | 524 | <span>Account Extended Private Key</span> |
525 | </label> | 525 | </label> |
526 | <div class="col-sm-10"> | 526 | <div class="col-sm-10"> |
527 | <textarea id="account-xprv" type="text" class="account-xprv form-control" readonly data-show-qr></textarea> | 527 | <textarea id="account-xprv" type="text" class="account-xprv form-control" readonly data-show-qr></textarea> |
@@ -529,7 +529,7 @@ | |||
529 | </div> | 529 | </div> |
530 | <div class="form-group"> | 530 | <div class="form-group"> |
531 | <label for="account-xpub" class="col-sm-2 control-label"> | 531 | <label for="account-xpub" class="col-sm-2 control-label"> |
532 | <span data-translate>Account Extended Public Key</span> | 532 | <span>Account Extended Public Key</span> |
533 | </label> | 533 | </label> |
534 | <div class="col-sm-10"> | 534 | <div class="col-sm-10"> |
535 | <textarea id="account-xpub" type="text" class="account-xpub form-control" readonly data-show-qr></textarea> | 535 | <textarea id="account-xpub" type="text" class="account-xpub form-control" readonly data-show-qr></textarea> |
@@ -539,11 +539,11 @@ | |||
539 | <label class="col-sm-2 control-label"> | 539 | <label class="col-sm-2 control-label"> |
540 | </label> | 540 | </label> |
541 | <div class="col-sm-10"> | 541 | <div class="col-sm-10"> |
542 | <p data-translate>The BIP32 derivation path and extended keys are the basis for the derived addresses.</p> | 542 | <p>The BIP32 derivation path and extended keys are the basis for the derived addresses.</p> |
543 | </div> | 543 | </div> |
544 | </div> | 544 | </div> |
545 | <div class="form-group"> | 545 | <div class="form-group"> |
546 | <label for="bip49-path" class="col-sm-2 control-label" data-translate>BIP32 Derivation Path</label> | 546 | <label for="bip49-path" class="col-sm-2 control-label">BIP32 Derivation Path</label> |
547 | <div class="col-sm-10"> | 547 | <div class="col-sm-10"> |
548 | <input id="bip49-path" type="text" class="path form-control" value="m/49'/0'/0'/0" readonly="readonly"> | 548 | <input id="bip49-path" type="text" class="path form-control" value="m/49'/0'/0'/0" readonly="readonly"> |
549 | </div> | 549 | </div> |
@@ -554,13 +554,13 @@ | |||
554 | </div> | 554 | </div> |
555 | <form class="form-horizontal" role="form"> | 555 | <form class="form-horizontal" role="form"> |
556 | <div class="form-group"> | 556 | <div class="form-group"> |
557 | <label for="extended-priv-key" class="col-sm-2 control-label" data-translate>BIP32 Extended Private Key</label> | 557 | <label for="extended-priv-key" class="col-sm-2 control-label">BIP32 Extended Private Key</label> |
558 | <div class="col-sm-10"> | 558 | <div class="col-sm-10"> |
559 | <textarea id="extended-priv-key" class="extended-priv-key form-control" readonly="readonly" data-show-qr></textarea> | 559 | <textarea id="extended-priv-key" class="extended-priv-key form-control" readonly="readonly" data-show-qr></textarea> |
560 | </div> | 560 | </div> |
561 | </div> | 561 | </div> |
562 | <div class="form-group"> | 562 | <div class="form-group"> |
563 | <label for="extended-pub-key" class="col-sm-2 control-label" data-translate>BIP32 Extended Public Key</label> | 563 | <label for="extended-pub-key" class="col-sm-2 control-label">BIP32 Extended Public Key</label> |
564 | <div class="col-sm-10"> | 564 | <div class="col-sm-10"> |
565 | <textarea id="extended-pub-key" class="extended-pub-key form-control" readonly="readonly" data-show-qr></textarea> | 565 | <textarea id="extended-pub-key" class="extended-pub-key form-control" readonly="readonly" data-show-qr></textarea> |
566 | </div> | 566 | </div> |
@@ -574,31 +574,31 @@ | |||
574 | <div class="row"> | 574 | <div class="row"> |
575 | <div class="col-md-12"> | 575 | <div class="col-md-12"> |
576 | <h2>Derived Addresses</h2> | 576 | <h2>Derived Addresses</h2> |
577 | <p data-translate>Note these addreses are derived from the BIP32 Extended Key</p> | 577 | <p>Note these addreses are derived from the BIP32 Extended Key</p> |
578 | <table class="table table-striped"> | 578 | <table class="table table-striped"> |
579 | <thead> | 579 | <thead> |
580 | <th> | 580 | <th> |
581 | <div class="input-group"> | 581 | <div class="input-group"> |
582 | <span data-translate>Path</span> | 582 | <span>Path</span> |
583 | <button class="index-toggle" data-translate>Toggle</button> | 583 | <button class="index-toggle">Toggle</button> |
584 | </div> | 584 | </div> |
585 | </th> | 585 | </th> |
586 | <th> | 586 | <th> |
587 | <div class="input-group"> | 587 | <div class="input-group"> |
588 | <span data-translate>Address</span> | 588 | <span>Address</span> |
589 | <button class="address-toggle" data-translate>Toggle</button> | 589 | <button class="address-toggle">Toggle</button> |
590 | </div> | 590 | </div> |
591 | </th> | 591 | </th> |
592 | <th> | 592 | <th> |
593 | <div class="input-group"> | 593 | <div class="input-group"> |
594 | <span data-translate>Public Key</span> | 594 | <span>Public Key</span> |
595 | <button class="public-key-toggle" data-translate>Toggle</button> | 595 | <button class="public-key-toggle">Toggle</button> |
596 | </div> | 596 | </div> |
597 | </th> | 597 | </th> |
598 | <th> | 598 | <th> |
599 | <div class="input-group"> | 599 | <div class="input-group"> |
600 | <span data-translate>Private Key</span> | 600 | <span>Private Key</span> |
601 | <button class="private-key-toggle" data-translate>Toggle</button> | 601 | <button class="private-key-toggle">Toggle</button> |
602 | </div> | 602 | </div> |
603 | </th> | 603 | </th> |
604 | </thead> | 604 | </thead> |
@@ -612,86 +612,86 @@ | |||
612 | </table> | 612 | </table> |
613 | </div> | 613 | </div> |
614 | </div> | 614 | </div> |
615 | <span data-translate>Show more rows</span>: | 615 | <span>Show more rows</span>: |
616 | <input type="number" class="rows-to-add" value="20"> | 616 | <input type="number" class="rows-to-add" value="20"> |
617 | <button class="more" data-translate>Show</button> | 617 | <button class="more">Show</button> |
618 | 618 | ||
619 | <hr> | 619 | <hr> |
620 | 620 | ||
621 | <div class="row"> | 621 | <div class="row"> |
622 | <div class="col-md-12"> | 622 | <div class="col-md-12"> |
623 | <h2 data-translate>More info</h2> | 623 | <h2>More info</h2> |
624 | <h3>BIP39 <span class="small" data-translate>Mnemonic code for generating deterministic keys</span></h3> | 624 | <h3>BIP39 <span class="small">Mnemonic code for generating deterministic keys</span></h3> |
625 | <p data-translate-html> | 625 | <p> |
626 | Read more at the | 626 | Read more at the |
627 | <a href="https://github.com/bitcoin/bips/blob/master/bip-0039.mediawiki">official BIP39 spec</a> | 627 | <a href="https://github.com/bitcoin/bips/blob/master/bip-0039.mediawiki">official BIP39 spec</a> |
628 | </p> | 628 | </p> |
629 | <h3>BIP32 <span class="small" data-translate>Hierarchical Deterministic Wallets</span></h3> | 629 | <h3>BIP32 <span class="small">Hierarchical Deterministic Wallets</span></h3> |
630 | <p data-translate-html> | 630 | <p> |
631 | Read more at the | 631 | Read more at the |
632 | <a href="https://github.com/bitcoin/bips/blob/master/bip-0032.mediawiki" target="_blank">official BIP32 spec</a> | 632 | <a href="https://github.com/bitcoin/bips/blob/master/bip-0032.mediawiki" target="_blank">official BIP32 spec</a> |
633 | </p> | 633 | </p> |
634 | <p data-translate-html> | 634 | <p> |
635 | See the demo at | 635 | See the demo at |
636 | <a href="http://bip32.org/" target="_blank">bip32.org</a> | 636 | <a href="http://bip32.org/" target="_blank">bip32.org</a> |
637 | </p> | 637 | </p> |
638 | <h3>BIP44 <span class="small" data-translate>Multi-Account Hierarchy for Deterministic Wallets</span></h3> | 638 | <h3>BIP44 <span class="small">Multi-Account Hierarchy for Deterministic Wallets</span></h3> |
639 | <p data-translate-html> | 639 | <p> |
640 | Read more at the | 640 | Read more at the |
641 | <a href="https://github.com/bitcoin/bips/blob/master/bip-0044.mediawiki" target="_blank">official BIP44 spec</a> | 641 | <a href="https://github.com/bitcoin/bips/blob/master/bip-0044.mediawiki" target="_blank">official BIP44 spec</a> |
642 | </p> | 642 | </p> |
643 | <h3>BIP49 <span class="small" data-translate>Derivation scheme for P2WPKH-nested-in-P2SH based accounts</span></h3> | 643 | <h3>BIP49 <span class="small">Derivation scheme for P2WPKH-nested-in-P2SH based accounts</span></h3> |
644 | <p data-translate-html> | 644 | <p> |
645 | Read more at the | 645 | Read more at the |
646 | <a href="https://github.com/bitcoin/bips/blob/master/bip-0049.mediawiki" target="_blank">official BIP49 spec</a> | 646 | <a href="https://github.com/bitcoin/bips/blob/master/bip-0049.mediawiki" target="_blank">official BIP49 spec</a> |
647 | </p> | 647 | </p> |
648 | <h3 data-translate>Private Keys</h3> | 648 | <h3>Private Keys</h3> |
649 | <p> | 649 | <p> |
650 | <span data-translate-html> | 650 | <span> |
651 | Use private keys at | 651 | Use private keys at |
652 | <a href="https://web.archive.org/web/20150707020924/https://brainwallet.org/" target="_blank">brainwallet.org</a>. | 652 | <a href="https://web.archive.org/web/20150707020924/https://brainwallet.org/" target="_blank">brainwallet.org</a>. |
653 | </span> | 653 | </span> |
654 | <span data-translate>Be careful - it can be easy to make mistakes if you don't know what you're doing.</span> | 654 | <span>Be careful - it can be easy to make mistakes if you don't know what you're doing.</span> |
655 | </p> | 655 | </p> |
656 | <h3 id="entropy-notes" data-translate>Entropy</h3> | 656 | <h3 id="entropy-notes">Entropy</h3> |
657 | <p> | 657 | <p> |
658 | <span data-translate-html> | 658 | <span> |
659 | Entropy values must be sourced from a | 659 | Entropy values must be sourced from a |
660 | <a href="https://en.wikipedia.org/wiki/Random_number_generation" target="_blank">strong source of randomness</a>. | 660 | <a href="https://en.wikipedia.org/wiki/Random_number_generation" target="_blank">strong source of randomness</a>. |
661 | </span> | 661 | </span> |
662 | <span data-translate>This means flipping a fair coin, rolling a fair dice, noise measurements etc.</span> | 662 | <span>This means flipping a fair coin, rolling a fair dice, noise measurements etc.</span> |
663 | <span data-translate-html> | 663 | <span> |
664 | Do <strong>NOT</strong> use phrases from books, lyrics from songs, your birthday or steet address, | 664 | Do <strong>NOT</strong> use phrases from books, lyrics from songs, your birthday or steet address, |
665 | keyboard mashing, or anything you <i>think</i> is random, because chances are overwhelming it isn't | 665 | keyboard mashing, or anything you <i>think</i> is random, because chances are overwhelming it isn't |
666 | random enough for the needs of this tool. | 666 | random enough for the needs of this tool. |
667 | </span> | 667 | </span> |
668 | </p> | 668 | </p> |
669 | <p> | 669 | <p> |
670 | <strong><span data-translate>Do not store entropy.</span></strong> | 670 | <strong><span>Do not store entropy.</span></strong> |
671 | </p> | 671 | </p> |
672 | <p> | 672 | <p> |
673 | <span data-translate>Storing entropy (such as keeping a deck of cards in a specific shuffled order) is unreliable compared to storing a mnemonic.</span> | 673 | <span>Storing entropy (such as keeping a deck of cards in a specific shuffled order) is unreliable compared to storing a mnemonic.</span> |
674 | <span data-translate>Instead of storing entropy, store the mnemonic generated from the entropy.</span> | 674 | <span>Instead of storing entropy, store the mnemonic generated from the entropy.</span> |
675 | <span data-translate-html><a href="https://en.wikipedia.org/wiki/Steganography#Physical" target="_blank">Steganography</a> may be beneficial when storing the mnemonic.</span> | 675 | <span><a href="https://en.wikipedia.org/wiki/Steganography#Physical" target="_blank">Steganography</a> may be beneficial when storing the mnemonic.</span> |
676 | </p> | 676 | </p> |
677 | <p> | 677 | <p> |
678 | <span data-translate-html> | 678 | <span> |
679 | The random mnemonic generator on this page uses a | 679 | The random mnemonic generator on this page uses a |
680 | <a href="https://developer.mozilla.org/en-US/docs/Web/API/RandomSource/getRandomValues" target="_blank">cryptographically secure random number generator</a>. | 680 | <a href="https://developer.mozilla.org/en-US/docs/Web/API/RandomSource/getRandomValues" target="_blank">cryptographically secure random number generator</a>. |
681 | </span> | 681 | </span> |
682 | <span data-translate>The built in random generator can generally be trusted more than your own intuition about randomness.</span> | 682 | <span>The built in random generator can generally be trusted more than your own intuition about randomness.</span> |
683 | <span data-translate>If cryptographic randomness isn't available in your browser, this page will show a warning and the generate button will not work.</span> | 683 | <span>If cryptographic randomness isn't available in your browser, this page will show a warning and the generate button will not work.</span> |
684 | <span data-translate>In that case you might choose to use your own source of entropy.</span> | 684 | <span>In that case you might choose to use your own source of entropy.</span> |
685 | </p> | 685 | </p> |
686 | <p> | 686 | <p> |
687 | <a href="https://bitcointalk.org/index.php?topic=311000.msg3345309#msg3345309" target="_blank" data-translate>You are not a good source of entropy.</a> | 687 | <a href="https://bitcointalk.org/index.php?topic=311000.msg3345309#msg3345309" target="_blank">You are not a good source of entropy.</a> |
688 | </p> | 688 | </p> |
689 | <h3 data-translate>License</h3> | 689 | <h3>License</h3> |
690 | <p> | 690 | <p> |
691 | <span data-translate-html>Please refer to <a href="https://github.com/iancoleman/bip39/blob/master/LICENSE" target="_blank">the software license</a> for more detail. | 691 | <span>Please refer to <a href="https://github.com/iancoleman/bip39/blob/master/LICENSE" target="_blank">the software license</a> for more detail. |
692 | </span> | 692 | </span> |
693 | </p> | 693 | </p> |
694 | <p data-translate>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.</p> | 694 | <p>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.</p> |
695 | </div> | 695 | </div> |
696 | </div> | 696 | </div> |
697 | 697 | ||
@@ -715,21 +715,21 @@ | |||
715 | <div class="row"> | 715 | <div class="row"> |
716 | <div class="col-md-12"> | 716 | <div class="col-md-12"> |
717 | 717 | ||
718 | <h2 data-translate>Offline Usage</h2> | 718 | <h2>Offline Usage</h2> |
719 | 719 | ||
720 | <p data-translate> | 720 | <p> |
721 | You can use this tool without having to be online. | 721 | You can use this tool without having to be online. |
722 | </p> | 722 | </p> |
723 | <p data-translate> | 723 | <p> |
724 | In your browser, select file save-as, and save this page | 724 | In your browser, select file save-as, and save this page |
725 | as a file. | 725 | as a file. |
726 | </p> | 726 | </p> |
727 | <p data-translate> | 727 | <p> |
728 | Double-click that file to open it in a browser | 728 | Double-click that file to open it in a browser |
729 | on any offline computer. | 729 | on any offline computer. |
730 | </p> | 730 | </p> |
731 | <p> | 731 | <p> |
732 | <span data-translate>Alternatively, download the file from the repository</span> | 732 | <span>Alternatively, download the file from the repository</span> |
733 | - | 733 | - |
734 | <a href="https://github.com/iancoleman/bip39">https://github.com/iancoleman/bip39</a> | 734 | <a href="https://github.com/iancoleman/bip39">https://github.com/iancoleman/bip39</a> |
735 | </p> | 735 | </p> |
@@ -742,17 +742,17 @@ | |||
742 | <div class="row"> | 742 | <div class="row"> |
743 | <div class="col-md-12"> | 743 | <div class="col-md-12"> |
744 | 744 | ||
745 | <h2 data-translate>This project is 100% open-source code</h2> | 745 | <h2>This project is 100% open-source code</h2> |
746 | 746 | ||
747 | <p> | 747 | <p> |
748 | <span data-translate>Get the source code from the repository</span> | 748 | <span>Get the source code from the repository</span> |
749 | - | 749 | - |
750 | <a href="https://github.com/iancoleman/bip39" target="_blank"> | 750 | <a href="https://github.com/iancoleman/bip39" target="_blank"> |
751 | https://github.com/iancoleman/bip39 | 751 | https://github.com/iancoleman/bip39 |
752 | </a> | 752 | </a> |
753 | </p> | 753 | </p> |
754 | 754 | ||
755 | <h3 data-translate>Libraries</h3> | 755 | <h3>Libraries</h3> |
756 | 756 | ||
757 | <p> | 757 | <p> |
758 | <span>BitcoinJS - </span> | 758 | <span>BitcoinJS - </span> |
@@ -795,11 +795,11 @@ | |||
795 | </div> | 795 | </div> |
796 | 796 | ||
797 | <div class="qr-container hidden"> | 797 | <div class="qr-container hidden"> |
798 | <div class="qr-hint bg-primary hidden" data-translate>Click field to hide QR</div> | 798 | <div class="qr-hint bg-primary hidden">Click field to hide QR</div> |
799 | <div class="qr-hint bg-primary" data-translate>Click field to show QR</div> | 799 | <div class="qr-hint bg-primary">Click field to show QR</div> |
800 | <div class="qr-hider hidden"> | 800 | <div class="qr-hider hidden"> |
801 | <div class="qr-image"></div> | 801 | <div class="qr-image"></div> |
802 | <div class="qr-warning bg-primary" data-translate>Caution: Scanner may keep history</div> | 802 | <div class="qr-warning bg-primary">Caution: Scanner may keep history</div> |
803 | </div> | 803 | </div> |
804 | </div> | 804 | </div> |
805 | 805 | ||
@@ -827,8 +827,6 @@ | |||
827 | <script src="js/ethereumjs-util.js"></script> | 827 | <script src="js/ethereumjs-util.js"></script> |
828 | <script src="js/ripple-util.js"></script> | 828 | <script src="js/ripple-util.js"></script> |
829 | <script src="js/sjcl-bip39.js"></script> | 829 | <script src="js/sjcl-bip39.js"></script> |
830 | <script src="js/translate.js"></script> | ||
831 | <script src="js/phrases_en.js"></script> | ||
832 | <script src="js/wordlist_english.js"></script> | 830 | <script src="js/wordlist_english.js"></script> |
833 | <script src="js/wordlist_japanese.js"></script> | 831 | <script src="js/wordlist_japanese.js"></script> |
834 | <script src="js/wordlist_spanish.js"></script> | 832 | <script src="js/wordlist_spanish.js"></script> |
diff --git a/src/js/phrases_en.js b/src/js/phrases_en.js deleted file mode 100644 index 7181544..0000000 --- a/src/js/phrases_en.js +++ /dev/null | |||
@@ -1,94 +0,0 @@ | |||
1 | Translate.loadForeignPhrases("en", | ||
2 | { | ||
3 | "<code>m/44'/0'/0'/0</code> generates public addresses": "<code>m/44'/0'/0'/0</code> generates public addresses", | ||
4 | "<code>m/44'/0'/0'/1</code> generates change addresses": "<code>m/44'/0'/0'/1</code> generates change addresses", | ||
5 | "<code>m/44'/0'/0'</code> generates extended keys for import / export": "<code>m/44'/0'/0'</code> generates extended keys for import / export", | ||
6 | "<code>m/44'/0'/1'</code> for the next account. Continue incrementing for more accounts (most use a single account).": "<code>m/44'/0'/1'</code> for the next account. Continue incrementing for more accounts (most use a single account).", | ||
7 | "Accepts binary, base 6, 6-sided dice, base 10, hexadecimal, cards": "Accepts binary, base 6, 6-sided dice, base 10, hexadecimal, cards", | ||
8 | "Account": "Account", | ||
9 | "Address": "Address", | ||
10 | "Alternatively, download the file from the repository": "Alternatively, download the file from the repository", | ||
11 | "BIP32 Derivation Path": "BIP32 Derivation Path", | ||
12 | "BIP32 Extended Key": "BIP32 Extended Key", | ||
13 | "BIP32 Extended Key (addresses only)": "BIP32 Extended Key (addresses only)", | ||
14 | "BIP32 Root Key": "BIP32 Root Key", | ||
15 | "BIP39 Mnemonic": "BIP39 Mnemonic", | ||
16 | "BIP39 Passphrase (optional)": "BIP39 Passphrase (optional)", | ||
17 | "BIP39 Seed": "BIP39 Seed", | ||
18 | "Base 10": "Base 10", | ||
19 | "Base 6": "Base 6", | ||
20 | "Be careful - it can be easy to make mistakes if you don't know what you're doing.": "Be careful - it can be easy to make mistakes if you don't know what you're doing.", | ||
21 | "Binary": "Binary", | ||
22 | "Bitcoin Core": "Bitcoin Core", | ||
23 | "Bits Per Event": "Bits Per Event", | ||
24 | "Block Explorers": "Block Explorers", | ||
25 | "Can be used with": "Can be used with", | ||
26 | "Card": "Card", | ||
27 | "Coin": "Coin", | ||
28 | "Dice": "Dice", | ||
29 | "Do <strong>NOT</strong> use phrases from books, lyrics from songs, your birthday or steet address, keyboard mashing, or anything you <i>think</i> is random, because chances are overwhelming it isn't random enough for the needs of this tool.": "Do <strong>NOT</strong> use phrases from books, lyrics from songs, your birthday or steet address, keyboard mashing, or anything you <i>think</i> is random, because chances are overwhelming it isn't random enough for the needs of this tool.", | ||
30 | "Double-click that file to open it in a browser on any offline computer.": "Double-click that file to open it in a browser on any offline computer.", | ||
31 | "Entropy": "Entropy", | ||
32 | "Entropy Type": "Entropy Type", | ||
33 | "Entropy is an advanced feature. Your mnemonic may be insecure if this feature is used incorrectly.": "Entropy is an advanced feature. Your mnemonic may be insecure if this feature is used incorrectly.", | ||
34 | "Entropy values must be sourced from a <a href=\"https://en.wikipedia.org/wiki/Random_number_generation\" target=\"_blank\">strong source of randomness</a>.": "Entropy values must be sourced from a <a href=\"https://en.wikipedia.org/wiki/Random_number_generation\" target=\"_blank\">strong source of randomness</a>.", | ||
35 | "Event Count": "Event Count", | ||
36 | "External / Internal": "External / Internal", | ||
37 | "Filtered Entropy": "Filtered Entropy", | ||
38 | "For more info see the <a href=\"http://www.mycelium.com/\" target=\"_blank\">Mycelium Wallet homepage</a>": "For more info see the <a href=\"http://www.mycelium.com/\" target=\"_blank\">Mycelium Wallet homepage</a>", | ||
39 | "For more info see the <a href=\"https://github.com/bitcoin/bips/blob/master/bip-0039.mediawiki\" target=\"_blank\">BIP39 spec</a>.": "For more info see the <a href=\"https://github.com/bitcoin/bips/blob/master/bip-0039.mediawiki\" target=\"_blank\">BIP39 spec</a>.", | ||
40 | "For more info see the <a href=\"https://github.com/bitcoin/bips/blob/master/bip-0044.mediawiki\" target=\"_blank\">BIP44 spec</a>.": "For more info see the <a href=\"https://github.com/bitcoin/bips/blob/master/bip-0044.mediawiki\" target=\"_blank\">BIP44 spec</a>.", | ||
41 | "For more info see the <a href=\"https://github.com/bitcoin/bitcoin/pull/8035\" target=\"_blank\">Bitcoin Core BIP32 implementation</a>": "For more info see the <a href=\"https://github.com/bitcoin/bitcoin/pull/8035\" target=\"_blank\">Bitcoin Core BIP32 implementation</a>", | ||
42 | "For more info see the BIP32 spec": "For more info see the BIP32 spec", | ||
43 | "From entropy length (3 words per 32 bits)": "From entropy length (3 words per 32 bits)", | ||
44 | "Generate a random mnemonic, or enter your own below": "Generate a random mnemonic, or enter your own below", | ||
45 | "Get the source code from the repository": "Get the source code from the repository", | ||
46 | "Hex": "Hex", | ||
47 | "Hierarchical Deterministic Wallets": "Hierarchical Deterministic Wallets", | ||
48 | "If cryptographic randomness isn't available in your browser, this page will show a warning and the generate button will not work.": "If cryptographic randomness isn't available in your browser, this page will show a warning and the generate button will not work.", | ||
49 | "In that case you might choose to use your own source of entropy.": "In that case you might choose to use your own source of entropy.", | ||
50 | "In your browser, select file save-as, and save this page as a file.": "In your browser, select file save-as, and save this page as a file.", | ||
51 | "Libraries": "Libraries", | ||
52 | "Mnemonic Language": "Mnemonic Language", | ||
53 | "Mnemonic Length": "Mnemonic Length", | ||
54 | "Mnemonic code for generating deterministic keys": "Mnemonic code for generating deterministic keys", | ||
55 | "More info": "More info", | ||
56 | "Multi-Account Hierarchy for Deterministic Wallets": "Multi-Account Hierarchy for Deterministic Wallets", | ||
57 | "Mycelium Wallet": "Mycelium Wallet", | ||
58 | "Note these addreses are derived from the BIP32 Extended Key": "Note these addreses are derived from the BIP32 Extended Key", | ||
59 | "Offline Usage": "Offline Usage", | ||
60 | "Only enter the <code>xpub</code> extended key into block explorer search fields, never the <code>xprv</code> key.": "Only enter the <code>xpub</code> extended key into block explorer search fields, never the <code>xprv</code> key.", | ||
61 | "Path": "Path", | ||
62 | "Private Key": "Private Key", | ||
63 | "Private Keys": "Private Keys", | ||
64 | "Public Key": "Public Key", | ||
65 | "Purpose": "Purpose", | ||
66 | "Raw Binary": "Raw Binary", | ||
67 | "Read more": "Read more", | ||
68 | "Read more at the <a href=\"https://github.com/bitcoin/bips/blob/master/bip-0032.mediawiki\" target=\"_blank\">official BIP32 spec</a>": "Read more at the <a href=\"https://github.com/bitcoin/bips/blob/master/bip-0032.mediawiki\" target=\"_blank\">official BIP32 spec</a>", | ||
69 | "Read more at the <a href=\"https://github.com/bitcoin/bips/blob/master/bip-0039.mediawiki\">official BIP39 spec</a>": "Read more at the <a href=\"https://github.com/bitcoin/bips/blob/master/bip-0039.mediawiki\">official BIP39 spec</a>", | ||
70 | "Read more at the <a href=\"https://github.com/bitcoin/bips/blob/master/bip-0044.mediawiki\" target=\"_blank\">official BIP44 spec</a>": "Read more at the <a href=\"https://github.com/bitcoin/bips/blob/master/bip-0044.mediawiki\" target=\"_blank\">official BIP44 spec</a>", | ||
71 | "See the demo at <a href=\"http://bip32.org/\" target=\"_blank\">bip32.org</a>": "See the demo at <a href=\"http://bip32.org/\" target=\"_blank\">bip32.org</a>", | ||
72 | "Show": "Show", | ||
73 | "Show more rows": "Show more rows", | ||
74 | "Strength": "Strength", | ||
75 | "Supply my own source of entropy": "Supply my own source of entropy", | ||
76 | "The built in random generator can generally be trusted more than your own intuition about randomness.": "The built in random generator can generally be trusted more than your own intuition about randomness.", | ||
77 | "The random mnemonic generator on this page uses a <a href=\"https://developer.mozilla.org/en-US/docs/Web/API/RandomSource/getRandomValues\" target=\"_blank\">cryptographically secure random number generator</a>.": "The random mnemonic generator on this page uses a <a href=\"https://developer.mozilla.org/en-US/docs/Web/API/RandomSource/getRandomValues\" target=\"_blank\">cryptographically secure random number generator</a>.", | ||
78 | "This means flipping a fair coin, rolling a fair dice, noise measurements etc.": "This means flipping a fair coin, rolling a fair dice, noise measurements etc.", | ||
79 | "This project is 100% open-source code": "This project is 100% open-source code", | ||
80 | "Toggle": "Toggle", | ||
81 | "Total Bits": "Total Bits", | ||
82 | "Use hardened addresses": "Use hardened addresses", | ||
83 | "Use path <code>m/0'/0'</code> with hardened addresses.": "Use path <code>m/0'/0'</code> with hardened addresses.", | ||
84 | "Use path <code>m/44'/0'/0'</code>.": "Use path <code>m/44'/0'/0'</code>.", | ||
85 | "Use private keys at <a href=\"https://web.archive.org/web/20150707020924/https://brainwallet.org/\" target=\"_blank\">brainwallet.org</a>.": "Use private keys at <a href=\"https://web.archive.org/web/20150707020924/https://brainwallet.org/\" target=\"_blank\">brainwallet.org</a>.", | ||
86 | "Valid entropy values include:": "Valid entropy values include:", | ||
87 | "Warning": "Warning", | ||
88 | "Word Count": "Word Count", | ||
89 | "You are not a good source of entropy.": "You are not a good source of entropy.", | ||
90 | "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).": "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).", | ||
91 | "You can use this tool without having to be online.": "You can use this tool without having to be online.", | ||
92 | "words": "words" | ||
93 | } | ||
94 | ); | ||
diff --git a/src/js/translate.js b/src/js/translate.js deleted file mode 100644 index a62d92b..0000000 --- a/src/js/translate.js +++ /dev/null | |||
@@ -1,153 +0,0 @@ | |||
1 | // An extremely basic translation library | ||
2 | // | ||
3 | // Example usage: | ||
4 | // | ||
5 | // Set some html to be translated. Do this using the 'data-translate' attribute: | ||
6 | // | ||
7 | // <div data-translate>Test</div> | ||
8 | // <div data-translate-html><em>keep em tag</em></div> | ||
9 | // <input data-translate-placeholder placeholder="Example placeholder"> | ||
10 | // <span data-translate-title title="Example title"></span> | ||
11 | // | ||
12 | // Obtain all the phrases to be translated via js debug console: | ||
13 | // | ||
14 | // Translate.phrasesAsJson(); | ||
15 | // | ||
16 | // Use that template to translate the phrases into another language. | ||
17 | // Leave the key the same. Change the value to the new language. | ||
18 | // | ||
19 | // Create a js file to load the new phrases. In this example for Spanish, | ||
20 | // es.js will contain the following code: | ||
21 | // | ||
22 | // Translate.loadForeignPhrases("es", { | ||
23 | // "Test": "Test in Spanish", | ||
24 | // "<em>keep em tag</em>": "<em>keep em tag in Spanish</em>", | ||
25 | // "Example placeholder": "Example placeholder in Spanish" | ||
26 | // "Example title": "Example title in Spanish" | ||
27 | // }); | ||
28 | // | ||
29 | // In your UI put a listener for clicking on the Spanish button: | ||
30 | // | ||
31 | // mySpanishButton.addEventListener("click", function() { | ||
32 | // Translate.setLanguage("es"); | ||
33 | // }); | ||
34 | // myEnglishButton.addEventListener("click", function() { | ||
35 | // Translate.setLanguage("en"); | ||
36 | // }); | ||
37 | |||
38 | Translate = new (function() { | ||
39 | |||
40 | var defaultLanguage = "en"; | ||
41 | |||
42 | var allPhrases = {}; | ||
43 | allPhrases[defaultLanguage] = {}; | ||
44 | |||
45 | // Node types | ||
46 | |||
47 | var text = { | ||
48 | selector: "[data-translate]", | ||
49 | getKey: function() { | ||
50 | return this.textContent.trim().replace(/\s+/g, " "); | ||
51 | }, | ||
52 | setPhrase: function(p) { | ||
53 | this.textContent = p; | ||
54 | }, | ||
55 | } | ||
56 | |||
57 | var html = { | ||
58 | selector: "[data-translate-html]", | ||
59 | getKey: function() { | ||
60 | return this.innerHTML.trim().replace(/\s+/g, " "); | ||
61 | }, | ||
62 | setPhrase: function(p) { | ||
63 | this.innerHTML = p; | ||
64 | }, | ||
65 | } | ||
66 | |||
67 | var placeholder = { | ||
68 | selector: "[data-translate-placeholder]", | ||
69 | getKey: function() { | ||
70 | return this.getAttribute("placeholder").trim().replace(/\s+/g, " "); | ||
71 | }, | ||
72 | setPhrase: function(p) { | ||
73 | this.setAttribute("placeholder", p); | ||
74 | }, | ||
75 | } | ||
76 | |||
77 | var title = { | ||
78 | selector: "[data-translate-title]", | ||
79 | getKey: function() { | ||
80 | return this.getAttribute("title").trim().replace(/\s+/g, " "); | ||
81 | }, | ||
82 | setPhrase: function(p) { | ||
83 | this.setAttribute("title", p); | ||
84 | }, | ||
85 | } | ||
86 | |||
87 | // Get elements to be translated | ||
88 | var allEls = getEls(text) | ||
89 | .concat(getEls(html)) | ||
90 | .concat(getEls(placeholder)) | ||
91 | .concat(getEls(title)); | ||
92 | |||
93 | // Provides access to phrases from a non-default language. | ||
94 | // See phrases_en.js for example usage. | ||
95 | this.loadForeignPhrases = function(language, phrases) { | ||
96 | allPhrases[language] = phrases; | ||
97 | } | ||
98 | |||
99 | // Displays a different language, eg "en" or "fr" | ||
100 | this.setLanguage = function(language) { | ||
101 | for (var i=0; i<allEls.length; i++) { | ||
102 | var el = allEls[i]; | ||
103 | var key = el.key; | ||
104 | if (!(language in allPhrases)) { | ||
105 | console.log(language + " not in allPhrases"); | ||
106 | return; | ||
107 | } | ||
108 | if (!(key in allPhrases[language])) { | ||
109 | console.log(language + " does not contain phrase: " + key); | ||
110 | return; | ||
111 | } | ||
112 | var phrase = allPhrases[language][key]; | ||
113 | el.setPhrase(phrase); | ||
114 | } | ||
115 | } | ||
116 | |||
117 | // Converts the phrases to a key-pair json file. | ||
118 | // This is a good way to export phrases for use in translation tools. | ||
119 | this.phrasesAsJson = function(language) { | ||
120 | var keys = []; | ||
121 | for (var i=0; i<allEls.length; i++) { | ||
122 | var el = allEls[i]; | ||
123 | var key = el.key; | ||
124 | keys.push(key); | ||
125 | } | ||
126 | keys.sort(); | ||
127 | var output = {}; | ||
128 | for (var i=0; i<keys.length; i++) { | ||
129 | var key = keys[i]; | ||
130 | var translated = ""; | ||
131 | if (language in allPhrases && key in allPhrases[language]) { | ||
132 | translated = allPhrases[language][key]; | ||
133 | } | ||
134 | output[key] = translated; | ||
135 | } | ||
136 | return JSON.stringify(output, null, 2); | ||
137 | } | ||
138 | |||
139 | function getEls(nodeType) { | ||
140 | var nodes = document.querySelectorAll(nodeType.selector); | ||
141 | var els = []; | ||
142 | for (var i=0; i<nodes.length; i++) { | ||
143 | var node = nodes[i]; | ||
144 | node.getKey = nodeType.getKey; | ||
145 | node.setPhrase = nodeType.setPhrase; | ||
146 | node.key = node.getKey(); | ||
147 | allPhrases[defaultLanguage][node.key] = node.key; | ||
148 | els.push(node); | ||
149 | } | ||
150 | return els; | ||
151 | } | ||
152 | |||
153 | })(); | ||