Compare commits

...

465 Commits
0.3.2 ... 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
63 changed files with 20898 additions and 128406 deletions

1
.gitignore vendored
View File

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

File diff suppressed because one or more lines are too long

View File

@@ -1,3 +1,204 @@
# 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

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

@@ -8,7 +8,8 @@ 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.
@@ -74,6 +75,9 @@ 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

View File

@@ -17,7 +17,7 @@ created with the following steps:
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. Add a new post to twitter from @bip39tool with the version, link and hash
1. Publish to any hosted locations (eg iancoleman.github.io/bip39)
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

View File

@@ -103,3 +103,9 @@ body {
overflow-x: scroll;
font-family: monospace;
}
.visual-privacy .private-data {
display: none;
}
.text-weight-normal {
font-weight: normal !important;
}

File diff suppressed because it is too large Load Diff

File diff suppressed because one or more lines are too long

View File

@@ -3,7 +3,7 @@
<head lang="en">
<meta charset="utf-8" />
<title>BIP39 - Mnemonic Code</title>
<link rel="stylesheet" href="css/bootstrap-3.3.7.css">
<link rel="stylesheet" href="css/bootstrap.css">
<link rel="stylesheet" href="css/app.css">
<meta content="Mnemonic code for generating deterministic keys" name="description"/>
<meta content="width=device-width, initial-scale=1.0" name="viewport" />
@@ -15,7 +15,7 @@
<div class="container">
<h1 class="text-center">Mnemonic Code Converter</h1>
<p class="version">v0.3.2</p>
<p class="version">v0.5.1</p>
<hr>
<div class="row">
<div class="col-md-12">
@@ -24,7 +24,7 @@
<div class="form-group">
<div class="col-sm-2"></div>
<div class="col-sm-10">
<p>You can enter an existing BIP39 mnemonic, or generate a new random one. Typing your own twelve words will probably not work how you expect, since the words require a particular structure (the last word is a checksum).</p>
<p>You can enter an existing BIP39 mnemonic, or generate a new random one. Typing your own twelve words will probably not work how you expect, since the words require a particular structure (the last word contains a checksum).</p>
<p>
For more info see the
<a href="https://github.com/bitcoin/bips/blob/master/bip-0039.mediawiki" target="_blank">BIP39 spec</a>.
@@ -36,8 +36,8 @@
<div class="col-sm-10">
<div class="form-inline">
<div class="input-group-inline">
<span>Generate a random mnemonic, or enter your own below</span>:
<button class="btn generate">Generate</button>
<span>Generate a random mnemonic</span>:
<button class="btn generate" ><b>GENERATE</b></button>
<select id="strength" class="strength form-control">
<option value="3">3</option>
<option value="6">6</option>
@@ -48,7 +48,12 @@
<option value="21">21</option>
<option value="24">24</option>
</select>
<span>words</span>
<span>words, or enter your own below</span>.
<p class="warning help-block hidden">
<span class="text-danger">
Mnemonics with less than 12 words have low entropy and may be guessed by an attacker.
</span>
</p>
</div>
</div>
</div>
@@ -64,7 +69,7 @@
<div class="form-group">
<label for="entropy" class="col-sm-2 control-label">Entropy</label>
<div class="col-sm-7">
<textarea id="entropy" rows="2" class="entropy form-control" placeholder="Accepts either binary, base 6, 6-sided dice, base 10, hexadecimal or cards"></textarea>
<textarea id="entropy" rows="2" class="entropy private-data form-control" placeholder="Accepts either binary, base 6, 6-sided dice, base 10, hexadecimal or cards" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false"></textarea>
<div class="row filter-warning text-danger hidden">
<p class="col-sm-12">
<strong>
@@ -81,7 +86,7 @@
<div class="row">
<label class="col-sm-3 control-label">Entropy Type</label>
<div class="type col-sm-3 form-control-static"></div>
<label class="col-sm-3 control-label">Bits Per Event</label>
<label class="col-sm-3 control-label">Avg Bits Per Event</label>
<div class="bits-per-event col-sm-3 form-control-static"></div>
</div>
<div class="row">
@@ -91,32 +96,69 @@
<div class="bits col-sm-3 form-control-static"></div>
</div>
<label class="col-sm-3 control-label">Filtered Entropy</label>
<div class="filtered col-sm-9 form-control-static"></div>
<div class="filtered private-data col-sm-9 form-control-static"></div>
<label class="col-sm-3 control-label">Raw Binary</label>
<div class="binary col-sm-9 form-control-static"></div>
<div class="binary private-data col-sm-9 form-control-static"></div>
<label class="col-sm-3 control-label">Binary Checksum</label>
<div class="checksum private-data col-sm-9 form-control-static">&nbsp;</div>
<label class="col-sm-3 control-label">Word Indexes</label>
<div class="word-indexes col-sm-9 form-control-static">&nbsp;</div>
<div class="word-indexes private-data col-sm-9 form-control-static">&nbsp;</div>
<label class="col-sm-3 control-label">Mnemonic Length</label>
<div class="col-sm-9">
<select class="mnemonic-length form-control">
<option value="raw" selected>Use Raw Entropy (3 words per 32 bits)</option>
<option value="12">12 <span>Words</span></option>
<option value="15">15 <span>Words</option>
<option value="15">15 <span>Words</span></option>
<option value="18">18 <span>Words</span></option>
<option value="21">21 <span>Words</span></option>
<option value="24">24 <span>Words</span></option>
</select>
<p class="weak-entropy-override-warning hidden">
<span class="text-danger">
The mnemonic will appear more secure than it really is.
</span>
</p>
</div>
</div>
<div class="col-sm-3">
<p>Valid entropy values include:</p>
<ul>
<li><strong>Binary</strong> [0-1]<br>101010011</li>
<li><strong>Base 6</strong> [0-5]<br>123434014</li>
<li><strong>Dice</strong> [1-6]<br>62535634</li>
<li><strong>Base 10</strong> [0-9]<br>90834528</li>
<li><strong>Hex</strong> [0-9A-F]<br>4187a8bfd9</li>
<li><strong>Card</strong> [A2-9TJQK][CDHS]<br>ahqs9dtc</li>
<li>
<label>
<input type="radio" name="entropy-type" value="binary">
<strong>Binary</strong> [0-1]<br>101010011
</label>
</li>
<li>
<label>
<input type="radio" name="entropy-type" value="base 6">
<strong>Base 6</strong> [0-5]<br>123434014
</label>
</li>
<li>
<label>
<input type="radio" name="entropy-type" value="dice">
<strong>Dice</strong> [1-6]<br>62535634
</label>
</li>
<li>
<label>
<input type="radio" name="entropy-type" value="base 10">
<strong>Base 10</strong> [0-9]<br>90834528
</label>
</li>
<li>
<label>
<input type="radio" name="entropy-type" value="hexadecimal" checked>
<strong>Hex</strong> [0-9A-F]<br>4187a8bfd9
</label>
</li>
<li>
<label>
<input type="radio" name="entropy-type" value="card">
<strong>Card</strong> [A2-9TJQK][CDHS]<br>ahqs9dtc
</label>
</li>
</ul>
</div>
</div>
@@ -130,6 +172,15 @@
</label>
</div>
</div>
<div class="form-group">
<div class="col-sm-2"></div>
<div class="col-sm-10 checkbox">
<label>
<input type="checkbox" class="privacy-screen-toggle">
<span>Hide all private info</span>
</label>
</div>
</div>
<div class="form-group">
<label class="col-sm-2 control-label">Mnemonic Language</label>
<div class="col-sm-10 languages">
@@ -141,25 +192,47 @@
<a href="#chinese_traditional" title="Chinese (Traditional)">中文(繁體)</a>
<a href="#french" title="French">Français</a>
<a href="#italian" title="Italian">Italiano</a>
<a href="#korean" title="Korean">한국어</a>
<a href="#czech" title="Czech">Čeština</a>
<a href="#portuguese" title="Portuguese">Português</a>
</div>
</div>
</div>
<div class="form-group">
<label for="phrase" class="col-sm-2 control-label">BIP39 Mnemonic</label>
<div class="col-sm-10">
<textarea id="phrase" class="phrase form-control" data-show-qr></textarea>
<textarea id="phrase" class="phrase private-data form-control" data-show-qr autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false"></textarea>
</div>
</div>
<div class="form-group">
<div class="splitMnemonic hidden">
<label for="phrase" class="col-sm-2 control-label">BIP39 Split Mnemonic</label>
<div class="col-sm-10">
<textarea id="phraseSplit" class="phraseSplit private-data form-control" title="Only 2 of 3 cards needed to recover." rows="3"></textarea>
<p class="help-block">
<span id="phraseSplitWarn" class="phraseSplitWarn"></span>
</p>
</div>
</div>
<div class="col-sm-2">
</div>
<div class="col-sm-10">
<label class="control-label text-weight-normal">
<input type="checkbox" class="showSplitMnemonic">
Show split mnemonic cards
</label>
</div>
</div>
<div class="form-group">
<label for="passphrase" class="col-sm-2 control-label">BIP39 Passphrase (optional)</label>
<div class="col-sm-10">
<textarea id="passphrase" class="passphrase form-control"></textarea>
<textarea id="passphrase" class="passphrase private-data form-control" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false"></textarea>
</div>
</div>
<div class="form-group">
<label for="seed" class="col-sm-2 control-label">BIP39 Seed</label>
<div class="col-sm-10">
<textarea id="seed" class="seed form-control" readonly="readonly" data-show-qr></textarea>
<textarea id="seed" class="seed private-data form-control" data-show-qr autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false"></textarea>
</div>
</div>
<div class="form-group">
@@ -173,9 +246,116 @@
<div class="form-group">
<label for="root-key" class="col-sm-2 control-label">BIP32 Root Key</label>
<div class="col-sm-10">
<textarea id="root-key" class="root-key form-control" data-show-qr></textarea>
<textarea id="root-key" class="root-key private-data form-control" data-show-qr autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false"></textarea>
</div>
</div>
<div class="form-group">
<div class="col-sm-2"></div>
<div class="col-sm-10">
<label class="control-label text-weight-normal">
<input type="checkbox" class="showBip85" />
Show BIP85
</label>
</div>
</div>
<div class="form-group bip85 hidden">
<div class="form-group text-danger">
<label class="col-sm-2 control-label">Warning</label>
<div class="col-sm-10 form-control-static">
This is an advanced feature and should only be used if you understand what it does.
</div>
</div>
<div class="form-group">
<label class="col-sm-2"></label>
<div class="col-sm-10">
<p>
The value of the "BIP85 Child Key" field shown below is not used
elsewhere on this page. It can be used as a new key.
</p>
<p>
In case of the BIP39 application, you can paste it into the "BIP39 Mnemonic"
field to use it as a new mnemonic.
</p>
<p>
Please read the
<a href="https://github.com/bitcoin/bips/blob/master/bip-0085.mediawiki" target="_blank">
BIP85 spec
</a>
for more information.
</p>
</div>
</p>
<label for="bip85-application" class="col-sm-2 control-label">BIP85 Application</label>
<div class="col-sm-10">
<select id="bip85-application" class="form-control">
<option value="bip39" selected>BIP39</option>
<option value="wif">WIF</option>
<option value="xprv">Xprv</option>
<option value="hex">Hex</option>
</select>
</div>
</div>
<div class="form-group bip85 bip85-mnemonic-language-input hidden">
<label for="bip85-mnemonic-language" class="col-sm-2 control-label">BIP85 Mnemonic Language</label>
<div class="col-sm-10 languages">
<select id="bip85-mnemonic-language" class="strength form-control">
<option value="0" selected>English</option>
<!--<option value="1">日本語</option>
<option value="2">한국어</option>
<option value="3">Español</option>
<option value="4">中文(简体)</option>
<option value="5">中文(繁體)</option>
<option value="6">Français</option>
<option value="7">Italiano</option>
<option value="8">Čeština</option>
<option value="9">Português</option>-->
</select>
</div>
</div>
<div class="form-group bip85 bip85-mnemonic-length-input hidden">
<label for="bip85-mnemonic-length" class="col-sm-2 control-label">BIP85 Mnemonic Length</label>
<div class="col-sm-10">
<select id="bip85-mnemonic-length" class="strength form-control">
<option value="12" selected>12</option>
<option value="18">18</option>
<option value="24">24</option>
</select>
</div>
</div>
<div class="form-group bip85 hidden">
<span class="bip85-bytes-input">
<label for="bip85-bytes" class="col-sm-2 control-label">BIP85 Bytes</label>
<div class="col-sm-10">
<input id="bip85-bytes" type="text" class="change form-control" value="64" />
</div>
</span>
</div>
<div class="form-group bip85 bip85-index-input hidden">
<label for="bip85-index" class="col-sm-2 control-label">BIP85 Index</label>
<div class="col-sm-10">
<input id="bip85-index" type="text" class="change form-control" value="0" />
</div>
</div>
<div class="form-group bip85 hidden">
<label for="phrase" class="col-sm-2 control-label">BIP85 Child Key</label>
<div class="col-sm-10">
<textarea
id="bip85Field"
data-show-qr
class="bip85Field private-data form-control"
title="BIP85 Child Key"
rows="3"
></textarea>
</div>
</div>
<div class="form-group litecoin-ltub-container hidden">
<label for="litecoin-use-ltub" class="col-sm-2 control-label">Prefixes</label>
<div class="col-sm-10 checkbox">
@@ -223,35 +403,35 @@
</p>
</div>
<div class="form-group">
<label for="purpose" class="col-sm-2 control-label">
<label for="purpose-bip44" class="col-sm-2 control-label">
<a href="https://github.com/bitcoin/bips/blob/master/bip-0044.mediawiki#purpose" target="_blank">Purpose</a>
</label>
<div class="col-sm-10">
<input id="purpose" type="text" class="purpose form-control" value="44" readonly>
<input id="purpose-bip44" type="text" class="purpose form-control" value="44" readonly>
</div>
</div>
<div class="form-group">
<label for="coin" class="col-sm-2 control-label">
<label for="coin-bip44" class="col-sm-2 control-label">
<a href="https://github.com/bitcoin/bips/blob/master/bip-0044.mediawiki#registered-coin-types" target="_blank">Coin</a>
</label>
<div class="col-sm-10">
<input id="coin" type="text" class="coin form-control" value="0" readonly>
<input id="coin-bip44" type="text" class="coin form-control" value="0" readonly>
</div>
</div>
<div class="form-group">
<label for="account" class="col-sm-2 control-label">
<label for="account-bip44" class="col-sm-2 control-label">
<a href="https://github.com/bitcoin/bips/blob/master/bip-0044.mediawiki#account" target="_blank">Account</a>
</label>
<div class="col-sm-10">
<input id="account" type="text" class="account form-control" value="0">
<input id="account-bip44" type="text" class="account form-control" value="0">
</div>
</div>
<div class="form-group">
<label for="change" class="col-sm-2 control-label">
<label for="change-bip44" class="col-sm-2 control-label">
<a href="https://github.com/bitcoin/bips/blob/master/bip-0044.mediawiki#change" target="_blank">External / Internal</a>
</label>
<div class="col-sm-10">
<input id="change" type="text" class="change form-control" value="0">
<input id="change-bip44" type="text" class="change form-control" value="0">
</div>
</div>
<div class="form-group">
@@ -266,7 +446,7 @@
<span>Account Extended Private Key</span>
</label>
<div class="col-sm-10">
<textarea id="account-xprv" type="text" class="account-xprv form-control" readonly data-show-qr></textarea>
<textarea id="account-xprv-bip44" type="text" class="account-xprv private-data form-control" readonly data-show-qr autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false"></textarea>
</div>
</div>
<div class="form-group">
@@ -274,7 +454,7 @@
<span>Account Extended Public Key</span>
</label>
<div class="col-sm-10">
<textarea id="account-xpub" type="text" class="account-xpub form-control" readonly data-show-qr></textarea>
<textarea id="account-xpub-bip44" type="text" class="account-xpub form-control" readonly data-show-qr autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false"></textarea>
</div>
</div>
<div class="form-group">
@@ -317,13 +497,6 @@
<input id="bip32-path" type="text" class="path form-control" value="m/0">
</div>
</div>
<div class="form-group">
<div class="col-sm-2"></div>
<label class="col-sm-10">
<input class="hardened-addresses" type="checkbox">
<span>Use hardened addresses</span>
</label>
</div>
<div class="form-group">
<label for="core-path" class="col-sm-2 control-label">Bitcoin Core</label>
<div class="col-sm-10">
@@ -341,6 +514,7 @@
<div class="col-sm-10">
<p class="form-control no-border">
<span>Use path <code>m/0'/0</code>.</span>
<span>For change addresses use path <code>m/0'/1</code>.</span>
</p>
<p class="form-control no-border">
<span>For more info see</span>
@@ -383,35 +557,35 @@
</p>
</div>
<div class="form-group">
<label for="purpose" class="col-sm-2 control-label">
<label for="purpose-bip49" class="col-sm-2 control-label">
<a href="https://github.com/bitcoin/bips/blob/master/bip-0044.mediawiki#purpose" target="_blank">Purpose</a>
</label>
<div class="col-sm-10">
<input id="purpose" type="text" class="purpose form-control" value="49" readonly>
<input id="purpose-bip49" type="text" class="purpose form-control" value="49" readonly>
</div>
</div>
<div class="form-group">
<label for="coin" class="col-sm-2 control-label">
<label for="coin-bip49" class="col-sm-2 control-label">
<a href="https://github.com/bitcoin/bips/blob/master/bip-0044.mediawiki#registered-coin-types" target="_blank">Coin</a>
</label>
<div class="col-sm-10">
<input id="coin" type="text" class="coin form-control" value="0" readonly>
<input id="coin-bip49" type="text" class="coin form-control" value="0" readonly>
</div>
</div>
<div class="form-group">
<label for="account" class="col-sm-2 control-label">
<label for="account-bip49" class="col-sm-2 control-label">
<a href="https://github.com/bitcoin/bips/blob/master/bip-0044.mediawiki#account" target="_blank">Account</a>
</label>
<div class="col-sm-10">
<input id="account" type="text" class="account form-control" value="0">
<input id="account-bip49" type="text" class="account form-control" value="0">
</div>
</div>
<div class="form-group">
<label for="change" class="col-sm-2 control-label">
<label for="change-bip49" class="col-sm-2 control-label">
<a href="https://github.com/bitcoin/bips/blob/master/bip-0044.mediawiki#change" target="_blank">External / Internal</a>
</label>
<div class="col-sm-10">
<input id="change" type="text" class="change form-control" value="0">
<input id="change-bip49" type="text" class="change form-control" value="0">
</div>
</div>
<div class="form-group">
@@ -426,7 +600,7 @@
<span>Account Extended Private Key</span>
</label>
<div class="col-sm-10">
<textarea id="account-xprv" type="text" class="account-xprv form-control" readonly data-show-qr></textarea>
<textarea id="account-xprv-bip49" type="text" class="account-xprv private-data form-control" readonly data-show-qr autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false"></textarea>
</div>
</div>
<div class="form-group">
@@ -434,7 +608,7 @@
<span>Account Extended Public Key</span>
</label>
<div class="col-sm-10">
<textarea id="account-xpub" type="text" class="account-xpub form-control" readonly data-show-qr></textarea>
<textarea id="account-xpub-bip49" type="text" class="account-xpub form-control" readonly data-show-qr autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false"></textarea>
</div>
</div>
<div class="form-group">
@@ -484,6 +658,8 @@
<select class="form-control bip141-semantics">
<option value="p2wpkh">P2WPKH</option>
<option value="p2wpkh-p2sh" selected>P2WPKH nested in P2SH</option>
<option value="p2wsh">P2WSH (1-of-1 multisig)</option>
<option value="p2wsh-p2sh">P2WSH nested in P2SH (1-of-1 multisig)</option>
</select>
</div>
</div>
@@ -493,79 +669,89 @@
<div id="bip84" class="tab-pane">
<form class="form-horizontal" role="form">
<br>
<div class="col-sm-2"></div>
<div class="col-sm-10">
<p>
For more info see the
<a href="https://github.com/bitcoin/bips/blob/master/bip-0084.mediawiki" target="_blank">BIP84 spec</a>.
</p>
</div>
<div class="form-group">
<label for="purpose" class="col-sm-2 control-label">
Purpose
</label>
<div class="col-sm-10">
<input id="purpose" type="text" class="purpose form-control" value="84" readonly>
<div class="unavailable hidden">
<div class="form-group">
<div class="col-sm-2"></div>
<div class="col-sm-10">
<p>BIP84 is unavailable for this coin.</p>
</div>
</div>
</div>
<div class="form-group">
<label for="coin" class="col-sm-2 control-label">
Coin
</label>
<div class="available">
<div class="col-sm-2"></div>
<div class="col-sm-10">
<input id="coin" type="text" class="coin form-control" value="0" readonly>
<p>
For more info see the
<a href="https://github.com/bitcoin/bips/blob/master/bip-0084.mediawiki" target="_blank">BIP84 spec</a>.
</p>
</div>
</div>
<div class="form-group">
<label for="account" class="col-sm-2 control-label">
Account
</label>
<div class="col-sm-10">
<input id="account" type="text" class="account form-control" value="0">
<div class="form-group">
<label for="purpose-bip84" class="col-sm-2 control-label">
Purpose
</label>
<div class="col-sm-10">
<input id="purpose-bip84" type="text" class="purpose form-control" value="84" readonly>
</div>
</div>
</div>
<div class="form-group">
<label for="change" class="col-sm-2 control-label">
External / Internal
</label>
<div class="col-sm-10">
<input id="change" type="text" class="change form-control" value="0">
<div class="form-group">
<label for="coin-bip84" class="col-sm-2 control-label">
Coin
</label>
<div class="col-sm-10">
<input id="coin-bip84" type="text" class="coin form-control" value="0" readonly>
</div>
</div>
</div>
<div class="form-group">
<label class="col-sm-2 control-label">
</label>
<div class="col-sm-10">
<p>The account extended keys can be used for importing to most BIP84 compatible wallets.</p>
<div class="form-group">
<label for="account-bip84" class="col-sm-2 control-label">
Account
</label>
<div class="col-sm-10">
<input id="account-bip84" type="text" class="account form-control" value="0">
</div>
</div>
</div>
<div class="form-group">
<label for="account-xprv" class="col-sm-2 control-label">
<span>Account Extended Private Key</span>
</label>
<div class="col-sm-10">
<textarea id="account-xprv" type="text" class="account-xprv form-control" readonly data-show-qr></textarea>
<div class="form-group">
<label for="change-bip84" class="col-sm-2 control-label">
External / Internal
</label>
<div class="col-sm-10">
<input id="change-bip84" type="text" class="change form-control" value="0">
</div>
</div>
</div>
<div class="form-group">
<label for="account-xpub" class="col-sm-2 control-label">
<span>Account Extended Public Key</span>
</label>
<div class="col-sm-10">
<textarea id="account-xpub" type="text" class="account-xpub form-control" readonly data-show-qr></textarea>
<div class="form-group">
<label class="col-sm-2 control-label">
</label>
<div class="col-sm-10">
<p>The account extended keys can be used for importing to most BIP84 compatible wallets.</p>
</div>
</div>
</div>
<div class="form-group">
<label class="col-sm-2 control-label">
</label>
<div class="col-sm-10">
<p>The BIP32 derivation path and extended keys are the basis for the derived addresses.</p>
<div class="form-group">
<label for="account-xprv" class="col-sm-2 control-label">
<span>Account Extended Private Key</span>
</label>
<div class="col-sm-10">
<textarea id="account-xprv-bip84" type="text" class="account-xprv private-data form-control" readonly data-show-qr autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false"></textarea>
</div>
</div>
</div>
<div class="form-group">
<label for="bip84-path" class="col-sm-2 control-label">BIP32 Derivation Path</label>
<div class="col-sm-10">
<input id="bip84-path" type="text" class="path form-control" value="m/84'/0'/0'/0" readonly="readonly">
<div class="form-group">
<label for="account-xpub" class="col-sm-2 control-label">
<span>Account Extended Public Key</span>
</label>
<div class="col-sm-10">
<textarea id="account-xpub-bip84" type="text" class="account-xpub form-control" readonly data-show-qr autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false"></textarea>
</div>
</div>
<div class="form-group">
<label class="col-sm-2 control-label">
</label>
<div class="col-sm-10">
<p>The BIP32 derivation path and extended keys are the basis for the derived addresses.</p>
</div>
</div>
<div class="form-group">
<label for="bip84-path" class="col-sm-2 control-label">BIP32 Derivation Path</label>
<div class="col-sm-10">
<input id="bip84-path" type="text" class="path form-control" value="m/84'/0'/0'/0" readonly="readonly">
</div>
</div>
</div>
</form>
@@ -575,13 +761,13 @@
<div class="form-group">
<label for="extended-priv-key" class="col-sm-2 control-label">BIP32 Extended Private Key</label>
<div class="col-sm-10">
<textarea id="extended-priv-key" class="extended-priv-key form-control" readonly="readonly" data-show-qr></textarea>
<textarea id="extended-priv-key" class="extended-priv-key private-data form-control" readonly="readonly" data-show-qr autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false"></textarea>
</div>
</div>
<div class="form-group">
<label for="extended-pub-key" class="col-sm-2 control-label">BIP32 Extended Public Key</label>
<div class="col-sm-10">
<textarea id="extended-pub-key" class="extended-pub-key form-control" readonly="readonly" data-show-qr></textarea>
<textarea id="extended-pub-key" class="extended-pub-key form-control" readonly="readonly" data-show-qr autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false"></textarea>
</div>
</div>
</form>
@@ -595,11 +781,41 @@
<h2>Derived Addresses</h2>
<p>Note these addresses are derived from the BIP32 Extended Key</p>
</div>
<div class="col-md-12 use-bitpay-addresses-container hidden">
<div class="col-md-12 bch-addr-type-container hidden">
<div class="radio">
<label>
<input type="radio" value="cashaddr" name="bch-addr-type" class="use-bch-cashaddr-addresses" checked="checked">
<span>Use CashAddr addresses for Bitcoin Cash (ie starting with 'q' instead of '1')</span>
</label>
</div>
<div class="radio">
<label>
<input type="radio" value="bitpay" name="bch-addr-type" class="use-bch-bitpay-addresses">
<span>Use BitPay-style addresses for Bitcoin Cash (ie starting with 'C' instead of '1')</span>
</label>
</div>
<div class="radio">
<label>
<input type="radio" value="legacy" name="bch-addr-type" class="use-bch-legacy-addresses">
<span>Use legacy addresses for Bitcoin Cash (ie starting with '1')</span>
</label>
</div>
</div>
<div class="col-md-12">
<div class="checkbox">
<label>
<input type="checkbox" class="use-bitpay-addresses">
<span>Use BitPay-style addresses for Bitcoin Cash (ie starting with 'C' instead of '1')</span>
<input type="checkbox" class="use-bip38">
<span>Encrypt private keys using BIP38 and this password:</span>
</label>
<input class="bip38-password private-data" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false">
<span>Enabling BIP38 means each key will take several minutes to generate.</span>
</div>
</div>
<div class="col-md-12">
<div class="checkbox">
<label>
<input class="hardened-addresses" type="checkbox">
<span>Use hardened addresses</span>
</label>
</div>
</div>
@@ -653,7 +869,7 @@
</div>
<div id="csv" class="tab-pane">
<div class="col-md-12">
<textarea class="csv form-control" rows="25" readonly></textarea>
<textarea class="csv form-control" rows="25" readonly autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false"></textarea>
</div>
</div>
</div>
@@ -694,15 +910,15 @@
Read more at the
<a href="https://github.com/bitcoin/bips/blob/master/bip-0049.mediawiki" target="_blank">official BIP49 spec</a>
</p>
<h3>Private Keys</h3>
<h3>BIP85 <span class="small">Deterministic Entropy From BIP32 Keychains</span></h3>
<p>
<span>
Use private keys at
<a href="https://web.archive.org/web/20150707020924/https://brainwallet.org/" target="_blank">brainwallet.org</a>.
</span>
<span>Be careful - it can be easy to make mistakes if you don't know what you're doing.</span>
Read more at the
<a href="https://github.com/bitcoin/bips/blob/master/bip-0085.mediawiki" target="_blank">official BIP85 spec</a>
</p>
<h3 id="entropy-notes">Entropy</h3>
<p>
<span>Entropy values should not include the BIP39 checksum. This is automatically added by the tool.</span>
</p>
<p>
<span>
Entropy values must be sourced from a
@@ -735,6 +951,19 @@
<p>
<a href="https://bitcointalk.org/index.php?topic=311000.msg3345309#msg3345309" target="_blank">You are not a good source of entropy.</a>
</p>
<p>
<span>Card entropy has been implemented assuming cards are replaced, not drawn one after another.</span>
<span>A full deck with replacement generates 232 bits of entropy (21 words). A full deck without replacement generates 225 bits of entropy (21 words).</span>
<span>Card entropy changed significantly from v0.4.3 to v0.5.0. The old version can be accessed at
<a href="https://github.com/iancoleman/bip39/releases/tag/0.4.3">
https://github.com/iancoleman/bip39/releases/tag/0.4.3
</a>
or
<a href="https://web.archive.org/web/20201018232020/https://iancoleman.io/bip39/">
https://web.archive.org/web/20201018232020/https://iancoleman.io/bip39/
</a>
</span>
</p>
<h3>License</h3>
<p>
<span>Please refer to <a href="https://github.com/iancoleman/bip39/blob/master/LICENSE" target="_blank">the software license</a> for more detail.
@@ -778,9 +1007,9 @@
on any offline computer.
</p>
<p>
<span>Alternatively, download the file from the repository</span>
<span>Alternatively, download the file from the latest GitHub release</span>
-
<a href="https://github.com/iancoleman/bip39">https://github.com/iancoleman/bip39</a>
<a href="https://github.com/iancoleman/bip39/releases/latest/">https://github.com/iancoleman/bip39/releases/latest/</a>
</p>
</div>
@@ -861,21 +1090,20 @@
<td class="index"><span></span></td>
<td class="address"><span data-show-qr></span></td>
<td class="pubkey"><span data-show-qr></span></td>
<td class="privkey"><span data-show-qr></span></td>
<td class="privkey private-data"><span data-show-qr></span></td>
</tr>
</script>
<script src="js/polyfill.es6.js"></script>
<script src="js/basex.js"></script>
<script src="js/unorm.js"></script>
<script src="js/jquery-3.2.1.js"></script>
<script src="js/bootstrap-3.3.7.js"></script>
<script src="js/levenshtein.js"></script>
<script src="js/kjua-0.1.1.min.js"></script>
<script src="js/bitcoinjs-3.3.0.js"></script>
<script src="js/bootstrap.js"></script>
<script src="js/bip39-libs.js"></script>
<script src="js/bitcoinjs-extensions.js"></script>
<script src="js/segwit-parameters.js"></script>
<script src="js/ethereumjs-util.js"></script>
<script src="js/ripple-util.js"></script>
<script src="js/jingtum-util.js"></script>
<script src="js/casinocoin-util.js"></script>
<script src="js/cosmos-util.js"></script>
<script src="js/eos-util.js"></script>
<script src="js/fio-util.js"></script>
<script src="js/sjcl-bip39.js"></script>
<script src="js/wordlist_english.js"></script>
<script src="js/wordlist_japanese.js"></script>
@@ -884,9 +1112,10 @@
<script src="js/wordlist_chinese_traditional.js"></script>
<script src="js/wordlist_french.js"></script>
<script src="js/wordlist_italian.js"></script>
<script src="js/wordlist_korean.js"></script>
<script src="js/wordlist_czech.js"></script>
<script src="js/wordlist_portuguese.js"></script>
<script src="js/jsbip39.js"></script>
<script src="js/biginteger.js"></script>
<script src="js/zxcvbn.js"></script>
<script src="js/entropy.js"></script>
<script src="js/index.js"></script>
</body>

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

View File

@@ -1,6 +1,6 @@
/*!
* Bootstrap v3.3.7 (http://getbootstrap.com)
* Copyright 2011-2016 Twitter, Inc.
* Bootstrap v3.4.1 (https://getbootstrap.com/)
* Copyright 2011-2019 Twitter, Inc.
* Licensed under the MIT license
*/
@@ -17,10 +17,10 @@ if (typeof jQuery === 'undefined') {
}(jQuery);
/* ========================================================================
* Bootstrap: transition.js v3.3.7
* http://getbootstrap.com/javascript/#transitions
* Bootstrap: transition.js v3.4.1
* https://getbootstrap.com/docs/3.4/javascript/#transitions
* ========================================================================
* Copyright 2011-2016 Twitter, Inc.
* Copyright 2011-2019 Twitter, Inc.
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
* ======================================================================== */
@@ -28,7 +28,7 @@ if (typeof jQuery === 'undefined') {
+function ($) {
'use strict';
// CSS TRANSITION SUPPORT (Shoutout: http://www.modernizr.com/)
// CSS TRANSITION SUPPORT (Shoutout: https://modernizr.com/)
// ============================================================
function transitionEnd() {
@@ -50,7 +50,7 @@ if (typeof jQuery === 'undefined') {
return false // explicit for ie8 ( ._.)
}
// http://blog.alexmaccaw.com/css-transitions
// https://blog.alexmaccaw.com/css-transitions
$.fn.emulateTransitionEnd = function (duration) {
var called = false
var $el = this
@@ -77,10 +77,10 @@ if (typeof jQuery === 'undefined') {
}(jQuery);
/* ========================================================================
* Bootstrap: alert.js v3.3.7
* http://getbootstrap.com/javascript/#alerts
* Bootstrap: alert.js v3.4.1
* https://getbootstrap.com/docs/3.4/javascript/#alerts
* ========================================================================
* Copyright 2011-2016 Twitter, Inc.
* Copyright 2011-2019 Twitter, Inc.
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
* ======================================================================== */
@@ -96,7 +96,7 @@ if (typeof jQuery === 'undefined') {
$(el).on('click', dismiss, this.close)
}
Alert.VERSION = '3.3.7'
Alert.VERSION = '3.4.1'
Alert.TRANSITION_DURATION = 150
@@ -109,7 +109,8 @@ if (typeof jQuery === 'undefined') {
selector = selector && selector.replace(/.*(?=#[^\s]*$)/, '') // strip for ie7
}
var $parent = $(selector === '#' ? [] : selector)
selector = selector === '#' ? [] : selector
var $parent = $(document).find(selector)
if (e) e.preventDefault()
@@ -172,10 +173,10 @@ if (typeof jQuery === 'undefined') {
}(jQuery);
/* ========================================================================
* Bootstrap: button.js v3.3.7
* http://getbootstrap.com/javascript/#buttons
* Bootstrap: button.js v3.4.1
* https://getbootstrap.com/docs/3.4/javascript/#buttons
* ========================================================================
* Copyright 2011-2016 Twitter, Inc.
* Copyright 2011-2019 Twitter, Inc.
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
* ======================================================================== */
@@ -192,7 +193,7 @@ if (typeof jQuery === 'undefined') {
this.isLoading = false
}
Button.VERSION = '3.3.7'
Button.VERSION = '3.4.1'
Button.DEFAULTS = {
loadingText: 'loading...'
@@ -298,10 +299,10 @@ if (typeof jQuery === 'undefined') {
}(jQuery);
/* ========================================================================
* Bootstrap: carousel.js v3.3.7
* http://getbootstrap.com/javascript/#carousel
* Bootstrap: carousel.js v3.4.1
* https://getbootstrap.com/docs/3.4/javascript/#carousel
* ========================================================================
* Copyright 2011-2016 Twitter, Inc.
* Copyright 2011-2019 Twitter, Inc.
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
* ======================================================================== */
@@ -329,7 +330,7 @@ if (typeof jQuery === 'undefined') {
.on('mouseleave.bs.carousel', $.proxy(this.cycle, this))
}
Carousel.VERSION = '3.3.7'
Carousel.VERSION = '3.4.1'
Carousel.TRANSITION_DURATION = 600
@@ -443,7 +444,9 @@ if (typeof jQuery === 'undefined') {
var slidEvent = $.Event('slid.bs.carousel', { relatedTarget: relatedTarget, direction: direction }) // yes, "slid"
if ($.support.transition && this.$element.hasClass('slide')) {
$next.addClass(type)
$next[0].offsetWidth // force reflow
if (typeof $next === 'object' && $next.length) {
$next[0].offsetWidth // force reflow
}
$active.addClass(direction)
$next.addClass(direction)
$active
@@ -505,10 +508,17 @@ if (typeof jQuery === 'undefined') {
// =================
var clickHandler = function (e) {
var href
var $this = $(this)
var $target = $($this.attr('data-target') || (href = $this.attr('href')) && href.replace(/.*(?=#[^\s]+$)/, '')) // strip for ie7
var href = $this.attr('href')
if (href) {
href = href.replace(/.*(?=#[^\s]+$)/, '') // strip for ie7
}
var target = $this.attr('data-target') || href
var $target = $(document).find(target)
if (!$target.hasClass('carousel')) return
var options = $.extend({}, $target.data(), $this.data())
var slideIndex = $this.attr('data-slide-to')
if (slideIndex) options.interval = false
@@ -536,10 +546,10 @@ if (typeof jQuery === 'undefined') {
}(jQuery);
/* ========================================================================
* Bootstrap: collapse.js v3.3.7
* http://getbootstrap.com/javascript/#collapse
* Bootstrap: collapse.js v3.4.1
* https://getbootstrap.com/docs/3.4/javascript/#collapse
* ========================================================================
* Copyright 2011-2016 Twitter, Inc.
* Copyright 2011-2019 Twitter, Inc.
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
* ======================================================================== */
@@ -567,7 +577,7 @@ if (typeof jQuery === 'undefined') {
if (this.options.toggle) this.toggle()
}
Collapse.VERSION = '3.3.7'
Collapse.VERSION = '3.4.1'
Collapse.TRANSITION_DURATION = 350
@@ -674,7 +684,7 @@ if (typeof jQuery === 'undefined') {
}
Collapse.prototype.getParent = function () {
return $(this.options.parent)
return $(document).find(this.options.parent)
.find('[data-toggle="collapse"][data-parent="' + this.options.parent + '"]')
.each($.proxy(function (i, element) {
var $element = $(element)
@@ -697,7 +707,7 @@ if (typeof jQuery === 'undefined') {
var target = $trigger.attr('data-target')
|| (href = $trigger.attr('href')) && href.replace(/.*(?=#[^\s]+$)/, '') // strip for ie7
return $(target)
return $(document).find(target)
}
@@ -749,10 +759,10 @@ if (typeof jQuery === 'undefined') {
}(jQuery);
/* ========================================================================
* Bootstrap: dropdown.js v3.3.7
* http://getbootstrap.com/javascript/#dropdowns
* Bootstrap: dropdown.js v3.4.1
* https://getbootstrap.com/docs/3.4/javascript/#dropdowns
* ========================================================================
* Copyright 2011-2016 Twitter, Inc.
* Copyright 2011-2019 Twitter, Inc.
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
* ======================================================================== */
@@ -769,7 +779,7 @@ if (typeof jQuery === 'undefined') {
$(element).on('click.bs.dropdown', this.toggle)
}
Dropdown.VERSION = '3.3.7'
Dropdown.VERSION = '3.4.1'
function getParent($this) {
var selector = $this.attr('data-target')
@@ -779,7 +789,7 @@ if (typeof jQuery === 'undefined') {
selector = selector && /#[A-Za-z]/.test(selector) && selector.replace(/.*(?=#[^\s]*$)/, '') // strip for ie7
}
var $parent = selector && $(selector)
var $parent = selector !== '#' ? $(document).find(selector) : null
return $parent && $parent.length ? $parent : $this.parent()
}
@@ -915,10 +925,10 @@ if (typeof jQuery === 'undefined') {
}(jQuery);
/* ========================================================================
* Bootstrap: modal.js v3.3.7
* http://getbootstrap.com/javascript/#modals
* Bootstrap: modal.js v3.4.1
* https://getbootstrap.com/docs/3.4/javascript/#modals
* ========================================================================
* Copyright 2011-2016 Twitter, Inc.
* Copyright 2011-2019 Twitter, Inc.
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
* ======================================================================== */
@@ -930,15 +940,16 @@ if (typeof jQuery === 'undefined') {
// ======================
var Modal = function (element, options) {
this.options = options
this.$body = $(document.body)
this.$element = $(element)
this.$dialog = this.$element.find('.modal-dialog')
this.$backdrop = null
this.isShown = null
this.originalBodyPad = null
this.scrollbarWidth = 0
this.options = options
this.$body = $(document.body)
this.$element = $(element)
this.$dialog = this.$element.find('.modal-dialog')
this.$backdrop = null
this.isShown = null
this.originalBodyPad = null
this.scrollbarWidth = 0
this.ignoreBackdropClick = false
this.fixedContent = '.navbar-fixed-top, .navbar-fixed-bottom'
if (this.options.remote) {
this.$element
@@ -949,7 +960,7 @@ if (typeof jQuery === 'undefined') {
}
}
Modal.VERSION = '3.3.7'
Modal.VERSION = '3.4.1'
Modal.TRANSITION_DURATION = 300
Modal.BACKDROP_TRANSITION_DURATION = 150
@@ -966,7 +977,7 @@ if (typeof jQuery === 'undefined') {
Modal.prototype.show = function (_relatedTarget) {
var that = this
var e = $.Event('show.bs.modal', { relatedTarget: _relatedTarget })
var e = $.Event('show.bs.modal', { relatedTarget: _relatedTarget })
this.$element.trigger(e)
@@ -1057,8 +1068,8 @@ if (typeof jQuery === 'undefined') {
.off('focusin.bs.modal') // guard against infinite focus loop
.on('focusin.bs.modal', $.proxy(function (e) {
if (document !== e.target &&
this.$element[0] !== e.target &&
!this.$element.has(e.target).length) {
this.$element[0] !== e.target &&
!this.$element.has(e.target).length) {
this.$element.trigger('focus')
}
}, this))
@@ -1160,7 +1171,7 @@ if (typeof jQuery === 'undefined') {
var modalIsOverflowing = this.$element[0].scrollHeight > document.documentElement.clientHeight
this.$element.css({
paddingLeft: !this.bodyIsOverflowing && modalIsOverflowing ? this.scrollbarWidth : '',
paddingLeft: !this.bodyIsOverflowing && modalIsOverflowing ? this.scrollbarWidth : '',
paddingRight: this.bodyIsOverflowing && !modalIsOverflowing ? this.scrollbarWidth : ''
})
}
@@ -1185,11 +1196,26 @@ if (typeof jQuery === 'undefined') {
Modal.prototype.setScrollbar = function () {
var bodyPad = parseInt((this.$body.css('padding-right') || 0), 10)
this.originalBodyPad = document.body.style.paddingRight || ''
if (this.bodyIsOverflowing) this.$body.css('padding-right', bodyPad + this.scrollbarWidth)
var scrollbarWidth = this.scrollbarWidth
if (this.bodyIsOverflowing) {
this.$body.css('padding-right', bodyPad + scrollbarWidth)
$(this.fixedContent).each(function (index, element) {
var actualPadding = element.style.paddingRight
var calculatedPadding = $(element).css('padding-right')
$(element)
.data('padding-right', actualPadding)
.css('padding-right', parseFloat(calculatedPadding) + scrollbarWidth + 'px')
})
}
}
Modal.prototype.resetScrollbar = function () {
this.$body.css('padding-right', this.originalBodyPad)
$(this.fixedContent).each(function (index, element) {
var padding = $(element).data('padding-right')
$(element).removeData('padding-right')
element.style.paddingRight = padding ? padding : ''
})
}
Modal.prototype.measureScrollbar = function () { // thx walsh
@@ -1207,8 +1233,8 @@ if (typeof jQuery === 'undefined') {
function Plugin(option, _relatedTarget) {
return this.each(function () {
var $this = $(this)
var data = $this.data('bs.modal')
var $this = $(this)
var data = $this.data('bs.modal')
var options = $.extend({}, Modal.DEFAULTS, $this.data(), typeof option == 'object' && option)
if (!data) $this.data('bs.modal', (data = new Modal(this, options)))
@@ -1219,7 +1245,7 @@ if (typeof jQuery === 'undefined') {
var old = $.fn.modal
$.fn.modal = Plugin
$.fn.modal = Plugin
$.fn.modal.Constructor = Modal
@@ -1236,10 +1262,13 @@ if (typeof jQuery === 'undefined') {
// ==============
$(document).on('click.bs.modal.data-api', '[data-toggle="modal"]', function (e) {
var $this = $(this)
var href = $this.attr('href')
var $target = $($this.attr('data-target') || (href && href.replace(/.*(?=#[^\s]+$)/, ''))) // strip for ie7
var option = $target.data('bs.modal') ? 'toggle' : $.extend({ remote: !/#/.test(href) && href }, $target.data(), $this.data())
var $this = $(this)
var href = $this.attr('href')
var target = $this.attr('data-target') ||
(href && href.replace(/.*(?=#[^\s]+$)/, '')) // strip for ie7
var $target = $(document).find(target)
var option = $target.data('bs.modal') ? 'toggle' : $.extend({ remote: !/#/.test(href) && href }, $target.data(), $this.data())
if ($this.is('a')) e.preventDefault()
@@ -1255,18 +1284,148 @@ if (typeof jQuery === 'undefined') {
}(jQuery);
/* ========================================================================
* Bootstrap: tooltip.js v3.3.7
* http://getbootstrap.com/javascript/#tooltip
* Bootstrap: tooltip.js v3.4.1
* https://getbootstrap.com/docs/3.4/javascript/#tooltip
* Inspired by the original jQuery.tipsy by Jason Frame
* ========================================================================
* Copyright 2011-2016 Twitter, Inc.
* Copyright 2011-2019 Twitter, Inc.
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
* ======================================================================== */
+function ($) {
'use strict';
var DISALLOWED_ATTRIBUTES = ['sanitize', 'whiteList', 'sanitizeFn']
var uriAttrs = [
'background',
'cite',
'href',
'itemtype',
'longdesc',
'poster',
'src',
'xlink:href'
]
var ARIA_ATTRIBUTE_PATTERN = /^aria-[\w-]*$/i
var DefaultWhitelist = {
// Global attributes allowed on any supplied element below.
'*': ['class', 'dir', 'id', 'lang', 'role', ARIA_ATTRIBUTE_PATTERN],
a: ['target', 'href', 'title', 'rel'],
area: [],
b: [],
br: [],
col: [],
code: [],
div: [],
em: [],
hr: [],
h1: [],
h2: [],
h3: [],
h4: [],
h5: [],
h6: [],
i: [],
img: ['src', 'alt', 'title', 'width', 'height'],
li: [],
ol: [],
p: [],
pre: [],
s: [],
small: [],
span: [],
sub: [],
sup: [],
strong: [],
u: [],
ul: []
}
/**
* A pattern that recognizes a commonly useful subset of URLs that are safe.
*
* Shoutout to Angular 7 https://github.com/angular/angular/blob/7.2.4/packages/core/src/sanitization/url_sanitizer.ts
*/
var SAFE_URL_PATTERN = /^(?:(?:https?|mailto|ftp|tel|file):|[^&:/?#]*(?:[/?#]|$))/gi
/**
* A pattern that matches safe data URLs. Only matches image, video and audio types.
*
* Shoutout to Angular 7 https://github.com/angular/angular/blob/7.2.4/packages/core/src/sanitization/url_sanitizer.ts
*/
var DATA_URL_PATTERN = /^data:(?:image\/(?:bmp|gif|jpeg|jpg|png|tiff|webp)|video\/(?:mpeg|mp4|ogg|webm)|audio\/(?:mp3|oga|ogg|opus));base64,[a-z0-9+/]+=*$/i
function allowedAttribute(attr, allowedAttributeList) {
var attrName = attr.nodeName.toLowerCase()
if ($.inArray(attrName, allowedAttributeList) !== -1) {
if ($.inArray(attrName, uriAttrs) !== -1) {
return Boolean(attr.nodeValue.match(SAFE_URL_PATTERN) || attr.nodeValue.match(DATA_URL_PATTERN))
}
return true
}
var regExp = $(allowedAttributeList).filter(function (index, value) {
return value instanceof RegExp
})
// Check if a regular expression validates the attribute.
for (var i = 0, l = regExp.length; i < l; i++) {
if (attrName.match(regExp[i])) {
return true
}
}
return false
}
function sanitizeHtml(unsafeHtml, whiteList, sanitizeFn) {
if (unsafeHtml.length === 0) {
return unsafeHtml
}
if (sanitizeFn && typeof sanitizeFn === 'function') {
return sanitizeFn(unsafeHtml)
}
// IE 8 and below don't support createHTMLDocument
if (!document.implementation || !document.implementation.createHTMLDocument) {
return unsafeHtml
}
var createdDocument = document.implementation.createHTMLDocument('sanitization')
createdDocument.body.innerHTML = unsafeHtml
var whitelistKeys = $.map(whiteList, function (el, i) { return i })
var elements = $(createdDocument.body).find('*')
for (var i = 0, len = elements.length; i < len; i++) {
var el = elements[i]
var elName = el.nodeName.toLowerCase()
if ($.inArray(elName, whitelistKeys) === -1) {
el.parentNode.removeChild(el)
continue
}
var attributeList = $.map(el.attributes, function (el) { return el })
var whitelistedAttributes = [].concat(whiteList['*'] || [], whiteList[elName] || [])
for (var j = 0, len2 = attributeList.length; j < len2; j++) {
if (!allowedAttribute(attributeList[j], whitelistedAttributes)) {
el.removeAttribute(attributeList[j].nodeName)
}
}
}
return createdDocument.body.innerHTML
}
// TOOLTIP PUBLIC CLASS DEFINITION
// ===============================
@@ -1282,7 +1441,7 @@ if (typeof jQuery === 'undefined') {
this.init('tooltip', element, options)
}
Tooltip.VERSION = '3.3.7'
Tooltip.VERSION = '3.4.1'
Tooltip.TRANSITION_DURATION = 150
@@ -1299,7 +1458,10 @@ if (typeof jQuery === 'undefined') {
viewport: {
selector: 'body',
padding: 0
}
},
sanitize : true,
sanitizeFn : null,
whiteList : DefaultWhitelist
}
Tooltip.prototype.init = function (type, element, options) {
@@ -1307,7 +1469,7 @@ if (typeof jQuery === 'undefined') {
this.type = type
this.$element = $(element)
this.options = this.getOptions(options)
this.$viewport = this.options.viewport && $($.isFunction(this.options.viewport) ? this.options.viewport.call(this, this.$element) : (this.options.viewport.selector || this.options.viewport))
this.$viewport = this.options.viewport && $(document).find($.isFunction(this.options.viewport) ? this.options.viewport.call(this, this.$element) : (this.options.viewport.selector || this.options.viewport))
this.inState = { click: false, hover: false, focus: false }
if (this.$element[0] instanceof document.constructor && !this.options.selector) {
@@ -1340,7 +1502,15 @@ if (typeof jQuery === 'undefined') {
}
Tooltip.prototype.getOptions = function (options) {
options = $.extend({}, this.getDefaults(), this.$element.data(), options)
var dataAttributes = this.$element.data()
for (var dataAttr in dataAttributes) {
if (dataAttributes.hasOwnProperty(dataAttr) && $.inArray(dataAttr, DISALLOWED_ATTRIBUTES) !== -1) {
delete dataAttributes[dataAttr]
}
}
options = $.extend({}, this.getDefaults(), dataAttributes, options)
if (options.delay && typeof options.delay == 'number') {
options.delay = {
@@ -1349,6 +1519,10 @@ if (typeof jQuery === 'undefined') {
}
}
if (options.sanitize) {
options.template = sanitizeHtml(options.template, options.whiteList, options.sanitizeFn)
}
return options
}
@@ -1460,7 +1634,7 @@ if (typeof jQuery === 'undefined') {
.addClass(placement)
.data('bs.' + this.type, this)
this.options.container ? $tip.appendTo(this.options.container) : $tip.insertAfter(this.$element)
this.options.container ? $tip.appendTo($(document).find(this.options.container)) : $tip.insertAfter(this.$element)
this.$element.trigger('inserted.bs.' + this.type)
var pos = this.getPosition()
@@ -1562,7 +1736,16 @@ if (typeof jQuery === 'undefined') {
var $tip = this.tip()
var title = this.getTitle()
$tip.find('.tooltip-inner')[this.options.html ? 'html' : 'text'](title)
if (this.options.html) {
if (this.options.sanitize) {
title = sanitizeHtml(title, this.options.whiteList, this.options.sanitizeFn)
}
$tip.find('.tooltip-inner').html(title)
} else {
$tip.find('.tooltip-inner').text(title)
}
$tip.removeClass('fade in top bottom left right')
}
@@ -1743,6 +1926,9 @@ if (typeof jQuery === 'undefined') {
})
}
Tooltip.prototype.sanitizeHtml = function (unsafeHtml) {
return sanitizeHtml(unsafeHtml, this.options.whiteList, this.options.sanitizeFn)
}
// TOOLTIP PLUGIN DEFINITION
// =========================
@@ -1776,10 +1962,10 @@ if (typeof jQuery === 'undefined') {
}(jQuery);
/* ========================================================================
* Bootstrap: popover.js v3.3.7
* http://getbootstrap.com/javascript/#popovers
* Bootstrap: popover.js v3.4.1
* https://getbootstrap.com/docs/3.4/javascript/#popovers
* ========================================================================
* Copyright 2011-2016 Twitter, Inc.
* Copyright 2011-2019 Twitter, Inc.
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
* ======================================================================== */
@@ -1796,7 +1982,7 @@ if (typeof jQuery === 'undefined') {
if (!$.fn.tooltip) throw new Error('Popover requires tooltip.js')
Popover.VERSION = '3.3.7'
Popover.VERSION = '3.4.1'
Popover.DEFAULTS = $.extend({}, $.fn.tooltip.Constructor.DEFAULTS, {
placement: 'right',
@@ -1822,10 +2008,25 @@ if (typeof jQuery === 'undefined') {
var title = this.getTitle()
var content = this.getContent()
$tip.find('.popover-title')[this.options.html ? 'html' : 'text'](title)
$tip.find('.popover-content').children().detach().end()[ // we use append for html objects to maintain js events
this.options.html ? (typeof content == 'string' ? 'html' : 'append') : 'text'
](content)
if (this.options.html) {
var typeContent = typeof content
if (this.options.sanitize) {
title = this.sanitizeHtml(title)
if (typeContent === 'string') {
content = this.sanitizeHtml(content)
}
}
$tip.find('.popover-title').html(title)
$tip.find('.popover-content').children().detach().end()[
typeContent === 'string' ? 'html' : 'append'
](content)
} else {
$tip.find('.popover-title').text(title)
$tip.find('.popover-content').children().detach().end().text(content)
}
$tip.removeClass('fade top bottom left right in')
@@ -1844,8 +2045,8 @@ if (typeof jQuery === 'undefined') {
return $e.attr('data-content')
|| (typeof o.content == 'function' ?
o.content.call($e[0]) :
o.content)
o.content.call($e[0]) :
o.content)
}
Popover.prototype.arrow = function () {
@@ -1885,10 +2086,10 @@ if (typeof jQuery === 'undefined') {
}(jQuery);
/* ========================================================================
* Bootstrap: scrollspy.js v3.3.7
* http://getbootstrap.com/javascript/#scrollspy
* Bootstrap: scrollspy.js v3.4.1
* https://getbootstrap.com/docs/3.4/javascript/#scrollspy
* ========================================================================
* Copyright 2011-2016 Twitter, Inc.
* Copyright 2011-2019 Twitter, Inc.
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
* ======================================================================== */
@@ -1914,7 +2115,7 @@ if (typeof jQuery === 'undefined') {
this.process()
}
ScrollSpy.VERSION = '3.3.7'
ScrollSpy.VERSION = '3.4.1'
ScrollSpy.DEFAULTS = {
offset: 10
@@ -2058,10 +2259,10 @@ if (typeof jQuery === 'undefined') {
}(jQuery);
/* ========================================================================
* Bootstrap: tab.js v3.3.7
* http://getbootstrap.com/javascript/#tabs
* Bootstrap: tab.js v3.4.1
* https://getbootstrap.com/docs/3.4/javascript/#tabs
* ========================================================================
* Copyright 2011-2016 Twitter, Inc.
* Copyright 2011-2019 Twitter, Inc.
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
* ======================================================================== */
@@ -2078,7 +2279,7 @@ if (typeof jQuery === 'undefined') {
// jscs:enable requireDollarBeforejQueryAssignment
}
Tab.VERSION = '3.3.7'
Tab.VERSION = '3.4.1'
Tab.TRANSITION_DURATION = 150
@@ -2107,7 +2308,7 @@ if (typeof jQuery === 'undefined') {
if (showEvent.isDefaultPrevented() || hideEvent.isDefaultPrevented()) return
var $target = $(selector)
var $target = $(document).find(selector)
this.activate($this.closest('li'), $ul)
this.activate($target, $target.parent(), function () {
@@ -2132,15 +2333,15 @@ if (typeof jQuery === 'undefined') {
$active
.removeClass('active')
.find('> .dropdown-menu > .active')
.removeClass('active')
.removeClass('active')
.end()
.find('[data-toggle="tab"]')
.attr('aria-expanded', false)
.attr('aria-expanded', false)
element
.addClass('active')
.find('[data-toggle="tab"]')
.attr('aria-expanded', true)
.attr('aria-expanded', true)
if (transition) {
element[0].offsetWidth // reflow for transition
@@ -2152,10 +2353,10 @@ if (typeof jQuery === 'undefined') {
if (element.parent('.dropdown-menu').length) {
element
.closest('li.dropdown')
.addClass('active')
.addClass('active')
.end()
.find('[data-toggle="tab"]')
.attr('aria-expanded', true)
.attr('aria-expanded', true)
}
callback && callback()
@@ -2214,10 +2415,10 @@ if (typeof jQuery === 'undefined') {
}(jQuery);
/* ========================================================================
* Bootstrap: affix.js v3.3.7
* http://getbootstrap.com/javascript/#affix
* Bootstrap: affix.js v3.4.1
* https://getbootstrap.com/docs/3.4/javascript/#affix
* ========================================================================
* Copyright 2011-2016 Twitter, Inc.
* Copyright 2011-2019 Twitter, Inc.
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
* ======================================================================== */
@@ -2231,7 +2432,9 @@ if (typeof jQuery === 'undefined') {
var Affix = function (element, options) {
this.options = $.extend({}, Affix.DEFAULTS, options)
this.$target = $(this.options.target)
var target = this.options.target === Affix.DEFAULTS.target ? $(this.options.target) : $(document).find(this.options.target)
this.$target = target
.on('scroll.bs.affix.data-api', $.proxy(this.checkPosition, this))
.on('click.bs.affix.data-api', $.proxy(this.checkPositionWithEventLoop, this))
@@ -2243,7 +2446,7 @@ if (typeof jQuery === 'undefined') {
this.checkPosition()
}
Affix.VERSION = '3.3.7'
Affix.VERSION = '3.4.1'
Affix.RESET = 'affix affix-top affix-bottom'

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)
}

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

File diff suppressed because one or more lines are too long

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;
}
}());

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)
}

View File

@@ -2,7 +2,7 @@
// p2wpkh
bitcoinjs.bitcoin.networks.bitcoin.p2wpkh = {
libs.bitcoin.networks.bitcoin.p2wpkh = {
baseNetwork: "bitcoin",
messagePrefix: '\x18Bitcoin Signed Message:\n',
bech32: 'bc',
@@ -15,9 +15,35 @@ bitcoinjs.bitcoin.networks.bitcoin.p2wpkh = {
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
bitcoinjs.bitcoin.networks.bitcoin.p2wpkhInP2sh = {
libs.bitcoin.networks.bitcoin.p2wpkhInP2sh = {
baseNetwork: "bitcoin",
messagePrefix: '\x18Bitcoin Signed Message:\n',
bech32: 'bc',
@@ -30,7 +56,7 @@ bitcoinjs.bitcoin.networks.bitcoin.p2wpkhInP2sh = {
wif: 0x80
};
bitcoinjs.bitcoin.networks.testnet.p2wpkhInP2sh = {
libs.bitcoin.networks.testnet.p2wpkhInP2sh = {
baseNetwork: "testnet",
messagePrefix: '\x18Bitcoin Signed Message:\n',
bech32: 'tb',
@@ -43,9 +69,148 @@ bitcoinjs.bitcoin.networks.testnet.p2wpkhInP2sh = {
wif: 0xef
};
bitcoinjs.bitcoin.networks.litecoin.p2wpkhInP2sh = {
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
@@ -55,4 +220,549 @@ bitcoinjs.bitcoin.networks.litecoin.p2wpkhInP2sh = {
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;

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

File diff suppressed because it is too large Load Diff