Compare commits

...

571 Commits
0.1.1 ... 0.5.1

Author SHA1 Message Date
Ian Coleman
5e376b8903 Release v0.5.1 2021-02-11 03:57:45 +00:00
Ian Coleman
90422a41af Updated ritocoin test, see #466 2021-02-11 03:24:34 +00:00
Ian Coleman
f3314418fb Update namecoin test
Tested private key import using electrum-nmc, it matches the address
2021-02-11 03:24:09 +00:00
Ian Coleman
7da8c22eaf Rebuild bip39-libs.js to include cosmos 2021-02-11 03:23:01 +00:00
Ian Coleman
d9ad938b52 Add Cosmos Hub (ATOM) support
Closes #452, thanks @conr2d
2021-02-11 02:34:38 +00:00
Ian Coleman
f7f579f5f5 Use local form for Portuguese 2021-02-11 02:05:51 +00:00
iancoleman
2cd19306b2 Merge pull request #468 from 3rdIteration/master
Add Portuguese Wordlist
2021-02-11 13:01:48 +11:00
iancoleman
545348d159 Merge pull request #466 from RitoProject/ritocoin
Add Ritocoin (RITO)
2021-02-11 12:58:49 +11:00
iancoleman
8835afe8a2 Merge pull request #462 from zoobc/master
Add ZooBC coin support
2021-02-11 12:55:36 +11:00
CryptoGuide
38e6aaed84 Add Portuguese Wordlist 2021-02-08 22:39:11 -05:00
Scotty0448
f7125606bf Update wif 2021-01-26 18:00:02 -07:00
Scotty0448
5b0b1a5c9a Add Ritocoin (RITO) 2021-01-26 16:12:25 -07:00
iancoleman
71573cb380 Merge pull request #464 from robiiinos/fix/namecoin-wif-prefix
fix: Namecoin WIF prefix
2021-01-18 10:37:00 +11:00
Robyn
c64ff95697 fix: Namecoin WIF prefix 2021-01-04 21:34:19 +01:00
jhonkus
6d2e202083 Add ZooBC address format 2020-12-07 20:25:25 +08:00
jhonkus
0cb81e1117 Add ZooBC coin support 2020-12-07 19:43:20 +08:00
Ian Coleman
32ade2fbf7 Remove trailing spaces 2020-11-30 00:40:04 +00:00
Ian Coleman
ac7f150a79 Remove non-English BIP85 languages 2020-11-30 00:35:56 +00:00
Ian Coleman
134213954d Add BIP85 details in More Info section 2020-11-30 00:21:48 +00:00
Ian Coleman
253f4cb75f Format BIP85 help text similar to entropy section 2020-11-30 00:19:39 +00:00
Ian Coleman
ebbb057dfa Update geckodriver version for firefox tests 2020-11-29 23:06:46 +00:00
Ian Coleman
38626a2d1f Add rebranded labelling to Zcoin/Firo 2020-11-29 21:59:20 +00:00
Ian Coleman
990ce0d072 Rebuild bip39-libs.js
This file had changes from other pull requests so rebuilding from
scratch ensures no additional non-npm content has crept in.
2020-11-29 21:54:49 +00:00
Ian Coleman
1ca3784b0a Update dev_env_setup to latest chromium for tests 2020-11-29 21:52:06 +00:00
iancoleman
1b54929bda Merge pull request #456 from r1979/master
Updated Zcoin (XZC) Due to its rebrand fo Firo (FIRO)
2020-11-30 08:46:02 +11:00
iancoleman
d75ddf4ea8 Merge pull request #454 from AndreasGassmann/master
Add BIP85 support
2020-11-23 10:28:16 +11:00
Ruggero M
ad07c1c0b5 Updated Zcoin (XZC) Due to its rebrand fo Firo (FIRO)
https://zcoin.io/zcoin-is-becoming-firo/
2020-11-15 16:51:37 +01:00
Ruggero M
0b911fc20f Updated Zcoin (XZC) Due to its rebrand fo Firo (FIRO)
https://zcoin.io/zcoin-is-becoming-firo/
2020-11-15 16:50:12 +01:00
Ruggero M
73ccaa1357 Updated Zcoin (XZC) Due to its rebrand fo Firo (FIRO)
https://zcoin.io/zcoin-is-becoming-firo/
2020-11-15 16:47:48 +01:00
Ruggero M
bd1ecd20f9 Updated Zcoin (XZC) Due to its rebrand fo Firo (FIRO) 2020-11-15 16:39:51 +01:00
Ruggero M
e3668fb51f Updated Zcoin (XZC) Due to its rebrand fo Firo (FIRO) 2020-11-15 16:37:02 +01:00
Ruggero M
3c222e57df Updated Zcoin (XZC) Due to its rebrand fo Firo (FIRO)
- https://zcoin.io/zcoin-is-becoming-firo/
- https://zcoin.io/the-exchange-ticker-for-firo/
2020-11-15 16:31:36 +01:00
AndreasGassmann
16ff1df7ab feat(bip85): add explanation text and warning 2020-11-09 01:25:39 +01:00
AndreasGassmann
f2f8d8177e feat(test): add bip85 test 2020-11-09 00:46:58 +01:00
AndreasGassmann
877b8bdfec feat(bip85): add bip85 logic 2020-11-07 16:58:08 +01:00
AndreasGassmann
5e211c6959 feat(bip85): include bip85 library 2020-11-07 16:33:50 +01:00
Ian Coleman
4e59e7d6fc Release v0.5.0 2020-10-19 01:13:39 +00:00
Ian Coleman
8c3a56ec4f Add notes about card entropy 2020-10-19 00:01:33 +00:00
Ian Coleman
d31a0ad44b Hide/show split mnemonic cards 2020-10-18 23:17:24 +00:00
Ian Coleman
4566751b89 Fix nano test, keys are lowercase not uppercase 2020-10-18 23:04:21 +00:00
Ian Coleman
b386aaa06e Update combined libs 2020-10-18 22:46:51 +00:00
Ian Coleman
ef95b4bfad Revert npm-shrinkwrap.json 2020-10-18 22:33:24 +00:00
iancoleman
30e3d246d4 Merge pull request #434 from Joohansson/nanocurrency
Added support for NANO currency
2020-10-19 09:26:29 +11:00
iancoleman
647410b4a6 Merge branch 'master' into nanocurrency 2020-10-19 09:26:08 +11:00
iancoleman
4669c88c67 Merge pull request #441 from bytefly/master
Add TRX coin support
2020-10-19 09:12:43 +11:00
iancoleman
9e865b8e75 Merge pull request #446 from jsarenik/jsn/update-bootstrap-3
Update bootstrap to 3.4.1
2020-10-19 09:04:50 +11:00
iancoleman
08713ff9c2 Merge pull request #447 from jsarenik/jsn/dependabot
All dependabot updates in one PR
2020-10-19 09:04:12 +11:00
dependabot[bot]
ed52cda20d Bump lodash from 4.17.11 to 4.17.19 in /libs/stellar-util
Bumps [lodash](https://github.com/lodash/lodash) from 4.17.11 to 4.17.19.
- [Release notes](https://github.com/lodash/lodash/releases)
- [Commits](https://github.com/lodash/lodash/compare/4.17.11...4.17.19)

Signed-off-by: dependabot[bot] <support@github.com>
2020-10-14 09:52:00 +02:00
dependabot[bot]
8ce57f3c13 Bump elliptic from 6.4.1 to 6.5.3 in /libs/stellar-util
Bumps [elliptic](https://github.com/indutny/elliptic) from 6.4.1 to 6.5.3.
- [Release notes](https://github.com/indutny/elliptic/releases)
- [Commits](https://github.com/indutny/elliptic/compare/v6.4.1...v6.5.3)

Signed-off-by: dependabot[bot] <support@github.com>
2020-10-14 09:52:00 +02:00
dependabot[bot]
043717034b Bump acorn from 6.0.4 to 6.4.1 in /libs/stellar-util
Bumps [acorn](https://github.com/acornjs/acorn) from 6.0.4 to 6.4.1.
- [Release notes](https://github.com/acornjs/acorn/releases)
- [Commits](https://github.com/acornjs/acorn/compare/6.0.4...6.4.1)

Signed-off-by: dependabot[bot] <support@github.com>
2020-10-14 09:52:00 +02:00
dependabot[bot]
eb100ec0e4 Bump jsrsasign from 8.0.12 to 8.0.19 in /libs/combined
Bumps [jsrsasign](https://github.com/kjur/jsrsasign) from 8.0.12 to 8.0.19.
- [Release notes](https://github.com/kjur/jsrsasign/releases)
- [Changelog](https://github.com/kjur/jsrsasign/blob/master/ChangeLog.txt)
- [Commits](https://github.com/kjur/jsrsasign/compare/8.0.12...8.0.19)

Signed-off-by: dependabot[bot] <support@github.com>
2020-10-14 09:52:00 +02:00
Jan Sarenik
5cbd174c18 Update bootstrap to 3.4.1
https://www.npmjs.com/advisories/891
2020-10-14 09:08:00 +02:00
iancoleman
75722c6d24 Merge pull request #445 from jsarenik/jsn/releases-link
src/index.html: Change link to latest standalone release
2020-10-14 15:55:42 +11:00
Jan Sarenik
7e75b98e1f src/index.html: Change link to latest standalone release 2020-10-07 15:14:47 +02:00
zr
47dbf58b6d Add testcase for TRX 2020-10-05 12:04:14 +08:00
iancoleman
42e00ef56a Merge pull request #442 from mvillalba/master
Add Binance Smart Chain (BSC) support
2020-10-02 11:25:17 +10:00
Ian Coleman
8dbf7d5837 Add dev_env_setup.sh 2020-10-01 23:55:21 +00:00
Ian Coleman
bf96267f89 Remove bias from entropy in base 6 and base 10 2020-10-01 23:44:38 +00:00
Martín Raúl Villalba
995bc58791 Add Binance Smart Chain (BSC) support 2020-09-25 12:27:50 -03:00
zr
d7125cda1d Modify to use uncompressed public key as keccak256 input for TRX 2020-09-18 15:28:56 +08:00
zr
b674c5710b Add TRX coin support 2020-09-10 17:40:56 +08:00
iancoleman
920f7aa078 Merge pull request #436 from conr2d/eosio-cleanup-dependencies
Clean up duplicated dependencies from eos-util
2020-09-07 11:14:19 +10:00
Jeeyong Um
5c6e875f2d Clean up duplicated dependencies from eos-util 2020-08-31 00:35:29 +09:00
Joohansson
e086305895 Added NANO currency 2020-08-26 11:57:58 +02:00
iancoleman
863eee8ed7 Merge pull request #433 from scribenetwork/master
Add Scribe support
2020-08-25 09:27:54 +10:00
scribenetwork
4729ecca04 Update tests.js 2020-08-19 06:22:14 +02:00
scribenetwork
fba7e98aea Update index.js 2020-08-12 02:58:56 +02:00
scribenetwork
95b306106f Update bitcoinjs-extensions.js 2020-08-12 02:52:46 +02:00
Ian Coleman
f32b24e380 Release v0.4.3 2020-05-11 10:03:18 +10:00
Ian Coleman
26767a2ce3 Add CranePay test 2020-05-11 09:43:35 +10:00
Ian Coleman
a748c4b5c6 Fix RSK tests 2020-05-11 09:43:21 +10:00
Ian Coleman
eaf7892872 Update bip39-libs with handshake and FIO libs 2020-05-11 09:17:48 +10:00
iancoleman
677d18f2e0 Merge pull request #422 from cryply/master
adding CRP support
2020-05-11 09:16:11 +10:00
iancoleman
f3051a6a9f Merge pull request #409 from bguiz/feat/rsk-network
feat: rsk network
2020-05-11 09:06:02 +10:00
iancoleman
bf528f65f4 Merge branch 'master' into feat/rsk-network 2020-05-11 09:05:32 +10:00
Shawn Arney
5699633538 Adding FIO -Foundation for Interwallet Operability 2020-05-11 08:43:55 +10:00
Shawn Arney
d1d8699fc4 Adding FIO -Foundation for Interwallet Operability
FIO - Foundation for Interwallet Operability.

https://fioprotocol.io
2020-05-11 08:43:55 +10:00
iancoleman
e284827677 Merge pull request #410 from MerkleBlock/handshake
libs: add handshake support
2020-05-11 08:34:35 +10:00
m0rpher
115eb45083 adding CRP support 2020-05-08 22:56:37 +02:00
iancoleman
0d78c2a120 Merge pull request #418 from jangchongchan20/master
Add Sugarchain testnet support
2020-04-29 08:26:37 +10:00
Jang Chongchan
7594405011 Add Sugarchain testnet support 2020-04-28 23:33:27 +09:00
iancoleman
d359fe64b2 Merge pull request #416 from Argoneum/argoneum
Add Argoneum (v1.4.1 or above)
2020-04-28 09:25:55 +10:00
Ian Coleman
1bf76fe32d last word is/contains a checksum
Closes #408
2020-04-27 10:47:31 +10:00
iancoleman
904e39748c Merge pull request #415 from jangchongchan20/master
Add Sugarchain support
2020-04-27 10:41:27 +10:00
Oleg Semyonov
46054e445e Add Argoneum (v1.4.1 or above) 2020-04-25 14:26:06 +03:00
Jang Chongchan
4958ea8009 Add Sugarchain support 2020-04-24 10:20:50 +09:00
Javed Khan
0e1fd95302 libs: add handshake support 2020-04-03 00:13:36 +05:30
bguiz
a823e5266c fix: calculate RSK addresses with EIP-155 compliant checksums 2020-03-10 17:08:16 +08:00
bguiz
b64fb35301 fix: define own libs.bitcoin.networks.rsk 2020-03-03 14:55:53 +08:00
iancoleman
54600393af Merge pull request #402 from you21979/fix-mona-bech32
fix bech32 prefix monacoin -> mona
2020-02-17 15:16:07 +11:00
iancoleman
ff2940e81e Merge pull request #403 from swtcca/master
add two networks: Jingtum and MOAC
2020-02-17 10:33:08 +11:00
Lospring Liu
f3101bd3f1 add test for networks Jingtum and MOAC 2020-02-15 16:17:04 -05:00
Lospring Liu
46a5338e42 add two networks: Jingtum and MOAC 2020-02-14 20:51:52 -05:00
yuki akiyama
c578337f0f fix bech32 prefix monacoin -> mona 2020-02-13 12:28:03 +09:00
Ian Coleman
90f7a5ec93 Release v0.4.2 2020-02-07 21:26:43 +11:00
Ian Coleman
dd496c82c1 Fix ethereum private key format 2020-02-07 21:25:57 +11:00
Ian Coleman
1dafc30db4 Test pubkey and privkey for all coins 2020-02-07 20:59:19 +11:00
Ian Coleman
927450e169 Release v0.4.1 2020-02-06 20:14:00 +11:00
Ian Coleman
a67554c649 Add tests for RSK network and testnet 2020-02-06 20:11:09 +11:00
Ian Coleman
0bc6361db4 Fix ethercore test 2020-02-06 20:10:52 +11:00
iancoleman
a98d40c43d Merge pull request #397 from aitorp6/master
Added DeepOnion Segwit parameters
2020-02-06 15:00:02 +11:00
iancoleman
54a8e781b4 Merge pull request #396 from ilanolkies/patch-2
Add network
2020-02-06 14:59:34 +11:00
iancoleman
c1d6274224 Merge pull request #393 from ethercore/master
Add EtherCore
2020-02-06 14:58:06 +11:00
aitorp6
c16661aeea Added DeepOnion Segwit parameters 2020-02-04 10:47:11 +01:00
Ilan
e9491c7efd Add network
Based on https://github.com/rsksmart/RSKIPs/blob/master/IPs/RSKIP57.md
2020-01-22 12:16:51 -03:00
Ian Coleman
d07983bc1f Catch nebulas error on some chrome configs
See #395
2020-01-08 17:31:14 +11:00
Ian Coleman
3aa7677ace Directly export libraries where they're required 2020-01-08 17:30:16 +11:00
EtherCore Contributor
9e04576e2f add testcase for ethercore 2020-01-02 00:53:17 +09:00
EtherCore Contributor
8131a07115 Add EtherCore 2020-01-02 00:45:48 +09:00
iancoleman
181b5d61e3 Merge pull request #390 from matthewleon/bugfix/eth-xpub-derivation
Bugfix/eth xpub derivation
2019-12-20 15:58:26 +11:00
Matthew Leon
4dfc681f71 fix Ethereum xpub derivation 2019-12-19 15:37:08 -05:00
Matthew Leon
dfb4fd1be5 add failing test for ETH xpub derivation
see https://github.com/iancoleman/bip39/issues/169
2019-12-19 15:35:31 -05:00
Ian Coleman
aa793f572f Release v0.4.0 2019-12-19 14:48:25 +11:00
Ian Coleman
6973e692b0 Minify third party libraries 2019-12-19 14:32:13 +11:00
Ian Coleman
22f8766947 Replace most libraries with combined libs 2019-12-19 14:21:33 +11:00
Ian Coleman
8017442c50 Add experimental incomplete combined js libs 2019-12-19 14:21:25 +11:00
Ian Coleman
82cf26c1cb Text for multibit mentions change addresses
Closes #376
2019-12-18 11:19:47 +11:00
Ian Coleman
206cbafceb Remove pending from some tests using chrome
Unfortunately firefox pending tests still do not work.
2019-12-18 10:57:29 +11:00
Ian Coleman
9cf02dd452 Make seed field editable 2019-12-18 10:32:25 +11:00
Ian Coleman
f12242014d Add bitcoin regtest params 2019-12-18 09:51:00 +11:00
Ian Coleman
244c76022a Convert mnemonic to hex entropy instead of binary 2019-12-18 09:07:17 +11:00
Ian Coleman
516c16d721 Allow manual override for entropy type 2019-12-17 14:10:45 +11:00
Ian Coleman
f7e9fdf002 Generate addresses for P2WSH and P2WSH-P2SH 2019-12-17 11:46:07 +11:00
Ian Coleman
5c203fab6a Add P2WSH and P2WSH-P2SH for bitcoin and testnet
Address generation still to come.
2019-12-16 13:27:15 +11:00
iancoleman
40d542ba58 Merge pull request #385 from hladik-dan/master
Add Czech language
2019-12-09 09:16:01 +11:00
Daniel Hladík
cc3c35487f Add Czech language 2019-12-06 20:21:43 +01:00
Ian Coleman
76531b610a Release v0.3.14 2019-12-02 10:46:49 +11:00
Ian Coleman
c845ee6f6e Fix energyweb test 2019-12-02 10:44:35 +11:00
Ian Coleman
c394ec3c4f Revert "Fix tests for Pull Request 371"
This reverts commit b130271b2b.
2019-12-02 10:25:09 +11:00
Ian Coleman
55367b989e Partially revert Pull 371 BIP44 Default Change 2019-12-02 10:24:37 +11:00
Ian Coleman
732613e44c Release v0.3.13 2019-11-11 12:42:52 +11:00
Ian Coleman
9ce31d3509 Move hardened addresses checkbox to address table 2019-11-11 12:32:50 +11:00
Ian Coleman
f8fae68efb Fix typo splitPhrase/phraseSplit 2019-11-11 11:41:45 +11:00
Ian Coleman
93f3a286db Add test for Pull Request 370 THT Thought network 2019-11-11 11:35:17 +11:00
Ian Coleman
3799728c76 Run all tests instead of only specific new tests 2019-11-11 11:23:54 +11:00
Ian Coleman
b130271b2b Fix tests for Pull Request 371 2019-11-11 11:19:18 +11:00
Ian Coleman
ea2cb91a49 Tidy up split phrase warning
Make red only when danger is present
Align neatly with the rest of the UI
Increase size of text area to show all three rows, although it still
overflows on 24 words.
2019-11-11 11:04:23 +11:00
Ian Coleman
bfe1963eaa Add test for Pull Request 319 EnergyWeb 2019-11-11 10:55:26 +11:00
Ian Coleman
a04946e23e Add test for Pull Request 279 split phrase cards 2019-11-11 10:53:20 +11:00
Ian Coleman
700294714c Raw entropy is interpreted as binary
For example, using abandon abandon ability becomes 8 zeros but how does
the entropy field know it's hex and not binary? It assumes the
worst-case scenario of binary, so entropy should be shown in binary.

Perhaps if entropy type is explicitly selected in the future this can be
changed back to using hex. But while magical assumptions exist, binary
it must be.
2019-11-11 10:31:14 +11:00
Ian Coleman
d93f2ba9f0 Remove trailing comments 2019-11-11 10:15:49 +11:00
Ian Coleman
96ee8ab0a0 Replace tabs with spaces as per rest of the file 2019-11-11 10:15:17 +11:00
Ian Coleman
659b06a7b8 Test for Pull Request 271 2019-11-11 10:11:40 +11:00
Ian Coleman
653538cd3a Reverse some changes from adding thought network 2019-11-11 10:04:20 +11:00
Ian Coleman
1ba5816184 Fix elastos changes 2019-11-11 10:01:51 +11:00
iancoleman
0a23f51792 Merge pull request #370 from thoughtnetwork/master
added Thought network spec
2019-11-11 09:56:49 +11:00
iancoleman
b9b3eaf670 Merge branch 'master' into master 2019-11-11 09:56:10 +11:00
iancoleman
7b29420f1a Merge pull request #371 from immae/master
Add a button to remove the "change" in the derivation path for ethereum
2019-11-11 09:54:29 +11:00
iancoleman
909297015e Merge branch 'master' into master 2019-11-11 09:54:07 +11:00
iancoleman
c7a092db32 Merge pull request #368 from johnnynanjiang/elastos-pr
Add Elastos
2019-11-11 09:47:35 +11:00
iancoleman
de5fe245cc Merge pull request #357 from PavlosTze/enable-segwit
Enable segwit for MONKEY, BCA, BTX, MONA, SYS, VIA, DOGEt, LTCt
2019-11-11 09:36:14 +11:00
iancoleman
4dc041d77e Merge pull request #319 from energywebfoundation/master
Add EWT
2019-11-11 09:35:13 +11:00
iancoleman
7cfd04e318 Merge pull request #280 from mctrivia/add-hack-time-for-split-cards
Add hack time calculation for Split Mnemonic Cards
2019-11-11 09:34:37 +11:00
iancoleman
d0428a8d21 Merge pull request #279 from mctrivia/master
Added Split Phrase Card Output
2019-11-11 09:28:28 +11:00
iancoleman
3dbf117928 Merge pull request #271 from cernekee/local
Allow converting mnemonic back to raw entropy value
2019-11-11 09:21:07 +11:00
iancoleman
342ff964aa Merge pull request #255 from dalijolijo/master
Fix wrong addresses for BTDX and MEC
2019-11-11 09:13:11 +11:00
Andrew
75138beed9 added Thought network spec 2019-11-05 11:26:58 -05:00
Nan Jiang
36523e0d97 Add Elastos 2019-10-30 13:58:32 +11:00
Ismaël Bouya
44e705cd31 Add a button to remove the "change" in the derivation path for ethereum 2019-10-29 01:24:15 +01:00
Pavlos Tzegiannakis
3e2af09e07 Merge branch 'enable-segwit' of https://github.com/PavlosTze/bip39 into enable-segwit 2019-09-17 10:10:01 +03:00
Pavlos Tzegiannakis
907172d6f0 Fix syscoin 2019-09-17 10:09:37 +03:00
iancoleman
394bce7c9e Merge branch 'master' into enable-segwit 2019-09-16 10:48:38 +10:00
iancoleman
bc32c84166 Merge pull request #353 from Groestlcoin/add-groestlcoin
Add Groestlcoin with Tests
2019-09-16 10:46:32 +10:00
HashEngineering
76120cb0b4 Add Groestlcoin 2019-09-13 06:27:59 -07:00
Pavlos Tzegiannakis
385ee32fd4 Enable segwit for MONKEY, BCA, BTX, MONA, SYS, VIA, DOGEt, LTCt 2019-09-13 16:10:08 +03:00
Ian Coleman
5b689bd6e7 Fix trailing whitespace 2019-09-13 10:15:15 +10:00
Ian Coleman
ac537983d9 Add base-x to libs directory 2019-09-12 21:00:45 +10:00
Ian Coleman
5b2edb3998 Fix typo in path for build script 2019-09-12 15:57:05 +10:00
Ian Coleman
eee4a60b35 Add instructions for manual changes for zcash 2019-09-12 15:56:40 +10:00
Ian Coleman
dedb054fd8 Add ethereumjs-util to libs directory 2019-09-12 15:29:10 +10:00
Ian Coleman
079635cba1 Change levenshtein library to fixed version 2.0.6 2019-09-12 15:04:09 +10:00
Ian Coleman
5db3540e89 Add bitcoinjs-bip38 to libs directory 2019-09-12 14:42:40 +10:00
Ian Coleman
b502adc910 Add bitcoinjs-lib to libs directory 2019-09-12 14:23:53 +10:00
Ian Coleman
cab37a96c4 Compile stellar-util to /tmp 2019-09-12 13:37:22 +10:00
Ian Coleman
b603572295 Fix test failing due to timeout 2019-09-12 11:58:32 +10:00
Ian Coleman
8817e2487a Fix CPUchain test 2019-09-12 10:39:03 +10:00
iancoleman
c6c86591a9 Merge pull request #352 from PavlosTze/bsv-rpd-monkey-arya
Support BSV, RPD, MONKEY, ARYA
2019-09-12 10:36:30 +10:00
iancoleman
5d1bb7d776 Merge pull request #355 from zhanghangorg/master
Zencash renamed Horizen
2019-09-12 10:14:33 +10:00
iancoleman
ea96c345cc Merge pull request #356 from skironDotNet/HUSH3
Added HUSH3 encoding and kept old as Legacy for users to be able to
2019-09-12 10:13:37 +10:00
Pawel Cioch
318ec4dc9f Added HUSH3 encoding and kept old as Legacy for users to be able to cross verify 2019-09-10 22:11:28 -05:00
zhanghang
ec38b3a263 Zencash was renamed Horizen in 2018 2019-09-11 10:55:02 +08:00
zhanghang
9cec5dd2b7 Zencash was renamed Horizen in 2018 2019-09-11 10:53:21 +08:00
Pavlos Tzegiannakis
31264e8bea Support BSV, RPD, MONKEY, ARYA 2019-09-02 09:58:09 +03:00
iancoleman
e440d504fb Merge pull request #345 from flyfoxuk/master
Added CSC (CasinoCoin) with test
2019-08-01 10:02:07 +10:00
iancoleman
786cd442cd Merge pull request #342 from minkcrypto/master
Add CPUchain support
2019-08-01 10:01:28 +10:00
iancoleman
9f675f2e47 Merge branch 'master' into master 2019-08-01 10:01:17 +10:00
iancoleman
e5c4aa4098 Merge pull request #341 from Cryptarchist/support_wagerr
Add support for Wagerr
2019-08-01 10:00:06 +10:00
Chris
45e40c288f Added CSC (CasinoCoin) with test 2019-07-18 11:50:14 +01:00
Min Khang Aung
519e9dc728 Add CPUchain support 2019-07-17 05:02:28 +09:00
Cryptarchist
67f18e2a63 Add support for Wagerr 2019-07-16 13:31:54 +01:00
iancoleman
c4f4208b95 Merge pull request #340 from sile16/master
Added support for VeChain, hdcoin 818, same address formats as ETH
2019-07-16 10:51:48 +10:00
Matt Robertson
881fbe2234 add test for VeChain 2019-07-04 14:18:30 -05:00
Matt Robertson
c7a1a00040 Added support for VeChain, hdcoin 818, same address formats as ETH 2019-07-04 13:20:14 -05:00
Ian Coleman
6aa2c1d26d Reorder release process steps
Should verify before publishing and promoting.
2019-07-04 12:41:38 +10:00
Ian Coleman
9e836ac8e6 Release v0.3.12 2019-07-04 12:31:54 +10:00
Ian Coleman
e2186682ac Remove Monkey network, test was failing.
See https://github.com/iancoleman/bip39/pull/335#issuecomment-500638649
2019-07-04 12:01:59 +10:00
Ian Coleman
152f0ce966 Add test for Stellar 2019-07-04 12:01:42 +10:00
Ian Coleman
084ff40d4f Fix typo testNetowrk/testNetwork 2019-07-04 11:41:14 +10:00
Ian Coleman
b244e34403 Fix naming of Dogecoin Testnet 2019-07-04 11:41:14 +10:00
Ian Coleman
e33f4b2704 Order networks alphabetically 2019-07-04 11:41:14 +10:00
iancoleman
6c733477db Merge pull request #339 from NewCapital/master
Adding support for TWINS and FIX coins
2019-07-04 11:40:32 +10:00
iancoleman
a36c509c91 Merge pull request #287 from sui77/master
XLM Stellar Lumens
2019-07-04 11:39:06 +10:00
yurykk
7d4e4cbe26 Adding FIX coin support 2019-06-27 12:15:11 +03:00
yurykk
82e3938afe Adding TWINS coin support 2019-06-27 11:56:47 +03:00
iancoleman
06cd4e7608 Merge pull request #338 from aitorp6/master
removed extra character that causes the whole thing to fail
2019-06-13 12:35:36 +10:00
Aitor P
8b569deeae removed extra character that causes the whole thing to fail 2019-06-12 18:19:20 +02:00
Suat Özgür
ad59508d7c use dummyNetwork for stellar 2019-06-12 11:47:01 +02:00
Suat Özgür
562ece8004 update stellar definition 2019-06-12 11:34:31 +02:00
Suat Özgür
8e3b890d26 stellar-util: remove uglify 2019-06-12 11:31:19 +02:00
iancoleman
6f53a445ee Merge pull request #337 from aitorp6/master
DeepOnion: test fixed
2019-06-12 09:41:20 +10:00
aitorp6
858c29e3be DeepOnion: test fixed 2019-06-11 14:34:18 +02:00
iancoleman
5a085aed79 Merge pull request #333 from conr2d/eosio-support
Add support EOSIO
2019-06-11 09:39:00 +10:00
iancoleman
7d68d5474e Merge branch 'master' into eosio-support 2019-06-11 09:37:53 +10:00
iancoleman
21e2e6c951 Merge pull request #335 from onnateldome/master
ADD support MONK, LTCt, DOGEt
2019-06-11 09:35:24 +10:00
Panagiotis David
7f59c88dbc [iancoleman/bip39] ADD support MONK, LTCt, DOGEt (#335)
Can you please replace the tab character with a space character in MONK name thanks.
2019-06-10 21:42:44 +03:00
Panagiotis David
b85da0745a ADD support MONK, LTCt, DOGEt 2019-06-10 10:53:30 +03:00
Jeeyong Um
0ae59396f5 Add EOSIO test spec 2019-06-02 11:51:52 +09:00
Jeeyong Um
3451d1a81b Add EOSIO (EOS) 2019-06-01 20:23:28 +09:00
iancoleman
22bb112ead Merge pull request #332 from aitorp6/master
Add DeepOnion (ONION)
2019-05-30 10:38:55 +10:00
Aitor
af14981d83 Add DeepOnion (ONION) 2019-05-29 12:21:22 +02:00
iancoleman
9f3c111766 Merge pull request #331 from mctrivia/master
fixed signing message for DigiByte
2019-05-29 09:16:22 +10:00
Suat Özgür
c2e4f93870 Merge branch 'master' into master 2019-05-25 14:18:15 +02:00
Suat Özgür
8e2d37d450 bugfix 2019-05-25 14:13:20 +02:00
Matthew Cornelisse
29040f3c8b fixed bip49,84 hd key prefixs 2019-05-22 00:13:34 -05:00
Matthew Cornelisse
6746a9a45e fixed signing message for DigiByte
Not fixed by this pull request because I could not figure out where it is done but like Bitcoin BIP44,BIP49,BIP84 should be xpub,ypub,zpub respectively.
2019-05-19 21:35:44 -05:00
Ian Coleman
c768923b77 Fix typo Forec/Force 2019-05-17 09:11:15 +10:00
Ian Coleman
0d0099e633 Release v0.3.11 2019-05-16 12:05:45 +10:00
Ian Coleman
bea736aeae Force spellcheck and autocomplete to be off 2019-05-16 11:26:28 +10:00
iancoleman
31190ced31 Merge pull request #330 from jestevez/master
BOLI - Use the correct address for testing the paraphrase
2019-05-16 11:26:19 +10:00
Jose Luis Estevez
575ee4de2c BOLI - Use the correct address fot testing the paraphrase 2019-05-15 09:23:52 +02:00
Ian Coleman
dfa696859a Include link to bip39-standalone.html in releases 2019-05-01 09:25:19 +10:00
iancoleman
32b5b0363f Merge pull request #324 from jestevez/master
Add Bolivarcoin (BOLI)
2019-04-30 11:08:13 +10:00
iancoleman
c69e40942e Merge pull request #323 from ellaism/ella-support
add Ellaism(ELLA) suppport
2019-04-30 11:07:23 +10:00
iancoleman
8cb07685fd Merge branch 'master' into ella-support 2019-04-30 11:07:12 +10:00
iancoleman
81a5a871d9 Merge pull request #322 from EthersocialNetwork/esn
add Ethersocial Network(ESN) support
2019-04-30 11:05:00 +10:00
Jose Luis Estevez
3e7b1ac938 Add Bolivarcoin (BOLI) 2019-04-25 22:17:31 +02:00
hackyminer
16afe3ecbf add Ethersocial Network(ESN) support 2019-04-26 01:42:07 +09:00
hackyminer
2885ddd5f7 add Ellaism(ELLA) suppport 2019-04-26 01:33:59 +09:00
Garrett MacDonald
f9ab643475 compile index 2019-04-25 10:44:56 +02:00
Garrett MacDonald
17bb7e6953 Delete index.html 2019-04-25 10:44:41 +02:00
Garrett MacDonald
b615704d4a Delete index.html 2019-04-25 10:44:27 +02:00
Garrett MacDonald
c47f0030ec Add index compiled 2019-04-25 10:44:08 +02:00
Garrett MacDonald
cb0300fc7b Compiled inedex
1
2019-04-25 10:43:08 +02:00
Garrett MacDonald
7cbfce747a Compiled Index 2019-04-25 10:42:14 +02:00
Garrett MacDonald
dd99c5fde9 Add EWT 2019-04-24 17:17:05 +02:00
iancoleman
c4a09d67eb Merge pull request #317 from skironDotNet/Crown_new_address_format
new Crown public address format (priv key not changed)
2019-04-23 09:01:11 +10:00
Pawel Cioch
bf13c95fb0 new Crown address format. May not be elegant solution, but bitcoinjs has limitation of network prefix length and I don't want to modify it. This approach is isolated and does not affect others 2019-04-16 23:17:16 -05:00
iancoleman
30d6779baa Merge pull request #316 from passionofvc/master
add SLP Token Type https://github.com/simpleledger/slp-specifications…
2019-04-17 08:07:28 +10:00
yamada
d0889ab9de add SLP Token Type https://github.com/simpleledger/slp-specifications/blob/master/slp-token-type-1.md 2019-04-17 00:02:00 +09:00
iancoleman
478e54ad47 Merge pull request #315 from jestevez/master
FIX coins ONX and LKR
2019-04-15 08:55:52 +10:00
Jose Luis Estevez
3b36d6c3ba FIX LKRcoin wif private key header 2019-04-15 00:03:48 +02:00
Jose Luis Estevez
b9f4ee2d4e FIX Onixcoin bip32 Header and correct signed message header 2019-04-15 00:02:10 +02:00
Jose Luis Estevez
1b419bc615 FIX Onixcoin wif private key header 2019-04-14 23:59:09 +02:00
iancoleman
961df0a5a5 Merge pull request #314 from hostgame/master
Add Nebulas (NAS)
2019-04-04 11:07:32 +11:00
hostgame
491948dbcb Nebulas. Add test spec. Replace nebulas.js by account part of nebulas.js only. 2019-04-03 17:09:41 +06:00
hostgame
7a11300336 Add Nebulas (nebulas.io) 2019-04-02 14:34:57 +06:00
iancoleman
dba22db54d Merge pull request #310 from boczeratul/master
Add definitions for DEXON (DXN)
2019-03-14 21:17:14 +11:00
Hsuan Lee
6cbd3bc8c2 Add definitions for DEXON (DXN) 2019-03-14 11:13:41 +08:00
iancoleman
74762b369e Merge pull request #309 from robiiinos/fix-clam
Fix CLAM scriptHash
2019-03-14 10:39:24 +11:00
iancoleman
5d7f36e9b2 Merge pull request #308 from robiiinos/xmy-scripthash
Fix XMY scriptHash
2019-03-14 10:38:40 +11:00
iancoleman
b0be9d8b60 Merge pull request #306 from robiiinos/fix-nmc
Fix NMC scriptHash
2019-03-14 10:38:20 +11:00
Robiiinos
9d9fefbb28 Fix CLAM scriptHash 2019-03-14 00:16:37 +09:00
Robiiinos
584d1a41c7 Fix XMY scriptHash 2019-03-14 00:12:41 +09:00
Robiiinos
a938c2f5a5 Fix NMC scriptHash 2019-03-13 23:33:39 +09:00
iancoleman
9f83f0fcd7 Merge pull request #302 from robiiinos/master
Added  NIX - NIX Platform
2019-02-26 10:17:37 +11:00
robiiinos
10980ed68c Added - NIX Platform 2019-02-26 03:08:08 +09:00
Ian Coleman
da6b42b2f0 Release v0.3.10 2019-02-25 12:06:14 +11:00
Ian Coleman
5dcc0ce632 Merge branch 'master' of github.com:iancoleman/bip39 2019-02-25 11:48:41 +11:00
iancoleman
a34543f81e Merge pull request #300 from robiiinos/master
Fixed PPC scriptHash
2019-02-25 11:27:23 +11:00
Ian Coleman
869f5375eb Fix SAFE test address 2019-02-25 11:23:10 +11:00
Ian Coleman
47d719a493 Remove info about private keys
Closes #260
2019-02-25 11:03:00 +11:00
Ian Coleman
8aa5ad6ded Remove unused code for Deimos
Closes #297
Reverses commit 3b6786bd51
2019-02-25 11:01:54 +11:00
iancoleman
a8cf5a4fd9 Merge pull request #296 from skironDotNet/blockstamp
Added BST - BlockStamp
2019-02-25 10:54:32 +11:00
robiiinos
5c1ad0856a Fixed PPC scriptHash 2019-02-23 05:56:16 +09:00
Pawel Cioch
d2be7b6fd6 restored deimos per project owner request https://github.com/iancoleman/bip39/pull/296#issuecomment-466240668 2019-02-21 21:56:59 -06:00
Pawel Cioch
f22f7677a6 Added BST - BlockStamp 2019-02-20 10:41:11 -06:00
Pawel Cioch
497fcf0e48 deimos not present commenting out 2019-02-20 10:26:02 -06:00
iancoleman
cceb518d09 Merge pull request #291 from jestevez/master
Add LKRcoin (LKR)
2019-01-15 08:55:56 +11:00
Jose Luis Estevez Prieto
ae27549baf LKRcoin test case 2019-01-14 16:42:28 +01:00
Jose Luis Estevez Prieto
8ba31a8985 Move in alphabetical order 2019-01-14 10:05:56 +01:00
Jose Luis Estevez
4735db1064 Add LKRcoin (LKR) 2019-01-13 20:39:47 +01:00
Suat Özgür
612d6b4206 Merge branch 'master' into master 2018-12-17 01:59:05 +01:00
Suat Özgür
d354a1dfab Merge remote-tracking branch 'origin/master' 2018-12-17 01:22:57 +01:00
Suat Özgür
d52d3f3784 Create readme.md 2018-12-17 01:22:29 +01:00
Suat Özgür
22c443df83 adding xlm stellar 2018-12-17 01:21:17 +01:00
Suat Özgür
8ffa333bc9 adding xlm stellar 2018-12-17 00:43:16 +01:00
iancoleman
717a3ffcb2 Merge pull request #284 from skironDotNet/litecoinZ
added LTZ - LitecoinZ https://litecoinz.org/
2018-12-11 07:43:55 +11:00
Pawel Cioch
d4fcdda9fb added LTZ - LitecoinZ https://litecoinz.org/ 2018-12-10 09:27:13 -06:00
iancoleman
7f65b685b3 Merge pull request #281 from Fair-Exchange/master
Added support for Safecoin (SAFE)
2018-12-05 08:37:36 +11:00
iancoleman
acf4c9b588 Merge branch 'master' into master 2018-12-05 08:36:51 +11:00
iancoleman
10cf809e7c Merge pull request #282 from Deimoscoin/patch-3
Update segwit-parameters.js
2018-12-03 09:02:13 +11:00
Deimos
3b6786bd51 Update segwit-parameters.js
Deimos Support
2018-11-30 20:44:16 -05:00
Matthew Cornelisse
5cdbe4620a added code to calculate hack time of split cards 2018-11-28 01:12:29 -06:00
Matthew Cornelisse
8253325365 added split card warning 2018-11-28 01:11:41 -06:00
Matthew Cornelisse
d100f3c0cb added hack time message 2018-11-28 01:10:34 -06:00
Matthew Cornelisse
c1322c7c89 wrong folder 2018-11-28 01:09:51 -06:00
Matthew Cornelisse
d9b5b5d0de added hack time message 2018-11-28 01:03:22 -06:00
iancoleman
20d077e3af Merge pull request #273 from CCob/master
Added support for Blocknode
2018-11-21 21:46:06 +11:00
Matthew Cornelisse
97bde20b84 Added 2/3 Seed Card 2018-11-20 02:23:51 -06:00
Matthew Cornelisse
b1100c66eb Added 2/3 Seed Card 2018-11-20 02:23:19 -06:00
EternityTula
d645b98261 Add Safecoin
Safecoin (SAFE) safecoin.org
2018-11-20 04:11:05 +03:00
EternityTula
31b846cf99 Add Safecoin
Safecoin (SAFE) safecoin.org
2018-11-20 04:07:08 +03:00
EternityTula
f1f1e39f89 Add Safecoin
Safecoin (SAFE) safecoin.org
2018-11-20 04:05:07 +03:00
iancoleman
3e4551b082 Merge pull request #277 from standard-error/master
Add Ravencoin (RVN)
2018-11-11 16:07:45 +11:00
standard-error
1fe8f5195f Add Ravencoin (RVN) 2018-11-09 17:03:28 +00:00
Unknown
6f43581752 Added support for Blocknode 2018-11-03 09:22:08 +00:00
iancoleman
ce349ac99f Merge pull request #272 from skironDotNet/phore-coin
Added Phore (PHR) coin
2018-11-01 15:56:25 +11:00
Pawel Cioch
38d1b296df Added Phore (PHR) coin 2018-10-31 10:50:42 -05:00
Ian Coleman
a51ef005ac Fix whitespace consistency 2018-10-29 19:06:33 +11:00
Ian Coleman
e066f14ecf Release v0.3.9 2018-10-29 18:46:03 +11:00
Ian Coleman
628a2f53d4 Fix test to work reliably on slow computers 2018-10-29 17:52:50 +11:00
Ian Coleman
f40c5c2423 Fix Stash testnet test
See https://github.com/iancoleman/bip39/pull/238#issuecomment-429679117
2018-10-29 17:44:16 +11:00
Ian Coleman
65afae0b5e Fix Salus test 2018-10-29 17:42:10 +11:00
Ian Coleman
3381604035 Fix tests for BitCloud and Megacoin 2018-10-29 17:14:16 +11:00
Ian Coleman
ba637be876 Add note for running http server in python 2 2018-10-29 17:14:16 +11:00
Kevin Cernekee
611f76238d Allow converting mnemonic back to raw entropy value
Currently, this sequence produces an unexpected result:

1) Navigate to bip39-standalone.html

2) Paste a known-good mnemonic into the BIP39 Mnemonic field

3) Select "Show entropy details"

This will erase the BIP39 Mnemonic field and most of the derived
address/key information.  It shows an empty Entropy field, and zeroes
for Event Count, Bits Per Event, Raw Entropy Words, Total Bits, etc.
However, it will show valid Word Indexes and BIP39 Seed.

The way to fix it is to convert the mnemonic back into a raw entropy
value and populate it in DOM.entropy, so that everything stays
consistent.  This will only happen if the mnemonic is manually entered
by the user, not if phraseChanged() is triggered by hand-editing the
entropy value.
2018-10-28 15:10:51 -07:00
iancoleman
011533e4bc Merge pull request #268 from skironDotNet/projectcoin
Added PRJ - ProjectCoin
2018-10-22 08:17:17 +11:00
Pawel Cioch
d2ba387163 Added PRJ - ProjectCoin 2018-10-21 14:57:38 -05:00
iancoleman
64425922ae Merge pull request #263 from skironDotNet/bitcoin-green
Added Bitcoin Green
2018-10-15 11:29:27 +11:00
iancoleman
cd4425ece7 Merge branch 'master' into bitcoin-green 2018-10-15 11:29:14 +11:00
iancoleman
8a516f5529 Merge pull request #267 from anonymousbitcoin/master
Add ANON
2018-10-15 11:27:17 +11:00
Kevin van der Poll
455886617d Add ANON 2018-10-11 15:10:24 -04:00
Pawel Cioch
8b2a093c8b Added BITG - Bitcoin Green 2018-10-10 17:53:06 -05:00
iancoleman
37f237239a Merge pull request #258 from mctrivia/patch-1
added DigiByte segwit parameters
2018-10-03 15:20:46 +10:00
Matthew Cornelisse
cd8893f6c9 added DigiByte segwit parameters 2018-10-02 23:44:17 -05:00
David
7ef0db981f Fix wrong addresses for BTDX and MEC 2018-09-21 11:16:29 +02:00
Ian Coleman
c4086c2413 Fix missing closing brackets in tests 2018-09-21 08:45:51 +10:00
iancoleman
2866e9d4d4 Merge pull request #253 from dalijolijo/master
Add BitCloud (BTDX) and Megacoin (MEC)
2018-09-21 08:16:47 +10:00
David B
5ed5f6612d Add BitCloud and Megacoin 2018-09-20 19:49:00 +00:00
iancoleman
8c849703eb Merge pull request #251 from skironDotNet/artaxcoin
Added Artax as HD 219 ...
2018-09-15 14:40:17 +10:00
Pawel Cioch
2575538b25 Added Artax as HD 219 from proposed https://github.com/satoshilabs/slips/pull/363 2018-09-13 23:19:00 -05:00
iancoleman
376ea8c46d Merge pull request #249 from harzo/task/add-exchangecoin
Add ExchangeCoin
2018-09-06 12:08:44 +10:00
harzo
a44c45e3c0 Add ExchangeCoin 2018-09-05 15:04:13 +02:00
iancoleman
341700110b Merge pull request #246 from hatgit/patch-1
Update index.html
2018-09-03 09:03:27 +10:00
Steven Hatzakis
0529ca55fa Update index.html 2018-09-01 11:26:53 +03:00
Steven Hatzakis
9f6352d696 Update index.html 2018-08-31 22:33:42 +03:00
Steven Hatzakis
01e0ec16b9 Update index.html 2018-08-31 22:31:59 +03:00
Steven Hatzakis
54348219db Update index.html 2018-08-31 22:27:57 +03:00
iancoleman
23183e61af Merge pull request #245 from VDamas/master
Fixed Salus and added Cryptoescudo
2018-08-29 09:02:50 +10:00
Steven Hatzakis
7d6078040d Update index.html
I think changing slightly the position of the generate button and re-wording the sentence as proposed will enhance the UX a little bit, I've also proposed to change the default selected word count to 12 from 15 (as 12 are more widely used).
2018-08-28 23:04:30 +03:00
Vitório Damas
04ec88af5c Added Cryptoescudo
Committer: Vitorio Damas <vitoriodamas@gmail.com>
2018-08-28 09:38:00 +01:00
Vitório Damas
5a1494327f Fixed Salus and added Cryptoescudo 2018-08-28 09:30:21 +01:00
iancoleman
e76cd8fbf3 Merge pull request #242 from Stoner19/master
Salus (SLS) support added
2018-08-22 10:06:38 +10:00
Stoner19
7878bb3295 Salus (SLS) support added 2018-08-21 13:35:49 -06:00
iancoleman
43e5cabfcf Merge pull request #234 from h4x3rotab/h4x3rotab-btg
Add SegWit support for BTG
2018-08-14 09:10:43 +10:00
iancoleman
c1a5e79c5f Merge pull request #238 from stashpayio/stash
Stash
2018-08-14 09:02:29 +10:00
BeachM
3eee87560b Release v0.3.8s 2018-08-10 21:56:20 -07:00
BeachM
74f0021ed0 Update changelog.md 2018-08-10 21:32:52 -07:00
BeachM
d2f5d28e33 remove space 2018-08-10 21:26:20 -07:00
BeachM
67df560a3c update changelog 2018-08-10 21:22:31 -07:00
BeachM
ae51db39a3 add stash parameters 2018-08-10 21:07:36 -07:00
h4x3rotab
efe95a35c1 Add SegWit spec for Bitcoin Gold 2018-07-31 17:55:34 +08:00
h4x3rotab
8103d17b09 Update BTG signing message 2018-07-31 17:38:18 +08:00
Ian Coleman
e47cd1970f Release v0.3.8 2018-07-26 12:04:37 +10:00
Ian Coleman
d221cd2f37 Remove BIP84 test for litecoin 2018-07-26 12:00:07 +10:00
Ian Coleman
fe3c963b73 Remove duplicate id properties on html elements
Closes #224
2018-07-26 11:40:17 +10:00
Ian Coleman
42fcf83e9b Remove bip39-standalone from source control
It's available in the releases tab of github.
Closes #226
2018-07-26 11:28:03 +10:00
Ian Coleman
b7de1f3d89 Update bitcore network parameters
Closes #231
2018-07-26 09:53:49 +10:00
Ian Coleman
0afecfc73c Test for HUSH network 2018-07-26 09:47:08 +10:00
Ian Coleman
44a5d363c7 Test for bip32 client coinomi/ledger 2018-07-26 09:43:34 +10:00
iancoleman
f83d786dd7 Merge pull request #216 from Coinomi/ethereum-like
Add ETC, PIRL, CLO, MIX, MUSIC, POA, EXP, and coinomi/ledger client o…
2018-07-26 09:34:34 +10:00
iancoleman
83fefeaf0b Merge pull request #229 from majikandy/patch-2
Added TSTRAT
2018-07-26 09:30:19 +10:00
iancoleman
9d4e17928a Merge pull request #233 from skironDotNet/hushcoin
Add HUSH coin, same as BTCZ but diffrent bip44 coin type
2018-07-26 09:29:34 +10:00
iancoleman
0f9081e2b5 Merge pull request #232 from skironDotNet/syscoin-fix
SYScoin fix for WIF private address format
2018-07-26 09:28:27 +10:00
Pawel Cioch
60727c5175 Hush coin 2018-07-23 08:18:47 -05:00
Pawel Cioch
0d9c6c5458 SYScoin fix for WIF private address format 2018-07-23 08:02:05 -05:00
Andy Davis
c990aff819 Stratis Testnet text 2018-07-16 15:08:54 +01:00
Andy Davis
4b1be40dea Merge pull request #2 from majikandy/patch-1
Added TSTRAT test
2018-07-16 15:06:31 +01:00
Andy Davis
b4d881fbd0 Merge pull request #1 from majikandy/patch-3
Update bitcoinjs-extensions.js
2018-07-16 15:05:29 +01:00
Andy Davis
cc9ed1c575 Update bitcoinjs-extensions.js 2018-07-16 15:04:14 +01:00
Andy Davis
3b43552ceb Added TSTRAT 2018-07-16 15:01:12 +01:00
Andy Davis
e96d3876c4 TSTRAT test 2018-07-16 14:56:48 +01:00
xarakas
0f1cfea04c Merge branch 'master' into ethereum-like 2018-06-18 17:17:49 +03:00
Ian Coleman
9369eaa6d5 Add litecoin p2wpkh parameters
From electrum-ltc
48996679e1/lib/constants.py
2018-05-30 11:32:43 +10:00
Ian Coleman
4218c87458 Release v0.3.7 2018-05-29 11:46:48 +10:00
Ian Coleman
2ab3faf414 Fix tests for altcoins
Checked reddcoin address in block explorer
https://live.reddcoin.com

AXE params were updated in
https://github.com/iancoleman/bip39/pull/213
but not the test.
2018-05-29 11:30:48 +10:00
Ian Coleman
6db7516d4a Fix typo - reddoin/reddcoin 2018-05-29 11:30:48 +10:00
Ian Coleman
0b6e351dce Add visual privacy safeguard for private data 2018-05-29 11:30:48 +10:00
Ian Coleman
6f7fa3539e Parse extended root key regardless of prefix 2018-05-29 11:30:48 +10:00
Ian Coleman
7733ac322b Hide 'calculating' feedback if segwit unavailable 2018-05-29 11:30:48 +10:00
Ian Coleman
530648c174 Add litecoin segwit tests 2018-05-29 11:30:48 +10:00
Ian Coleman
c147cb5e4f Replace hasSegwit variable with test for params 2018-05-29 11:30:48 +10:00
Ian Coleman
bddd5d9f95 Add BIP84 unavailable indicator to UI 2018-05-29 11:30:48 +10:00
iancoleman
cbd0625ff7 Merge pull request #219 from cryptostorage/master
Fix incorrect address generation for altcoins with BIP38 enabled
2018-05-29 10:29:47 +10:00
iancoleman
bd06face96 Merge pull request #222 from ihomp/patch-1
html: missed closing </span>
2018-05-29 10:28:33 +10:00
Viacheslav Bakshaev
5c3143888e Update index.html
html: missed closing </span>
2018-05-26 12:52:30 +02:00
woodser
55b878d8d5 undo zcash max payload length fix 2018-05-21 11:05:49 -04:00
iancoleman
370e201901 Merge pull request #218 from losh11/patch-1
Add Litecoin bech32 HRP
2018-05-21 15:03:04 +10:00
woodser
6df5b2a100 increase maximum payload length for zcash 2018-05-18 10:31:46 -04:00
woodser
29c30bf33a Fix incorrect address generation for altcoins with bip38 2018-05-18 10:26:54 -04:00
Loshan T
bda303dd53 Add Litecoin bech32 HRP 2018-05-16 23:34:28 +01:00
xarakas
bb381a72ab Add ETC, PIRL, CLO, MIX, MUSIC, POA, EXP, and coinomi/ledger client option in bip32 tab 2018-05-15 18:19:18 +03:00
iancoleman
35d9e9fddc Merge pull request #215 from Coinomi/coinomi
Add BTCP, BTCZ, ZCL, ZEN
2018-05-15 09:00:29 +10:00
xarakas
1e2cc748b0 Add BTCP, BTCZ, ZCL, ZEN 2018-05-14 11:32:25 +03:00
iancoleman
f62138da71 Merge pull request #213 from charlesrocket/upd-axe
update AXE network
2018-05-10 08:41:16 +10:00
iancoleman
95edc76985 Merge pull request #214 from XUEZ/add_xuez
Add xuez coin to coinlist
2018-05-10 08:14:18 +10:00
-k
7d9b5f6871 update bip value 2018-05-09 11:42:26 -04:00
ddude
24355c461b Add Xuez coin 2018-05-09 11:28:07 -04:00
ddude
4b250c83eb Add Xuez coin 2018-05-09 11:23:55 -04:00
-k
e32531d9a9 update AXE network values 2018-05-09 11:12:00 -04:00
Ian Coleman
ccdd300af3 Release v0.3.6 2018-05-08 10:32:56 +10:00
Ian Coleman
e0f91e2029 Add cashaddr address format for bitcoin cash 2018-05-08 10:19:59 +10:00
Ian Coleman
956e44efd7 Korean uses ascii spaces, not ideographic spaces 2018-05-08 09:11:30 +10:00
iancoleman
65cef19412 Merge pull request #212 from Coinomi/zcash
Add zcash support
2018-05-08 09:06:07 +10:00
xarakas
0702ecd352 Add zcash support 2018-04-30 17:41:05 +03:00
iancoleman
584dbddd37 Merge pull request #210 from potatohodler/patch/vertcoin
Improve Vertcoin support
2018-04-20 09:45:39 +10:00
iancoleman
b08caad07e Merge pull request #207 from Coinomi/kobocoin
Add Kobocoin support
2018-04-20 09:37:28 +10:00
Potato
f150f0c03a Adds Segwit support for Vertcoin. 2018-04-18 15:28:31 +02:00
Potato
e3bed0bfd0 Fixes the Vertcoin Mainnet version byte. 2018-04-18 15:03:36 +02:00
xarakas
0a5d28a7ad Add Kobocoin support 2018-04-18 14:58:17 +03:00
Ian Coleman
a08c709606 Release v0.3.5 2018-04-12 12:34:35 +10:00
Ian Coleman
645945a00f Warn when using weak entropy and strong mnemonic 2018-04-12 12:16:05 +10:00
Ian Coleman
85c906727a Warn when generating low entropy mnemonics 2018-04-12 12:08:52 +10:00
iancoleman
d1b4c8c579 Merge pull request #200 from Coinomi/coinomi
Add coins supported by Coinomi wallet
2018-04-12 11:32:37 +10:00
iancoleman
e602fd18de Merge pull request #198 from fujicoin/mod-fujicoin-SegWit
fix index.js fujicoin
2018-04-11 10:32:53 +10:00
xarakas
85f762c905 Add coins supported by Coinomi wallet 2018-04-10 17:34:16 +03:00
motty
3021870752 fix index.js fujicoin 2018-04-10 21:23:56 +09:00
iancoleman
63e2e0755f Merge pull request #196 from fujicoin/mod-fujicoin-SegWit
mod fujicoin SegWit
2018-04-10 08:59:07 +10:00
motty
9a2ca392f0 mod fujicoin SegWit 2018-04-08 21:15:25 +09:00
Ian Coleman
db37d63919 Order Neblio coin alphabetically 2018-03-27 10:32:19 +11:00
Ian Coleman
2eab7c3236 Order Beetlecoin alphabetically 2018-03-27 10:32:01 +11:00
Ian Coleman
38122a3d58 Add test for testnet p2wpkh parameters 2018-03-27 10:31:23 +11:00
Ian Coleman
680b94c1ef Add test for Beetlecoin 2018-03-27 10:28:39 +11:00
Ian Coleman
e5167afe28 Add test for Neblio coin 2018-03-27 10:28:17 +11:00
Ian Coleman
88ae130125 Change Bitcoin Gold coin number to 156
Closes #189
2018-03-27 10:24:35 +11:00
iancoleman
27fa320125 Merge pull request #188 from dalitsairio/master
Add network testnet.p2wpkh
2018-03-27 10:22:07 +11:00
iancoleman
dfbb5a65ff Merge pull request #186 from williamersatz/master
Implemented support for Beetle Coin
2018-03-27 10:20:57 +11:00
Dalit Sairio
206a27352d Add network testnet.p2wpkh 2018-03-25 22:28:25 +02:00
williamersatz
0c9bbd03b0 Added support for Beetle Coin 2018-03-22 09:09:02 +02:00
williamersatz
52d698e42f Added support for Beetle Coin 2018-03-22 09:08:16 +02:00
Ian Coleman
b777ff554d Update bitcoinjs-lib from 3.3.0 to 3.3.2
Built using instructions at
https://github.com/bitcoinjs/bitcoinjs-lib/tree/v3.3.2#browser
2018-03-19 15:13:07 +11:00
iancoleman
0d876b51df Merge pull request #178 from TrifidTeam/init-nebl-integration
Add Neblio
2018-03-16 10:09:13 +11:00
TrifidTeam
ae008be5db Add files via upload 2018-03-14 16:57:16 -04:00
iancoleman
2ed3f6c0c8 Merge pull request #177 from dimitris-t/patch-2
Fixed typo
2018-03-14 09:38:55 +11:00
Dimitris Tsapakidis
dfe833a7db Fixed typo
"each key will take take several minutes" -> "each key will take several minutes'
2018-03-13 23:52:42 +04:00
Ian Coleman
fca07769eb Release v0.3.4 2018-03-12 11:48:10 +11:00
Ian Coleman
5028988195 Use correct BIP44 value for Denarius of 116, not 0
See https://github.com/satoshilabs/slips/blob/master/slip-0044.md
2018-03-12 11:41:35 +11:00
Ian Coleman
139becaf2c Add Korean language 2018-03-12 11:31:41 +11:00
Ian Coleman
0514c20b81 Update jsbip39.js to latest version 2018-03-12 11:31:41 +11:00
Ian Coleman
f8ca25c338 Add spacing every 11 bits to the checksum 2018-03-12 11:31:41 +11:00
Ian Coleman
548d94994b Warn that entropy values should exclude checksum 2018-03-12 11:31:41 +11:00
Ian Coleman
09d63290a4 Show the checksum value in the entropy details 2018-03-12 11:31:41 +11:00
Ian Coleman
d6cade868f Add spaces every 11 bits to raw binary of entropy
This makes it easier to see that the checksum is missing from the end of
the entropy.
2018-03-12 11:31:41 +11:00
Ian Coleman
048721a6ff Add test for blackcoin 2018-03-12 11:31:41 +11:00
Ian Coleman
892ce76fed Order blackcoin alphabetically in coin list 2018-03-12 11:31:41 +11:00
iancoleman
aaa82c097f Merge pull request #172 from carsenk/master
Add Denarius (DNR) Support
2018-03-12 11:21:17 +11:00
iancoleman
05311e7f54 Merge pull request #163 from janko33bd/blackcoin
Add Blackcoin please
2018-03-12 09:23:17 +11:00
carsenk
40209fd898 Add DNR Support 2018-03-06 01:11:55 -07:00
janko33bd
e5520bb859 typo 2018-02-07 19:27:35 +01:00
janko33bd
e1d0cf4f72 update index.js with correct BIP44 reg. number 2018-02-07 19:26:26 +01:00
janko33bd
e82a142872 make bitcoinjs-extensions black 2018-02-07 19:20:54 +01:00
Ian Coleman
fcc7d12109 Release v0.3.3 2018-02-06 10:36:38 +11:00
Ian Coleman
5dfe77e4a3 Fix tests which generate more rows 2018-02-06 10:33:21 +11:00
Ian Coleman
e21e32da31 Add BIP38 test 2018-02-06 10:14:22 +11:00
Ian Coleman
ba678b1147 Allow initial number of rows to be set by user 2018-02-06 09:57:28 +11:00
Ian Coleman
0b39e9dca7 Add BIP38 interface elements 2018-02-06 09:57:23 +11:00
Ian Coleman
cc61ec30c5 Encrypt private keys with BIP38
with fakes for missing UI elements
2018-02-06 09:43:13 +11:00
Ian Coleman
0f0a888e13 Add bitcoinjs-bip38-2.0.2 library
Created using browserify:
git clone https://github.com/bitcoinjs/bip38.git
git checkout v2.0.2
npm install
npm run unit
browserify index.js --standalone bitcoinjs-bip38 > bitcoinjs-bip38-2.0.2.js
2018-02-06 09:42:10 +11:00
Ian Coleman
2ef27fb80b Remove commented-out lines of code from test 2018-01-16 10:37:37 +11:00
Ian Coleman
423fb969c6 Test AXE network 2018-01-16 10:34:42 +11:00
Ian Coleman
9fae1ffbcc Increase allowed rendering time tests
Firefox was only generating 15 of 20 rows in the address table
2018-01-16 10:33:08 +11:00
Ian Coleman
78db37f663 LeftPad ethereum private keys with zeros if needed 2018-01-16 10:33:08 +11:00
iancoleman
28e1cd455c Merge pull request #154 from AXErunners/master
Add AXE
2018-01-16 09:05:18 +11:00
-k
47debf07ed AXE support
prefix fixed
2018-01-07 00:55:48 -05:00
-k
cfc0c4d743 AXE support 2018-01-06 23:57:11 -05:00
Ian Coleman
de8e5bc11f Release v0.3.2 2018-01-03 10:54:10 +11:00
Ian Coleman
5c1003dde3 Fix test for komodo 2018-01-03 10:52:39 +11:00
Ian Coleman
a78f4e280c Add csv display of addresses 2018-01-03 10:33:22 +11:00
Ian Coleman
4e9b492ca4 Add BIP84 tab 2018-01-03 09:32:14 +11:00
Ian Coleman
91eb2cbcfd Fix typo game/komodo 2017-12-20 10:48:09 +11:00
Ian Coleman
c51bb4f9e5 Add test for Onixcoin 2017-12-20 10:42:55 +11:00
iancoleman
3fa0f4cbef Merge pull request #137 from AraguaneyBits/master
Add ONX (Onixcoin)
2017-12-20 10:38:14 +11:00
jestevez
92fb39311e FIX OnixCoin Correct BIP44 Code 174 2017-12-19 21:55:28 +01:00
jestevez
d00c719932 FIX OnixCoin Correct BIP44 Code 174 2017-12-19 21:50:55 +01:00
iancoleman
ab1bd64d52 Merge pull request #142 from ca333/master
[ADD] KMD - Komodo
2017-12-13 14:15:20 +11:00
ca333
aab3645f21 [ADD] KMD - Komodo 2017-12-04 05:01:53 +01:00
jestevez
66419cf39c Add ONX (Onixcoin) 2017-11-30 20:42:49 +01:00
Ian Coleman
26dd39fd0e Release v0.3.1 2017-11-29 10:32:58 +11:00
Ian Coleman
9225b805d6 Replace jquery.qrcode with kjua for QR codes
This handles UTF-8 content correctly
2017-11-29 10:28:09 +11:00
Ian Coleman
f2de7aa7d8 Move css specific to the app into own file 2017-11-29 10:28:09 +11:00
Ian Coleman
9a54f27efc Update bootstrap from minified 3.2.0 to 3.3.7 2017-11-29 10:28:09 +11:00
Ian Coleman
863fa61aaf Update jquery from minified 2.1.1 to 3.2.1 2017-11-29 10:28:09 +11:00
iancoleman
2f410ee66e Merge pull request #134 from dimitris-t/patch-2
Fixed typos
2017-11-28 10:30:36 +11:00
Dimitris Tsapakidis
2087192332 Fixed typos
addreses -> addresses
steet -> street
2017-11-24 18:01:19 +02:00
Ian Coleman
74ab4cbe90 Show entropy from PRNG and word indexes
see issue #132
2017-11-22 15:37:36 +11:00
Ian Coleman
cf6c204497 Release v0.3.0 2017-11-22 13:34:58 +11:00
Ian Coleman
c49e881294 Add BIP141 tab for full segwit compatibility 2017-11-22 13:03:47 +11:00
Ian Coleman
0fd67b5915 Remove segwit from bip32 tab
This option will be added in the future to a bip141 tab
2017-11-22 09:59:58 +11:00
Ian Coleman
1c2b8c6b2d Use ltub for litecoin by default instead of xprv
Introduced when upgrading from bitcoinjs-lib v3.3.0
2017-11-22 09:40:35 +11:00
Ian Coleman
9f59e99bec Update bitcoinjs from v3.1.1 to v3.3.0 2017-11-22 09:19:14 +11:00
Ian Coleman
924727ed26 Release v0.2.9 2017-11-21 12:17:28 +11:00
Ian Coleman
9183f9f658 Allow more rows to be generated at a custom index 2017-11-21 12:06:56 +11:00
Ian Coleman
f487fea9b8 Fix ordering of networks to be alphabetical 2017-11-16 15:11:01 +11:00
Ian Coleman
5a10834a36 Add test for monacoin 2017-11-16 15:09:56 +11:00
Ian Coleman
1f354b0390 Add test for Bitcoin Gold network 2017-11-16 15:09:37 +11:00
Ian Coleman
0460b53f3a Use selenium for tests instead of phantomjs 2017-11-16 14:37:17 +11:00
iancoleman
e8ee368f18 Merge pull request #129 from rsnel/bgold
add BTG (Bitcoin Gold/bgold)
2017-11-15 08:53:38 +11:00
iancoleman
107edb3454 Merge pull request #126 from monautils/master
add monacoin
2017-11-15 08:53:25 +11:00
Rik Snel
3960807353 add BTG (Bitcoin Gold/bgold) 2017-11-14 09:05:50 +01:00
you21979
214c584c40 fix new secret_key https://github.com/monacoinproject/monacoin/blob/master-0.14/src/chainparams.cpp#L135 2017-11-09 19:17:16 +09:00
you21979
c1396e87ed add monacoin 2017-11-09 17:21:07 +09:00
Ian Coleman
b57b721e2c Fix web link from github.io to iancoleman.io 2017-11-01 09:32:18 +11:00
Ian Coleman
0f6b34d68b Release v0.2.8 2017-10-31 13:34:53 +11:00
Ian Coleman
2a01f39de7 Add P2WPKH-nested-in-P2SH to litecoin 2017-10-31 11:48:51 +11:00
Ian Coleman
93c3ef4757 Use correct prefixes for xprv/xpub with segwit 2017-10-31 11:44:42 +11:00
Ian Coleman
fe8f2d140d Allow BitPay address format for bitcoin cash 2017-10-31 10:35:52 +11:00
Ian Coleman
0cca6e893a Add test for nubits network 2017-10-10 12:04:27 +11:00
iancoleman
f2a1a8e67f Merge pull request #123 from alkley/master
Add nubits
2017-10-10 11:48:33 +11:00
alkley
8dd28f2cff Add nubits 2017-10-09 15:34:39 +02:00
iancoleman
4b1e5c340f Merge pull request #122 from dimitris-t/patch-1
Update changelog.md
2017-10-05 09:59:25 +11:00
Dimitris Tsapakidis
2be42f9dba Update changelog.md
Fixed markdown typo.
2017-10-04 19:22:49 +03:00
Ian Coleman
4aa771eb68 Add test for fujicoin 2017-10-03 14:40:56 +11:00
Ian Coleman
1102f20135 Release v0.2.7 2017-10-02 14:16:46 +11:00
Ian Coleman
fb00a22d3f Remove hand-rolled translation library 2017-10-02 14:09:32 +11:00
Ian Coleman
73b8724a6f List alternative tools 2017-10-02 14:04:23 +11:00
iancoleman
8890d0f4c3 Merge pull request #120 from fujicoin/add-fujicoin
Add Fujicoin
2017-09-27 10:58:48 +10:00
motty
6e67990522 add Fujicoin 2017-09-26 11:54:56 +09:00
Ian Coleman
9ff30babbc Release v0.2.6 2017-09-20 11:39:06 +10:00
Ian Coleman
ee0981f1ec Detect and warn of filtered entropy 2017-09-20 11:25:21 +10:00
Ian Coleman
6024e655a8 Update process for committing changes
Do not include changes in bip39-standalone.html
2017-09-19 11:15:25 +10:00
Ian Coleman
7e6bdc498e Reword entropy text to say one type, not multiple 2017-09-19 11:13:03 +10:00
iancoleman
16b4c2788a Merge pull request #117 from jonathancross/iancoleman-bip39-bip49
Adding BIP 49 to "More info" section.
2017-09-19 10:32:20 +10:00
iancoleman
0197de2795 Merge pull request #116 from jonathancross/iancoleman-bip39-compile
Allowing compilation with Python 2.x
2017-09-19 10:26:32 +10:00
Jonathan Cross
861750ae51 Adding BIP 49 to "More info" section. 2017-09-18 02:18:51 +02:00
Jonathan Cross
a40d59d904 Allowing compilation with Python 2.x and 3. 2017-09-18 01:57:05 +02:00
iancoleman
d933c3f731 Merge pull request #103 from Zwilla/patch-3
correctLevel from 2 to 3
2017-09-08 08:12:34 +10:00
iancoleman
408ecc184a Merge pull request #102 from Zwilla/patch-2
remove sourceMappingURL=zxcvbn.js.map
2017-09-08 08:07:51 +10:00
Zwilla
00114002fe correctLevel from 2 to 3
correctLevel 3 is generally recommended for industrial environments.

See also: https://github.com/iancoleman/bip39/issues/101
2017-09-07 14:32:42 +02:00
Zwilla
e80955983d remove sourceMappingURL=zxcvbn.js.map
just remove this line, if not every time we run the converter it searches for the map file. It is not enough to uncomment this line.
thx
2017-09-07 09:42:54 +02:00
iancoleman
f20b7e7128 Merge pull request #98 from Zwilla/patch-1
changed some wrong comma and ;
2017-09-04 10:03:05 +10:00
Zwilla
908dc06fe8 changed some wrong comma and ;
nothing else
2017-09-04 01:55:55 +02:00
Ian Coleman
3d548c6f9b Improve release process order and add details 2017-09-01 13:20:29 +10:00
Ian Coleman
0a8d06d03e Release v0.2.5 2017-09-01 12:35:42 +10:00
Ian Coleman
88311463c7 Allow P2WPKH nested in P2SH addresses on BIP32 tab 2017-09-01 12:28:27 +10:00
Ian Coleman
cd7c8327b1 Validate root key correctly for alternate networks 2017-09-01 12:27:03 +10:00
Ian Coleman
0cda44d5f6 Rename bip49 to p2wpkhNestedInP2sh where suitable 2017-09-01 12:25:45 +10:00
Ian Coleman
7258b102c1 Add confirmation steps to the release process 2017-08-28 10:03:21 +10:00
Ian Coleman
8d18f379fd Release v0.2.4 2017-08-28 09:48:48 +10:00
Ian Coleman
3abab9b087 Add a checkbox to switch litecoin key prefixes 2017-08-28 09:45:38 +10:00
Ian Coleman
b18eb97ae3 Show error when using xpub with hardened addresses 2017-08-24 09:37:21 +10:00
Ian Coleman
88ea3e40ee Release v0.2.3 2017-08-23 09:45:09 +10:00
Ian Coleman
8a9f391376 Test for Maza network 2017-08-23 09:41:53 +10:00
iancoleman
e40acc3ab0 Merge pull request #92 from jonspock/master
Add maza coin, update PIVX in bip39-standalone.html
2017-08-23 09:30:43 +10:00
Jon Spock
56ad960105 Add maza coin 2017-08-21 17:13:44 -07:00
Ian Coleman
f128bd58c4 Release v0.2.2 2017-08-16 11:26:10 +10:00
Ian Coleman
0eda54f5a7 Improve showing feedback for pending calculations 2017-08-16 11:04:13 +10:00
Ian Coleman
ed6d9d3905 Clear old seed when mnemonic is changed 2017-08-16 10:43:09 +10:00
Ian Coleman
47b64d3ee1 Add PIVX network tests 2017-08-14 15:27:24 +10:00
iancoleman
bc33f5ee53 Merge pull request #89 from alkley/master
Add PIVX
2017-08-14 14:43:04 +10:00
alkley
c0df01895d Added PIVX 2017-08-11 15:08:53 +02:00
Ian Coleman
b3cc3930d0 Release v0.2.1 2017-08-07 19:13:10 +10:00
Ian Coleman
c18511dd0d Add myriadcoin test 2017-08-07 19:01:03 +10:00
Ian Coleman
7ebdf61c99 Order networks alphabetically 2017-08-07 18:57:41 +10:00
Ian Coleman
daab55dc61 Add BCH - Bitcoin Cash network 2017-08-07 18:54:12 +10:00
Ian Coleman
7b742f87d3 Default coin selection is BTC - Bitcoin 2017-08-07 18:54:12 +10:00
iancoleman
4d9c184a84 Merge pull request #87 from alkley/master
Add Myriadcoin
2017-08-07 18:53:46 +10:00
alkley
d5e01cc6e2 placeholder scripthash 2017-08-06 18:20:33 +02:00
alkley
adedbf9169 Added myriad to selectbox 2017-08-06 17:45:22 +02:00
alkley
f36d10080a Added myriad to extensions 2017-08-06 17:40:42 +02:00
Ian Coleman
8335cf17bc Add testing and publishing to release process 2017-08-05 16:26:14 +10:00
Ian Coleman
9987f0c184 Release v0.2.0 2017-08-05 15:14:45 +10:00
Ian Coleman
d2fea262c3 Formalize the release process 2017-08-05 15:10:45 +10:00
Ian Coleman
6c08f364b3 Add BIP49 tab 2017-08-02 17:28:39 +10:00
Ian Coleman
fa2e4e936e Refactor clearKey to better named clearKeys 2017-08-02 17:12:21 +10:00
Ian Coleman
684624b522 Change BIP44 purpose and coin fields to readonly 2017-08-02 17:12:13 +10:00
Ian Coleman
33b3dd47aa Order tabs for derivation path alphabetically 2017-08-02 17:12:04 +10:00
Ian Coleman
a0091a40c4 Upgrade bitcoinjs from v1.5.7 to v3.1.1 2017-08-02 17:11:39 +10:00
Ian Coleman
039a98ba5a Release v0.1.2 2017-07-03 11:00:41 +10:00
iancoleman
9dab7e5d0c Merge pull request #81 from mikeyb/naming
Add CRW / Change bip44 dropdown naming convention
2017-07-03 10:42:20 +10:00
mikeyb
534481b628 standardize dropdown naming scheme 2017-07-02 09:44:54 -07:00
mikeyb
0921f37077 Add CRW - Crown 2017-07-01 15:38:46 -07:00
73 changed files with 43843 additions and 89284 deletions

2
.gitignore vendored Normal file
View File

@@ -0,0 +1,2 @@
node_modules
bip39-standalone.html

File diff suppressed because one or more lines are too long

View File

@@ -1,3 +1,300 @@
# 0.5.1
* Add Portuguese language
* Add BIP85
* Add Ritocoin
* Add Cosmos Hub
* Add ZooBC
* Add Zcoin/Firo rebranded coin
* Update Namecoin WIF
# 0.5.0
* Remove bias from base 6 and base 10 entropy
* Add notes about card entropy
* Hide/show split mnemonic cards
* Fix link to standalone release file
* Add Scribe network
* Add Nano network
* Add TRX network
* Add Binance Smart Chain network
* Clean up dependencies for eos-util
* Update bootstrap to 3.4.1
* Bump library versions
# 0.4.3
* Add FIO - Foundation for Interwallet Operability
* Add Argoneum
* Add CranePay
* Add Jingtum network
* Add MOAC
* Update RSK network
* Add HandShake
* Add Sugarchain testnet
* Fix wording "is a checksum" / "contains a checksum"
* Fix bech32 prefix for monacoin
# 0.4.2
* Fix ethereum private key format
# 0.4.1
* Fix no loading on chrome with third-party cookies blocked
* Add EtherCore
* Add RSK network
* Add DeepOnion segwit parameters
* Fix ethereum xpub derivation
# 0.4.0
* Third party libraries deduplicated and minified
* Add text reminder for multibit wallet change addresses
* Seed field can be edited
* Add bitcoin regtest parameters
* Mnemonic conversion to entropy is hex encoded instead of binary
* Entropy type can be manually selected
* Add Bitcoin P2WSH and P2WSH-P2SH
* Add Czech language
# 0.3.14
* Ethereum uses standard BIP44 as per majority of wallets (Issue 378)
# 0.3.13
* Add Thought network
* Add Energyweb network
* Add Elastos network
* Add Groestlcoin
* Fix for syscoin network
* Add BSV, RPD, MONKEY, ARYA
* Rename Zencash to Horizen
* Update Hush network
* Add CasinoCoin
* Add CPUchain
* Add Wagerr
* Add VeChain
* Option to not use 'change' field for ethereum networks in bip45
* Add segwit parameters for MONKEY, BCA, BTC, MONA, SYS, VIA, DOGEt, LTCt
* Convert mnemonic back to raw entropy
* Add 2-of-3 phrase cards
* Move position of hardened addresses checkbox to address table
# 0.3.12
* Fix typos
* Fix DigiByte signing message
* Add DeepOnion network
* Add EOS network
* Add LTC testnetwork
* Add DOGE testnetwork
* Add Stellar network
* Add TWINS network
* Add FIX network
# 0.3.11
* Add NIX network
* Fix coin parameters for NMC, XMY, CLAM, ONX, LKR
* Add DEXON network
* Add Nebulas network
* Add LSP network
* Fix Crown network address format
* Add Ellaism network
* Add Etheresocial network
* Add Bolivarcoin network
* Force spellcheck and autocomplete to be off
# 0.3.10
* Add Phore network
* Add Blocknode network
* Add Ravencoin network
* Add Safecoin network
* Add LitecoinZ network
* Add LKRcoin network
* Update Peercoin scripthash parameter
* Add Blockstamp network
* Remove old info regarding use of private keys
# 0.3.9
* Update BTG signing message
* Add segwit parameters for BTG
* Add segwit parameters for DigiByte
* Add Stash network (see 0.3.8s below)
* Add Salus network
* Add Cryptoescudo network
* Add ExchangeCoin network
* Add Artax network
* Add BitCloud network
* Add Megacoin network
* Add Bitcoin Green network
* Add ANON network
* Add ProjectCoin network
* Reword the 'generate' inputs and words
* Add note for running http server in python 2
* Adjust test to run reliably on slow computers
# 0.3.8s
* Add Stash network
# 0.3.8
* Add p2wpkh for litecoin
* Add more networks - TSTRAT, Hush, ETC, PIRL, CLO, MIX, MUSIC, POA, EXP
* Add coinomi/ledger client to BIP32 tab
* Fix SYSCOIN and BTX parameters
* Remove bip39-standalone.html from repository
* Remove duplicate id properties on html elements
# 0.3.7
* Update AXE network parameters
* Add new networks - Xuez, BTCP, BTCZ, ZCL, ZEN
* Add litecoin bech32 params
* Fix BIP38 for altcoins
* Fix missing span closing tag
* Add indicator to UI for when BIP84 is unavailable
* Replace hasSegwit variable with test for segwit params
* Allow xpub to be used as root key for segwit derivations
* Add visual privacy safeguard
# 0.3.6
* Add Kobocoin
* Update Vertcoin version byte and segwit support
* Add Zcash
* Korean mnemonics use ascii spaces
* Add CashAddr address format for bitcoin cash
# 0.3.5
* Fix typo
* Add Neblio network
* Update bitcoinjs-lib from 3.3.0 to 3.3.2
* Add Beetle Coin
* Add segwit for bitcoin testnet and Fujicoin
* Set coin number for Bitcoin God to 156
* Add coins supported by coinomi
* Warn when generating low entropy mnemonics
* Warn when overriding weak entropy with a strong mnemonic length
# 0.3.4
* Add BlackCoin
* Add Denarius
* Raw entropy shows groupings with space every 11 bits
* Checksum shown in entropy details
* Warn that entropy values should exclude checksum
* Add Korean language
# 0.3.3
* Add AXE network
* Ethereum private key generation bugfix
* Add BIP38 support
* Allow initial number of rows to be set by the user
# 0.3.2
* Add Onixcoin
* Add Komodo
* BIP84 tab for derivation path
* CSV tab for derived addresses
# 0.3.1
* Populate entropy field with hex value used from PRNG
* Show list of word indexes
* Fix typos
* Update jquery from 2.1.1 to 3.2.1
* Update bootstrap from 3.2.0 to 3.3.7
* Move application-specific css into own file
* QR codes with accents work correctly by replacing jquery.qrcode with kjua
# 0.3.0
* Update bitcoinjs from 3.1.1 to 3.3.0
* Litecoin defaults to ltub instead of xpub
* Segwit option removed from bip32 tab
* BIP141 tab added for full segwit compatibility
# 0.2.9
* Update links from old site to new site
* Add Monacoin
* Add Bitcoin Gold
* Port test suite to selenium
* Allow more rows to be generated starting from a custom index
# 0.2.8
* Enable segwit for Litecoin
* BitPay-style addresses for Bitcoin Cash
* Use new xpub/xprv prefixes for Segwit BIP49
* Add nubits network
# 0.2.7
* Add Fujicoin
* List alternative tools
* Remove unused translations and library
# 0.2.6
* Detect and warn when entropy is filtered / discarded
* Reword entropy text to indicate using a single source only
* Add BIP49 to More Info section
* Update compile script to work across python 2 and 3
* QR Codes use correctLevel 3 instead of 2
* Source map removed from zxcvbn
* Tidy up code with consistent use of commas and semicolons
# 0.2.5
* Rename variables for clarity between BIP49 and P2WPKH Nested In P2SH
* Fix bug for validation of root key when using non-bitcoin networks
* Add option to use P2WPKH Nested In P2SH addresses on BIP32 tab
# 0.2.4
* Show error when using xpub with hardened addresses
* Allow switching litecoin prefixes between xprv and Ltpv
# 0.2.3
* Add maza coin
# 0.2.2
* Improve showing feedback for pending calculations
* Bugfix: Clear old seed when mnemonic is changed
* Add PIVX network
# 0.2.1
* BTC is the default coin
* Add myriadcoin
* Add Bitcon Cash
# 0.2.0
* BitcoinJS library upgrded to v3.1.1
* Tab order is alphabetical
* BIP44 'purpose' and 'coin' fields are readonly
* Refactor method to clear old data from the display
* BIP49 support
* Release process is documented
# 0.1.2
* Add Crown network
* Network names are displayed with currency code
# 0.1.1
* Add DASH Testnet

View File

@@ -1,6 +1,7 @@
import os
import re
import datetime
from io import open
# This script generates the bip39-standalone.html file.

58
dev_env_setup.sh Executable file
View File

@@ -0,0 +1,58 @@
# this script is intended to be run in a VM
# running ubuntu 20.04 server
# from the root directory of this repo
echo "This script is intended to be run in a VM."
echo "It may do things to your OS that you don't want to be peristent."
echo "Please type virtualmachine to continue, or Ctrl-C to quit."
read passage
if [ "$passage" = "virtualmachine" ]; then
echo "Installing dev environment"
else
echo "Did not type virtualmachine, quitting with no changes applied"
exit
fi
# set up place for local binaries
mkdir $HOME/.bin
echo "export PATH=$PATH:$HOME/.bin" >> $HOME/.bashrc
source $HOME/.bashrc
# allow python3 to be run with python command
ln -s /usr/bin/python3 $HOME/.bin/python
# install firefox and other dependencies
sudo apt-get -y install firefox unzip openjdk-11-jre-headless xvfb libxi6 libgconf-2-4 make build-essential
# install chrome
curl -sS -o - https://dl-ssl.google.com/linux/linux_signing_key.pub | sudo apt-key add
sudo sh -c "echo \"deb https://dl.google.com/linux/chrome/deb/ stable main\" >> /etc/apt/sources.list.d/google-chrome.list"
sudo apt-get -y update
sudo apt-get -y install google-chrome-stable
# install nodejs for running tests
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.36.0/install.sh | bash
# load nvm
source $HOME/.bashrc
export NVM_DIR="$HOME/.nvm"
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm
[ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion" # This loads nvm bash_completion
# install latest node
nvm install node
# install jasmine
cd tests
npm install --global jasmine
npm install selenium-webdriver
# install gecko webdriver for firefox
wget https://github.com/mozilla/geckodriver/releases/download/v0.28.0/geckodriver-v0.28.0-linux64.tar.gz --output-document=/tmp/geckodriver.tar.gz
tar -xf /tmp/geckodriver.tar.gz -C $HOME/.bin
# install chrome webdriver for chromium
wget https://chromedriver.storage.googleapis.com/87.0.4280.20/chromedriver_linux64.zip --output-document=/tmp/chromedriver.zip
unzip /tmp/chromedriver.zip -d $HOME/.bin
# to run tests
# cd tests
# Xvfb :1 -screen 1 1024x768x24 & export DISPLAY=:1.1
# BROWSER=firefox jasmine spec/tests.js
# BROWSER=chrome jasmine spec/tests.js

22
libs/base-x/LICENSE.md Normal file
View File

@@ -0,0 +1,22 @@
The MIT License (MIT)
Copyright (c) 2018 base-x contributors
Copyright (c) 2014-2018 The Bitcoin Core developers
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

44
libs/base-x/package.json Normal file
View File

@@ -0,0 +1,44 @@
{
"name": "base-x",
"version": "3.0.7",
"description": "Fast base encoding / decoding of any given alphabet",
"keywords": [
"base-x",
"base58",
"base62",
"base64",
"crypto",
"crytography",
"decode",
"decoding",
"encode",
"encoding"
],
"homepage": "https://github.com/cryptocoinjs/base-x",
"bugs": {
"url": "https://github.com/cryptocoinjs/base-x/issues"
},
"license": "MIT",
"author": "Daniel Cousens",
"files": [
"src"
],
"main": "src/index.js",
"types": "src/index.d.ts",
"repository": {
"type": "git",
"url": "https://github.com/cryptocoinjs/base-x.git"
},
"scripts": {
"build": "tsc -p ./tsconfig.json ; standard --fix; browserify src/index.js --standalone basex > /tmp/base-x.js"
},
"devDependencies": {
"@types/node": "12.0.10",
"standard": "^10.0.3",
"tape": "^4.5.1",
"typescript": "3.5.2"
},
"dependencies": {
"safe-buffer": "^5.0.1"
}
}

4
libs/base-x/readme.md Normal file
View File

@@ -0,0 +1,4 @@
Build (will create a bundle and copy it to /tmp/base-x.js):
npm install
npm run build

161
libs/base-x/ts_src/index.ts Normal file
View File

@@ -0,0 +1,161 @@
// base-x encoding / decoding
// Copyright (c) 2018 base-x contributors
// Copyright (c) 2014-2018 The Bitcoin Core developers (base58.cpp)
// Distributed under the MIT software license, see the accompanying
// file LICENSE or http://www.opensource.org/licenses/mit-license.php.
// @ts-ignore
const _Buffer = require('safe-buffer').Buffer;
function base (ALPHABET: string): base.BaseConverter {
if (ALPHABET.length >= 255) throw new TypeError('Alphabet too long')
const BASE_MAP = new Uint8Array(256)
BASE_MAP.fill(255)
for (let i = 0; i < ALPHABET.length; i++) {
const x = ALPHABET.charAt(i)
const xc = x.charCodeAt(0)
if (BASE_MAP[xc] !== 255) throw new TypeError(x + ' is ambiguous')
BASE_MAP[xc] = i
}
const BASE = ALPHABET.length
const LEADER = ALPHABET.charAt(0)
const FACTOR = Math.log(BASE) / Math.log(256) // log(BASE) / log(256), rounded up
const iFACTOR = Math.log(256) / Math.log(BASE) // log(256) / log(BASE), rounded up
function encode (source: Buffer): string {
if (!_Buffer.isBuffer(source)) throw new TypeError('Expected Buffer')
if (source.length === 0) return ''
// Skip & count leading zeroes.
let zeroes = 0
let length = 0
let pbegin = 0
const pend = source.length
while (pbegin !== pend && source[pbegin] === 0) {
pbegin++
zeroes++
}
// Allocate enough space in big-endian base58 representation.
const size = ((pend - pbegin) * iFACTOR + 1) >>> 0
const b58 = new Uint8Array(size)
// Process the bytes.
while (pbegin !== pend) {
let carry = source[pbegin]
// Apply "b58 = b58 * 256 + ch".
let i = 0
for (let it1 = size - 1; (carry !== 0 || i < length) && (it1 !== -1); it1--, i++) {
carry += (256 * b58[it1]) >>> 0
b58[it1] = (carry % BASE) >>> 0
carry = (carry / BASE) >>> 0
}
if (carry !== 0) throw new Error('Non-zero carry')
length = i
pbegin++
}
// Skip leading zeroes in base58 result.
let it2 = size - length
while (it2 !== size && b58[it2] === 0) {
it2++
}
// Translate the result into a string.
let str = LEADER.repeat(zeroes)
for (; it2 < size; ++it2) str += ALPHABET.charAt(b58[it2])
return str
}
function decodeUnsafe (source: string): Buffer | undefined {
if (typeof source !== 'string') throw new TypeError('Expected String')
if (source.length === 0) return _Buffer.alloc(0)
let psz = 0
// Skip leading spaces.
if (source[psz] === ' ') return
// Skip and count leading '1's.
let zeroes = 0
let length = 0
while (source[psz] === LEADER) {
zeroes++
psz++
}
// Allocate enough space in big-endian base256 representation.
const size = (((source.length - psz) * FACTOR) + 1) >>> 0 // log(58) / log(256), rounded up.
const b256 = new Uint8Array(size)
// Process the characters.
while (source[psz]) {
// Decode character
let carry = BASE_MAP[source.charCodeAt(psz)]
// Invalid character
if (carry === 255) return
let i = 0
for (let it3 = size - 1; (carry !== 0 || i < length) && (it3 !== -1); it3--, i++) {
carry += (BASE * b256[it3]) >>> 0
b256[it3] = (carry % 256) >>> 0
carry = (carry / 256) >>> 0
}
if (carry !== 0) throw new Error('Non-zero carry')
length = i
psz++
}
// Skip trailing spaces.
if (source[psz] === ' ') return
// Skip leading zeroes in b256.
let it4 = size - length
while (it4 !== size && b256[it4] === 0) {
it4++
}
const vch = _Buffer.allocUnsafe(zeroes + (size - it4))
vch.fill(0x00, 0, zeroes)
let j = zeroes
while (it4 !== size) {
vch[j++] = b256[it4++]
}
return vch
}
function decode (string: string): Buffer {
const buffer = decodeUnsafe(string)
if (buffer) return buffer
throw new Error('Non-base' + BASE + ' character')
}
return {
encode: encode,
decodeUnsafe: decodeUnsafe,
decode: decode
}
}
export = base;
declare namespace base {
interface BaseConverter {
encode(buffer: Buffer): string;
decodeUnsafe(string: string): Buffer | undefined;
decode(string: string): Buffer;
}
}

31
libs/base-x/tsconfig.json Normal file
View File

@@ -0,0 +1,31 @@
{
"compilerOptions": {
"target": "ES5",
"module": "commonjs",
"outDir": "./src",
"declaration": true,
"rootDir": "./ts_src",
"types": [
"node"
],
"allowJs": false,
"strict": true,
"noImplicitAny": true,
"strictNullChecks": true,
"strictFunctionTypes": true,
"strictBindCallApply": true,
"strictPropertyInitialization": true,
"noImplicitThis": true,
"alwaysStrict": true,
"esModuleInterop": false,
"noUnusedLocals": true,
"noUnusedParameters": true
},
"include": [
"ts_src/**/*.ts"
],
"exclude": [
"**/*.spec.ts",
"node_modules/**/*"
]
}

View File

@@ -0,0 +1,244 @@
var aes = require('browserify-aes')
var assert = require('assert')
var Buffer = require('safe-buffer').Buffer
var bs58check = require('bs58check')
var createHash = require('create-hash')
var scrypt = require('scryptsy')
var xor = require('buffer-xor/inplace')
var ecurve = require('ecurve')
var curve = ecurve.getCurveByName('secp256k1')
var BigInteger = require('bigi')
// constants
var SCRYPT_PARAMS = {
N: 16384, // specified by BIP38
r: 8,
p: 8
}
var NULL = Buffer.alloc(0)
function hash160 (buffer) {
var hash
try {
hash = createHash('rmd160')
} catch (e) {
hash = createHash('ripemd160')
}
return hash.update(
createHash('sha256').update(buffer).digest()
).digest()
}
function hash256 (buffer) {
return createHash('sha256').update(
createHash('sha256').update(buffer).digest()
).digest()
}
function getAddress (d, compressed) {
var Q = curve.G.multiply(d).getEncoded(compressed)
var hash = hash160(Q)
var payload = Buffer.allocUnsafe(21)
payload.writeUInt8(0x00, 0) // XXX TODO FIXME bitcoin only??? damn you BIP38
hash.copy(payload, 1)
return bs58check.encode(payload)
}
function encryptRaw (buffer, compressed, passphrase, progressCallback, scryptParams) {
if (buffer.length !== 32) throw new Error('Invalid private key length')
scryptParams = scryptParams || SCRYPT_PARAMS
var d = BigInteger.fromBuffer(buffer)
var address = getAddress(d, compressed)
var secret = Buffer.from(passphrase, 'utf8')
var salt = hash256(address).slice(0, 4)
var N = scryptParams.N
var r = scryptParams.r
var p = scryptParams.p
var scryptBuf = scrypt(secret, salt, N, r, p, 64, progressCallback)
var derivedHalf1 = scryptBuf.slice(0, 32)
var derivedHalf2 = scryptBuf.slice(32, 64)
var xorBuf = xor(derivedHalf1, buffer)
var cipher = aes.createCipheriv('aes-256-ecb', derivedHalf2, NULL)
cipher.setAutoPadding(false)
cipher.end(xorBuf)
var cipherText = cipher.read()
// 0x01 | 0x42 | flagByte | salt (4) | cipherText (32)
var result = Buffer.allocUnsafe(7 + 32)
result.writeUInt8(0x01, 0)
result.writeUInt8(0x42, 1)
result.writeUInt8(compressed ? 0xe0 : 0xc0, 2)
salt.copy(result, 3)
cipherText.copy(result, 7)
return result
}
function encrypt (buffer, compressed, passphrase, progressCallback, scryptParams) {
return bs58check.encode(encryptRaw(buffer, compressed, passphrase, progressCallback, scryptParams))
}
// some of the techniques borrowed from: https://github.com/pointbiz/bitaddress.org
function decryptRaw (buffer, passphrase, progressCallback, scryptParams) {
// 39 bytes: 2 bytes prefix, 37 bytes payload
if (buffer.length !== 39) throw new Error('Invalid BIP38 data length')
if (buffer.readUInt8(0) !== 0x01) throw new Error('Invalid BIP38 prefix')
scryptParams = scryptParams || SCRYPT_PARAMS
// check if BIP38 EC multiply
var type = buffer.readUInt8(1)
if (type === 0x43) return decryptECMult(buffer, passphrase, progressCallback, scryptParams)
if (type !== 0x42) throw new Error('Invalid BIP38 type')
passphrase = Buffer.from(passphrase, 'utf8')
var flagByte = buffer.readUInt8(2)
var compressed = flagByte === 0xe0
if (!compressed && flagByte !== 0xc0) throw new Error('Invalid BIP38 compression flag')
var N = scryptParams.N
var r = scryptParams.r
var p = scryptParams.p
var salt = buffer.slice(3, 7)
var scryptBuf = scrypt(passphrase, salt, N, r, p, 64, progressCallback)
var derivedHalf1 = scryptBuf.slice(0, 32)
var derivedHalf2 = scryptBuf.slice(32, 64)
var privKeyBuf = buffer.slice(7, 7 + 32)
var decipher = aes.createDecipheriv('aes-256-ecb', derivedHalf2, NULL)
decipher.setAutoPadding(false)
decipher.end(privKeyBuf)
var plainText = decipher.read()
var privateKey = xor(derivedHalf1, plainText)
// verify salt matches address
var d = BigInteger.fromBuffer(privateKey)
var address = getAddress(d, compressed)
var checksum = hash256(address).slice(0, 4)
assert.deepStrictEqual(salt, checksum)
return {
privateKey: privateKey,
compressed: compressed
}
}
function decrypt (string, passphrase, progressCallback, scryptParams) {
return decryptRaw(bs58check.decode(string), passphrase, progressCallback, scryptParams)
}
function decryptECMult (buffer, passphrase, progressCallback, scryptParams) {
passphrase = Buffer.from(passphrase, 'utf8')
buffer = buffer.slice(1) // FIXME: we can avoid this
scryptParams = scryptParams || SCRYPT_PARAMS
var flag = buffer.readUInt8(1)
var compressed = (flag & 0x20) !== 0
var hasLotSeq = (flag & 0x04) !== 0
assert.strictEqual((flag & 0x24), flag, 'Invalid private key.')
var addressHash = buffer.slice(2, 6)
var ownerEntropy = buffer.slice(6, 14)
var ownerSalt
// 4 bytes ownerSalt if 4 bytes lot/sequence
if (hasLotSeq) {
ownerSalt = ownerEntropy.slice(0, 4)
// else, 8 bytes ownerSalt
} else {
ownerSalt = ownerEntropy
}
var encryptedPart1 = buffer.slice(14, 22) // First 8 bytes
var encryptedPart2 = buffer.slice(22, 38) // 16 bytes
var N = scryptParams.N
var r = scryptParams.r
var p = scryptParams.p
var preFactor = scrypt(passphrase, ownerSalt, N, r, p, 32, progressCallback)
var passFactor
if (hasLotSeq) {
var hashTarget = Buffer.concat([preFactor, ownerEntropy])
passFactor = hash256(hashTarget)
} else {
passFactor = preFactor
}
var passInt = BigInteger.fromBuffer(passFactor)
var passPoint = curve.G.multiply(passInt).getEncoded(true)
var seedBPass = scrypt(passPoint, Buffer.concat([addressHash, ownerEntropy]), 1024, 1, 1, 64)
var derivedHalf1 = seedBPass.slice(0, 32)
var derivedHalf2 = seedBPass.slice(32, 64)
var decipher = aes.createDecipheriv('aes-256-ecb', derivedHalf2, Buffer.alloc(0))
decipher.setAutoPadding(false)
decipher.end(encryptedPart2)
var decryptedPart2 = decipher.read()
var tmp = xor(decryptedPart2, derivedHalf1.slice(16, 32))
var seedBPart2 = tmp.slice(8, 16)
var decipher2 = aes.createDecipheriv('aes-256-ecb', derivedHalf2, Buffer.alloc(0))
decipher2.setAutoPadding(false)
decipher2.write(encryptedPart1) // first 8 bytes
decipher2.end(tmp.slice(0, 8)) // last 8 bytes
var seedBPart1 = xor(decipher2.read(), derivedHalf1.slice(0, 16))
var seedB = Buffer.concat([seedBPart1, seedBPart2], 24)
var factorB = BigInteger.fromBuffer(hash256(seedB))
// d = passFactor * factorB (mod n)
var d = passInt.multiply(factorB).mod(curve.n)
return {
privateKey: d.toBuffer(32),
compressed: compressed
}
}
function verify (string) {
var decoded = bs58check.decodeUnsafe(string)
if (!decoded) return false
if (decoded.length !== 39) return false
if (decoded.readUInt8(0) !== 0x01) return false
var type = decoded.readUInt8(1)
var flag = decoded.readUInt8(2)
// encrypted WIF
if (type === 0x42) {
if (flag !== 0xc0 && flag !== 0xe0) return false
// EC mult
} else if (type === 0x43) {
if ((flag & ~0x24)) return false
} else {
return false
}
return true
}
module.exports = {
decrypt: decrypt,
decryptECMult: decryptECMult,
decryptRaw: decryptRaw,
encrypt: encrypt,
encryptRaw: encryptRaw,
verify: verify
}

View File

@@ -0,0 +1,38 @@
{
"name": "bip38",
"version": "2.0.2",
"description": "BIP38 is a standard process to encrypt Bitcoin and crypto currency private keys that is impervious to brute force attacks thus protecting the user.",
"main": "index.js",
"keywords": [
"bitcoin",
"crypto",
"cryptography",
"litecoin"
],
"homepage": "http://cryptocoinjs.com/modules/currency/bip38/",
"author": "JP Richardson",
"dependencies": {
"bigi": "^1.2.0",
"browserify-aes": "^1.0.1",
"bs58check": "<3.0.0",
"buffer-xor": "^1.0.2",
"create-hash": "^1.1.1",
"ecurve": "^1.0.0",
"scryptsy": "^2.0.0"
},
"devDependencies": {
},
"repository": {
"url": "git@github.com:bitcoinjs/bip38.git",
"type": "git"
},
"scripts": {
"browser-test": "mochify --wd -R spec --timeout 100000",
"build": "browserify index.js --standalone bitcoinjs-bip38 > /tmp/bitcoinjs-bip38.js",
"coverage": "istanbul cover _mocha -- --reporter list test/*.js",
"coveralls": "npm run-script coverage && coveralls < coverage/lcov.info",
"standard": "standard",
"test": "npm run standard && npm run unit",
"unit": "mocha --ui bdd --timeout 240000"
}
}

View File

@@ -0,0 +1,4 @@
Build (will create a bundle and copy it to /tmp/bitcoinjs-bip38.js):
npm install
npm run build

View File

@@ -0,0 +1,5 @@
let bitcoin = require('bitcoinjs-lib')
module.exports = {
bitcoin
}

View File

@@ -0,0 +1,14 @@
{
"name": "bitcoinjs-lib",
"version": "3.3.2",
"scripts": {
"build": "browserify bitcoinjs-lib.js --standalone bitcoinjs > /tmp/bitcoinjs-lib.js"
},
"dependencies": {
"bitcoinjs-lib": "3.3.2"
},
"devDependencies": {
"browserify": "^16.2.3",
"uglify-es": "^3.3.9"
}
}

View File

@@ -0,0 +1,5 @@
Build (will create a bundle and copy it to /tmp/bitcoinjs-lib.js):
npm install
npm run build
manually add changes in https://github.com/iancoleman/bip39/commit/0702ecd3520c44cb8016f80329dcb5a3c8df88fc

169
libs/combined/index.js Normal file
View File

@@ -0,0 +1,169 @@
/* base-x */
module.exports.basex = require('base-x')
/* base32 */
module.exports.base32 = require('base32.js')
/* bchaddrjs */
module.exports.bchaddr = require('bchaddrjs')
/* bchaddrjs slp */
module.exports.bchaddrSlp = require('bchaddrjs-slp')
/* bech32 */
module.exports.bech32 = require('bech32')
/* biginteger */
module.exports.BigInteger = require('javascript-biginteger')
/* bitcoinjs-bip38 */
module.exports.bip38 = require('bip38')
/* bip85 */
module.exports.bip85 = require('bip85')
/* bitcoinjs-lib */
module.exports.bitcoin = require('bitcoinjs-lib')
/* buffer */
module.exports.buffer = require('buffer');
/* elastos */
// See https://github.com/iancoleman/bip39/pull/368
// and https://github.com/johnnynanjiang/Elastos.SDK.Keypair.Javascript/tree/iancoleman-bip39
module.exports.elastosjs = require('elastos-wallet-js')
/* ethereum-util */
module.exports.ethUtil = require('ethereumjs-util')
/* fast-levenshtein */
module.exports.levenshtein = require('fast-levenshtein')
/* groestlcoin */
module.exports.groestlcoinjs = require('groestlcoinjs-lib')
/* groestlcoin bip38 */
module.exports.groestlcoinjsBip38 = require('bip38grs')
/* kjua qr codes */
module.exports.kjua = require('kjua')
/* nebulas */
try {
module.exports.nebulas = require('nebulas')
}
catch (e) {
console.warn("Error loading nebulas library");
console.warn(e);
};
/* stellar-util */
let StellarBase = require('stellar-base');
let edHd = require('ed25519-hd-key');
module.exports.stellarUtil = {
getKeypair: function (path, seed) {
const result = edHd.derivePath(path, seed);
return StellarBase.Keypair.fromRawEd25519Seed(result.key);
},
dummyNetwork: {
bip32: {public: 0, private: 0},
messagePrefix: '',
pubKeyHash: 0,
scriptHash: 0,
wif: 0,
},
}
/* zoobc-util */
let base32 = require('base32.js');
let nbl = require('nebulas');
module.exports.zoobcUtil = {
getKeypair: function (path, seed) {
const { key, chainCode} = edHd.derivePath(path, seed);
const pubKey = edHd.getPublicKey(key);
return {key,chainCode, pubKey};
},
getZBCAddress(publicKey, prefix = "ZBC") {
const prefixDefault = ["ZBC", "ZNK", "ZBL", "ZTX"];
const valid = prefixDefault.indexOf(prefix) > -1;
if (valid) {
var bytes = new Uint8Array(35);
for (let i = 0; i < 32; i++) bytes[i] = publicKey[i];
for (let i = 0; i < 3; i++) bytes[i + 32] = prefix.charCodeAt(i);
const checksum = nbl.CryptoUtils.sha3(bytes);
for (let i = 0; i < 3; i++) bytes[i + 32] = Number(checksum[i]);
var segs = [prefix];
var b32 = base32.encode(bytes);
for (let i = 0; i < 7; i++) segs.push(b32.substr(i * 8, 8));
return segs.join("_");
} else {
throw new Error("The Prefix not available!");
}
}
}
/* nano-util */
let NanoBase = require('nanocurrency-web');
module.exports.nanoUtil = {
getKeypair: function (index, seed) {
const accounts = NanoBase.wallet.accounts(seed, index, index)
return {privKey: accounts[0].privateKey, pubKey: accounts[0].publicKey, address: accounts[0].address};
},
dummyNetwork: {
bip32: {public: 0, private: 0},
messagePrefix: '',
pubKeyHash: 0,
scriptHash: 0,
wif: 0,
},
}
/* unorm */
module.exports.unorm = require('unorm')
/* zxcvbn */
module.exports.zxcvbn = require('zxcvbn')
/* handshake */
module.exports.handshake = require('handshake-util')
/* bs58 */
try {
module.exports.bs58 = require('bs58')
}
catch (e) {
console.warn("Error loading bs58 library");
console.warn(e);
};
/* create-hash */
try {
module.exports.createHash = require('create-hash')
}
catch (e) {
console.warn("Error loading create-hash library");
console.warn(e);
};

5314
libs/combined/package-lock.json generated Normal file

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,38 @@
{
"name": "bip39-tool-external-libs",
"version": "0.4.0",
"scripts": {
"build": "browserify index.js --standalone libs | uglifyjs -c > ../../src/js/bip39-libs.js"
},
"dependencies": {
"base-x": "3.0.7",
"bchaddrjs": "0.4.4",
"bchaddrjs-slp": "git://github.com/simpleledger/bchaddrjs.git#af16e44a6bfbe4b3980a62dba50e2f68ed864c6b",
"bech32": "1.1.4",
"bip38": "2.0.2",
"bip38grs": "git://github.com/Groestlcoin/bip38grs.git#091975b01679b74dc0a4136bb743fe17791b0151",
"bip85": "0.0.3",
"bitcoinjs-lib": "git://github.com/iancoleman/bitcoinjs-lib.git#v3.3.2_16bit",
"bs58": "^4.0.1",
"buffer": "^5.4.3",
"create-hash": "^1.2.0",
"ed25519-hd-key": "^1.0.0",
"elastos-wallet-js": "git://github.com/johnnynanjiang/Elastos.SDK.Keypair.Javascript.git#491dc51b64efaf0a8aae62028b68e2c8e38fde06",
"ethereumjs-util": "6.0.0",
"fast-levenshtein": "2.0.6",
"groestlcoinjs-lib": "git://github.com/Groestlcoin/groestlcoinjs-lib.git#3.3.2",
"handshake-util": "1.2.0",
"javascript-biginteger": "0.9.2",
"jsrsasign": "^8.0.19",
"kjua": "0.6.0",
"nanocurrency-web": "^1.2.2",
"nebulas": "0.5.6",
"stellar-base": "^0.10.0",
"unorm": "1.6.0",
"zxcvbn": "4.4.2"
},
"devDependencies": {
"browserify": "^16.2.3",
"uglify-es": "^3.3.9"
}
}

6
libs/combined/readme.md Normal file
View File

@@ -0,0 +1,6 @@
# Generate libs
```
npm install --no-optional
npm run build
```

View File

@@ -0,0 +1,736 @@
const createKeccakHash = require('keccak')
const secp256k1 = require('secp256k1')
const assert = require('assert')
const rlp = require('rlp')
const BN = require('bn.js')
const createHash = require('create-hash')
const Buffer = require('safe-buffer').Buffer
Object.assign(exports, require('ethjs-util'))
/**
* the max integer that this VM can handle (a ```BN```)
* @var {BN} MAX_INTEGER
*/
exports.MAX_INTEGER = new BN('ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff', 16)
/**
* 2^256 (a ```BN```)
* @var {BN} TWO_POW256
*/
exports.TWO_POW256 = new BN('10000000000000000000000000000000000000000000000000000000000000000', 16)
/**
* Keccak-256 hash of null (a ```String```)
* @var {String} KECCAK256_NULL_S
*/
exports.KECCAK256_NULL_S = 'c5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470'
/**
* Keccak-256 hash of null (a ```Buffer```)
* @var {Buffer} KECCAK256_NULL
*/
exports.KECCAK256_NULL = Buffer.from(exports.KECCAK256_NULL_S, 'hex')
/**
* Keccak-256 of an RLP of an empty array (a ```String```)
* @var {String} KECCAK256_RLP_ARRAY_S
*/
exports.KECCAK256_RLP_ARRAY_S = '1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347'
/**
* Keccak-256 of an RLP of an empty array (a ```Buffer```)
* @var {Buffer} KECCAK256_RLP_ARRAY
*/
exports.KECCAK256_RLP_ARRAY = Buffer.from(exports.KECCAK256_RLP_ARRAY_S, 'hex')
/**
* Keccak-256 hash of the RLP of null (a ```String```)
* @var {String} KECCAK256_RLP_S
*/
exports.KECCAK256_RLP_S = '56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421'
/**
* Keccak-256 hash of the RLP of null (a ```Buffer```)
* @var {Buffer} KECCAK256_RLP
*/
exports.KECCAK256_RLP = Buffer.from(exports.KECCAK256_RLP_S, 'hex')
/**
* [`BN`](https://github.com/indutny/bn.js)
* @var {Function}
*/
exports.BN = BN
/**
* [`rlp`](https://github.com/ethereumjs/rlp)
* @var {Function}
*/
exports.rlp = rlp
/**
* [`secp256k1`](https://github.com/cryptocoinjs/secp256k1-node/)
* @var {Object}
*/
exports.secp256k1 = secp256k1
/**
* Returns a buffer filled with 0s
* @method zeros
* @param {Number} bytes the number of bytes the buffer should be
* @return {Buffer}
*/
exports.zeros = function (bytes) {
return Buffer.allocUnsafe(bytes).fill(0)
}
/**
* Returns a zero address
* @method zeroAddress
* @return {String}
*/
exports.zeroAddress = function () {
const addressLength = 20
const zeroAddress = exports.zeros(addressLength)
return exports.bufferToHex(zeroAddress)
}
/**
* Left Pads an `Array` or `Buffer` with leading zeros till it has `length` bytes.
* Or it truncates the beginning if it exceeds.
* @method lsetLength
* @param {Buffer|Array} msg the value to pad
* @param {Number} length the number of bytes the output should be
* @param {Boolean} [right=false] whether to start padding form the left or right
* @return {Buffer|Array}
*/
exports.setLengthLeft = exports.setLength = function (msg, length, right) {
const buf = exports.zeros(length)
msg = exports.toBuffer(msg)
if (right) {
if (msg.length < length) {
msg.copy(buf)
return buf
}
return msg.slice(0, length)
} else {
if (msg.length < length) {
msg.copy(buf, length - msg.length)
return buf
}
return msg.slice(-length)
}
}
/**
* Right Pads an `Array` or `Buffer` with leading zeros till it has `length` bytes.
* Or it truncates the beginning if it exceeds.
* @param {Buffer|Array} msg the value to pad
* @param {Number} length the number of bytes the output should be
* @return {Buffer|Array}
*/
exports.setLengthRight = function (msg, length) {
return exports.setLength(msg, length, true)
}
/**
* Trims leading zeros from a `Buffer` or an `Array`
* @param {Buffer|Array|String} a
* @return {Buffer|Array|String}
*/
exports.unpad = exports.stripZeros = function (a) {
a = exports.stripHexPrefix(a)
let first = a[0]
while (a.length > 0 && first.toString() === '0') {
a = a.slice(1)
first = a[0]
}
return a
}
/**
* Attempts to turn a value into a `Buffer`. As input it supports `Buffer`, `String`, `Number`, null/undefined, `BN` and other objects with a `toArray()` method.
* @param {*} v the value
*/
exports.toBuffer = function (v) {
if (!Buffer.isBuffer(v)) {
if (Array.isArray(v)) {
v = Buffer.from(v)
} else if (typeof v === 'string') {
if (exports.isHexString(v)) {
v = Buffer.from(exports.padToEven(exports.stripHexPrefix(v)), 'hex')
} else {
v = Buffer.from(v)
}
} else if (typeof v === 'number') {
v = exports.intToBuffer(v)
} else if (v === null || v === undefined) {
v = Buffer.allocUnsafe(0)
} else if (BN.isBN(v)) {
v = v.toArrayLike(Buffer)
} else if (v.toArray) {
// converts a BN to a Buffer
v = Buffer.from(v.toArray())
} else {
throw new Error('invalid type')
}
}
return v
}
/**
* Converts a `Buffer` to a `Number`
* @param {Buffer} buf
* @return {Number}
* @throws If the input number exceeds 53 bits.
*/
exports.bufferToInt = function (buf) {
return new BN(exports.toBuffer(buf)).toNumber()
}
/**
* Converts a `Buffer` into a hex `String`
* @param {Buffer} buf
* @return {String}
*/
exports.bufferToHex = function (buf) {
buf = exports.toBuffer(buf)
return '0x' + buf.toString('hex')
}
/**
* Interprets a `Buffer` as a signed integer and returns a `BN`. Assumes 256-bit numbers.
* @param {Buffer} num
* @return {BN}
*/
exports.fromSigned = function (num) {
return new BN(num).fromTwos(256)
}
/**
* Converts a `BN` to an unsigned integer and returns it as a `Buffer`. Assumes 256-bit numbers.
* @param {BN} num
* @return {Buffer}
*/
exports.toUnsigned = function (num) {
return Buffer.from(num.toTwos(256).toArray())
}
/**
* Creates Keccak hash of the input
* @param {Buffer|Array|String|Number} a the input data
* @param {Number} [bits=256] the Keccak width
* @return {Buffer}
*/
exports.keccak = function (a, bits) {
a = exports.toBuffer(a)
if (!bits) bits = 256
return createKeccakHash('keccak' + bits).update(a).digest()
}
/**
* Creates Keccak-256 hash of the input, alias for keccak(a, 256)
* @param {Buffer|Array|String|Number} a the input data
* @return {Buffer}
*/
exports.keccak256 = function (a) {
return exports.keccak(a)
}
/**
* Creates SHA256 hash of the input
* @param {Buffer|Array|String|Number} a the input data
* @return {Buffer}
*/
exports.sha256 = function (a) {
a = exports.toBuffer(a)
return createHash('sha256').update(a).digest()
}
/**
* Creates RIPEMD160 hash of the input
* @param {Buffer|Array|String|Number} a the input data
* @param {Boolean} padded whether it should be padded to 256 bits or not
* @return {Buffer}
*/
exports.ripemd160 = function (a, padded) {
a = exports.toBuffer(a)
const hash = createHash('rmd160').update(a).digest()
if (padded === true) {
return exports.setLength(hash, 32)
} else {
return hash
}
}
/**
* Creates SHA-3 hash of the RLP encoded version of the input
* @param {Buffer|Array|String|Number} a the input data
* @return {Buffer}
*/
exports.rlphash = function (a) {
return exports.keccak(rlp.encode(a))
}
/**
* Checks if the private key satisfies the rules of the curve secp256k1.
* @param {Buffer} privateKey
* @return {Boolean}
*/
exports.isValidPrivate = function (privateKey) {
return secp256k1.privateKeyVerify(privateKey)
}
/**
* Checks if the public key satisfies the rules of the curve secp256k1
* and the requirements of Ethereum.
* @param {Buffer} publicKey The two points of an uncompressed key, unless sanitize is enabled
* @param {Boolean} [sanitize=false] Accept public keys in other formats
* @return {Boolean}
*/
exports.isValidPublic = function (publicKey, sanitize) {
if (publicKey.length === 64) {
// Convert to SEC1 for secp256k1
return secp256k1.publicKeyVerify(Buffer.concat([ Buffer.from([4]), publicKey ]))
}
if (!sanitize) {
return false
}
return secp256k1.publicKeyVerify(publicKey)
}
/**
* Returns the ethereum address of a given public key.
* Accepts "Ethereum public keys" and SEC1 encoded keys.
* @param {Buffer} pubKey The two points of an uncompressed key, unless sanitize is enabled
* @param {Boolean} [sanitize=false] Accept public keys in other formats
* @return {Buffer}
*/
exports.pubToAddress = exports.publicToAddress = function (pubKey, sanitize) {
pubKey = exports.toBuffer(pubKey)
if (sanitize && (pubKey.length !== 64)) {
pubKey = secp256k1.publicKeyConvert(pubKey, false).slice(1)
}
assert(pubKey.length === 64)
// Only take the lower 160bits of the hash
return exports.keccak(pubKey).slice(-20)
}
/**
* Returns the ethereum public key of a given private key
* @param {Buffer} privateKey A private key must be 256 bits wide
* @return {Buffer}
*/
const privateToPublic = exports.privateToPublic = function (privateKey) {
privateKey = exports.toBuffer(privateKey)
// skip the type flag and use the X, Y points
return secp256k1.publicKeyCreate(privateKey, false).slice(1)
}
/**
* Converts a public key to the Ethereum format.
* @param {Buffer} publicKey
* @return {Buffer}
*/
exports.importPublic = function (publicKey) {
publicKey = exports.toBuffer(publicKey)
if (publicKey.length !== 64) {
publicKey = secp256k1.publicKeyConvert(publicKey, false).slice(1)
}
return publicKey
}
/**
* ECDSA sign
* @param {Buffer} msgHash
* @param {Buffer} privateKey
* @param {Number} [chainId]
* @return {Object}
*/
exports.ecsign = function (msgHash, privateKey, chainId) {
const sig = secp256k1.sign(msgHash, privateKey)
const ret = {}
ret.r = sig.signature.slice(0, 32)
ret.s = sig.signature.slice(32, 64)
ret.v = chainId ? sig.recovery + (chainId * 2 + 35) : sig.recovery + 27
return ret
}
/**
* Returns the keccak-256 hash of `message`, prefixed with the header used by the `eth_sign` RPC call.
* The output of this function can be fed into `ecsign` to produce the same signature as the `eth_sign`
* call for a given `message`, or fed to `ecrecover` along with a signature to recover the public key
* used to produce the signature.
* @param message
* @returns {Buffer} hash
*/
exports.hashPersonalMessage = function (message) {
const prefix = exports.toBuffer('\u0019Ethereum Signed Message:\n' + message.length.toString())
return exports.keccak(Buffer.concat([prefix, message]))
}
/**
* ECDSA public key recovery from signature
* @param {Buffer} msgHash
* @param {Number} v
* @param {Buffer} r
* @param {Buffer} s
* @param {Number} [chainId]
* @return {Buffer} publicKey
*/
exports.ecrecover = function (msgHash, v, r, s, chainId) {
const signature = Buffer.concat([exports.setLength(r, 32), exports.setLength(s, 32)], 64)
const recovery = calculateSigRecovery(v, chainId)
if (!isValidSigRecovery(recovery)) {
throw new Error('Invalid signature v value')
}
const senderPubKey = secp256k1.recover(msgHash, signature, recovery)
return secp256k1.publicKeyConvert(senderPubKey, false).slice(1)
}
/**
* Convert signature parameters into the format of `eth_sign` RPC method
* @param {Number} v
* @param {Buffer} r
* @param {Buffer} s
* @param {Number} [chainId]
* @return {String} sig
*/
exports.toRpcSig = function (v, r, s, chainId) {
let recovery = calculateSigRecovery(v, chainId)
if (!isValidSigRecovery(recovery)) {
throw new Error('Invalid signature v value')
}
// geth (and the RPC eth_sign method) uses the 65 byte format used by Bitcoin
return exports.bufferToHex(Buffer.concat([
exports.setLengthLeft(r, 32),
exports.setLengthLeft(s, 32),
exports.toBuffer(v)
]))
}
/**
* Convert signature format of the `eth_sign` RPC method to signature parameters
* NOTE: all because of a bug in geth: https://github.com/ethereum/go-ethereum/issues/2053
* @param {String} sig
* @return {Object}
*/
exports.fromRpcSig = function (sig) {
sig = exports.toBuffer(sig)
// NOTE: with potential introduction of chainId this might need to be updated
if (sig.length !== 65) {
throw new Error('Invalid signature length')
}
let v = sig[64]
// support both versions of `eth_sign` responses
if (v < 27) {
v += 27
}
return {
v: v,
r: sig.slice(0, 32),
s: sig.slice(32, 64)
}
}
/**
* Returns the ethereum address of a given private key
* @param {Buffer} privateKey A private key must be 256 bits wide
* @return {Buffer}
*/
exports.privateToAddress = function (privateKey) {
return exports.publicToAddress(privateToPublic(privateKey))
}
/**
* Checks if the address is a valid. Accepts checksummed addresses too
* @param {String} address
* @return {Boolean}
*/
exports.isValidAddress = function (address) {
return /^0x[0-9a-fA-F]{40}$/.test(address)
}
/**
* Checks if a given address is a zero address
* @method isZeroAddress
* @param {String} address
* @return {Boolean}
*/
exports.isZeroAddress = function (address) {
const zeroAddress = exports.zeroAddress()
return zeroAddress === exports.addHexPrefix(address)
}
/**
* Returns a checksummed address
* @param {String} address
* @return {String}
*/
exports.toChecksumAddress = function (address) {
address = exports.stripHexPrefix(address).toLowerCase()
const hash = exports.keccak(address).toString('hex')
let ret = '0x'
for (let i = 0; i < address.length; i++) {
if (parseInt(hash[i], 16) >= 8) {
ret += address[i].toUpperCase()
} else {
ret += address[i]
}
}
return ret
}
/**
* Checks if the address is a valid checksummed address
* @param {Buffer} address
* @return {Boolean}
*/
exports.isValidChecksumAddress = function (address) {
return exports.isValidAddress(address) && (exports.toChecksumAddress(address) === address)
}
/**
* Generates an address of a newly created contract
* @param {Buffer} from the address which is creating this new address
* @param {Buffer} nonce the nonce of the from account
* @return {Buffer}
*/
exports.generateAddress = function (from, nonce) {
from = exports.toBuffer(from)
nonce = new BN(nonce)
if (nonce.isZero()) {
// in RLP we want to encode null in the case of zero nonce
// read the RLP documentation for an answer if you dare
nonce = null
} else {
nonce = Buffer.from(nonce.toArray())
}
// Only take the lower 160bits of the hash
return exports.rlphash([from, nonce]).slice(-20)
}
/**
* Generates an address for a contract created using CREATE2
* @param {Buffer} from the address which is creating this new address
* @param {Buffer} salt a salt
* @param {Buffer} initCode the init code of the contract being created
* @return {Buffer}
*/
exports.generateAddress2 = function (from, salt, initCode) {
from = exports.toBuffer(from)
salt = exports.toBuffer(salt)
initCode = exports.toBuffer(initCode)
assert(from.length === 20)
assert(salt.length === 32)
let address = exports.keccak256(Buffer.concat([
Buffer.from('ff', 'hex'),
from,
salt,
exports.keccak256(initCode)
]))
return address.slice(-20)
}
/**
* Returns true if the supplied address belongs to a precompiled account (Byzantium)
* @param {Buffer|String} address
* @return {Boolean}
*/
exports.isPrecompiled = function (address) {
const a = exports.unpad(address)
return a.length === 1 && a[0] >= 1 && a[0] <= 8
}
/**
* Adds "0x" to a given `String` if it does not already start with "0x"
* @param {String} str
* @return {String}
*/
exports.addHexPrefix = function (str) {
if (typeof str !== 'string') {
return str
}
return exports.isHexPrefixed(str) ? str : '0x' + str
}
/**
* Validate ECDSA signature
* @method isValidSignature
* @param {Buffer} v
* @param {Buffer} r
* @param {Buffer} s
* @param {Boolean} [homestead=true]
* @param {Number} [chainId]
* @return {Boolean}
*/
exports.isValidSignature = function (v, r, s, homestead, chainId) {
const SECP256K1_N_DIV_2 = new BN('7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a0', 16)
const SECP256K1_N = new BN('fffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141', 16)
if (r.length !== 32 || s.length !== 32) {
return false
}
if (!isValidSigRecovery(calculateSigRecovery(v, chainId))) {
return false
}
r = new BN(r)
s = new BN(s)
if (r.isZero() || r.gt(SECP256K1_N) || s.isZero() || s.gt(SECP256K1_N)) {
return false
}
if ((homestead === false) && (new BN(s).cmp(SECP256K1_N_DIV_2) === 1)) {
return false
}
return true
}
/**
* Converts a `Buffer` or `Array` to JSON
* @param {Buffer|Array} ba
* @return {Array|String|null}
*/
exports.baToJSON = function (ba) {
if (Buffer.isBuffer(ba)) {
return '0x' + ba.toString('hex')
} else if (ba instanceof Array) {
const array = []
for (let i = 0; i < ba.length; i++) {
array.push(exports.baToJSON(ba[i]))
}
return array
}
}
/**
* Defines properties on a `Object`. It make the assumption that underlying data is binary.
* @param {Object} self the `Object` to define properties on
* @param {Array} fields an array fields to define. Fields can contain:
* * `name` - the name of the properties
* * `length` - the number of bytes the field can have
* * `allowLess` - if the field can be less than the length
* * `allowEmpty`
* @param {*} data data to be validated against the definitions
*/
exports.defineProperties = function (self, fields, data) {
self.raw = []
self._fields = []
// attach the `toJSON`
self.toJSON = function (label) {
if (label) {
const obj = {}
self._fields.forEach((field) => {
obj[field] = '0x' + self[field].toString('hex')
})
return obj
}
return exports.baToJSON(this.raw)
}
self.serialize = function serialize () {
return rlp.encode(self.raw)
}
fields.forEach((field, i) => {
self._fields.push(field.name)
function getter () {
return self.raw[i]
}
function setter (v) {
v = exports.toBuffer(v)
if (v.toString('hex') === '00' && !field.allowZero) {
v = Buffer.allocUnsafe(0)
}
if (field.allowLess && field.length) {
v = exports.stripZeros(v)
assert(field.length >= v.length, 'The field ' + field.name + ' must not have more ' + field.length + ' bytes')
} else if (!(field.allowZero && v.length === 0) && field.length) {
assert(field.length === v.length, 'The field ' + field.name + ' must have byte length of ' + field.length)
}
self.raw[i] = v
}
Object.defineProperty(self, field.name, {
enumerable: true,
configurable: true,
get: getter,
set: setter
})
if (field.default) {
self[field.name] = field.default
}
// attach alias
if (field.alias) {
Object.defineProperty(self, field.alias, {
enumerable: false,
configurable: true,
set: setter,
get: getter
})
}
})
// if the constuctor is passed data
if (data) {
if (typeof data === 'string') {
data = Buffer.from(exports.stripHexPrefix(data), 'hex')
}
if (Buffer.isBuffer(data)) {
data = rlp.decode(data)
}
if (Array.isArray(data)) {
if (data.length > self._fields.length) {
throw (new Error('wrong number of fields in data'))
}
// make sure all the items are buffers
data.forEach((d, i) => {
self[self._fields[i]] = exports.toBuffer(d)
})
} else if (typeof data === 'object') {
const keys = Object.keys(data)
fields.forEach((field) => {
if (keys.indexOf(field.name) !== -1) self[field.name] = data[field.name]
if (keys.indexOf(field.alias) !== -1) self[field.alias] = data[field.alias]
})
} else {
throw new Error('invalid data')
}
}
}
function calculateSigRecovery (v, chainId) {
return chainId ? v - (2 * chainId + 35) : v - 27
}
function isValidSigRecovery (recovery) {
return recovery === 0 || recovery === 1
}

View File

@@ -0,0 +1,125 @@
{
"name": "ethereumjs-util",
"version": "6.0.0",
"description": "a collection of utility functions for Ethereum",
"main": "dist/index.js",
"files": [
"dist"
],
"scripts": {
"build": "browserify index.js -s ethUtil -o /tmp/ethereumjs-util.js",
"coverage": "npm run build:dist && istanbul cover _mocha",
"coveralls": "npm run coverage && coveralls <coverage/lcov.info",
"lint": "standard",
"prepublishOnly": "npm run test && npm run build:dist",
"test": "npm run lint && npm run test:node && npm run test:browser",
"test:browser": "npm run build:dist && karma start karma.conf.js",
"test:node": "npm run build:dist && istanbul test mocha -- --reporter spec",
"build:dist": "babel index.js --source-root ./ -d ./dist",
"build:docs": "documentation build ./index.js --github --sort-order='alpha' -f md > ./docs/index.md"
},
"repository": {
"type": "git",
"url": "https://github.com/ethereumjs/ethereumjs-util.git"
},
"keywords": [
"ethereum",
"utilties"
],
"author": "mjbecze <mjbecze@gmail.com>",
"contributors": [
{
"name": "Tim Coulter",
"email": "tim@timothyjcoulter.com",
"url": "https://github.com/tcoulter",
"contributions": 1,
"additions": 2,
"deletions": 2
},
{
"name": "Nick Dodson",
"url": "https://github.com/SilentCicero",
"contributions": 2,
"additions": 26,
"deletions": 2
},
{
"name": "Mr. Chico",
"url": "https://github.com/MrChico",
"contributions": 1,
"additions": 11,
"deletions": 1
},
{
"name": "Dũng Trần",
"email": "tad88.dev@gmail.com",
"url": "https://github.com/tad88dev",
"contributions": 2,
"additions": 5,
"deletions": 5
},
{
"name": "Alex Beregszaszi",
"email": "alex@rtfs.hu",
"url": "https://github.com/axic",
"contributions": 77,
"additions": 1796,
"deletions": 642
},
{
"name": "Taylor Gerring",
"url": "https://github.com/tgerring",
"contributions": 1,
"additions": 1,
"deletions": 1
},
{
"name": "Kirill Fomichev",
"email": "fanatid@ya.ru",
"url": "https://github.com/fanatid",
"contributions": 8,
"additions": 32,
"deletions": 16
},
{
"name": "kumavis",
"email": "aaron@kumavis.me",
"url": "https://github.com/kumavis",
"contributions": 2,
"additions": 2,
"deletions": 2
},
{
"name": "Alexander Sinyagin",
"email": "sinyagin.alexander@gmail.com",
"url": "https://github.com/asinyagin",
"contributions": 1,
"additions": 3,
"deletions": 1
}
],
"license": "MPL-2.0",
"bugs": {
"url": "https://github.com/ethereumjs/ethereumjs-util/issues"
},
"homepage": "https://github.com/ethereumjs/ethereumjs-util",
"dependencies": {
"bn.js": "^4.11.0",
"create-hash": "^1.1.2",
"ethjs-util": "^0.1.6",
"keccak": "^1.0.2",
"rlp": "^2.0.0",
"safe-buffer": "^5.1.1",
"secp256k1": "^3.0.1"
},
"devDependencies": {},
"standard": {
"globals": [
"describe",
"it"
],
"ignore": [
"dist/**"
]
}
}

View File

@@ -0,0 +1,4 @@
Build (will create a bundle and copy it to /tmp/ethereumjs-util.js):
npm install
npm run build

View File

@@ -0,0 +1,15 @@
const NanoBase = require('nanocurrency-web');
window.nanoUtil = {
getKeypair: function (index, seed) {
const accounts = NanoBase.wallet.accounts(seed, index, index)
return {privKey: accounts[0].privateKey, pubKey: accounts[0].publicKey, address: accounts[0].address};
},
dummyNetwork: {
bip32: {public: 0, private: 0},
messagePrefix: '',
pubKeyHash: 0,
scriptHash: 0,
wif: 0,
},
}

1614
libs/nanocurrency-web/package-lock.json generated Executable file

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,14 @@
{
"name": "nano-util",
"version": "0.0.1",
"scripts": {
"build": "browserify nano-util.js > /tmp/nano-util.js"
},
"dependencies": {
"nanocurrency-web": "^1.2.2"
},
"devDependencies": {
"browserify": "^16.2.3",
"uglify-es": "^3.3.9"
}
}

View File

@@ -0,0 +1,4 @@
Build (will create a bundle and copy it to /tmp/nano-util.js):
npm install
npm run build

1389
libs/stellar-util/package-lock.json generated Normal file

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,15 @@
{
"name": "stellar-util",
"version": "0.0.1",
"scripts": {
"build": "browserify stellar-util.js > /tmp/stellar-util.js"
},
"dependencies": {
"ed25519-hd-key": "^1.0.0",
"stellar-base": "^0.10.0"
},
"devDependencies": {
"browserify": "^16.2.3",
"uglify-es": "^3.3.9"
}
}

View File

@@ -0,0 +1,4 @@
Build (will create a bundle and copy it to /tmp/stellar-util.js):
npm install
npm run build

View File

@@ -0,0 +1,16 @@
const StellarBase = require('stellar-base');
const edHd = require('ed25519-hd-key');
window.stellarUtil = {
getKeypair: function (path, seed) {
const result = edHd.derivePath(path, seed);
return StellarBase.Keypair.fromRawEd25519Seed(result.key);
},
dummyNetwork: {
bip32: {public: 0, private: 0},
messagePrefix: '',
pubKeyHash: 0,
scriptHash: 0,
wif: 0,
},
}

View File

@@ -4,11 +4,12 @@ A tool for converting BIP39 mnemonic phrases to addresses and private keys.
## Online Version
https://iancoleman.github.io/bip39/
https://iancoleman.io/bip39/
## Standalone offline version
Download `bip39-standalone.html`
Download `bip39-standalone.html` from
[the releases](https://github.com/iancoleman/bip39/releases).
Open the file in a browser by double clicking it.
@@ -55,16 +56,35 @@ at 1PC9aZC4hNX2rmmrt7uHTfYAS3hRbph4UN
Please do not make modifications to `bip39-standalone.html`, since they will
be overwritten by `compile.py`.
Make changes in `src/*` and apply them using the command `python compile.py`
Make changes in `src/*`.
Changes are applied during release using the command `python compile.py`, so
please do not commit changes to `bip39-standalone.html`
# Tests
Tests depend on [phantomjs](http://phantomjs.org/).
Tests depend on
* nodejs
* selenium webdriver - cd /path/to/bip39/tests; npm install
* selenium driver for firefox ([geckodriver](https://github.com/mozilla/geckodriver/releases)) and / or chrome ([chromedriver](https://sites.google.com/a/chromium.org/chromedriver/downloads))
* jasmine - npm install --global jasmine
Before running tests, the site must be served at http://localhost:8000.
```
$ cd /path/to/bip39/src
$ python -m http.server
or for python2
$ python -m SimpleHTTPServer
```
Run tests from the command-line
```
$ phantomjs tests.js
$ cd /path/to/bip39/tests
$ jasmine spec/tests.js
```
# License

23
release_process.md Normal file
View File

@@ -0,0 +1,23 @@
Once all code changes for this version have been committed, a release can be
created with the following steps:
1. Run tests and ensure all tests pass
1. Set the version in index.html
1. Update changelog
1. Run `python compile.py`
1. Commit these changes with message `Release vX.Y.Z`
1. Tag the commit `git tag X.Y.Z`
1. Get the hash of the file `sha256sum bip39-standalone.html`
1. Create the text for the release notes (see prior releases)
1. Sign the release notes `gpg --clearsign /tmp/signature.txt`
1. Push the changes `git push`
1. Push the new tag `git push --tags`
1. Create a release on github from the tagged commit
1. include the signed release notes as text for the release
1. include the changelog for this release as text for the release
1. attach signature.txt.asc
1. attach the bip39-standalone.html file
1. Download the file from the release and confirm it hashes to the expected value `sha256sum bip39-standalone.html`
1. Download the signature from the release and verify it. `gpg --verify signature.txt.asc`
1. Publish to any hosted locations (eg iancoleman.github.io/bip39)
1. Add a new post to twitter from @bip39tool with the version, link and hash

111
src/css/app.css Normal file
View File

@@ -0,0 +1,111 @@
body {
padding-bottom: 32px;
}
.form-control[readonly] {
cursor: text;
}
.feedback-container {
position: fixed;
top: 0;
width: 100%;
text-align: center;
z-index: 4;
}
.feedback {
display: table;
padding: 0.5em 1em;
background-color: orange;
margin: 0 auto;
font-size: 2em;
color: #444;
border: 2px solid #555;
border-top: 0;
border-bottom-left-radius: 20px 20px;
border-bottom-right-radius: 20px 20px;
}
.no-border {
border: 0;
box-shadow: inset 0 1px 1px rgba(0,0,0,.0);
-webkit-box-shadow: inset 0 1px 1px rgba(0,0,0,.0);
}
.phrase {
word-break: keep-all;
}
.generate-container .strength {
/* override mobile width from bootstrap */
width: auto!important;
display: inline-block;
}
.languages a {
padding-left: 10px;
}
.languages a:nth-of-type(1) {
margin-left: -12px;
padding-left: 0;
}
.monospace {
font-family: monospace;
}
.entropy-container .filtered,
.entropy-container .binary {
word-wrap: break-word;
}
.entropy-container li {
padding-bottom: 5px;
}
.card-suit {
font-size: 19px;
line-height: 0;
}
.card-suit.club {
color: #009F00;
}
.card-suit.diamond {
color: #3D5DC4;
}
.card-suit.heart {
color: #F00;
}
.card-suit.spade {
color: #000;
}
.qr-container {
position: fixed;
top: 0;
right: 0;
text-align: center;
background-color: #FFF;
border: 1px solid #CCC;
}
.qr-image {
margin: 5px;
}
.qr-hint,
.qr-warning {
padding: 2px;
max-width: 320px;
}
.more-info {
cursor: help;
border-bottom: 1px dashed #000;
text-decoration: none;
}
.version {
position: absolute;
top: 5px;
right: 5px;
}
.csv {
margin-top: 20px;
margin-bottom: 20px;
white-space: pre;
overflow-wrap: normal;
overflow-x: scroll;
font-family: monospace;
}
.visual-privacy .private-data {
display: none;
}
.text-weight-normal {
font-weight: normal !important;
}

6834
src/css/bootstrap.css vendored Normal file

File diff suppressed because it is too large Load Diff

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

1
src/js/bip39-libs.js Executable file

File diff suppressed because one or more lines are too long

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

2580
src/js/bootstrap.js vendored Normal file

File diff suppressed because it is too large Load Diff

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1,9 @@
function convertCasinoCoinAdrr(address) {
return libs.basex('cpshnaf39wBUDNEGHJKLM4PQRST7VWXYZ2brdeCg65jkm8oFqi1tuvAxyz').encode(
libs.basex('123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz').decode(address)
)
}
function convertCasinoCoinPriv(priv) {
return libs.basex('123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz').decode(priv).toString("hex").slice(2,66)
}

13
src/js/cosmos-util.js Normal file
View File

@@ -0,0 +1,13 @@
function CosmosBufferToPublic(pubBuf) {
const Buffer = libs.buffer.Buffer;
const AminoSecp256k1PubkeyPrefix = Buffer.from("EB5AE987", "hex");
const AminoSecp256k1PubkeyLength = Buffer.from("21", "hex");
pubBuf = Buffer.concat([AminoSecp256k1PubkeyPrefix, AminoSecp256k1PubkeyLength, pubBuf]);
return libs.bech32.encode("cosmospub", libs.bech32.toWords(pubBuf));
}
function CosmosBufferToAddress(pubBuf) {
const sha256_ed = libs.createHash("sha256").update(pubBuf).digest();
const ripemd160_ed = libs.createHash("rmd160").update(sha256_ed).digest();
return libs.bech32.encode("cosmos", libs.bech32.toWords(ripemd160_ed));
}

View File

@@ -16,7 +16,136 @@
window.Entropy = new (function() {
var TWO = new BigInteger(2);
let eventBits = {
"binary": {
"0": "0",
"1": "1",
},
// log2(6) = 2.58496 bits per roll, with bias
// 4 rolls give 2 bits each
// 2 rolls give 1 bit each
// Average (4*2 + 2*1) / 6 = 1.66 bits per roll without bias
"base 6": {
"0": "00",
"1": "01",
"2": "10",
"3": "11",
"4": "0",
"5": "1",
},
// log2(6) = 2.58496 bits per roll, with bias
// 4 rolls give 2 bits each
// 2 rolls give 1 bit each
// Average (4*2 + 2*1) / 6 = 1.66 bits per roll without bias
"base 6 (dice)": {
"0": "00", // equivalent to 0 in base 6
"1": "01",
"2": "10",
"3": "11",
"4": "0",
"5": "1",
},
// log2(10) = 3.321928 bits per digit, with bias
// 8 digits give 3 bits each
// 2 digits give 1 bit each
// Average (8*3 + 2*1) / 10 = 2.6 bits per digit without bias
"base 10": {
"0": "000",
"1": "001",
"2": "010",
"3": "011",
"4": "100",
"5": "101",
"6": "110",
"7": "111",
"8": "0",
"9": "1",
},
"hexadecimal": {
"0": "0000",
"1": "0001",
"2": "0010",
"3": "0011",
"4": "0100",
"5": "0101",
"6": "0110",
"7": "0111",
"8": "1000",
"9": "1001",
"a": "1010",
"b": "1011",
"c": "1100",
"d": "1101",
"e": "1110",
"f": "1111",
},
// log2(52) = 5.7004 bits per card, with bias
// 32 cards give 5 bits each
// 16 cards give 4 bits each
// 4 cards give 2 bits each
// Average (32*5 + 16*4 + 4*2) / 52 = 4.46 bits per card without bias
"card": {
"ac": "00000",
"2c": "00001",
"3c": "00010",
"4c": "00011",
"5c": "00100",
"6c": "00101",
"7c": "00110",
"8c": "00111",
"9c": "01000",
"tc": "01001",
"jc": "01010",
"qc": "01011",
"kc": "01100",
"ad": "01101",
"2d": "01110",
"3d": "01111",
"4d": "10000",
"5d": "10001",
"6d": "10010",
"7d": "10011",
"8d": "10100",
"9d": "10101",
"td": "10110",
"jd": "10111",
"qd": "11000",
"kd": "11001",
"ah": "11010",
"2h": "11011",
"3h": "11100",
"4h": "11101",
"5h": "11110",
"6h": "11111",
"7h": "0000",
"8h": "0001",
"9h": "0010",
"th": "0011",
"jh": "0100",
"qh": "0101",
"kh": "0110",
"as": "0111",
"2s": "1000",
"3s": "1001",
"4s": "1010",
"5s": "1011",
"6s": "1100",
"7s": "1101",
"8s": "1110",
"9s": "1111",
"ts": "00",
"js": "01",
"qs": "10",
"ks": "11",
},
}
// matchers returns an array of the matched events for each type of entropy.
// eg
@@ -51,48 +180,28 @@ window.Entropy = new (function() {
}
}
// Convert array of cards from ["ac", "4d", "ks"]
// to numbers between 0 and 51 [0, 16, 51]
function convertCardsToInts(cards) {
var ints = [];
var values = "a23456789tjqk";
var suits = "cdhs";
for (var i=0; i<cards.length; i++) {
var card = cards[i].toLowerCase();
var value = card[0];
var suit = card[1];
var asInt = 13 * suits.indexOf(suit) + values.indexOf(value);
ints.push(asInt);
}
return ints;
}
this.fromString = function(rawEntropyStr) {
this.fromString = function(rawEntropyStr, baseStr) {
// Find type of entropy being used (binary, hex, dice etc)
var base = getBase(rawEntropyStr);
var base = getBase(rawEntropyStr, baseStr);
// Convert dice to base6 entropy (ie 1-6 to 0-5)
// This is done by changing all 6s to 0s
if (base.str == "dice") {
var newParts = [];
var newInts = [];
for (var i=0; i<base.parts.length; i++) {
var c = base.parts[i];
var newEvents = [];
for (var i=0; i<base.events.length; i++) {
var c = base.events[i];
if ("12345".indexOf(c) > -1) {
newParts[i] = base.parts[i];
newInts[i] = base.ints[i];
newEvents[i] = base.events[i];
}
else {
newParts[i] = "0";
newInts[i] = 0;
newEvents[i] = "0";
}
}
base.str = "base 6 (dice)";
base.ints = newInts;
base.parts = newParts;
base.events = newEvents;
base.matcher = matchers.base6;
}
// Detect empty entropy
if (base.parts.length == 0) {
if (base.events.length == 0) {
return {
binaryStr: "",
cleanStr: "",
@@ -100,44 +209,23 @@ window.Entropy = new (function() {
base: base,
};
}
// Convert base.ints to BigInteger.
// Due to using unusual bases, eg cards of base52, this is not as simple as
// using BigInteger.parse()
var entropyInt = BigInteger.ZERO;
for (var i=base.ints.length-1; i>=0; i--) {
var thisInt = BigInteger.parse(base.ints[i]);
var power = (base.ints.length - 1) - i;
var additionalEntropy = BigInteger.parse(base.asInt).pow(power).multiply(thisInt);
entropyInt = entropyInt.add(additionalEntropy);
}
// Convert entropy to binary
var entropyBin = entropyInt.toString(2);
// If the first integer is small, it must be padded with zeros.
// Otherwise the chance of the first bit being 1 is 100%, which is
// obviously incorrect.
// This is not perfect for non-2^n bases.
var expectedBits = Math.floor(base.parts.length * Math.log2(base.asInt));
while (entropyBin.length < expectedBits) {
entropyBin = "0" + entropyBin;
}
// Calculate the number of bits per event
var bitsPerEvent = Math.log2(base.asInt);
// Cards binary must be handled differently, since they're not replaced
if (base.asInt == 52) {
var cardEntropy = processCardEntropy(base.parts);
entropyBin = cardEntropy.binaryStr;
bitsPerEvent = cardEntropy.bitsPerEvent;
}
// Convert entropy events to binary
var entropyBin = base.events.map(function(e) {
return eventBits[base.str][e.toLowerCase()];
}).join("");
// Get average bits per event
// which may be adjusted for bias if log2(base) is fractional
var bitsPerEvent = base.bitsPerEvent;
// Supply a 'filtered' entropy string for display purposes
var entropyClean = base.parts.join("");
var entropyHtml = base.parts.join("");
var entropyClean = base.events.join("");
var entropyHtml = base.events.join("");
if (base.asInt == 52) {
entropyClean = base.parts.join(" ").toUpperCase();
entropyClean = base.events.join(" ").toUpperCase();
entropyClean = entropyClean.replace(/C/g, "\u2663");
entropyClean = entropyClean.replace(/D/g, "\u2666");
entropyClean = entropyClean.replace(/H/g, "\u2665");
entropyClean = entropyClean.replace(/S/g, "\u2660");
entropyHtml = base.parts.join(" ").toUpperCase();
entropyHtml = base.events.join(" ").toUpperCase();
entropyHtml = entropyHtml.replace(/C/g, "<span class='card-suit club'>\u2663</span>");
entropyHtml = entropyHtml.replace(/D/g, "<span class='card-suit diamond'>\u2666</span>");
entropyHtml = entropyHtml.replace(/H/g, "<span class='card-suit heart'>\u2665</span>");
@@ -154,192 +242,80 @@ window.Entropy = new (function() {
return e;
}
function getSortedDeck() {
var s = [];
var suits = "CDHS";
var values = "A23456789TJQK";
for (var i=0; i<suits.length; i++) {
for (var j=0; j<values.length; j++) {
s.push(values[j]+suits[i]);
}
}
return s;
}
function getBase(str) {
function getBase(str, baseStr) {
// Need to get the lowest base for the supplied entropy.
// This prevents interpreting, say, dice rolls as hexadecimal.
var binaryMatches = matchers.binary(str);
var hexMatches = matchers.hex(str);
var autodetect = baseStr === undefined;
// Find the lowest base that can be used, whilst ignoring any irrelevant chars
if (binaryMatches.length == hexMatches.length && hexMatches.length > 0) {
if ((binaryMatches.length == hexMatches.length && hexMatches.length > 0 && autodetect) || baseStr === "binary") {
var ints = binaryMatches.map(function(i) { return parseInt(i, 2) });
return {
ints: ints,
parts: binaryMatches,
events: binaryMatches,
matcher: matchers.binary,
asInt: 2,
bitsPerEvent: 1,
str: "binary",
}
}
var cardMatches = matchers.card(str);
if (cardMatches.length >= hexMatches.length / 2) {
var ints = convertCardsToInts(cardMatches);
if ((cardMatches.length >= hexMatches.length / 2 && autodetect) || baseStr === "card") {
return {
ints: ints,
parts: cardMatches,
events: cardMatches,
matcher: matchers.card,
asInt: 52,
bitsPerEvent: (32*5 + 16*4 + 4*2) / 52, // see cardBits
str: "card",
}
}
var diceMatches = matchers.dice(str);
if (diceMatches.length == hexMatches.length && hexMatches.length > 0) {
if ((diceMatches.length == hexMatches.length && hexMatches.length > 0 && autodetect) || baseStr === "dice") {
var ints = diceMatches.map(function(i) { return parseInt(i) });
return {
ints: ints,
parts: diceMatches,
events: diceMatches,
matcher: matchers.dice,
asInt: 6,
bitsPerEvent: (4*2 + 2*1) / 6, // see diceBits
str: "dice",
}
}
var base6Matches = matchers.base6(str);
if (base6Matches.length == hexMatches.length && hexMatches.length > 0) {
if ((base6Matches.length == hexMatches.length && hexMatches.length > 0 && autodetect) || baseStr === "base 6") {
var ints = base6Matches.map(function(i) { return parseInt(i) });
return {
ints: ints,
parts: base6Matches,
events: base6Matches,
matcher: matchers.base6,
asInt: 6,
bitsPerEvent: (4*2 + 2*1) / 6, // see diceBits
str: "base 6",
}
}
var base10Matches = matchers.base10(str);
if (base10Matches.length == hexMatches.length && hexMatches.length > 0) {
if ((base10Matches.length == hexMatches.length && hexMatches.length > 0 && autodetect) || baseStr === "base 10") {
var ints = base10Matches.map(function(i) { return parseInt(i) });
return {
ints: ints,
parts: base10Matches,
events: base10Matches,
matcher: matchers.base10,
asInt: 10,
bitsPerEvent: (8*3 + 2*1) / 10, // see b10Bits
str: "base 10",
}
}
var ints = hexMatches.map(function(i) { return parseInt(i, 16) });
return {
ints: ints,
parts: hexMatches,
events: hexMatches,
matcher: matchers.hex,
asInt: 16,
bitsPerEvent: 4,
str: "hexadecimal",
}
}
// Assume cards are NOT replaced.
// Additional entropy decreases as more cards are used. This means
// total possible entropy is measured using n!, not base^n.
// eg the second last card can be only one of two, not one of fifty two
// so the added entropy for that card is only one bit at most
function processCardEntropy(cards) {
// Track how many instances of each card have been used, and thus
// how many decks are in use.
var cardCounts = {};
var numberOfDecks = 0;
// Work out number of decks by max(duplicates)
for (var i=0; i<cards.length; i++) {
// Get the card that was drawn
var cardLower = cards[i];
var card = cardLower.toUpperCase();
// Initialize the count for this card if needed
if (!(card in cardCounts)) {
cardCounts[card] = 0;
}
cardCounts[card] += 1;
// See if this is max(duplicates)
if (cardCounts[card] > numberOfDecks) {
numberOfDecks = cardCounts[card];
}
}
// Work out the total number of bits for this many decks
// See http://crypto.stackexchange.com/q/41886
var gainedBits = 0;
// Equivalent of Math.log2(factorial(52*numberOfDecks))
// which becomes infinity for numberOfDecks > 4
for (var i=1; i<=52*numberOfDecks; i++) {
gainedBits = gainedBits + Math.log2(i);
}
var lostBits = 52 * Math.log2(factorial(numberOfDecks));
var maxBits = gainedBits - lostBits;
// Convert the drawn cards to a binary representation.
// The exact technique for doing this is unclear.
// See
// http://crypto.stackexchange.com/a/41896
// "I even doubt that this is well defined (only the average entropy
// is, I believe)."
// See
// https://github.com/iancoleman/bip39/issues/33#issuecomment-263021856
// "The binary representation can be the first log(permutations,2) bits
// of the sha-2 hash of the normalized deck string."
//
// In this specific implementation, the first N bits of the hash of the
// normalized cards string is being used. Uppercase, no spaces; eg
// sha256("AH8DQSTC2H")
var totalCards = numberOfDecks * 52;
var percentUsed = cards.length / totalCards;
// Calculate the average number of bits of entropy for the number of
// cards drawn.
var numberOfBits = Math.floor(maxBits * percentUsed);
// Create a normalized string of the selected cards
var normalizedCards = cards.join("").toUpperCase();
// Convert to binary using the SHA256 hash of the normalized cards.
// If the number of bits is more than 256, multiple hashes
// are used until the required number of bits is reached.
var entropyBin = "";
var iterations = 0;
while (entropyBin.length < numberOfBits) {
var hashedCards = sjcl.hash.sha256.hash(normalizedCards + ":" + iterations);
var hashHex = sjcl.codec.hex.fromBits(hashedCards);
for (var i=0; i<hashHex.length; i++) {
var decimal = parseInt(hashHex[i], 16);
var binary = decimal.toString(2);
while (binary.length < 4) {
binary = "0" + binary;
}
entropyBin = entropyBin + binary;
}
iterations = iterations + 1;
}
// Truncate to the appropriate number of bits.
entropyBin = entropyBin.substring(0, numberOfBits);
// Get the number of bits per event
bitsPerEvent = maxBits / totalCards;
return {
binaryStr: entropyBin,
bitsPerEvent: bitsPerEvent,
}
}
// Polyfill for Math.log2
// See https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math/log2#Polyfill
Math.log2 = Math.log2 || function(x) {
// The polyfill isn't good enough because of the poor accuracy of
// Math.LOG2E
// log2(8) gave 2.9999999999999996 which when floored causes issues.
// So instead use the BigInteger library to get it right.
return BigInteger.log(x) / BigInteger.log(2);
};
// Depends on BigInteger
function factorial(n) {
if (n == 0) {
return 1;
}
f = BigInteger.ONE;
for (var i=1; i<=n; i++) {
f = f.multiply(new BigInteger(i));
}
return f;
}
})();

17
src/js/eos-util.js Normal file
View File

@@ -0,0 +1,17 @@
function EOSbufferToPublic(pubBuf) {
const Buffer = libs.buffer.Buffer;
const EOS_PUBLIC_PREFIX = "EOS";
let checksum = libs.createHash("rmd160").update(pubBuf).digest("hex").slice(0, 8);
pubBuf = Buffer.concat([pubBuf, Buffer.from(checksum, "hex")]);
return EOS_PUBLIC_PREFIX.concat(libs.bs58.encode(pubBuf));
}
function EOSbufferToPrivate(privBuf) {
const Buffer = libs.buffer.Buffer;
const EOS_PRIVATE_PREFIX = "80";
privBuf = Buffer.concat([Buffer.from(EOS_PRIVATE_PREFIX, "hex"), privBuf]);
let tmp = libs.createHash("sha256").update(privBuf).digest();
let checksum = libs.createHash("sha256").update(tmp).digest("hex").slice(0, 8);
privBuf = Buffer.concat([privBuf, Buffer.from(checksum, "hex")]);
return libs.bs58.encode(privBuf);
}

File diff suppressed because it is too large Load Diff

19
src/js/fio-util.js Normal file
View File

@@ -0,0 +1,19 @@
function FIObufferToPublic(pubBuf) {
const Buffer = libs.buffer.Buffer;
const FIO_PUBLIC_PREFIX = "FIO";
let checksum = libs.createHash("rmd160").update(pubBuf).digest("hex").slice(0, 8);
pubBuf = Buffer.concat([pubBuf, Buffer.from(checksum, "hex")]);
return FIO_PUBLIC_PREFIX.concat(libs.bs58.encode(pubBuf));
}
function FIObufferToPrivate(privBuf) {
const Buffer = libs.buffer.Buffer;
const FIO_PRIVATE_PREFIX = "80";
privBuf = Buffer.concat([Buffer.from(FIO_PRIVATE_PREFIX, "hex"), privBuf]);
let tmp = libs.createHash("sha256").update(privBuf).digest();
let checksum = libs.createHash("sha256").update(tmp).digest("hex").slice(0, 8);
privBuf = Buffer.concat([privBuf, Buffer.from(checksum, "hex")]);
return libs.bs58.encode(privBuf);
}

File diff suppressed because it is too large Load Diff

10
src/js/jingtum-util.js Normal file
View File

@@ -0,0 +1,10 @@
function convertJingtumAdrr(address) {
return libs.basex('jpshnaf39wBUDNEGHJKLM4PQRST7VWXYZ2bcdeCg65rkm8oFqi1tuvAxyz').encode(
libs.basex('123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz').decode(address)
)
}
function convertJingtumPriv(priv) {
return libs.basex('123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz').decode(priv).toString("hex").slice(2,66)
}

10253
src/js/jquery-3.2.1.js vendored Normal file

File diff suppressed because it is too large Load Diff

File diff suppressed because one or more lines are too long

View File

@@ -1,28 +0,0 @@
(function(r){r.fn.qrcode=function(h){var s;function u(a){this.mode=s;this.data=a}function o(a,c){this.typeNumber=a;this.errorCorrectLevel=c;this.modules=null;this.moduleCount=0;this.dataCache=null;this.dataList=[]}function q(a,c){if(void 0==a.length)throw Error(a.length+"/"+c);for(var d=0;d<a.length&&0==a[d];)d++;this.num=Array(a.length-d+c);for(var b=0;b<a.length-d;b++)this.num[b]=a[b+d]}function p(a,c){this.totalCount=a;this.dataCount=c}function t(){this.buffer=[];this.length=0}u.prototype={getLength:function(){return this.data.length},
write:function(a){for(var c=0;c<this.data.length;c++)a.put(this.data.charCodeAt(c),8)}};o.prototype={addData:function(a){this.dataList.push(new u(a));this.dataCache=null},isDark:function(a,c){if(0>a||this.moduleCount<=a||0>c||this.moduleCount<=c)throw Error(a+","+c);return this.modules[a][c]},getModuleCount:function(){return this.moduleCount},make:function(){if(1>this.typeNumber){for(var a=1,a=1;40>a;a++){for(var c=p.getRSBlocks(a,this.errorCorrectLevel),d=new t,b=0,e=0;e<c.length;e++)b+=c[e].dataCount;
for(e=0;e<this.dataList.length;e++)c=this.dataList[e],d.put(c.mode,4),d.put(c.getLength(),j.getLengthInBits(c.mode,a)),c.write(d);if(d.getLengthInBits()<=8*b)break}this.typeNumber=a}this.makeImpl(!1,this.getBestMaskPattern())},makeImpl:function(a,c){this.moduleCount=4*this.typeNumber+17;this.modules=Array(this.moduleCount);for(var d=0;d<this.moduleCount;d++){this.modules[d]=Array(this.moduleCount);for(var b=0;b<this.moduleCount;b++)this.modules[d][b]=null}this.setupPositionProbePattern(0,0);this.setupPositionProbePattern(this.moduleCount-
7,0);this.setupPositionProbePattern(0,this.moduleCount-7);this.setupPositionAdjustPattern();this.setupTimingPattern();this.setupTypeInfo(a,c);7<=this.typeNumber&&this.setupTypeNumber(a);null==this.dataCache&&(this.dataCache=o.createData(this.typeNumber,this.errorCorrectLevel,this.dataList));this.mapData(this.dataCache,c)},setupPositionProbePattern:function(a,c){for(var d=-1;7>=d;d++)if(!(-1>=a+d||this.moduleCount<=a+d))for(var b=-1;7>=b;b++)-1>=c+b||this.moduleCount<=c+b||(this.modules[a+d][c+b]=
0<=d&&6>=d&&(0==b||6==b)||0<=b&&6>=b&&(0==d||6==d)||2<=d&&4>=d&&2<=b&&4>=b?!0:!1)},getBestMaskPattern:function(){for(var a=0,c=0,d=0;8>d;d++){this.makeImpl(!0,d);var b=j.getLostPoint(this);if(0==d||a>b)a=b,c=d}return c},createMovieClip:function(a,c,d){a=a.createEmptyMovieClip(c,d);this.make();for(c=0;c<this.modules.length;c++)for(var d=1*c,b=0;b<this.modules[c].length;b++){var e=1*b;this.modules[c][b]&&(a.beginFill(0,100),a.moveTo(e,d),a.lineTo(e+1,d),a.lineTo(e+1,d+1),a.lineTo(e,d+1),a.endFill())}return a},
setupTimingPattern:function(){for(var a=8;a<this.moduleCount-8;a++)null==this.modules[a][6]&&(this.modules[a][6]=0==a%2);for(a=8;a<this.moduleCount-8;a++)null==this.modules[6][a]&&(this.modules[6][a]=0==a%2)},setupPositionAdjustPattern:function(){for(var a=j.getPatternPosition(this.typeNumber),c=0;c<a.length;c++)for(var d=0;d<a.length;d++){var b=a[c],e=a[d];if(null==this.modules[b][e])for(var f=-2;2>=f;f++)for(var i=-2;2>=i;i++)this.modules[b+f][e+i]=-2==f||2==f||-2==i||2==i||0==f&&0==i?!0:!1}},setupTypeNumber:function(a){for(var c=
j.getBCHTypeNumber(this.typeNumber),d=0;18>d;d++){var b=!a&&1==(c>>d&1);this.modules[Math.floor(d/3)][d%3+this.moduleCount-8-3]=b}for(d=0;18>d;d++)b=!a&&1==(c>>d&1),this.modules[d%3+this.moduleCount-8-3][Math.floor(d/3)]=b},setupTypeInfo:function(a,c){for(var d=j.getBCHTypeInfo(this.errorCorrectLevel<<3|c),b=0;15>b;b++){var e=!a&&1==(d>>b&1);6>b?this.modules[b][8]=e:8>b?this.modules[b+1][8]=e:this.modules[this.moduleCount-15+b][8]=e}for(b=0;15>b;b++)e=!a&&1==(d>>b&1),8>b?this.modules[8][this.moduleCount-
b-1]=e:9>b?this.modules[8][15-b-1+1]=e:this.modules[8][15-b-1]=e;this.modules[this.moduleCount-8][8]=!a},mapData:function(a,c){for(var d=-1,b=this.moduleCount-1,e=7,f=0,i=this.moduleCount-1;0<i;i-=2)for(6==i&&i--;;){for(var g=0;2>g;g++)if(null==this.modules[b][i-g]){var n=!1;f<a.length&&(n=1==(a[f]>>>e&1));j.getMask(c,b,i-g)&&(n=!n);this.modules[b][i-g]=n;e--; -1==e&&(f++,e=7)}b+=d;if(0>b||this.moduleCount<=b){b-=d;d=-d;break}}}};o.PAD0=236;o.PAD1=17;o.createData=function(a,c,d){for(var c=p.getRSBlocks(a,
c),b=new t,e=0;e<d.length;e++){var f=d[e];b.put(f.mode,4);b.put(f.getLength(),j.getLengthInBits(f.mode,a));f.write(b)}for(e=a=0;e<c.length;e++)a+=c[e].dataCount;if(b.getLengthInBits()>8*a)throw Error("code length overflow. ("+b.getLengthInBits()+">"+8*a+")");for(b.getLengthInBits()+4<=8*a&&b.put(0,4);0!=b.getLengthInBits()%8;)b.putBit(!1);for(;!(b.getLengthInBits()>=8*a);){b.put(o.PAD0,8);if(b.getLengthInBits()>=8*a)break;b.put(o.PAD1,8)}return o.createBytes(b,c)};o.createBytes=function(a,c){for(var d=
0,b=0,e=0,f=Array(c.length),i=Array(c.length),g=0;g<c.length;g++){var n=c[g].dataCount,h=c[g].totalCount-n,b=Math.max(b,n),e=Math.max(e,h);f[g]=Array(n);for(var k=0;k<f[g].length;k++)f[g][k]=255&a.buffer[k+d];d+=n;k=j.getErrorCorrectPolynomial(h);n=(new q(f[g],k.getLength()-1)).mod(k);i[g]=Array(k.getLength()-1);for(k=0;k<i[g].length;k++)h=k+n.getLength()-i[g].length,i[g][k]=0<=h?n.get(h):0}for(k=g=0;k<c.length;k++)g+=c[k].totalCount;d=Array(g);for(k=n=0;k<b;k++)for(g=0;g<c.length;g++)k<f[g].length&&
(d[n++]=f[g][k]);for(k=0;k<e;k++)for(g=0;g<c.length;g++)k<i[g].length&&(d[n++]=i[g][k]);return d};s=4;for(var j={PATTERN_POSITION_TABLE:[[],[6,18],[6,22],[6,26],[6,30],[6,34],[6,22,38],[6,24,42],[6,26,46],[6,28,50],[6,30,54],[6,32,58],[6,34,62],[6,26,46,66],[6,26,48,70],[6,26,50,74],[6,30,54,78],[6,30,56,82],[6,30,58,86],[6,34,62,90],[6,28,50,72,94],[6,26,50,74,98],[6,30,54,78,102],[6,28,54,80,106],[6,32,58,84,110],[6,30,58,86,114],[6,34,62,90,118],[6,26,50,74,98,122],[6,30,54,78,102,126],[6,26,52,
78,104,130],[6,30,56,82,108,134],[6,34,60,86,112,138],[6,30,58,86,114,142],[6,34,62,90,118,146],[6,30,54,78,102,126,150],[6,24,50,76,102,128,154],[6,28,54,80,106,132,158],[6,32,58,84,110,136,162],[6,26,54,82,110,138,166],[6,30,58,86,114,142,170]],G15:1335,G18:7973,G15_MASK:21522,getBCHTypeInfo:function(a){for(var c=a<<10;0<=j.getBCHDigit(c)-j.getBCHDigit(j.G15);)c^=j.G15<<j.getBCHDigit(c)-j.getBCHDigit(j.G15);return(a<<10|c)^j.G15_MASK},getBCHTypeNumber:function(a){for(var c=a<<12;0<=j.getBCHDigit(c)-
j.getBCHDigit(j.G18);)c^=j.G18<<j.getBCHDigit(c)-j.getBCHDigit(j.G18);return a<<12|c},getBCHDigit:function(a){for(var c=0;0!=a;)c++,a>>>=1;return c},getPatternPosition:function(a){return j.PATTERN_POSITION_TABLE[a-1]},getMask:function(a,c,d){switch(a){case 0:return 0==(c+d)%2;case 1:return 0==c%2;case 2:return 0==d%3;case 3:return 0==(c+d)%3;case 4:return 0==(Math.floor(c/2)+Math.floor(d/3))%2;case 5:return 0==c*d%2+c*d%3;case 6:return 0==(c*d%2+c*d%3)%2;case 7:return 0==(c*d%3+(c+d)%2)%2;default:throw Error("bad maskPattern:"+
a);}},getErrorCorrectPolynomial:function(a){for(var c=new q([1],0),d=0;d<a;d++)c=c.multiply(new q([1,l.gexp(d)],0));return c},getLengthInBits:function(a,c){if(1<=c&&10>c)switch(a){case 1:return 10;case 2:return 9;case s:return 8;case 8:return 8;default:throw Error("mode:"+a);}else if(27>c)switch(a){case 1:return 12;case 2:return 11;case s:return 16;case 8:return 10;default:throw Error("mode:"+a);}else if(41>c)switch(a){case 1:return 14;case 2:return 13;case s:return 16;case 8:return 12;default:throw Error("mode:"+
a);}else throw Error("type:"+c);},getLostPoint:function(a){for(var c=a.getModuleCount(),d=0,b=0;b<c;b++)for(var e=0;e<c;e++){for(var f=0,i=a.isDark(b,e),g=-1;1>=g;g++)if(!(0>b+g||c<=b+g))for(var h=-1;1>=h;h++)0>e+h||c<=e+h||0==g&&0==h||i==a.isDark(b+g,e+h)&&f++;5<f&&(d+=3+f-5)}for(b=0;b<c-1;b++)for(e=0;e<c-1;e++)if(f=0,a.isDark(b,e)&&f++,a.isDark(b+1,e)&&f++,a.isDark(b,e+1)&&f++,a.isDark(b+1,e+1)&&f++,0==f||4==f)d+=3;for(b=0;b<c;b++)for(e=0;e<c-6;e++)a.isDark(b,e)&&!a.isDark(b,e+1)&&a.isDark(b,e+
2)&&a.isDark(b,e+3)&&a.isDark(b,e+4)&&!a.isDark(b,e+5)&&a.isDark(b,e+6)&&(d+=40);for(e=0;e<c;e++)for(b=0;b<c-6;b++)a.isDark(b,e)&&!a.isDark(b+1,e)&&a.isDark(b+2,e)&&a.isDark(b+3,e)&&a.isDark(b+4,e)&&!a.isDark(b+5,e)&&a.isDark(b+6,e)&&(d+=40);for(e=f=0;e<c;e++)for(b=0;b<c;b++)a.isDark(b,e)&&f++;a=Math.abs(100*f/c/c-50)/5;return d+10*a}},l={glog:function(a){if(1>a)throw Error("glog("+a+")");return l.LOG_TABLE[a]},gexp:function(a){for(;0>a;)a+=255;for(;256<=a;)a-=255;return l.EXP_TABLE[a]},EXP_TABLE:Array(256),
LOG_TABLE:Array(256)},m=0;8>m;m++)l.EXP_TABLE[m]=1<<m;for(m=8;256>m;m++)l.EXP_TABLE[m]=l.EXP_TABLE[m-4]^l.EXP_TABLE[m-5]^l.EXP_TABLE[m-6]^l.EXP_TABLE[m-8];for(m=0;255>m;m++)l.LOG_TABLE[l.EXP_TABLE[m]]=m;q.prototype={get:function(a){return this.num[a]},getLength:function(){return this.num.length},multiply:function(a){for(var c=Array(this.getLength()+a.getLength()-1),d=0;d<this.getLength();d++)for(var b=0;b<a.getLength();b++)c[d+b]^=l.gexp(l.glog(this.get(d))+l.glog(a.get(b)));return new q(c,0)},mod:function(a){if(0>
this.getLength()-a.getLength())return this;for(var c=l.glog(this.get(0))-l.glog(a.get(0)),d=Array(this.getLength()),b=0;b<this.getLength();b++)d[b]=this.get(b);for(b=0;b<a.getLength();b++)d[b]^=l.gexp(l.glog(a.get(b))+c);return(new q(d,0)).mod(a)}};p.RS_BLOCK_TABLE=[[1,26,19],[1,26,16],[1,26,13],[1,26,9],[1,44,34],[1,44,28],[1,44,22],[1,44,16],[1,70,55],[1,70,44],[2,35,17],[2,35,13],[1,100,80],[2,50,32],[2,50,24],[4,25,9],[1,134,108],[2,67,43],[2,33,15,2,34,16],[2,33,11,2,34,12],[2,86,68],[4,43,27],
[4,43,19],[4,43,15],[2,98,78],[4,49,31],[2,32,14,4,33,15],[4,39,13,1,40,14],[2,121,97],[2,60,38,2,61,39],[4,40,18,2,41,19],[4,40,14,2,41,15],[2,146,116],[3,58,36,2,59,37],[4,36,16,4,37,17],[4,36,12,4,37,13],[2,86,68,2,87,69],[4,69,43,1,70,44],[6,43,19,2,44,20],[6,43,15,2,44,16],[4,101,81],[1,80,50,4,81,51],[4,50,22,4,51,23],[3,36,12,8,37,13],[2,116,92,2,117,93],[6,58,36,2,59,37],[4,46,20,6,47,21],[7,42,14,4,43,15],[4,133,107],[8,59,37,1,60,38],[8,44,20,4,45,21],[12,33,11,4,34,12],[3,145,115,1,146,
116],[4,64,40,5,65,41],[11,36,16,5,37,17],[11,36,12,5,37,13],[5,109,87,1,110,88],[5,65,41,5,66,42],[5,54,24,7,55,25],[11,36,12],[5,122,98,1,123,99],[7,73,45,3,74,46],[15,43,19,2,44,20],[3,45,15,13,46,16],[1,135,107,5,136,108],[10,74,46,1,75,47],[1,50,22,15,51,23],[2,42,14,17,43,15],[5,150,120,1,151,121],[9,69,43,4,70,44],[17,50,22,1,51,23],[2,42,14,19,43,15],[3,141,113,4,142,114],[3,70,44,11,71,45],[17,47,21,4,48,22],[9,39,13,16,40,14],[3,135,107,5,136,108],[3,67,41,13,68,42],[15,54,24,5,55,25],[15,
43,15,10,44,16],[4,144,116,4,145,117],[17,68,42],[17,50,22,6,51,23],[19,46,16,6,47,17],[2,139,111,7,140,112],[17,74,46],[7,54,24,16,55,25],[34,37,13],[4,151,121,5,152,122],[4,75,47,14,76,48],[11,54,24,14,55,25],[16,45,15,14,46,16],[6,147,117,4,148,118],[6,73,45,14,74,46],[11,54,24,16,55,25],[30,46,16,2,47,17],[8,132,106,4,133,107],[8,75,47,13,76,48],[7,54,24,22,55,25],[22,45,15,13,46,16],[10,142,114,2,143,115],[19,74,46,4,75,47],[28,50,22,6,51,23],[33,46,16,4,47,17],[8,152,122,4,153,123],[22,73,45,
3,74,46],[8,53,23,26,54,24],[12,45,15,28,46,16],[3,147,117,10,148,118],[3,73,45,23,74,46],[4,54,24,31,55,25],[11,45,15,31,46,16],[7,146,116,7,147,117],[21,73,45,7,74,46],[1,53,23,37,54,24],[19,45,15,26,46,16],[5,145,115,10,146,116],[19,75,47,10,76,48],[15,54,24,25,55,25],[23,45,15,25,46,16],[13,145,115,3,146,116],[2,74,46,29,75,47],[42,54,24,1,55,25],[23,45,15,28,46,16],[17,145,115],[10,74,46,23,75,47],[10,54,24,35,55,25],[19,45,15,35,46,16],[17,145,115,1,146,116],[14,74,46,21,75,47],[29,54,24,19,
55,25],[11,45,15,46,46,16],[13,145,115,6,146,116],[14,74,46,23,75,47],[44,54,24,7,55,25],[59,46,16,1,47,17],[12,151,121,7,152,122],[12,75,47,26,76,48],[39,54,24,14,55,25],[22,45,15,41,46,16],[6,151,121,14,152,122],[6,75,47,34,76,48],[46,54,24,10,55,25],[2,45,15,64,46,16],[17,152,122,4,153,123],[29,74,46,14,75,47],[49,54,24,10,55,25],[24,45,15,46,46,16],[4,152,122,18,153,123],[13,74,46,32,75,47],[48,54,24,14,55,25],[42,45,15,32,46,16],[20,147,117,4,148,118],[40,75,47,7,76,48],[43,54,24,22,55,25],[10,
45,15,67,46,16],[19,148,118,6,149,119],[18,75,47,31,76,48],[34,54,24,34,55,25],[20,45,15,61,46,16]];p.getRSBlocks=function(a,c){var d=p.getRsBlockTable(a,c);if(void 0==d)throw Error("bad rs block @ typeNumber:"+a+"/errorCorrectLevel:"+c);for(var b=d.length/3,e=[],f=0;f<b;f++)for(var h=d[3*f+0],g=d[3*f+1],j=d[3*f+2],l=0;l<h;l++)e.push(new p(g,j));return e};p.getRsBlockTable=function(a,c){switch(c){case 1:return p.RS_BLOCK_TABLE[4*(a-1)+0];case 0:return p.RS_BLOCK_TABLE[4*(a-1)+1];case 3:return p.RS_BLOCK_TABLE[4*
(a-1)+2];case 2:return p.RS_BLOCK_TABLE[4*(a-1)+3]}};t.prototype={get:function(a){return 1==(this.buffer[Math.floor(a/8)]>>>7-a%8&1)},put:function(a,c){for(var d=0;d<c;d++)this.putBit(1==(a>>>c-d-1&1))},getLengthInBits:function(){return this.length},putBit:function(a){var c=Math.floor(this.length/8);this.buffer.length<=c&&this.buffer.push(0);a&&(this.buffer[c]|=128>>>this.length%8);this.length++}};"string"===typeof h&&(h={text:h});h=r.extend({},{render:"canvas",width:256,height:256,typeNumber:-1,
correctLevel:2,background:"#ffffff",foreground:"#000000"},h);return this.each(function(){var a;if("canvas"==h.render){a=new o(h.typeNumber,h.correctLevel);a.addData(h.text);a.make();var c=document.createElement("canvas");c.width=h.width;c.height=h.height;for(var d=c.getContext("2d"),b=h.width/a.getModuleCount(),e=h.height/a.getModuleCount(),f=0;f<a.getModuleCount();f++)for(var i=0;i<a.getModuleCount();i++){d.fillStyle=a.isDark(f,i)?h.foreground:h.background;var g=Math.ceil((i+1)*b)-Math.floor(i*b),
j=Math.ceil((f+1)*b)-Math.floor(f*b);d.fillRect(Math.round(i*b),Math.round(f*e),g,j)}}else{a=new o(h.typeNumber,h.correctLevel);a.addData(h.text);a.make();c=r("<table></table>").css("width",h.width+"px").css("height",h.height+"px").css("border","0px").css("border-collapse","collapse").css("background-color",h.background);d=h.width/a.getModuleCount();b=h.height/a.getModuleCount();for(e=0;e<a.getModuleCount();e++){f=r("<tr></tr>").css("height",b+"px").appendTo(c);for(i=0;i<a.getModuleCount();i++)r("<td></td>").css("width",
d+"px").css("background-color",a.isDark(e,i)?h.foreground:h.background).appendTo(f)}}a=c;$(a).appendTo(this)})}})($);

View File

@@ -97,22 +97,10 @@ var Mnemonic = function(language) {
}
self.check = function(mnemonic) {
var mnemonic = self.splitWords(mnemonic);
if (mnemonic.length == 0 || mnemonic.length % 3 > 0) {
return false
var b = mnemonicToBinaryString(mnemonic);
if (b === null) {
return false;
}
// idx = map(lambda x: bin(self.wordlist.index(x))[2:].zfill(11), mnemonic)
var idx = [];
for (var i=0; i<mnemonic.length; i++) {
var word = mnemonic[i];
var wordIndex = wordlist.indexOf(word);
if (wordIndex == -1) {
return false;
}
var binaryIndex = zfill(wordIndex.toString(2), 11);
idx.push(binaryIndex);
}
var b = idx.join('');
var l = b.length;
//d = b[:l / 33 * 32]
//h = b[-l / 33:]
@@ -128,6 +116,26 @@ var Mnemonic = function(language) {
return h == nh;
}
self.toRawEntropyHex = function(mnemonic) {
var b = mnemonicToBinaryString(mnemonic);
if (b === null)
return null;
var d = b.substring(0, b.length / 33 * 32);
var nd = binaryStringToWordArray(d);
var h = "";
for (var i=0; i<nd.length; i++) {
h += ('0000000' + nd[i].toString(16)).slice(-8);
}
return h;
}
self.toRawEntropyBin = function(mnemonic) {
var b = mnemonicToBinaryString(mnemonic);
var d = b.substring(0, b.length / 33 * 32);
return d;
}
self.toSeed = function(mnemonic, passphrase) {
passphrase = passphrase || '';
mnemonic = self.joinWords(self.splitWords(mnemonic)); // removes duplicate blanks
@@ -156,14 +164,7 @@ var Mnemonic = function(language) {
}
self.normalizeString = function(str) {
if (typeof str.normalize == "function") {
return str.normalize("NFKD");
}
else {
// TODO decide how to handle this in the future.
// https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/normalize
return str;
}
return str.normalize("NFKD");
}
function byteArrayToWordArray(data) {
@@ -207,6 +208,25 @@ var Mnemonic = function(language) {
return a;
}
function mnemonicToBinaryString(mnemonic) {
var mnemonic = self.splitWords(mnemonic);
if (mnemonic.length == 0 || mnemonic.length % 3 > 0) {
return null;
}
// idx = map(lambda x: bin(self.wordlist.index(x))[2:].zfill(11), mnemonic)
var idx = [];
for (var i=0; i<mnemonic.length; i++) {
var word = mnemonic[i];
var wordIndex = wordlist.indexOf(word);
if (wordIndex == -1) {
return null;
}
var binaryIndex = zfill(wordIndex.toString(2), 11);
idx.push(binaryIndex);
}
return idx.join('');
}
// Pad a numeric string on the left with zero digits until the given width
// is reached.
// Note this differs to the python implementation because it does not

View File

@@ -1,211 +0,0 @@
(function() {
'use strict';
/**
* Extend an Object with another Object's properties.
*
* The source objects are specified as additional arguments.
*
* @param dst Object the object to extend.
*
* @return Object the final object.
*/
var _extend = function(dst) {
var sources = Array.prototype.slice.call(arguments, 1);
for (var i=0; i<sources.length; ++i) {
var src = sources[i];
for (var p in src) {
if (src.hasOwnProperty(p)) dst[p] = src[p];
}
}
return dst;
};
/**
* Defer execution of given function.
* @param {Function} func
*/
var _defer = function(func) {
if (typeof setImmediate === 'function') {
return setImmediate(func);
} else {
return setTimeout(func, 0);
}
};
/**
* Based on the algorithm at http://en.wikipedia.org/wiki/Levenshtein_distance.
*/
var Levenshtein = {
/**
* Calculate levenshtein distance of the two strings.
*
* @param str1 String the first string.
* @param str2 String the second string.
* @return Integer the levenshtein distance (0 and above).
*/
get: function(str1, str2) {
// base cases
if (str1 === str2) return 0;
if (str1.length === 0) return str2.length;
if (str2.length === 0) return str1.length;
// two rows
var prevRow = new Array(str2.length + 1),
curCol, nextCol, i, j, tmp;
// initialise previous row
for (i=0; i<prevRow.length; ++i) {
prevRow[i] = i;
}
// calculate current row distance from previous row
for (i=0; i<str1.length; ++i) {
nextCol = i + 1;
for (j=0; j<str2.length; ++j) {
curCol = nextCol;
// substution
nextCol = prevRow[j] + ( (str1.charAt(i) === str2.charAt(j)) ? 0 : 1 );
// insertion
tmp = curCol + 1;
if (nextCol > tmp) {
nextCol = tmp;
}
// deletion
tmp = prevRow[j + 1] + 1;
if (nextCol > tmp) {
nextCol = tmp;
}
// copy current col value into previous (in preparation for next iteration)
prevRow[j] = curCol;
}
// copy last col value into previous (in preparation for next iteration)
prevRow[j] = nextCol;
}
return nextCol;
},
/**
* Asynchronously calculate levenshtein distance of the two strings.
*
* @param str1 String the first string.
* @param str2 String the second string.
* @param cb Function callback function with signature: function(Error err, int distance)
* @param [options] Object additional options.
* @param [options.progress] Function progress callback with signature: function(percentComplete)
*/
getAsync: function(str1, str2, cb, options) {
options = _extend({}, {
progress: null
}, options);
// base cases
if (str1 === str2) return cb(null, 0);
if (str1.length === 0) return cb(null, str2.length);
if (str2.length === 0) return cb(null, str1.length);
// two rows
var prevRow = new Array(str2.length + 1),
curCol, nextCol,
i, j, tmp,
startTime, currentTime;
// initialise previous row
for (i=0; i<prevRow.length; ++i) {
prevRow[i] = i;
}
nextCol = 1;
i = 0;
j = -1;
var __calculate = function() {
// reset timer
startTime = new Date().valueOf();
currentTime = startTime;
// keep going until one second has elapsed
while (currentTime - startTime < 1000) {
// reached end of current row?
if (str2.length <= (++j)) {
// copy current into previous (in preparation for next iteration)
prevRow[j] = nextCol;
// if already done all chars
if (str1.length <= (++i)) {
return cb(null, nextCol);
}
// else if we have more left to do
else {
nextCol = i + 1;
j = 0;
}
}
// calculation
curCol = nextCol;
// substution
nextCol = prevRow[j] + ( (str1.charAt(i) === str2.charAt(j)) ? 0 : 1 );
// insertion
tmp = curCol + 1;
if (nextCol > tmp) {
nextCol = tmp;
}
// deletion
tmp = prevRow[j + 1] + 1;
if (nextCol > tmp) {
nextCol = tmp;
}
// copy current into previous (in preparation for next iteration)
prevRow[j] = curCol;
// get current time
currentTime = new Date().valueOf();
}
// send a progress update?
if (null !== options.progress) {
try {
options.progress.call(null, (i * 100.0/ str1.length));
} catch (err) {
return cb('Progress callback: ' + err.toString());
}
}
// next iteration
_defer(__calculate);
};
__calculate();
}
};
// amd
if (typeof define !== "undefined" && define !== null && define.amd) {
define(function() {
return Levenshtein;
});
}
// commonjs
else if (typeof module !== "undefined" && module !== null && typeof exports !== "undefined" && module.exports === exports) {
module.exports = Levenshtein;
}
// web worker
else if (typeof self !== "undefined" && typeof self.postMessage === 'function' && typeof self.importScripts === 'function') {
self.Levenshtein = Levenshtein;
}
// browser main thread
else if (typeof window !== "undefined" && window !== null) {
window.Levenshtein = Levenshtein;
}
}());

View File

@@ -1,94 +0,0 @@
Translate.loadForeignPhrases("en",
{
"<code>m/44'/0'/0'/0</code> generates public addresses": "<code>m/44'/0'/0'/0</code> generates public addresses",
"<code>m/44'/0'/0'/1</code> generates change addresses": "<code>m/44'/0'/0'/1</code> generates change addresses",
"<code>m/44'/0'/0'</code> generates extended keys for import / export": "<code>m/44'/0'/0'</code> generates extended keys for import / export",
"<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).",
"Accepts binary, base 6, 6-sided dice, base 10, hexadecimal, cards": "Accepts binary, base 6, 6-sided dice, base 10, hexadecimal, cards",
"Account": "Account",
"Address": "Address",
"Alternatively, download the file from the repository": "Alternatively, download the file from the repository",
"BIP32 Derivation Path": "BIP32 Derivation Path",
"BIP32 Extended Key": "BIP32 Extended Key",
"BIP32 Extended Key (addresses only)": "BIP32 Extended Key (addresses only)",
"BIP32 Root Key": "BIP32 Root Key",
"BIP39 Mnemonic": "BIP39 Mnemonic",
"BIP39 Passphrase (optional)": "BIP39 Passphrase (optional)",
"BIP39 Seed": "BIP39 Seed",
"Base 10": "Base 10",
"Base 6": "Base 6",
"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.",
"Binary": "Binary",
"Bitcoin Core": "Bitcoin Core",
"Bits Per Event": "Bits Per Event",
"Block Explorers": "Block Explorers",
"Can be used with": "Can be used with",
"Card": "Card",
"Coin": "Coin",
"Dice": "Dice",
"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.",
"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.",
"Entropy": "Entropy",
"Entropy Type": "Entropy Type",
"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.",
"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>.",
"Event Count": "Event Count",
"External / Internal": "External / Internal",
"Filtered Entropy": "Filtered Entropy",
"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>",
"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>.",
"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>.",
"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>",
"For more info see the BIP32 spec": "For more info see the BIP32 spec",
"From entropy length (3 words per 32 bits)": "From entropy length (3 words per 32 bits)",
"Generate a random mnemonic, or enter your own below": "Generate a random mnemonic, or enter your own below",
"Get the source code from the repository": "Get the source code from the repository",
"Hex": "Hex",
"Hierarchical Deterministic Wallets": "Hierarchical Deterministic Wallets",
"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.",
"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.",
"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.",
"Libraries": "Libraries",
"Mnemonic Language": "Mnemonic Language",
"Mnemonic Length": "Mnemonic Length",
"Mnemonic code for generating deterministic keys": "Mnemonic code for generating deterministic keys",
"More info": "More info",
"Multi-Account Hierarchy for Deterministic Wallets": "Multi-Account Hierarchy for Deterministic Wallets",
"Mycelium Wallet": "Mycelium Wallet",
"Note these addreses are derived from the BIP32 Extended Key": "Note these addreses are derived from the BIP32 Extended Key",
"Offline Usage": "Offline Usage",
"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.",
"Path": "Path",
"Private Key": "Private Key",
"Private Keys": "Private Keys",
"Public Key": "Public Key",
"Purpose": "Purpose",
"Raw Binary": "Raw Binary",
"Read more": "Read more",
"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>",
"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>",
"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>",
"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>",
"Show": "Show",
"Show more rows": "Show more rows",
"Strength": "Strength",
"Supply my own source of entropy": "Supply my own source of entropy",
"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.",
"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>.",
"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.",
"This project is 100% open-source code": "This project is 100% open-source code",
"Toggle": "Toggle",
"Total Bits": "Total Bits",
"Use hardened addresses": "Use hardened addresses",
"Use path <code>m/0'/0'</code> with hardened addresses.": "Use path <code>m/0'/0'</code> with hardened addresses.",
"Use path <code>m/44'/0'/0'</code>.": "Use path <code>m/44'/0'/0'</code>.",
"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>.",
"Valid entropy values include:": "Valid entropy values include:",
"Warning": "Warning",
"Word Count": "Word Count",
"You are not a good source of entropy.": "You are not a good source of entropy.",
"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).",
"You can use this tool without having to be online.": "You can use this tool without having to be online.",
"words": "words"
}
);

File diff suppressed because it is too large Load Diff

View File

@@ -1,10 +1,10 @@
function convertRippleAdrr(address) {
return window.basex('rpshnaf39wBUDNEGHJKLM4PQRST7VWXYZ2bcdeCg65jkm8oFqi1tuvAxyz').encode(
window.basex('123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz').decode(address)
return libs.basex('rpshnaf39wBUDNEGHJKLM4PQRST7VWXYZ2bcdeCg65jkm8oFqi1tuvAxyz').encode(
libs.basex('123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz').decode(address)
)
}
function convertRipplePriv(priv) {
return window.basex('123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz').decode(priv).toString("hex").slice(2,66)
}
return libs.basex('123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz').decode(priv).toString("hex").slice(2,66)
}

768
src/js/segwit-parameters.js Normal file
View File

@@ -0,0 +1,768 @@
(function() {
// p2wpkh
libs.bitcoin.networks.bitcoin.p2wpkh = {
baseNetwork: "bitcoin",
messagePrefix: '\x18Bitcoin Signed Message:\n',
bech32: 'bc',
bip32: {
public: 0x04b24746,
private: 0x04b2430c
},
pubKeyHash: 0x00,
scriptHash: 0x05,
wif: 0x80
};
libs.bitcoin.networks.testnet.p2wpkh = {
baseNetwork: "testnet",
messagePrefix: '\x18Bitcoin Signed Message:\n',
bech32: 'tb',
bip32: {
public: 0x045f1cf6,
private: 0x045f18bc
},
pubKeyHash: 0x6f,
scriptHash: 0xc4,
wif: 0xef
};
libs.bitcoin.networks.regtest.p2wpkh = {
baseNetwork: "regtest",
messagePrefix: '\x18Bitcoin Signed Message:\n',
bech32: 'bcrt',
bip32: {
public: 0x045f1cf6,
private: 0x045f18bc
},
pubKeyHash: 0x6f,
scriptHash: 0xc4,
wif: 0xef
};
// p2wpkh in p2sh
libs.bitcoin.networks.bitcoin.p2wpkhInP2sh = {
baseNetwork: "bitcoin",
messagePrefix: '\x18Bitcoin Signed Message:\n',
bech32: 'bc',
bip32: {
public: 0x049d7cb2,
private: 0x049d7878
},
pubKeyHash: 0x00,
scriptHash: 0x05,
wif: 0x80
};
libs.bitcoin.networks.testnet.p2wpkhInP2sh = {
baseNetwork: "testnet",
messagePrefix: '\x18Bitcoin Signed Message:\n',
bech32: 'tb',
bip32: {
public: 0x044a5262,
private: 0x044a4e28
},
pubKeyHash: 0x6f,
scriptHash: 0xc4,
wif: 0xef
};
libs.bitcoin.networks.regtest.p2wpkhInP2sh = {
baseNetwork: "regtest",
messagePrefix: '\x18Bitcoin Signed Message:\n',
bech32: 'bcrt',
bip32: {
public: 0x044a5262,
private: 0x044a4e28
},
pubKeyHash: 0x6f,
scriptHash: 0xc4,
wif: 0xef
};
// p2wsh
libs.bitcoin.networks.bitcoin.p2wsh = {
baseNetwork: "bitcoin",
messagePrefix: '\x18Bitcoin Signed Message:\n',
bech32: 'bc',
bip32: {
public: 0x02aa7ed3,
private: 0x02aa7a99
},
pubKeyHash: 0x00,
scriptHash: 0x05,
wif: 0x80
};
libs.bitcoin.networks.testnet.p2wsh = {
baseNetwork: "testnet",
messagePrefix: '\x18Bitcoin Signed Message:\n',
bech32: 'tb',
bip32: {
public: 0x02575483,
private: 0x02575048
},
pubKeyHash: 0x6f,
scriptHash: 0xc4,
wif: 0xef
};
libs.bitcoin.networks.regtest.p2wsh = {
baseNetwork: "regtest",
messagePrefix: '\x18Bitcoin Signed Message:\n',
bech32: 'bcrt',
bip32: {
public: 0x02575483,
private: 0x02575048
},
pubKeyHash: 0x6f,
scriptHash: 0xc4,
wif: 0xef
};
// p2wsh in p2sh
libs.bitcoin.networks.bitcoin.p2wshInP2sh = {
baseNetwork: "bitcoin",
messagePrefix: '\x18Bitcoin Signed Message:\n',
bech32: 'bc',
bip32: {
public: 0x0295b43f,
private: 0x0295b005
},
pubKeyHash: 0x00,
scriptHash: 0x05,
wif: 0x80
};
libs.bitcoin.networks.testnet.p2wshInP2sh = {
baseNetwork: "testnet",
messagePrefix: '\x18Bitcoin Signed Message:\n',
bech32: 'tb',
bip32: {
public: 0x024289ef,
private: 0x024285b5
},
pubKeyHash: 0x6f,
scriptHash: 0xc4,
wif: 0xef
};
libs.bitcoin.networks.regtest.p2wshInP2sh = {
baseNetwork: "regtest",
messagePrefix: '\x18Bitcoin Signed Message:\n',
bech32: 'bcrt',
bip32: {
public: 0x024289ef,
private: 0x024285b5
},
pubKeyHash: 0x6f,
scriptHash: 0xc4,
wif: 0xef
};
libs.bitcoin.networks.cranepay.p2wpkhInP2sh = {
baseNetwork: "cranepay",
messagePrefix: '\x18Bitcoin Signed Message:\n',
bech32: 'cp',
bip32: {
public: 0x049d7cb2,
private: 0x049d7878
},
pubKeyHash: 28,
scriptHash: 10,
wif: 123
};
// bech32
libs.bitcoin.networks.cranepay.p2wpkh = {
baseNetwork: "cranepay",
messagePrefix: '\x18Bitcoin Signed Message:\n',
bech32: 'cp',
bip32: {
public: 0x04b24746,
private: 0x04b2430c
},
pubKeyHash: 28,
scriptHash: 10,
wif: 123
};
libs.bitcoin.networks.litecoin.p2wpkh = {
baseNetwork: "litecoin",
messagePrefix: '\x19Litecoin Signed Message:\n',
bech32: 'ltc',
bip32: {
public: 0x04b24746,
private: 0x04b2430c
},
pubKeyHash: 0x30,
scriptHash: 0x32,
wif: 0xb0
};
libs.bitcoin.networks.litecoin.p2wpkhInP2sh = {
baseNetwork: "litecoin",
messagePrefix: '\x19Litecoin Signed Message:\n',
bech32: 'ltc',
bip32: {
public: 0x01b26ef6,
private: 0x01b26792
},
pubKeyHash: 0x30,
scriptHash: 0x32,
wif: 0xb0
};
libs.bitcoin.networks.fujicoin.p2wpkh = {
baseNetwork: "fujicoin",
messagePrefix: '\x19FujiCoin Signed Message:\n',
bech32: 'fc',
bip32: {
public: 0x04b24746,
private: 0x04b2430c
},
pubKeyHash: 0x24,
scriptHash: 0x10,
wif: 0xa4
};
libs.bitcoin.networks.fujicoin.p2wpkhInP2sh = {
baseNetwork: "fujicoin",
messagePrefix: '\x19FujiCoin Signed Message:\n',
bech32: 'fc',
bip32: {
public: 0x049d7cb2,
private: 0x049d7878
},
pubKeyHash: 0x24,
scriptHash: 0x10,
wif: 0xa4
};
libs.bitcoin.networks.vertcoin.p2wpkh = {
baseNetwork: "vertcoin",
messagePrefix: '\x18Vertcoin Signed Message:\n',
bech32: 'vtc',
bip32: {
public: 0x0488b21e,
private: 0x0488ade4
},
pubKeyHash: 71,
scriptHash: 5,
wif: 0x80
};
libs.bitcoin.networks.vertcoin.p2wpkhInP2sh = {
baseNetwork: "vertcoin",
messagePrefix: '\x18Vertcoin Signed Message:\n',
bip32: {
public: 0x0488b21e,
private: 0x0488ade4
},
pubKeyHash: 71,
scriptHash: 5,
wif: 0x80
};
libs.bitcoin.networks.bgold.p2wpkh = {
baseNetwork: "bgold",
messagePrefix: '\x1DBitcoin Gold Signed Message:\n',
bech32: 'btg',
bip32: {
public: 0x04b24746,
private: 0x04b2430c
},
pubKeyHash: 0x26,
scriptHash: 0x17,
wif: 0x80,
};
libs.bitcoin.networks.bgold.p2wpkhInP2sh = {
baseNetwork: "bgold",
messagePrefix: '\x1DBitcoin Gold Signed Message:\n',
bech32: 'btg',
bip32: {
public: 0x049d7cb2,
private: 0x049d7878
},
pubKeyHash: 0x26,
scriptHash: 0x17,
wif: 0x80,
};
libs.bitcoin.networks.digibyte.p2wpkh = {
baseNetwork: "digibyte",
messagePrefix: 'x19DigiByte Signed Message:\n',
bech32: 'dgb',
bip32: {
public: 0x04b24746,
private: 0x04b2430c
},
pubKeyHash: 0x1e,
scriptHash: 0x3f,
wif: 0x80
};
libs.bitcoin.networks.digibyte.p2wpkhInP2sh = {
baseNetwork: "digibyte",
messagePrefix: '\x19DigiByte Signed Message:\n',
bech32: 'dgb',
bip32: {
public: 0x049d7cb2,
private: 0x049d7878
},
pubKeyHash: 0x1e,
scriptHash: 0x3f,
wif: 0x80
};
libs.bitcoin.networks.blockstamp.p2wpkh = {
baseNetwork: "blockstamp",
messagePrefix: '\x18BlockStamp Signed Message:\n',
bech32: 'bc',
bip32: {
public: 0x0488B21E,
private: 0x0488ADE4,
},
pubKeyHash: 0x00,
scriptHash: 0x05,
wif: 0x80,
};
libs.bitcoin.networks.blockstamp.p2wpkhInP2sh = {
baseNetwork: "blockstamp",
messagePrefix: '\x18BlockStamp Signed Message:\n',
bech32: 'bc',
bip32: {
public: 0x0488B21E,
private: 0x0488ADE4,
},
pubKeyHash: 0x00,
scriptHash: 0x05,
wif: 0x80,
};
libs.bitcoin.networks.nix.p2wpkh = {
baseNetwork: "nix",
messagePrefix: '\x18Nix Signed Message:\n',
bech32: 'nix',
bip32: {
public: 0x0488b21e,
private: 0x0488ade4,
},
pubKeyHash: 0x26,
scriptHash: 0x35,
wif: 0x80,
};
libs.bitcoin.networks.nix.p2wpkhInP2sh = {
baseNetwork: "nix",
messagePrefix: '\x18Nix Signed Message:\n',
bech32: 'nix',
bip32: {
public: 0x0488b21e,
private: 0x0488ade4,
},
pubKeyHash: 0x26,
scriptHash: 0x35,
wif: 0x80,
};
libs.bitcoin.networks.cpuchain.p2wpkh = {
baseNetwork: "cpuchain",
messagePrefix: '\x1DCPUchain Signed Message:\n',
bech32: 'cpu',
bip32: {
public: 0x04b24746,
private: 0x04b2430c
},
pubKeyHash: 0x1c,
scriptHash: 0x1e,
wif: 0x80,
};
libs.bitcoin.networks.cpuchain.p2wpkhInP2sh = {
baseNetwork: "cpuchain",
messagePrefix: '\x1DCPUchain Signed Message:\n',
bech32: 'cpu',
bip32: {
public: 0x049d7cb2,
private: 0x049d7878
},
pubKeyHash: 0x1c,
scriptHash: 0x1e,
wif: 0x80,
};
libs.bitcoin.networks.monkeyproject.p2wpkh = {
baseNetwork: "monkeyproject",
messagePrefix: 'Monkey Signed Message:\n',
bech32: 'monkey',
bip32: {
public: 0x0488b21e,
private: 0x0488dde4
},
pubKeyHash: 0x33,
scriptHash: 0x1c,
wif: 0x37
};
libs.bitcoin.networks.monkeyproject.p2wpkhInP2sh = {
baseNetwork: "monkeyproject",
messagePrefix: 'Monkey Signed Message:\n',
bech32: 'monkey',
bip32: {
public: 0x0488b21e,
private: 0x0488dde4
},
pubKeyHash: 0x33,
scriptHash: 0x1c,
wif: 0x37
};
libs.bitcoin.networks.atom.p2wpkh = {
baseNetwork: "atom",
messagePrefix: '\x18Bitcoin Atom Signed Message:\n',
bech32: 'atom',
bip32: {
public: 0x0488B21E,
private: 0x0488ADE4
},
pubKeyHash: 0x17,
scriptHash: 0x0a,
wif: 0x80
};
libs.bitcoin.networks.atom.p2wpkhInP2sh = {
baseNetwork: "atom",
messagePrefix: '\x18Bitcoin Atom Signed Message:\n',
bech32: 'atom',
bip32: {
public: 0x0488B21E,
private: 0x0488ADE4
},
pubKeyHash: 0x17,
scriptHash: 0x0a,
wif: 0x80
};
libs.bitcoin.networks.bitcore.p2wpkh = {
baseNetwork: "bitcore",
messagePrefix: '\x18BitCore Signed Message:\n',
bech32: 'bitcore',
bip32: {
public: 0x0488B21E,
private: 0x0488ADE4
},
pubKeyHash: 0x03,
scriptHash: 0x7D,
wif: 0x80
};
libs.bitcoin.networks.bitcore.p2wpkhInP2sh = {
baseNetwork: "bitcore",
messagePrefix: '\x18BitCore Signed Message:\n',
bech32: 'bitcore',
bip32: {
public: 0x0488B21E,
private: 0x0488ADE4
},
pubKeyHash: 0x03,
scriptHash: 0x7D,
wif: 0x80
};
libs.bitcoin.networks.monacoin.p2wpkh = {
baseNetwork: "monacoin",
messagePrefix: '\x18Monacoin Signed Message:\n',
bech32: 'mona',
bip32: {
public: 0x0488b21e,
private: 0x0488ade4
},
pubKeyHash: 0x32,
scriptHash: 0x37,
wif: 0xb0
};
libs.bitcoin.networks.monacoin.p2wpkhInP2sh = {
baseNetwork: "monacoin",
messagePrefix: '\x18Monacoin Signed Message:\n',
bech32: 'mona',
bip32: {
public: 0x0488b21e,
private: 0x0488ade4
},
pubKeyHash: 0x32,
scriptHash: 0x37,
wif: 0xb0
};
libs.bitcoin.networks.syscoin.p2wpkh = {
baseNetwork: "syscoin",
messagePrefix: '\x18Syscoin Signed Message:\n',
bech32: 'sys',
bip32: {
public: 0x04b24746,
private: 0x04b2430c
},
pubKeyHash: 0x3f,
scriptHash: 0x05,
wif: 0x80
};
libs.bitcoin.networks.syscoin.p2wpkhInP2sh = {
baseNetwork: "syscoin",
messagePrefix: '\x18Syscoin Signed Message:\n',
bech32: 'sys',
bip32: {
public: 0x049d7cb2,
private: 0x049d7878
},
pubKeyHash: 0x3f,
scriptHash: 0x05,
wif: 0x80
};
libs.bitcoin.networks.viacoin.p2wpkh = {
baseNetwork: "viacoin",
messagePrefix: '\x18Viacoin Signed Message:\n',
bech32: 'viacoin',
bip32: {
public: 0x0488b21e,
private: 0x0488ade4
},
pubKeyHash: 0x47,
scriptHash: 0x21,
wif: 0xc7
};
libs.bitcoin.networks.viacoin.p2wpkhInP2sh = {
baseNetwork: "viacoin",
messagePrefix: '\x18Viacoin Signed Message:\n',
bech32: 'viacoin',
bip32: {
public: 0x0488b21e,
private: 0x0488ade4
},
pubKeyHash: 0x47,
scriptHash: 0x21,
wif: 0xc7
};
libs.bitcoin.networks.dogecointestnet.p2wpkh = {
baseNetwork: "dogecointestnet",
messagePrefix: '\x19Dogecoin Signed Message:\n',
bech32: 'dogecointestnet',
bip32: {
public: 0x043587cf,
private: 0x04358394
},
pubKeyHash: 0x71,
scriptHash: 0xc4,
wif: 0xf1
};
libs.bitcoin.networks.dogecointestnet.p2wpkhInP2sh = {
baseNetwork: "dogecointestnet",
messagePrefix: '\x19Dogecoin Signed Message:\n',
bech32: 'dogecointestnet',
bip32: {
public: 0x043587cf,
private: 0x04358394
},
pubKeyHash: 0x71,
scriptHash: 0xc4,
wif: 0xf1
};
libs.bitcoin.networks.dogecointestnet.p2wpkh = {
baseNetwork: "dogecointestnet",
messagePrefix: '\x19Dogecoin Signed Message:\n',
bech32: 'dogecointestnet',
bip32: {
public: 0x043587cf,
private: 0x04358394
},
pubKeyHash: 0x71,
scriptHash: 0xc4,
wif: 0xf1
};
libs.bitcoin.networks.dogecointestnet.p2wpkhInP2sh = {
baseNetwork: "dogecointestnet",
messagePrefix: '\x19Dogecoin Signed Message:\n',
bech32: 'dogecointestnet',
bip32: {
public: 0x043587cf,
private: 0x04358394
},
pubKeyHash: 0x71,
scriptHash: 0xc4,
wif: 0xf1
};
libs.bitcoin.networks.litecointestnet.p2wpkh = {
baseNetwork: "litecointestnet",
messagePrefix: '\x18Litecoin Signed Message:\n',
bech32: 'litecointestnet',
bip32: {
public: 0x043587cf,
private: 0x04358394
},
pubKeyHash: 0x6f,
scriptHash: 0xc4,
wif: 0xef
};
libs.bitcoin.networks.litecointestnet.p2wpkhInP2sh = {
baseNetwork: "litecointestnet",
messagePrefix: '\x18Litecoin Signed Message:\n',
bech32: 'litecointestnet',
bip32: {
public: 0x043587cf,
private: 0x04358394
},
pubKeyHash: 0x6f,
scriptHash: 0xc4,
wif: 0xef
};
libs.bitcoin.networks.groestlcoin.p2wpkh = {
baseNetwork: "groestlcoin",
messagePrefix: '\x19GroestlCoin Signed Message:\n',
bech32: 'grs',
bip32: {
public: 0x04b24746,
private: 0x04b2430c
},
pubKeyHash: 0x24,
scriptHash: 0x05,
wif: 0x80,
};
libs.bitcoin.networks.groestlcointestnet.p2wpkh = {
baseNetwork: "groestlcointestnet",
messagePrefix: '\x19GroestlCoin Signed Message:\n',
bech32: 'tgrs',
bip32: {
public: 0x045f1cf6,
private: 0x045f18bc
},
pubKeyHash: 0x6f,
scriptHash: 0xc4,
wif: 0xef
};
libs.bitcoin.networks.groestlcoin.p2wpkhInP2sh = {
baseNetwork: "groestlcoin",
messagePrefix: '\x19GroestlCoin Signed Message:\n',
bech32: 'grs',
bip32: {
public: 0x049d7cb2,
private: 0x049d7878
},
pubKeyHash: 0x24,
scriptHash: 0x05,
wif: 0x80,
};
libs.bitcoin.networks.groestlcointestnet.p2wpkhInP2sh = {
baseNetwork: "groestlcointestnet",
messagePrefix: '\x19GroestlCoin Signed Message:\n',
bech32: 'tgrs',
bip32: {
public: 0x044a5262,
private: 0x044a4e28
},
pubKeyHash: 0x6f,
scriptHash: 0xc4,
wif: 0xef
};
libs.bitcoin.networks.deeponion.p2wpkh = {
baseNetwork: "deeponion",
messagePrefix: '\x18DeepOnion Signed Message:\n',
bech32: 'dpn',
bip32: {
public: 0x0488b21e,
private: 0x0488ade4
},
pubKeyHash: 0x1f,
scriptHash: 0x4e,
wif: 0x9f
};
libs.bitcoin.networks.deeponion.p2wpkhInP2sh = {
baseNetwork: "deeponion",
messagePrefix: '\x18DeepOnion Signed Message:\n',
bech32: 'dpn',
bip32: {
public: 0x0488b21e,
private: 0x0488ade4
},
pubKeyHash: 0x1f,
scriptHash: 0x4e,
wif: 0x9f
};
libs.bitcoin.networks.sugarchain.p2wpkh = {
baseNetwork: "sugarchain",
messagePrefix: '\x1DSugarchain Signed Message:\n',
bech32: 'sugar',
bip32: {
public: 0x04b24746,
private: 0x04b2430c
},
pubKeyHash: 0x3f,
scriptHash: 0x7d,
wif: 0x80
};
libs.bitcoin.networks.sugarchain.p2wpkhInP2sh = {
baseNetwork: "sugarchain",
messagePrefix: '\x1DSugarchain Signed Message:\n',
bech32: 'sugar',
bip32: {
public: 0x049d7cb2,
private: 0x049d7878
},
pubKeyHash: 0x3f,
scriptHash: 0x7d,
wif: 0x80
};
libs.bitcoin.networks.sugarchaintestnet.p2wpkh = {
baseNetwork: "sugarchaintestnet",
messagePrefix: '\x18Sugarchain Signed Message:\n',
bech32: 'tugar',
bip32: {
public: 0x045f1cf6,
private: 0x045f18bc
},
pubKeyHash: 0x42,
scriptHash: 0x80,
wif: 0xef
};
libs.bitcoin.networks.sugarchaintestnet.p2wpkhInP2sh = {
baseNetwork: "sugarchaintestnet",
messagePrefix: '\x18Sugarchain Signed Message:\n',
bech32: 'tugar',
bip32: {
public: 0x044a5262,
private: 0x044a4e28
},
pubKeyHash: 0x42,
scriptHash: 0x80,
wif: 0xef
};
})();

View File

@@ -26,13 +26,13 @@ var sjcl = {
/** @namespace Key exchange functions. Right now only SRP is implemented. */
keyexchange: {},
/** @namespace Block cipher modes of operation. */
mode: {},
/** @namespace Miscellaneous. HMAC and PBKDF2. */
misc: {},
/**
* @namespace Bit array encoders and decoders.
*
@@ -43,7 +43,7 @@ var sjcl = {
* the method names are "fromBits" and "toBits".
*/
codec: {},
/** @namespace Exceptions. */
exception: {
/** @constructor Ciphertext is corrupt. */
@@ -51,13 +51,13 @@ var sjcl = {
this.toString = function() { return "CORRUPT: "+this.message; };
this.message = message;
},
/** @constructor Invalid parameter. */
invalid: function(message) {
this.toString = function() { return "INVALID: "+this.message; };
this.message = message;
},
/** @constructor Bug or missing feature in SJCL. @constructor */
bug: function(message) {
this.toString = function() { return "BUG: "+this.message; };
@@ -159,7 +159,7 @@ sjcl.bitArray = {
if (a1.length === 0 || a2.length === 0) {
return a1.concat(a2);
}
var last = a1[a1.length-1], shift = sjcl.bitArray.getPartial(last);
if (shift === 32) {
return a1.concat(a2);
@@ -245,7 +245,7 @@ sjcl.bitArray = {
_shiftRight: function (a, shift, carry, out) {
var i, last2=0, shift2;
if (out === undefined) { out = []; }
for (; shift >= 32; shift -= 32) {
out.push(carry);
carry = 0;
@@ -253,7 +253,7 @@ sjcl.bitArray = {
if (shift === 0) {
return out.concat(a);
}
for (i=0; i<a.length; i++) {
out.push(carry | a[i]>>>shift);
carry = a[i] << (32-shift);
@@ -263,7 +263,7 @@ sjcl.bitArray = {
out.push(sjcl.bitArray.partial(shift+shift2 & 31, (shift + shift2 > 32) ? carry : out.pop(),1));
return out;
},
/** xor a block of 4 words together.
* @private
*/
@@ -295,7 +295,7 @@ sjcl.bitArray = {
* @author Mike Hamburg
* @author Dan Boneh
*/
/** @namespace UTF-8 strings */
sjcl.codec.utf8String = {
/** Convert from a bitArray to a UTF-8 string. */
@@ -310,7 +310,7 @@ sjcl.codec.utf8String = {
}
return decodeURIComponent(escape(out));
},
/** Convert from a UTF-8 string to a bitArray. */
toBits: function (str) {
str = unescape(encodeURIComponent(str));
@@ -412,7 +412,7 @@ sjcl.hash.sha512.prototype = {
* @constant
*/
blockSize: 1024,
/**
* Reset the hash state.
* @return this
@@ -423,7 +423,7 @@ sjcl.hash.sha512.prototype = {
this._length = 0;
return this;
},
/**
* Input several words to the hash.
* @param {bitArray|String} data the data to hash.
@@ -441,7 +441,7 @@ sjcl.hash.sha512.prototype = {
}
return this;
},
/**
* Complete hashing and output the hash value.
* @return {bitArray} The hash value, an array of 16 big-endian words.
@@ -736,12 +736,12 @@ sjcl.misc.hmac = function (key, Hash) {
if (key.length > bs) {
key = Hash.hash(key);
}
for (i=0; i<bs; i++) {
exKey[0][i] = key[i]^0x36363636;
exKey[1][i] = key[i]^0x5C5C5C5C;
}
this._baseHash[0].update(exKey[0]);
this._baseHash[1].update(exKey[1]);
this._resultHash = new Hash(this._baseHash[0]);
@@ -804,34 +804,34 @@ sjcl.misc.hmac.prototype.digest = function () {
*/
sjcl.misc.pbkdf2 = function (password, salt, count, length, Prff) {
count = count || 1000;
if (length < 0 || count < 0) {
throw sjcl.exception.invalid("invalid params to pbkdf2");
}
if (typeof password === "string") {
password = sjcl.codec.utf8String.toBits(password);
}
if (typeof salt === "string") {
salt = sjcl.codec.utf8String.toBits(salt);
}
Prff = Prff || sjcl.misc.hmac;
var prf = new Prff(password),
u, ui, i, j, k, out = [], b = sjcl.bitArray;
for (k = 1; 32 * out.length < (length || 1); k++) {
u = ui = prf.encrypt(b.concat(salt,[k]));
for (i=1; i<count; i++) {
ui = prf.encrypt(ui);
for (j=0; j<ui.length; j++) {
u[j] ^= ui[j];
}
}
out = out.concat(u);
}
@@ -890,7 +890,7 @@ sjcl.hash.sha256.prototype = {
* @constant
*/
blockSize: 512,
/**
* Reset the hash state.
* @return this
@@ -901,7 +901,7 @@ sjcl.hash.sha256.prototype = {
this._length = 0;
return this;
},
/**
* Input several words to the hash.
* @param {bitArray|String} data the data to hash.
@@ -919,7 +919,7 @@ sjcl.hash.sha256.prototype = {
}
return this;
},
/**
* Complete hashing and output the hash value.
* @return {bitArray} The hash value, an array of 8 big-endian words.
@@ -929,12 +929,12 @@ sjcl.hash.sha256.prototype = {
// Round out and push the buffer
b = sjcl.bitArray.concat(b, [sjcl.bitArray.partial(1,1)]);
// Round out the buffer to a multiple of 16 words, less the 2 length words.
for (i = b.length + 2; i & 15; i++) {
b.push(0);
}
// append the length
b.push(Math.floor(this._length / 0x100000000));
b.push(this._length | 0);
@@ -955,7 +955,7 @@ sjcl.hash.sha256.prototype = {
/*
_init:[0x6a09e667,0xbb67ae85,0x3c6ef372,0xa54ff53a,0x510e527f,0x9b05688c,0x1f83d9ab,0x5be0cd19],
*/
/**
* The SHA-256 hash key, to be precomputed.
* @private
@@ -990,7 +990,7 @@ sjcl.hash.sha256.prototype = {
continue outer;
}
}
if (i<8) {
this._init[i] = frac(Math.pow(prime, 1/2));
}
@@ -998,13 +998,13 @@ sjcl.hash.sha256.prototype = {
i++;
}
},
/**
* Perform one cycle of SHA-256.
* @param {bitArray} words one block of words.
* @private
*/
_block:function (words) {
_block:function (words) {
var i, tmp, a, b,
w = words.slice(0),
h = this._h,
@@ -1032,13 +1032,13 @@ sjcl.hash.sha256.prototype = {
} else {
a = w[(i+1 ) & 15];
b = w[(i+14) & 15];
tmp = w[i&15] = ((a>>>7 ^ a>>>18 ^ a>>>3 ^ a<<25 ^ a<<14) +
tmp = w[i&15] = ((a>>>7 ^ a>>>18 ^ a>>>3 ^ a<<25 ^ a<<14) +
(b>>>17 ^ b>>>19 ^ b>>>10 ^ b<<15 ^ b<<13) +
w[i&15] + w[(i+9) & 15]) | 0;
}
tmp = (tmp + h7 + (h4>>>6 ^ h4>>>11 ^ h4>>>25 ^ h4<<26 ^ h4<<21 ^ h4<<7) + (h6 ^ h4&(h5^h6)) + k[i]); // | 0;
// shift register
h7 = h6; h6 = h5; h5 = h4;
h4 = h3 + tmp | 0;

View File

@@ -1,153 +0,0 @@
// An extremely basic translation library
//
// Example usage:
//
// Set some html to be translated. Do this using the 'data-translate' attribute:
//
// <div data-translate>Test</div>
// <div data-translate-html><em>keep em tag</em></div>
// <input data-translate-placeholder placeholder="Example placeholder">
// <span data-translate-title title="Example title"></span>
//
// Obtain all the phrases to be translated via js debug console:
//
// Translate.phrasesAsJson();
//
// Use that template to translate the phrases into another language.
// Leave the key the same. Change the value to the new language.
//
// Create a js file to load the new phrases. In this example for Spanish,
// es.js will contain the following code:
//
// Translate.loadForeignPhrases("es", {
// "Test": "Test in Spanish",
// "<em>keep em tag</em>": "<em>keep em tag in Spanish</em>",
// "Example placeholder": "Example placeholder in Spanish"
// "Example title": "Example title in Spanish"
// });
//
// In your UI put a listener for clicking on the Spanish button:
//
// mySpanishButton.addEventListener("click", function() {
// Translate.setLanguage("es");
// });
// myEnglishButton.addEventListener("click", function() {
// Translate.setLanguage("en");
// });
Translate = new (function() {
var defaultLanguage = "en";
var allPhrases = {};
allPhrases[defaultLanguage] = {};
// Node types
var text = {
selector: "[data-translate]",
getKey: function() {
return this.textContent.trim().replace(/\s+/g, " ");
},
setPhrase: function(p) {
this.textContent = p;
},
}
var html = {
selector: "[data-translate-html]",
getKey: function() {
return this.innerHTML.trim().replace(/\s+/g, " ");
},
setPhrase: function(p) {
this.innerHTML = p;
},
}
var placeholder = {
selector: "[data-translate-placeholder]",
getKey: function() {
return this.getAttribute("placeholder").trim().replace(/\s+/g, " ");
},
setPhrase: function(p) {
this.setAttribute("placeholder", p);
},
}
var title = {
selector: "[data-translate-title]",
getKey: function() {
return this.getAttribute("title").trim().replace(/\s+/g, " ");
},
setPhrase: function(p) {
this.setAttribute("title", p);
},
}
// Get elements to be translated
var allEls = getEls(text)
.concat(getEls(html))
.concat(getEls(placeholder))
.concat(getEls(title));
// Provides access to phrases from a non-default language.
// See phrases_en.js for example usage.
this.loadForeignPhrases = function(language, phrases) {
allPhrases[language] = phrases;
}
// Displays a different language, eg "en" or "fr"
this.setLanguage = function(language) {
for (var i=0; i<allEls.length; i++) {
var el = allEls[i];
var key = el.key;
if (!(language in allPhrases)) {
console.log(language + " not in allPhrases");
return;
}
if (!(key in allPhrases[language])) {
console.log(language + " does not contain phrase: " + key);
return;
}
var phrase = allPhrases[language][key];
el.setPhrase(phrase);
}
}
// Converts the phrases to a key-pair json file.
// This is a good way to export phrases for use in translation tools.
this.phrasesAsJson = function(language) {
var keys = [];
for (var i=0; i<allEls.length; i++) {
var el = allEls[i];
var key = el.key;
keys.push(key);
}
keys.sort();
var output = {};
for (var i=0; i<keys.length; i++) {
var key = keys[i];
var translated = "";
if (language in allPhrases && key in allPhrases[language]) {
translated = allPhrases[language][key];
}
output[key] = translated;
}
return JSON.stringify(output, null, 2);
}
function getEls(nodeType) {
var nodes = document.querySelectorAll(nodeType.selector);
var els = [];
for (var i=0; i<nodes.length; i++) {
var node = nodes[i];
node.getKey = nodeType.getKey;
node.setPhrase = nodeType.setPhrase;
node.key = node.getKey();
allPhrases[defaultLanguage][node.key] = node.key;
els.push(node);
}
return els;
}
})();

File diff suppressed because one or more lines are too long

14
src/js/wordlist_czech.js Normal file

File diff suppressed because one or more lines are too long

2051
src/js/wordlist_korean.js Normal file

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,197 @@
WORDLISTS = typeof
WORDLISTS == "undefined" ? {}: WORDLISTS;
WORDLISTS["portuguese"] = [
"abacate", "abaixo", "abalar", "abater", "abduzir", "abelha", "aberto", "abismo", "abotoar", "abranger", "abreviar",
"abrigar", "abrupto", "absinto", "absoluto", "absurdo", "abutre", "acabado", "acalmar", "acampar", "acanhar",
"acaso", "aceitar", "acelerar", "acenar", "acervo", "acessar", "acetona", "achatar", "acidez", "acima", "acionado",
"acirrar", "aclamar", "aclive", "acolhida", "acomodar", "acoplar", "acordar", "acumular", "acusador", "adaptar",
"adega", "adentro", "adepto", "adequar", "aderente", "adesivo", "adeus", "adiante", "aditivo", "adjetivo",
"adjunto", "admirar", "adorar", "adquirir", "adubo", "adverso", "advogado", "aeronave", "afastar", "aferir",
"afetivo", "afinador", "afivelar", "aflito", "afluente", "afrontar", "agachar", "agarrar", "agasalho", "agenciar",
"agilizar", "agiota", "agitado", "agora", "agradar", "agreste", "agrupar", "aguardar", "agulha", "ajoelhar",
"ajudar", "ajustar", "alameda", "alarme", "alastrar", "alavanca", "albergue", "albino", "alcatra", "aldeia",
"alecrim", "alegria", "alertar", "alface", "alfinete", "algum", "alheio", "aliar", "alicate", "alienar", "alinhar",
"aliviar", "almofada", "alocar", "alpiste", "alterar", "altitude", "alucinar", "alugar", "aluno", "alusivo", "alvo",
"amaciar", "amador", "amarelo", "amassar", "ambas", "ambiente", "ameixa", "amenizar", "amido", "amistoso",
"amizade", "amolador", "amontoar", "amoroso", "amostra", "amparar", "ampliar", "ampola", "anagrama", "analisar",
"anarquia", "anatomia", "andaime", "anel", "anexo", "angular", "animar", "anjo", "anomalia", "anotado", "ansioso",
"anterior", "anuidade", "anunciar", "anzol", "apagador", "apalpar", "apanhado", "apego", "apelido", "apertada",
"apesar", "apetite", "apito", "aplauso", "aplicada", "apoio", "apontar", "aposta", "aprendiz", "aprovar", "aquecer",
"arame", "aranha", "arara", "arcada", "ardente", "areia", "arejar", "arenito", "aresta", "argiloso", "argola",
"arma", "arquivo", "arraial", "arrebate", "arriscar", "arroba", "arrumar", "arsenal", "arterial", "artigo",
"arvoredo", "asfaltar", "asilado", "aspirar", "assador", "assinar", "assoalho", "assunto", "astral", "atacado",
"atadura", "atalho", "atarefar", "atear", "atender", "aterro", "ateu", "atingir", "atirador", "ativo", "atoleiro",
"atracar", "atrevido", "atriz", "atual", "atum", "auditor", "aumentar", "aura", "aurora", "autismo", "autoria",
"autuar", "avaliar", "avante", "avaria", "avental", "avesso", "aviador", "avisar", "avulso", "axila", "azarar",
"azedo", "azeite", "azulejo", "babar", "babosa", "bacalhau", "bacharel", "bacia", "bagagem", "baiano", "bailar",
"baioneta", "bairro", "baixista", "bajular", "baleia", "baliza", "balsa", "banal", "bandeira", "banho", "banir",
"banquete", "barato", "barbado", "baronesa", "barraca", "barulho", "baseado", "bastante", "batata", "batedor",
"batida", "batom", "batucar", "baunilha", "beber", "beijo", "beirada", "beisebol", "beldade", "beleza", "belga",
"beliscar", "bendito", "bengala", "benzer", "berimbau", "berlinda", "berro", "besouro", "bexiga", "bezerro", "bico",
"bicudo", "bienal", "bifocal", "bifurcar", "bigorna", "bilhete", "bimestre", "bimotor", "biologia", "biombo",
"biosfera", "bipolar", "birrento", "biscoito", "bisneto", "bispo", "bissexto", "bitola", "bizarro", "blindado",
"bloco", "bloquear", "boato", "bobagem", "bocado", "bocejo", "bochecha", "boicotar", "bolada", "boletim", "bolha",
"bolo", "bombeiro", "bonde", "boneco", "bonita", "borbulha", "borda", "boreal", "borracha", "bovino", "boxeador",
"branco", "brasa", "braveza", "breu", "briga", "brilho", "brincar", "broa", "brochura", "bronzear", "broto",
"bruxo", "bucha", "budismo", "bufar", "bule", "buraco", "busca", "busto", "buzina", "cabana", "cabelo", "cabide",
"cabo", "cabrito", "cacau", "cacetada", "cachorro", "cacique", "cadastro", "cadeado", "cafezal", "caiaque",
"caipira", "caixote", "cajado", "caju", "calafrio", "calcular", "caldeira", "calibrar", "calmante", "calota",
"camada", "cambista", "camisa", "camomila", "campanha", "camuflar", "canavial", "cancelar", "caneta", "canguru",
"canhoto", "canivete", "canoa", "cansado", "cantar", "canudo", "capacho", "capela", "capinar", "capotar",
"capricho", "captador", "capuz", "caracol", "carbono", "cardeal", "careca", "carimbar", "carneiro", "carpete",
"carreira", "cartaz", "carvalho", "casaco", "casca", "casebre", "castelo", "casulo", "catarata", "cativar", "caule",
"causador", "cautelar", "cavalo", "caverna", "cebola", "cedilha", "cegonha", "celebrar", "celular", "cenoura",
"censo", "centeio", "cercar", "cerrado", "certeiro", "cerveja", "cetim", "cevada", "chacota", "chaleira", "chamado",
"chapada", "charme", "chatice", "chave", "chefe", "chegada", "cheiro", "cheque", "chicote", "chifre", "chinelo",
"chocalho", "chover", "chumbo", "chutar", "chuva", "cicatriz", "ciclone", "cidade", "cidreira", "ciente", "cigana",
"cimento", "cinto", "cinza", "ciranda", "circuito", "cirurgia", "citar", "clareza", "clero", "clicar", "clone",
"clube", "coado", "coagir", "cobaia", "cobertor", "cobrar", "cocada", "coelho", "coentro", "coeso", "cogumelo",
"coibir", "coifa", "coiote", "colar", "coleira", "colher", "colidir", "colmeia", "colono", "coluna", "comando",
"combinar", "comentar", "comitiva", "comover", "complexo", "comum", "concha", "condor", "conectar", "confuso",
"congelar", "conhecer", "conjugar", "consumir", "contrato", "convite", "cooperar", "copeiro", "copiador", "copo",
"coquetel", "coragem", "cordial", "corneta", "coronha", "corporal", "correio", "cortejo", "coruja", "corvo",
"cosseno", "costela", "cotonete", "couro", "couve", "covil", "cozinha", "cratera", "cravo", "creche", "credor",
"creme", "crer", "crespo", "criada", "criminal", "crioulo", "crise", "criticar", "crosta", "crua", "cruzeiro",
"cubano", "cueca", "cuidado", "cujo", "culatra", "culminar", "culpar", "cultura", "cumprir", "cunhado", "cupido",
"curativo", "curral", "cursar", "curto", "cuspir", "custear", "cutelo", "damasco", "datar", "debater", "debitar",
"deboche", "debulhar", "decalque", "decimal", "declive", "decote", "decretar", "dedal", "dedicado", "deduzir",
"defesa", "defumar", "degelo", "degrau", "degustar", "deitado", "deixar", "delator", "delegado", "delinear",
"delonga", "demanda", "demitir", "demolido", "dentista", "depenado", "depilar", "depois", "depressa", "depurar",
"deriva", "derramar", "desafio", "desbotar", "descanso", "desenho", "desfiado", "desgaste", "desigual", "deslize",
"desmamar", "desova", "despesa", "destaque", "desviar", "detalhar", "detentor", "detonar", "detrito", "deusa",
"dever", "devido", "devotado", "dezena", "diagrama", "dialeto", "didata", "difuso", "digitar", "dilatado",
"diluente", "diminuir", "dinastia", "dinheiro", "diocese", "direto", "discreta", "disfarce", "disparo", "disquete",
"dissipar", "distante", "ditador", "diurno", "diverso", "divisor", "divulgar", "dizer", "dobrador", "dolorido",
"domador", "dominado", "donativo", "donzela", "dormente", "dorsal", "dosagem", "dourado", "doutor", "drenagem",
"drible", "drogaria", "duelar", "duende", "dueto", "duplo", "duquesa", "durante", "duvidoso", "eclodir", "ecoar",
"ecologia", "edificar", "edital", "educado", "efeito", "efetivar", "ejetar", "elaborar", "eleger", "eleitor",
"elenco", "elevador", "eliminar", "elogiar", "embargo", "embolado", "embrulho", "embutido", "emenda", "emergir",
"emissor", "empatia", "empenho", "empinado", "empolgar", "emprego", "empurrar", "emulador", "encaixe", "encenado",
"enchente", "encontro", "endeusar", "endossar", "enfaixar", "enfeite", "enfim", "engajado", "engenho", "englobar",
"engomado", "engraxar", "enguia", "enjoar", "enlatar", "enquanto", "enraizar", "enrolado", "enrugar", "ensaio",
"enseada", "ensino", "ensopado", "entanto", "enteado", "entidade", "entortar", "entrada", "entulho", "envergar",
"enviado", "envolver", "enxame", "enxerto", "enxofre", "enxuto", "epiderme", "equipar", "ereto", "erguido",
"errata", "erva", "ervilha", "esbanjar", "esbelto", "escama", "escola", "escrita", "escuta", "esfinge", "esfolar",
"esfregar", "esfumado", "esgrima", "esmalte", "espanto", "espelho", "espiga", "esponja", "espreita", "espumar",
"esquerda", "estaca", "esteira", "esticar", "estofado", "estrela", "estudo", "esvaziar", "etanol", "etiqueta",
"euforia", "europeu", "evacuar", "evaporar", "evasivo", "eventual", "evidente", "evoluir", "exagero", "exalar",
"examinar", "exato", "exausto", "excesso", "excitar", "exclamar", "executar", "exemplo", "exibir", "exigente",
"exonerar", "expandir", "expelir", "expirar", "explanar", "exposto", "expresso", "expulsar", "externo", "extinto",
"extrato", "fabricar", "fabuloso", "faceta", "facial", "fada", "fadiga", "faixa", "falar", "falta", "familiar",
"fandango", "fanfarra", "fantoche", "fardado", "farelo", "farinha", "farofa", "farpa", "fartura", "fatia", "fator",
"favorita", "faxina", "fazenda", "fechado", "feijoada", "feirante", "felino", "feminino", "fenda", "feno", "fera",
"feriado", "ferrugem", "ferver", "festejar", "fetal", "feudal", "fiapo", "fibrose", "ficar", "ficheiro", "figurado",
"fileira", "filho", "filme", "filtrar", "firmeza", "fisgada", "fissura", "fita", "fivela", "fixador", "fixo",
"flacidez", "flamingo", "flanela", "flechada", "flora", "flutuar", "fluxo", "focal", "focinho", "fofocar", "fogo",
"foguete", "foice", "folgado", "folheto", "forjar", "formiga", "forno", "forte", "fosco", "fossa", "fragata",
"fralda", "frango", "frasco", "fraterno", "freira", "frente", "fretar", "frieza", "friso", "fritura", "fronha",
"frustrar", "fruteira", "fugir", "fulano", "fuligem", "fundar", "fungo", "funil", "furador", "furioso", "futebol",
"gabarito", "gabinete", "gado", "gaiato", "gaiola", "gaivota", "galega", "galho", "galinha", "galocha", "ganhar",
"garagem", "garfo", "gargalo", "garimpo", "garoupa", "garrafa", "gasoduto", "gasto", "gata", "gatilho", "gaveta",
"gazela", "gelado", "geleia", "gelo", "gemada", "gemer", "gemido", "generoso", "gengiva", "genial", "genoma",
"genro", "geologia", "gerador", "germinar", "gesso", "gestor", "ginasta", "gincana", "gingado", "girafa", "girino",
"glacial", "glicose", "global", "glorioso", "goela", "goiaba", "golfe", "golpear", "gordura", "gorjeta", "gorro",
"gostoso", "goteira", "governar", "gracejo", "gradual", "grafite", "gralha", "grampo", "granada", "gratuito",
"graveto", "graxa", "grego", "grelhar", "greve", "grilo", "grisalho", "gritaria", "grosso", "grotesco", "grudado",
"grunhido", "gruta", "guache", "guarani", "guaxinim", "guerrear", "guiar", "guincho", "guisado", "gula", "guloso",
"guru", "habitar", "harmonia", "haste", "haver", "hectare", "herdar", "heresia", "hesitar", "hiato", "hibernar",
"hidratar", "hiena", "hino", "hipismo", "hipnose", "hipoteca", "hoje", "holofote", "homem", "honesto", "honrado",
"hormonal", "hospedar", "humorado", "iate", "ideia", "idoso", "ignorado", "igreja", "iguana", "ileso", "ilha",
"iludido", "iluminar", "ilustrar", "imagem", "imediato", "imenso", "imersivo", "iminente", "imitador", "imortal",
"impacto", "impedir", "implante", "impor", "imprensa", "impune", "imunizar", "inalador", "inapto", "inativo",
"incenso", "inchar", "incidir", "incluir", "incolor", "indeciso", "indireto", "indutor", "ineficaz", "inerente",
"infantil", "infestar", "infinito", "inflamar", "informal", "infrator", "ingerir", "inibido", "inicial", "inimigo",
"injetar", "inocente", "inodoro", "inovador", "inox", "inquieto", "inscrito", "inseto", "insistir", "inspetor",
"instalar", "insulto", "intacto", "integral", "intimar", "intocado", "intriga", "invasor", "inverno", "invicto",
"invocar", "iogurte", "iraniano", "ironizar", "irreal", "irritado", "isca", "isento", "isolado", "isqueiro",
"italiano", "janeiro", "jangada", "janta", "jararaca", "jardim", "jarro", "jasmim", "jato", "javali", "jazida",
"jejum", "joaninha", "joelhada", "jogador", "joia", "jornal", "jorrar", "jovem", "juba", "judeu", "judoca", "juiz",
"julgador", "julho", "jurado", "jurista", "juro", "justa", "labareda", "laboral", "lacre", "lactante", "ladrilho",
"lagarta", "lagoa", "laje", "lamber", "lamentar", "laminar", "lampejo", "lanche", "lapidar", "lapso", "laranja",
"lareira", "largura", "lasanha", "lastro", "lateral", "latido", "lavanda", "lavoura", "lavrador", "laxante",
"lazer", "lealdade", "lebre", "legado", "legendar", "legista", "leigo", "leiloar", "leitura", "lembrete", "leme",
"lenhador", "lentilha", "leoa", "lesma", "leste", "letivo", "letreiro", "levar", "leveza", "levitar", "liberal",
"libido", "liderar", "ligar", "ligeiro", "limitar", "limoeiro", "limpador", "linda", "linear", "linhagem",
"liquidez", "listagem", "lisura", "litoral", "livro", "lixa", "lixeira", "locador", "locutor", "lojista", "lombo",
"lona", "longe", "lontra", "lorde", "lotado", "loteria", "loucura", "lousa", "louvar", "luar", "lucidez", "lucro",
"luneta", "lustre", "lutador", "luva", "macaco", "macete", "machado", "macio", "madeira", "madrinha", "magnata",
"magreza", "maior", "mais", "malandro", "malha", "malote", "maluco", "mamilo", "mamoeiro", "mamute", "manada",
"mancha", "mandato", "manequim", "manhoso", "manivela", "manobrar", "mansa", "manter", "manusear", "mapeado",
"maquinar", "marcador", "maresia", "marfim", "margem", "marinho", "marmita", "maroto", "marquise", "marreco",
"martelo", "marujo", "mascote", "masmorra", "massagem", "mastigar", "matagal", "materno", "matinal", "matutar",
"maxilar", "medalha", "medida", "medusa", "megafone", "meiga", "melancia", "melhor", "membro", "memorial", "menino",
"menos", "mensagem", "mental", "merecer", "mergulho", "mesada", "mesclar", "mesmo", "mesquita", "mestre", "metade",
"meteoro", "metragem", "mexer", "mexicano", "micro", "migalha", "migrar", "milagre", "milenar", "milhar", "mimado",
"minerar", "minhoca", "ministro", "minoria", "miolo", "mirante", "mirtilo", "misturar", "mocidade", "moderno",
"modular", "moeda", "moer", "moinho", "moita", "moldura", "moleza", "molho", "molinete", "molusco", "montanha",
"moqueca", "morango", "morcego", "mordomo", "morena", "mosaico", "mosquete", "mostarda", "motel", "motim", "moto",
"motriz", "muda", "muito", "mulata", "mulher", "multar", "mundial", "munido", "muralha", "murcho", "muscular",
"museu", "musical", "nacional", "nadador", "naja", "namoro", "narina", "narrado", "nascer", "nativa", "natureza",
"navalha", "navegar", "navio", "neblina", "nebuloso", "negativa", "negociar", "negrito", "nervoso", "neta",
"neural", "nevasca", "nevoeiro", "ninar", "ninho", "nitidez", "nivelar", "nobreza", "noite", "noiva", "nomear",
"nominal", "nordeste", "nortear", "notar", "noticiar", "noturno", "novelo", "novilho", "novo", "nublado", "nudez",
"numeral", "nupcial", "nutrir", "nuvem", "obcecado", "obedecer", "objetivo", "obrigado", "obscuro", "obstetra",
"obter", "obturar", "ocidente", "ocioso", "ocorrer", "oculista", "ocupado", "ofegante", "ofensiva", "oferenda",
"oficina", "ofuscado", "ogiva", "olaria", "oleoso", "olhar", "oliveira", "ombro", "omelete", "omisso", "omitir",
"ondulado", "oneroso", "ontem", "opcional", "operador", "oponente", "oportuno", "oposto", "orar", "orbitar",
"ordem", "ordinal", "orfanato", "orgasmo", "orgulho", "oriental", "origem", "oriundo", "orla", "ortodoxo",
"orvalho", "oscilar", "ossada", "osso", "ostentar", "otimismo", "ousadia", "outono", "outubro", "ouvido", "ovelha",
"ovular", "oxidar", "oxigenar", "pacato", "paciente", "pacote", "pactuar", "padaria", "padrinho", "pagar", "pagode",
"painel", "pairar", "paisagem", "palavra", "palestra", "palheta", "palito", "palmada", "palpitar", "pancada",
"panela", "panfleto", "panqueca", "pantanal", "papagaio", "papelada", "papiro", "parafina", "parcial", "pardal",
"parede", "partida", "pasmo", "passado", "pastel", "patamar", "patente", "patinar", "patrono", "paulada", "pausar",
"peculiar", "pedalar", "pedestre", "pediatra", "pedra", "pegada", "peitoral", "peixe", "pele", "pelicano", "penca",
"pendurar", "peneira", "penhasco", "pensador", "pente", "perceber", "perfeito", "pergunta", "perito", "permitir",
"perna", "perplexo", "persiana", "pertence", "peruca", "pescado", "pesquisa", "pessoa", "petiscar", "piada",
"picado", "piedade", "pigmento", "pilastra", "pilhado", "pilotar", "pimenta", "pincel", "pinguim", "pinha",
"pinote", "pintar", "pioneiro", "pipoca", "piquete", "piranha", "pires", "pirueta", "piscar", "pistola", "pitanga",
"pivete", "planta", "plaqueta", "platina", "plebeu", "plumagem", "pluvial", "pneu", "poda", "poeira", "poetisa",
"polegada", "policiar", "poluente", "polvilho", "pomar", "pomba", "ponderar", "pontaria", "populoso", "porta",
"possuir", "postal", "pote", "poupar", "pouso", "povoar", "praia", "prancha", "prato", "praxe", "prece", "predador",
"prefeito", "premiar", "prensar", "preparar", "presilha", "pretexto", "prevenir", "prezar", "primata", "princesa",
"prisma", "privado", "processo", "produto", "profeta", "proibido", "projeto", "prometer", "propagar", "prosa",
"protetor", "provador", "publicar", "pudim", "pular", "pulmonar", "pulseira", "punhal", "punir", "pupilo", "pureza",
"puxador", "quadra", "quantia", "quarto", "quase", "quebrar", "queda", "queijo", "quente", "querido", "quimono",
"quina", "quiosque", "rabanada", "rabisco", "rachar", "racionar", "radial", "raiar", "rainha", "raio", "raiva",
"rajada", "ralado", "ramal", "ranger", "ranhura", "rapadura", "rapel", "rapidez", "raposa", "raquete", "raridade",
"rasante", "rascunho", "rasgar", "raspador", "rasteira", "rasurar", "ratazana", "ratoeira", "realeza", "reanimar",
"reaver", "rebaixar", "rebelde", "rebolar", "recado", "recente", "recheio", "recibo", "recordar", "recrutar",
"recuar", "rede", "redimir", "redonda", "reduzida", "reenvio", "refinar", "refletir", "refogar", "refresco",
"refugiar", "regalia", "regime", "regra", "reinado", "reitor", "rejeitar", "relativo", "remador", "remendo",
"remorso", "renovado", "reparo", "repelir", "repleto", "repolho", "represa", "repudiar", "requerer", "resenha",
"resfriar", "resgatar", "residir", "resolver", "respeito", "ressaca", "restante", "resumir", "retalho", "reter",
"retirar", "retomada", "retratar", "revelar", "revisor", "revolta", "riacho", "rica", "rigidez", "rigoroso",
"rimar", "ringue", "risada", "risco", "risonho", "robalo", "rochedo", "rodada", "rodeio", "rodovia", "roedor",
"roleta", "romano", "roncar", "rosado", "roseira", "rosto", "rota", "roteiro", "rotina", "rotular", "rouco",
"roupa", "roxo", "rubro", "rugido", "rugoso", "ruivo", "rumo", "rupestre", "russo", "sabor", "saciar", "sacola",
"sacudir", "sadio", "safira", "saga", "sagrada", "saibro", "salada", "saleiro", "salgado", "saliva", "salpicar",
"salsicha", "saltar", "salvador", "sambar", "samurai", "sanar", "sanfona", "sangue", "sanidade", "sapato", "sarda",
"sargento", "sarjeta", "saturar", "saudade", "saxofone", "sazonal", "secar", "secular", "seda", "sedento",
"sediado", "sedoso", "sedutor", "segmento", "segredo", "segundo", "seiva", "seleto", "selvagem", "semanal",
"semente", "senador", "senhor", "sensual", "sentado", "separado", "sereia", "seringa", "serra", "servo", "setembro",
"setor", "sigilo", "silhueta", "silicone", "simetria", "simpatia", "simular", "sinal", "sincero", "singular",
"sinopse", "sintonia", "sirene", "siri", "situado", "soberano", "sobra", "socorro", "sogro", "soja", "solda",
"soletrar", "solteiro", "sombrio", "sonata", "sondar", "sonegar", "sonhador", "sono", "soprano", "soquete",
"sorrir", "sorteio", "sossego", "sotaque", "soterrar", "sovado", "sozinho", "suavizar", "subida", "submerso",
"subsolo", "subtrair", "sucata", "sucesso", "suco", "sudeste", "sufixo", "sugador", "sugerir", "sujeito", "sulfato",
"sumir", "suor", "superior", "suplicar", "suposto", "suprimir", "surdina", "surfista", "surpresa", "surreal",
"surtir", "suspiro", "sustento", "tabela", "tablete", "tabuada", "tacho", "tagarela", "talher", "talo", "talvez",
"tamanho", "tamborim", "tampa", "tangente", "tanto", "tapar", "tapioca", "tardio", "tarefa", "tarja", "tarraxa",
"tatuagem", "taurino", "taxativo", "taxista", "teatral", "tecer", "tecido", "teclado", "tedioso", "teia", "teimar",
"telefone", "telhado", "tempero", "tenente", "tensor", "tentar", "termal", "terno", "terreno", "tese", "tesoura",
"testado", "teto", "textura", "texugo", "tiara", "tigela", "tijolo", "timbrar", "timidez", "tingido", "tinteiro",
"tiragem", "titular", "toalha", "tocha", "tolerar", "tolice", "tomada", "tomilho", "tonel", "tontura", "topete",
"tora", "torcido", "torneio", "torque", "torrada", "torto", "tostar", "touca", "toupeira", "toxina", "trabalho",
"tracejar", "tradutor", "trafegar", "trajeto", "trama", "trancar", "trapo", "traseiro", "tratador", "travar",
"treino", "tremer", "trepidar", "trevo", "triagem", "tribo", "triciclo", "tridente", "trilogia", "trindade",
"triplo", "triturar", "triunfal", "trocar", "trombeta", "trova", "trunfo", "truque", "tubular", "tucano", "tudo",
"tulipa", "tupi", "turbo", "turma", "turquesa", "tutelar", "tutorial", "uivar", "umbigo", "unha", "unidade",
"uniforme", "urologia", "urso", "urtiga", "urubu", "usado", "usina", "usufruir", "vacina", "vadiar", "vagaroso",
"vaidoso", "vala", "valente", "validade", "valores", "vantagem", "vaqueiro", "varanda", "vareta", "varrer",
"vascular", "vasilha", "vassoura", "vazar", "vazio", "veado", "vedar", "vegetar", "veicular", "veleiro", "velhice",
"veludo", "vencedor", "vendaval", "venerar", "ventre", "verbal", "verdade", "vereador", "vergonha", "vermelho",
"verniz", "versar", "vertente", "vespa", "vestido", "vetorial", "viaduto", "viagem", "viajar", "viatura",
"vibrador", "videira", "vidraria", "viela", "viga", "vigente", "vigiar", "vigorar", "vilarejo", "vinco", "vinheta",
"vinil", "violeta", "virada", "virtude", "visitar", "visto", "vitral", "viveiro", "vizinho", "voador", "voar",
"vogal", "volante", "voleibol", "voltagem", "volumoso", "vontade", "vulto", "vuvuzela", "xadrez", "xarope", "xeque",
"xeretar", "xerife", "xingar", "zangado", "zarpar", "zebu", "zelador", "zombar", "zoologia", "zumbido"]

File diff suppressed because one or more lines are too long

3798
tests.js

File diff suppressed because it is too large Load Diff

17
tests/package.json Normal file
View File

@@ -0,0 +1,17 @@
{
"name": "tests",
"version": "1.0.0",
"scripts": {
"test": "node tests.js"
},
"author": "Ian coleman",
"description": "Tests for BIP39 tool",
"repository": {
"type": "git",
"url": "git://github.com/iancoleman/bip39.git"
},
"dependencies": {
"selenium-webdriver": "^3.6.0"
},
"license": "MIT"
}

View File

@@ -0,0 +1,11 @@
{
"spec_dir": "spec",
"spec_files": [
"**/*[sS]pec.js"
],
"helpers": [
"helpers/**/*.js"
],
"stopSpecOnExpectationFailure": false,
"random": false
}

5125
tests/spec/tests.js Normal file

File diff suppressed because it is too large Load Diff