mirror of
https://github.com/OneKeyHQ/bip39.git
synced 2026-04-06 19:03:49 +00:00
Compare commits
101 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
23f393acfb | ||
|
|
c560e01e91 | ||
|
|
a362ff2f62 | ||
|
|
9a82f12b91 | ||
|
|
5e376b8903 | ||
|
|
90422a41af | ||
|
|
f3314418fb | ||
|
|
7da8c22eaf | ||
|
|
d9ad938b52 | ||
|
|
f7f579f5f5 | ||
|
|
2cd19306b2 | ||
|
|
545348d159 | ||
|
|
8835afe8a2 | ||
|
|
38e6aaed84 | ||
|
|
f7125606bf | ||
|
|
5b0b1a5c9a | ||
|
|
71573cb380 | ||
|
|
c64ff95697 | ||
|
|
6d2e202083 | ||
|
|
0cb81e1117 | ||
|
|
32ade2fbf7 | ||
|
|
ac7f150a79 | ||
|
|
134213954d | ||
|
|
253f4cb75f | ||
|
|
ebbb057dfa | ||
|
|
38626a2d1f | ||
|
|
990ce0d072 | ||
|
|
1ca3784b0a | ||
|
|
1b54929bda | ||
|
|
d75ddf4ea8 | ||
|
|
ad07c1c0b5 | ||
|
|
0b911fc20f | ||
|
|
73ccaa1357 | ||
|
|
bd1ecd20f9 | ||
|
|
e3668fb51f | ||
|
|
3c222e57df | ||
|
|
16ff1df7ab | ||
|
|
f2f8d8177e | ||
|
|
877b8bdfec | ||
|
|
5e211c6959 | ||
|
|
4e59e7d6fc | ||
|
|
8c3a56ec4f | ||
|
|
d31a0ad44b | ||
|
|
4566751b89 | ||
|
|
b386aaa06e | ||
|
|
ef95b4bfad | ||
|
|
30e3d246d4 | ||
|
|
647410b4a6 | ||
|
|
4669c88c67 | ||
|
|
9e865b8e75 | ||
|
|
08713ff9c2 | ||
|
|
ed52cda20d | ||
|
|
8ce57f3c13 | ||
|
|
043717034b | ||
|
|
eb100ec0e4 | ||
|
|
5cbd174c18 | ||
|
|
75722c6d24 | ||
|
|
7e75b98e1f | ||
|
|
47dbf58b6d | ||
|
|
42e00ef56a | ||
|
|
8dbf7d5837 | ||
|
|
bf96267f89 | ||
|
|
995bc58791 | ||
|
|
d7125cda1d | ||
|
|
b674c5710b | ||
|
|
920f7aa078 | ||
|
|
5c6e875f2d | ||
|
|
e086305895 | ||
|
|
863eee8ed7 | ||
|
|
4729ecca04 | ||
|
|
fba7e98aea | ||
|
|
95b306106f | ||
|
|
f32b24e380 | ||
|
|
26767a2ce3 | ||
|
|
a748c4b5c6 | ||
|
|
eaf7892872 | ||
|
|
677d18f2e0 | ||
|
|
f3051a6a9f | ||
|
|
bf528f65f4 | ||
|
|
5699633538 | ||
|
|
d1d8699fc4 | ||
|
|
e284827677 | ||
|
|
115eb45083 | ||
|
|
0d78c2a120 | ||
|
|
7594405011 | ||
|
|
d359fe64b2 | ||
|
|
1bf76fe32d | ||
|
|
904e39748c | ||
|
|
46054e445e | ||
|
|
4958ea8009 | ||
|
|
0e1fd95302 | ||
|
|
a823e5266c | ||
|
|
b64fb35301 | ||
|
|
54600393af | ||
|
|
ff2940e81e | ||
|
|
f3101bd3f1 | ||
|
|
46a5338e42 | ||
|
|
c578337f0f | ||
|
|
90f7a5ec93 | ||
|
|
dd496c82c1 | ||
|
|
1dafc30db4 |
45
changelog.md
45
changelog.md
@@ -1,3 +1,48 @@
|
||||
# 0.5.2
|
||||
|
||||
* Show ethereum private keys with correct padding
|
||||
|
||||
# 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
|
||||
|
||||
58
dev_env_setup.sh
Executable file
58
dev_env_setup.sh
Executable 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.29.0/geckodriver-v0.29.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/88.0.4324.96/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
|
||||
@@ -2,6 +2,10 @@
|
||||
|
||||
module.exports.basex = require('base-x')
|
||||
|
||||
/* base32 */
|
||||
|
||||
module.exports.base32 = require('base32.js')
|
||||
|
||||
/* bchaddrjs */
|
||||
|
||||
module.exports.bchaddr = require('bchaddrjs')
|
||||
@@ -10,6 +14,10 @@ module.exports.bchaddr = require('bchaddrjs')
|
||||
|
||||
module.exports.bchaddrSlp = require('bchaddrjs-slp')
|
||||
|
||||
/* bech32 */
|
||||
|
||||
module.exports.bech32 = require('bech32')
|
||||
|
||||
/* biginteger */
|
||||
|
||||
module.exports.BigInteger = require('javascript-biginteger')
|
||||
@@ -18,6 +26,10 @@ module.exports.BigInteger = require('javascript-biginteger')
|
||||
|
||||
module.exports.bip38 = require('bip38')
|
||||
|
||||
/* bip85 */
|
||||
|
||||
module.exports.bip85 = require('bip85')
|
||||
|
||||
/* bitcoinjs-lib */
|
||||
|
||||
module.exports.bitcoin = require('bitcoinjs-lib')
|
||||
@@ -80,6 +92,52 @@ module.exports.stellarUtil = {
|
||||
},
|
||||
}
|
||||
|
||||
/* 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')
|
||||
@@ -87,3 +145,25 @@ 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);
|
||||
};
|
||||
|
||||
|
||||
17
libs/combined/npm-shrinkwrap.json
generated
17
libs/combined/npm-shrinkwrap.json
generated
@@ -1,17 +0,0 @@
|
||||
{
|
||||
"dependencies": {
|
||||
"elastos-wallet-js": {
|
||||
"version": "git://github.com/johnnynanjiang/Elastos.SDK.Keypair.Javascript.git#491dc51b64efaf0a8aae62028b68e2c8e38fde06",
|
||||
"dependencies": {
|
||||
"bitcore-lib-p256": {
|
||||
"version": "0.16.0",
|
||||
"dependencies": {
|
||||
"lodash": {
|
||||
"version": "4.17.12"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
3647
libs/combined/package-lock.json
generated
3647
libs/combined/package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@@ -8,17 +8,24 @@
|
||||
"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",
|
||||
"buffer": "5.4.3",
|
||||
"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",
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
# Generate libs
|
||||
|
||||
```
|
||||
npm install
|
||||
npm install --no-optional
|
||||
npm run build
|
||||
```
|
||||
|
||||
15
libs/nanocurrency-web/nano-util.js
Executable file
15
libs/nanocurrency-web/nano-util.js
Executable 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
1614
libs/nanocurrency-web/package-lock.json
generated
Executable file
File diff suppressed because it is too large
Load Diff
14
libs/nanocurrency-web/package.json
Executable file
14
libs/nanocurrency-web/package.json
Executable 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"
|
||||
}
|
||||
}
|
||||
4
libs/nanocurrency-web/readme.md
Executable file
4
libs/nanocurrency-web/readme.md
Executable file
@@ -0,0 +1,4 @@
|
||||
Build (will create a bundle and copy it to /tmp/nano-util.js):
|
||||
|
||||
npm install
|
||||
npm run build
|
||||
24
libs/stellar-util/package-lock.json
generated
24
libs/stellar-util/package-lock.json
generated
@@ -15,9 +15,9 @@
|
||||
}
|
||||
},
|
||||
"acorn": {
|
||||
"version": "6.0.4",
|
||||
"resolved": "https://registry.npmjs.org/acorn/-/acorn-6.0.4.tgz",
|
||||
"integrity": "sha512-VY4i5EKSKkofY2I+6QLTbTTN/UvEQPCo6eiwzzSaSWfpaDhOmStMCMod6wmuPciNq+XS0faCglFu2lHZpdHUtg==",
|
||||
"version": "6.4.1",
|
||||
"resolved": "https://registry.npmjs.org/acorn/-/acorn-6.4.1.tgz",
|
||||
"integrity": "sha512-ZVA9k326Nwrj3Cj9jlh3wGFutC2ZornPNARZwsNYqQYgN0EsV2d53w5RN/co65Ohn4sUAUtb1rSUAOD6XN9idA==",
|
||||
"dev": true
|
||||
},
|
||||
"acorn-dynamic-import": {
|
||||
@@ -90,7 +90,7 @@
|
||||
},
|
||||
"util": {
|
||||
"version": "0.10.3",
|
||||
"resolved": "http://registry.npmjs.org/util/-/util-0.10.3.tgz",
|
||||
"resolved": "https://registry.npmjs.org/util/-/util-0.10.3.tgz",
|
||||
"integrity": "sha1-evsa/lCAUkZInj23/g7TeTNqwPk=",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
@@ -186,7 +186,7 @@
|
||||
"dependencies": {
|
||||
"resolve": {
|
||||
"version": "1.1.7",
|
||||
"resolved": "http://registry.npmjs.org/resolve/-/resolve-1.1.7.tgz",
|
||||
"resolved": "https://registry.npmjs.org/resolve/-/resolve-1.1.7.tgz",
|
||||
"integrity": "sha1-IDEU2CrSxe2ejgQRs5ModeiJ6Xs=",
|
||||
"dev": true
|
||||
}
|
||||
@@ -581,9 +581,9 @@
|
||||
}
|
||||
},
|
||||
"elliptic": {
|
||||
"version": "6.4.1",
|
||||
"resolved": "https://registry.npmjs.org/elliptic/-/elliptic-6.4.1.tgz",
|
||||
"integrity": "sha512-BsXLz5sqX8OHcsh7CqBMztyXARmGQ3LWPtGjJi6DiJHq5C/qvi9P3OqgswKSDftbu8+IoI/QDTAm2fFnQ9SZSQ==",
|
||||
"version": "6.5.3",
|
||||
"resolved": "https://registry.npmjs.org/elliptic/-/elliptic-6.5.3.tgz",
|
||||
"integrity": "sha512-IMqzv5wNQf+E6aHeIqATs0tOLeOTwj1QKbRcS3jBbYkl5oLAserA8yJTT7/VyHUYG91PRmPyeQDObKLPpeS4dw==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"bn.js": "^4.4.0",
|
||||
@@ -810,9 +810,9 @@
|
||||
}
|
||||
},
|
||||
"lodash": {
|
||||
"version": "4.17.11",
|
||||
"resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.11.tgz",
|
||||
"integrity": "sha512-cQKh8igo5QUhZ7lg38DYWAxMvjSAKG0A8wGSVimP07SIUEK2UO+arSRKbRZWtelMtN5V0Hkwh5ryOto/SshYIg=="
|
||||
"version": "4.17.19",
|
||||
"resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.19.tgz",
|
||||
"integrity": "sha512-JNvd8XER9GQX0v2qJgsaN/mzFCNA5BRe/j8JN9d+tWyGLSodKQHKFicdwNYzWwI3wjRnaKPsGj1XkBjx/F96DQ=="
|
||||
},
|
||||
"lodash.memoize": {
|
||||
"version": "3.0.4",
|
||||
@@ -1085,7 +1085,7 @@
|
||||
"dependencies": {
|
||||
"string_decoder": {
|
||||
"version": "1.1.1",
|
||||
"resolved": "http://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz",
|
||||
"resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz",
|
||||
"integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
|
||||
985
src/css/bootstrap-3.3.7.css → src/css/bootstrap.css
vendored
985
src/css/bootstrap-3.3.7.css → src/css/bootstrap.css
vendored
File diff suppressed because it is too large
Load Diff
1
src/css/bootstrap.css.map
Normal file
1
src/css/bootstrap.css.map
Normal file
File diff suppressed because one or more lines are too long
164
src/index.html
164
src/index.html
@@ -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.4.1</p>
|
||||
<p class="version">v0.5.2</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>.
|
||||
@@ -86,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">
|
||||
@@ -194,6 +194,7 @@
|
||||
<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>
|
||||
@@ -204,12 +205,22 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="phrase" class="col-sm-2 control-label">BIP39 Split Mnemonic</label>
|
||||
<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">
|
||||
<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>
|
||||
<label class="control-label text-weight-normal">
|
||||
<input type="checkbox" class="showSplitMnemonic">
|
||||
Show split mnemonic cards
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
@@ -238,6 +249,113 @@
|
||||
<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">
|
||||
@@ -792,6 +910,11 @@
|
||||
Read more at the
|
||||
<a href="https://github.com/bitcoin/bips/blob/master/bip-0049.mediawiki" target="_blank">official BIP49 spec</a>
|
||||
</p>
|
||||
<h3>BIP85 <span class="small">Deterministic Entropy From BIP32 Keychains</span></h3>
|
||||
<p>
|
||||
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>
|
||||
@@ -828,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.
|
||||
@@ -871,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>
|
||||
@@ -958,13 +1094,16 @@
|
||||
</tr>
|
||||
</script>
|
||||
<script src="js/jquery-3.2.1.js"></script>
|
||||
<script src="js/bootstrap-3.3.7.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/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>
|
||||
@@ -975,6 +1114,7 @@
|
||||
<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/entropy.js"></script>
|
||||
<script src="js/index.js"></script>
|
||||
|
||||
2
src/js/bip39-libs.js
Normal file → Executable file
2
src/js/bip39-libs.js
Normal file → Executable file
File diff suppressed because one or more lines are too long
@@ -114,7 +114,7 @@ libs.bitcoin.networks.namecoin = {
|
||||
},
|
||||
pubKeyHash: 0x34,
|
||||
scriptHash: 0x0D,
|
||||
wif: 0x80
|
||||
wif: 0xb4
|
||||
};
|
||||
|
||||
libs.bitcoin.networks.peercoin = {
|
||||
@@ -139,6 +139,17 @@ libs.bitcoin.networks.axe = {
|
||||
wif: 0xcc
|
||||
};
|
||||
|
||||
libs.bitcoin.networks.scribe = {
|
||||
messagePrefix: 'unused',
|
||||
bip32: {
|
||||
public: 0x0488B21E,
|
||||
private: 0x0488ADE4
|
||||
},
|
||||
pubKeyHash: 0x3c,
|
||||
scriptHash: 0x7d,
|
||||
wif: 0x6e
|
||||
};
|
||||
|
||||
libs.bitcoin.networks.slimcoin = {
|
||||
messagePrefix: 'unused',
|
||||
bip32: {
|
||||
@@ -581,6 +592,17 @@ libs.bitcoin.networks.cannacoin = {
|
||||
wif: 0x9c,
|
||||
};
|
||||
|
||||
libs.bitcoin.networks.cranepay = {
|
||||
messagePrefix: '\x18Bitcoin Signed Message:\n',
|
||||
bip32: {
|
||||
public: 0x0488b21e,
|
||||
private: 0x0488ade4
|
||||
},
|
||||
pubKeyHash: 28,
|
||||
scriptHash: 10,
|
||||
wif: 123,
|
||||
};
|
||||
|
||||
libs.bitcoin.networks.cryptoescudo = {
|
||||
messagePrefix: '\x18Cryptoescudo Signed Message:\n',
|
||||
bip32: {
|
||||
@@ -746,6 +768,28 @@ libs.bitcoin.networks.feathercoin = {
|
||||
wif: 0x8e,
|
||||
};
|
||||
|
||||
libs.bitcoin.networks.firo = {
|
||||
messagePrefix: '\x18Firo Signed Message:\n',
|
||||
bip32: {
|
||||
public: 0x0488B21E,
|
||||
private: 0x0488ADE4,
|
||||
},
|
||||
pubKeyHash: 0x52,
|
||||
scriptHash: 0x07,
|
||||
wif: 0xd2,
|
||||
};
|
||||
|
||||
libs.bitcoin.networks.zcoin = {
|
||||
messagePrefix: '\x18Zcoin Signed Message:\n',
|
||||
bip32: {
|
||||
public: 0x0488B21E,
|
||||
private: 0x0488ADE4,
|
||||
},
|
||||
pubKeyHash: 0x52,
|
||||
scriptHash: 0x07,
|
||||
wif: 0xd2,
|
||||
};
|
||||
|
||||
libs.bitcoin.networks.firstcoin = {
|
||||
messagePrefix: '\x18FirstCoin Signed Message:\n',
|
||||
bip32: {
|
||||
@@ -1175,6 +1219,42 @@ libs.bitcoin.networks.revolutionvr = {
|
||||
wif: 0xc6,
|
||||
};
|
||||
|
||||
libs.bitcoin.networks.ritocoin = {
|
||||
messagePrefix: '\x15Rito Signed Message:\n',
|
||||
bip32: {
|
||||
public: 0x0488B21E,
|
||||
private: 0x0488ADE4,
|
||||
},
|
||||
pubKeyHash: 0x19,
|
||||
scriptHash: 0x69,
|
||||
wif: 0x8b,
|
||||
};
|
||||
|
||||
libs.bitcoin.networks.rsk = {
|
||||
messagePrefix: '\x18RSK Signed Message:\n',
|
||||
bip32: {
|
||||
public: 0x0488b21e,
|
||||
private: 0x0488ade4
|
||||
},
|
||||
// TODO defaulting to Bitcoin value, check this
|
||||
pubKeyHash: 0x00,
|
||||
// TODO defaulting to Bitcoin value, check this
|
||||
scriptHash: 0x05,
|
||||
// TODO defaulting to Bitcoin value, check this
|
||||
wif: 0x80
|
||||
};
|
||||
|
||||
libs.bitcoin.networks.rsktestnet = {
|
||||
messagePrefix: '\x18RSK Testnet Signed Message:\n',
|
||||
bip32: {
|
||||
public: 0x043587cf,
|
||||
private: 0x04358394
|
||||
},
|
||||
pubKeyHash: 0x6f,
|
||||
scriptHash: 0xc4,
|
||||
wif: 0xef
|
||||
};
|
||||
|
||||
libs.bitcoin.networks.rubycoin = {
|
||||
messagePrefix: '\x18Rubycoin Signed Message:\n',
|
||||
bip32: {
|
||||
@@ -1418,17 +1498,6 @@ libs.bitcoin.networks.wincoin = {
|
||||
wif: 0xc9,
|
||||
};
|
||||
|
||||
libs.bitcoin.networks.zcoin = {
|
||||
messagePrefix: '\x18Zcoin Signed Message:\n',
|
||||
bip32: {
|
||||
public: 0x0488B21E,
|
||||
private: 0x0488ADE4,
|
||||
},
|
||||
pubKeyHash: 0x52,
|
||||
scriptHash: 0x07,
|
||||
wif: 0xd2,
|
||||
};
|
||||
|
||||
libs.bitcoin.networks.zcash = {
|
||||
messagePrefix: '\x18Zcash Signed Message:\n',
|
||||
bip32: {
|
||||
@@ -1495,6 +1564,18 @@ libs.bitcoin.networks.hush3 = {
|
||||
wif: 0xBC,
|
||||
};
|
||||
|
||||
libs.bitcoin.networks.zoobc = {
|
||||
messagePrefix: '\x18ZooBC Signed Message:\n',
|
||||
bech32: 'bc',
|
||||
bip32: {
|
||||
public: 0x0488b21e,
|
||||
private: 0x0488ade4,
|
||||
},
|
||||
pubKeyHash: 0x00,
|
||||
scriptHash: 0x05,
|
||||
wif: 0x80,
|
||||
};
|
||||
|
||||
libs.bitcoin.networks.zclassic = {
|
||||
messagePrefix: '\x18Zcash Signed Message:\n',
|
||||
bip32: {
|
||||
@@ -1739,6 +1820,28 @@ libs.bitcoin.networks.elastos = {
|
||||
wif: 0xef // TODO set this correctly, same as BTC for now
|
||||
};
|
||||
|
||||
libs.bitcoin.networks.sugarchain = {
|
||||
messagePrefix: '\x18Sugarchain Signed Message:\n',
|
||||
bip32: {
|
||||
public: 0x0488B21E,
|
||||
private: 0x0488ADE4,
|
||||
},
|
||||
pubKeyHash: 0x3f,
|
||||
scriptHash: 0x7d,
|
||||
wif: 0x80
|
||||
};
|
||||
|
||||
libs.bitcoin.networks.sugarchaintestnet = {
|
||||
messagePrefix: '\x18Sugarchain Signed Message:\n',
|
||||
bip32: {
|
||||
public: 0x045f1cf6,
|
||||
private: 0x045f18bc,
|
||||
},
|
||||
pubKeyHash: 0x42,
|
||||
scriptHash: 0x80,
|
||||
wif: 0xef
|
||||
};
|
||||
|
||||
// https://github.com/libs.bitcoinjs-lib/blob/3f6f5ef97a1ee1b8337865209282c0095e22b2e7/src/networks.js
|
||||
libs.bitcoin.networks.regtest = {
|
||||
messagePrefix: '\x18Bitcoin Signed Message:\n',
|
||||
@@ -1751,3 +1854,14 @@ libs.bitcoin.networks.regtest = {
|
||||
scriptHash: 0xc4,
|
||||
wif: 0xef,
|
||||
};
|
||||
|
||||
libs.bitcoin.networks.argoneum = {
|
||||
messagePrefix: 'unused',
|
||||
bip32: {
|
||||
public: 0x0488b21e,
|
||||
private: 0x0488ade4
|
||||
},
|
||||
pubKeyHash: 0x32,
|
||||
scriptHash: 0x61,
|
||||
wif: 0xbf
|
||||
};
|
||||
|
||||
397
src/js/bootstrap-3.3.7.js → src/js/bootstrap.js
vendored
397
src/js/bootstrap-3.3.7.js → src/js/bootstrap.js
vendored
@@ -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'
|
||||
|
||||
13
src/js/cosmos-util.js
Normal file
13
src/js/cosmos-util.js
Normal 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));
|
||||
}
|
||||
@@ -16,7 +16,136 @@
|
||||
|
||||
window.Entropy = new (function() {
|
||||
|
||||
var TWO = new libs.BigInteger.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, baseStr) {
|
||||
// Find type of entropy being used (binary, hex, dice etc)
|
||||
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 = libs.BigInteger.BigInteger.ZERO;
|
||||
for (var i=base.ints.length-1; i>=0; i--) {
|
||||
var thisInt = libs.BigInteger.BigInteger.parse(base.ints[i]);
|
||||
var power = (base.ints.length - 1) - i;
|
||||
var additionalEntropy = libs.BigInteger.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,18 +242,6 @@ 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, baseStr) {
|
||||
// Need to get the lowest base for the supplied entropy.
|
||||
// This prevents interpreting, say, dice rolls as hexadecimal.
|
||||
@@ -177,20 +253,21 @@ window.Entropy = new (function() {
|
||||
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 && autodetect) || baseStr === "card") {
|
||||
var ints = convertCardsToInts(cardMatches);
|
||||
return {
|
||||
ints: ints,
|
||||
parts: cardMatches,
|
||||
events: cardMatches,
|
||||
matcher: matchers.card,
|
||||
asInt: 52,
|
||||
bitsPerEvent: (32*5 + 16*4 + 4*2) / 52, // see cardBits
|
||||
str: "card",
|
||||
}
|
||||
}
|
||||
@@ -199,9 +276,10 @@ window.Entropy = new (function() {
|
||||
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",
|
||||
}
|
||||
}
|
||||
@@ -210,9 +288,10 @@ window.Entropy = new (function() {
|
||||
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",
|
||||
}
|
||||
}
|
||||
@@ -221,126 +300,22 @@ window.Entropy = new (function() {
|
||||
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 libs.BigInteger.BigInteger.log(x) / libs.BigInteger.BigInteger.log(2);
|
||||
};
|
||||
|
||||
// Depends on BigInteger
|
||||
function factorial(n) {
|
||||
if (n == 0) {
|
||||
return 1;
|
||||
}
|
||||
f = libs.BigInteger.BigInteger.ONE;
|
||||
for (var i=1; i<=n; i++) {
|
||||
f = f.multiply(new libs.BigInteger.BigInteger(i));
|
||||
}
|
||||
return f;
|
||||
}
|
||||
|
||||
})();
|
||||
|
||||
7415
src/js/eos-util.js
7415
src/js/eos-util.js
File diff suppressed because it is too large
Load Diff
19
src/js/fio-util.js
Normal file
19
src/js/fio-util.js
Normal 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);
|
||||
}
|
||||
380
src/js/index.js
380
src/js/index.js
@@ -47,6 +47,8 @@
|
||||
DOM.entropyWeakEntropyOverrideWarning = DOM.entropyContainer.find(".weak-entropy-override-warning");
|
||||
DOM.entropyFilterWarning = DOM.entropyContainer.find(".filter-warning");
|
||||
DOM.phrase = $(".phrase");
|
||||
DOM.splitMnemonic = $(".splitMnemonic");
|
||||
DOM.showSplitMnemonic = $(".showSplitMnemonic");
|
||||
DOM.phraseSplit = $(".phraseSplit");
|
||||
DOM.phraseSplitWarn = $(".phraseSplitWarn");
|
||||
DOM.passphrase = $(".passphrase");
|
||||
@@ -92,6 +94,18 @@
|
||||
DOM.bip84accountXprv = $("#bip84 .account-xprv");
|
||||
DOM.bip84accountXpub = $("#bip84 .account-xpub");
|
||||
DOM.bip84change = $("#bip84 .change");
|
||||
DOM.bip85 = $('.bip85');
|
||||
DOM.showBip85 = $('.showBip85');
|
||||
DOM.bip85Field = $('.bip85Field');
|
||||
DOM.bip85application = $('#bip85-application');
|
||||
DOM.bip85mnemonicLanguage = $('#bip85-mnemonic-language');
|
||||
DOM.bip85mnemonicLanguageInput = $('.bip85-mnemonic-language-input');
|
||||
DOM.bip85mnemonicLength = $('#bip85-mnemonic-length');
|
||||
DOM.bip85mnemonicLengthInput = $('.bip85-mnemonic-length-input');
|
||||
DOM.bip85index = $('#bip85-index');
|
||||
DOM.bip85indexInput = $('.bip85-index-input');
|
||||
DOM.bip85bytes = $('#bip85-bytes');
|
||||
DOM.bip85bytesInput = $('.bip85-bytes-input');
|
||||
DOM.bip141unavailable = $("#bip141 .unavailable");
|
||||
DOM.bip141available = $("#bip141 .available");
|
||||
DOM.bip141path = $("#bip141-path");
|
||||
@@ -133,11 +147,13 @@
|
||||
DOM.entropyMnemonicLength.on("change", entropyChanged);
|
||||
DOM.entropyTypeInputs.on("change", entropyTypeChanged);
|
||||
DOM.phrase.on("input", delayedPhraseChanged);
|
||||
DOM.showSplitMnemonic.on("change", toggleSplitMnemonic);
|
||||
DOM.passphrase.on("input", delayedPhraseChanged);
|
||||
DOM.generate.on("click", generateClicked);
|
||||
DOM.more.on("click", showMore);
|
||||
DOM.seed.on("input", delayedSeedChanged);
|
||||
DOM.rootKey.on("input", delayedRootKeyChanged);
|
||||
DOM.showBip85.on('change', toggleBip85);
|
||||
DOM.litecoinUseLtub.on("change", litecoinUseLtubChanged);
|
||||
DOM.bip32path.on("input", calcForDerivationPath);
|
||||
DOM.bip44account.on("input", calcForDerivationPath);
|
||||
@@ -146,6 +162,11 @@
|
||||
DOM.bip49change.on("input", calcForDerivationPath);
|
||||
DOM.bip84account.on("input", calcForDerivationPath);
|
||||
DOM.bip84change.on("input", calcForDerivationPath);
|
||||
DOM.bip85application.on('input', calcBip85);
|
||||
DOM.bip85mnemonicLanguage.on('change', calcBip85);
|
||||
DOM.bip85mnemonicLength.on('change', calcBip85);
|
||||
DOM.bip85index.on('input', calcBip85);
|
||||
DOM.bip85bytes.on('input', calcBip85);
|
||||
DOM.bip141path.on("input", calcForDerivationPath);
|
||||
DOM.bip141semantics.on("change", tabChanged);
|
||||
DOM.tab.on("shown.bs.tab", tabChanged);
|
||||
@@ -265,6 +286,7 @@
|
||||
var passphrase = DOM.passphrase.val();
|
||||
calcBip32RootKeyFromSeed(phrase, passphrase);
|
||||
calcForDerivationPath();
|
||||
calcBip85();
|
||||
// Show the word indexes
|
||||
showWordIndexes();
|
||||
writeSplitPhrase(phrase);
|
||||
@@ -401,6 +423,7 @@
|
||||
}
|
||||
// Calculate and display
|
||||
calcForDerivationPath();
|
||||
calcBip85();
|
||||
}
|
||||
|
||||
function rootKeyChanged() {
|
||||
@@ -415,6 +438,7 @@
|
||||
// Calculate and display
|
||||
calcBip32RootKeyFromBase58(rootKeyBase58);
|
||||
calcForDerivationPath();
|
||||
calcBip85();
|
||||
}
|
||||
|
||||
function litecoinUseLtubChanged() {
|
||||
@@ -428,6 +452,84 @@
|
||||
phraseChanged();
|
||||
}
|
||||
|
||||
function toggleSplitMnemonic() {
|
||||
if (DOM.showSplitMnemonic.prop("checked")) {
|
||||
DOM.splitMnemonic.removeClass("hidden");
|
||||
}
|
||||
else {
|
||||
DOM.splitMnemonic.addClass("hidden");
|
||||
}
|
||||
}
|
||||
|
||||
function toggleBip85() {
|
||||
if (DOM.showBip85.prop('checked')) {
|
||||
DOM.bip85.removeClass('hidden');
|
||||
calcBip85();
|
||||
} else {
|
||||
DOM.bip85.addClass('hidden');
|
||||
}
|
||||
}
|
||||
|
||||
function toggleBip85Fields() {
|
||||
if (DOM.showBip85.prop('checked')) {
|
||||
DOM.bip85mnemonicLanguageInput.addClass('hidden');
|
||||
DOM.bip85mnemonicLengthInput.addClass('hidden');
|
||||
DOM.bip85bytesInput.addClass('hidden');
|
||||
|
||||
var app = DOM.bip85application.val();
|
||||
if (app === 'bip39') {
|
||||
DOM.bip85mnemonicLanguageInput.removeClass('hidden');
|
||||
DOM.bip85mnemonicLengthInput.removeClass('hidden');
|
||||
} else if (app === 'hex') {
|
||||
DOM.bip85bytesInput.removeClass('hidden');
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function calcBip85() {
|
||||
if (!DOM.showBip85.prop('checked')) {
|
||||
return
|
||||
}
|
||||
|
||||
toggleBip85Fields();
|
||||
|
||||
var app = DOM.bip85application.val();
|
||||
|
||||
var phrase = DOM.phrase.val();
|
||||
var passphrase = DOM.passphrase.val();
|
||||
if (!phrase) {
|
||||
return;
|
||||
}
|
||||
try {
|
||||
var master = libs.bip85.BIP85.fromMnemonic(phrase, passphrase);
|
||||
|
||||
var result;
|
||||
|
||||
const index = parseInt(DOM.bip85index.val(), 10);
|
||||
|
||||
if (app === 'bip39') {
|
||||
const language = parseInt(DOM.bip85mnemonicLanguage.val(), 10);
|
||||
const length = parseInt(DOM.bip85mnemonicLength.val(), 10);
|
||||
|
||||
result = master.deriveBIP39(language, length, index).toMnemonic();
|
||||
} else if (app === 'wif') {
|
||||
result = master.deriveWIF(index).toWIF();
|
||||
} else if (app === 'xprv') {
|
||||
result = master.deriveXPRV(index).toXPRV();
|
||||
} else if (app === 'hex') {
|
||||
const bytes = parseInt(DOM.bip85bytes.val(), 10);
|
||||
|
||||
result = master.deriveHex(bytes, index).toEntropy();
|
||||
}
|
||||
|
||||
hideValidationError();
|
||||
DOM.bip85Field.val(result);
|
||||
} catch (e) {
|
||||
showValidationError('BIP85: ' + e.message);
|
||||
DOM.bip85Field.val('');
|
||||
}
|
||||
}
|
||||
|
||||
function calcForDerivationPath() {
|
||||
clearDerivedKeys();
|
||||
clearAddressesList();
|
||||
@@ -1134,8 +1236,55 @@
|
||||
var hexAddress = addressBuffer.toString('hex');
|
||||
var checksumAddress = libs.ethUtil.toChecksumAddress(hexAddress);
|
||||
address = libs.ethUtil.addHexPrefix(checksumAddress);
|
||||
privkey = libs.ethUtil.addHexPrefix(privkey);
|
||||
pubkey = libs.ethUtil.addHexPrefix(pubkey);
|
||||
if (hasPrivkey) {
|
||||
privkey = libs.ethUtil.bufferToHex(keyPair.d.toBuffer(32));
|
||||
}
|
||||
}
|
||||
//TRX is different
|
||||
if (networks[DOM.network.val()].name == "TRX - Tron") {
|
||||
keyPair = new libs.bitcoin.ECPair(keyPair.d, null, { network: network, compressed: false });
|
||||
var pubkeyBuffer = keyPair.getPublicKeyBuffer();
|
||||
var ethPubkey = libs.ethUtil.importPublic(pubkeyBuffer);
|
||||
var addressBuffer = libs.ethUtil.publicToAddress(ethPubkey);
|
||||
address = libs.bitcoin.address.toBase58Check(addressBuffer, 0x41);
|
||||
if (hasPrivkey) {
|
||||
privkey = keyPair.d.toBuffer().toString('hex');
|
||||
}
|
||||
}
|
||||
|
||||
// RSK values are different
|
||||
if (networkIsRsk()) {
|
||||
var pubkeyBuffer = keyPair.getPublicKeyBuffer();
|
||||
var ethPubkey = libs.ethUtil.importPublic(pubkeyBuffer);
|
||||
var addressBuffer = libs.ethUtil.publicToAddress(ethPubkey);
|
||||
var hexAddress = addressBuffer.toString('hex');
|
||||
// Use chainId based on selected network
|
||||
// Ref: https://developers.rsk.co/rsk/architecture/account-based/#chainid
|
||||
var chainId;
|
||||
var rskNetworkName = networks[DOM.network.val()].name;
|
||||
switch (rskNetworkName) {
|
||||
case "R-BTC - RSK":
|
||||
chainId = 30;
|
||||
break;
|
||||
case "tR-BTC - RSK Testnet":
|
||||
chainId = 31;
|
||||
break;
|
||||
default:
|
||||
chainId = null;
|
||||
}
|
||||
var checksumAddress = toChecksumAddressForRsk(hexAddress, chainId);
|
||||
address = libs.ethUtil.addHexPrefix(checksumAddress);
|
||||
pubkey = libs.ethUtil.addHexPrefix(pubkey);
|
||||
if (hasPrivkey) {
|
||||
privkey = libs.ethUtil.bufferToHex(keyPair.d.toBuffer());
|
||||
}
|
||||
}
|
||||
|
||||
// Handshake values are different
|
||||
if (networks[DOM.network.val()].name == "HNS - Handshake") {
|
||||
var ring = libs.handshake.KeyRing.fromPublic(keyPair.getPublicKeyBuffer())
|
||||
address = ring.getAddress().toString();
|
||||
}
|
||||
|
||||
// Stellar is different
|
||||
@@ -1150,6 +1299,15 @@
|
||||
privkey = keypair.secret();
|
||||
pubkey = address = keypair.publicKey();
|
||||
}
|
||||
|
||||
// Nano currency
|
||||
if (networks[DOM.network.val()].name == "NANO - Nano") {
|
||||
var nanoKeypair = libs.nanoUtil.getKeypair(index, seed);
|
||||
privkey = nanoKeypair.privKey;
|
||||
pubkey = nanoKeypair.pubKey;
|
||||
address = nanoKeypair.address;
|
||||
}
|
||||
|
||||
if ((networks[DOM.network.val()].name == "NAS - Nebulas")) {
|
||||
var privKeyBuffer = keyPair.d.toBuffer(32);
|
||||
var nebulasAccount = libs.nebulas.Account.NewAccount();
|
||||
@@ -1163,6 +1321,11 @@
|
||||
privkey = convertRipplePriv(privkey);
|
||||
address = convertRippleAdrr(address);
|
||||
}
|
||||
// Jingtum values are different
|
||||
if (networks[DOM.network.val()].name == "SWTC - Jingtum") {
|
||||
privkey = convertJingtumPriv(privkey);
|
||||
address = convertJingtumAdrr(address);
|
||||
}
|
||||
// CasinoCoin values are different
|
||||
if (networks[DOM.network.val()].name == "CSC - CasinoCoin") {
|
||||
privkey = convertCasinoCoinPriv(privkey);
|
||||
@@ -1185,6 +1348,27 @@
|
||||
address = libs.bchaddrSlp.toSlpAddress(address);
|
||||
}
|
||||
}
|
||||
|
||||
// ZooBC address format may vary
|
||||
if (networks[DOM.network.val()].name == "ZBC - ZooBlockchain") {
|
||||
|
||||
var purpose = parseIntNoNaN(DOM.bip44purpose.val(), 44);
|
||||
var coin = parseIntNoNaN(DOM.bip44coin.val(), 0);
|
||||
var path = "m/";
|
||||
path += purpose + "'/";
|
||||
path += coin + "'/" + index + "'";
|
||||
var result = libs.zoobcUtil.getKeypair(path, seed);
|
||||
|
||||
let publicKey = result.pubKey.slice(1, 33);
|
||||
let privateKey = result.key;
|
||||
|
||||
privkey = privateKey.toString('hex');
|
||||
pubkey = publicKey.toString('hex');
|
||||
|
||||
indexText = path;
|
||||
address = libs.zoobcUtil.getZBCAddress(publicKey, 'ZBC');
|
||||
}
|
||||
|
||||
// Segwit addresses are different
|
||||
if (isSegwit) {
|
||||
if (!segwitAvailable) {
|
||||
@@ -1225,8 +1409,20 @@
|
||||
|
||||
if (networks[DOM.network.val()].name == "EOS - EOSIO") {
|
||||
address = ""
|
||||
pubkey = eosUtil.bufferToPublic(keyPair.getPublicKeyBuffer());
|
||||
privkey = eosUtil.bufferToPrivate(keyPair.d.toBuffer(32));
|
||||
pubkey = EOSbufferToPublic(keyPair.getPublicKeyBuffer());
|
||||
privkey = EOSbufferToPrivate(keyPair.d.toBuffer(32));
|
||||
}
|
||||
|
||||
if (networks[DOM.network.val()].name == "FIO - Foundation for Interwallet Operability") {
|
||||
address = ""
|
||||
pubkey = FIObufferToPublic(keyPair.getPublicKeyBuffer());
|
||||
privkey = FIObufferToPrivate(keyPair.d.toBuffer(32));
|
||||
}
|
||||
|
||||
if (networks[DOM.network.val()].name == "ATOM - Cosmos Hub") {
|
||||
address = CosmosBufferToAddress(keyPair.getPublicKeyBuffer());
|
||||
pubkey = CosmosBufferToPublic(keyPair.getPublicKeyBuffer());
|
||||
privkey = keyPair.d.toBuffer().toString("base64");
|
||||
}
|
||||
|
||||
//Groestlcoin Addresses are different
|
||||
@@ -1679,7 +1875,7 @@
|
||||
var numberOfBits = entropy.binaryStr.length;
|
||||
var timeToCrack = "unknown";
|
||||
try {
|
||||
var z = libs.zxcvbn(entropy.base.parts.join(""));
|
||||
var z = libs.zxcvbn(entropy.base.events.join(""));
|
||||
timeToCrack = z.crack_times_display.offline_fast_hashing_1e10_per_second;
|
||||
if (z.feedback.warning != "") {
|
||||
timeToCrack = timeToCrack + " - " + z.feedback.warning;
|
||||
@@ -1698,7 +1894,7 @@
|
||||
DOM.entropyFiltered.html(entropy.cleanHtml);
|
||||
DOM.entropyType.text(entropyTypeStr);
|
||||
DOM.entropyCrackTime.text(timeToCrack);
|
||||
DOM.entropyEventCount.text(entropy.base.ints.length);
|
||||
DOM.entropyEventCount.text(entropy.base.events.length);
|
||||
DOM.entropyBits.text(numberOfBits);
|
||||
DOM.entropyWordCount.text(wordCount);
|
||||
DOM.entropyBinary.text(spacedBinaryStr);
|
||||
@@ -1723,8 +1919,8 @@
|
||||
// Detect duplicates
|
||||
var dupes = [];
|
||||
var dupeTracker = {};
|
||||
for (var i=0; i<entropy.base.parts.length; i++) {
|
||||
var card = entropy.base.parts[i];
|
||||
for (var i=0; i<entropy.base.events.length; i++) {
|
||||
var card = entropy.base.events[i];
|
||||
var cardUpper = card.toUpperCase();
|
||||
if (cardUpper in dupeTracker) {
|
||||
dupes.push(card);
|
||||
@@ -1830,6 +2026,7 @@
|
||||
|| (name == "EWT - EnergyWeb")
|
||||
|| (name == "PIRL - Pirl")
|
||||
|| (name == "MIX - MIX")
|
||||
|| (name == "MOAC - MOAC")
|
||||
|| (name == "MUSIC - Musicoin")
|
||||
|| (name == "POA - Poa")
|
||||
|| (name == "EXP - Expanse")
|
||||
@@ -1839,6 +2036,13 @@
|
||||
|| (name == "ESN - Ethersocial Network")
|
||||
|| (name == "VET - VeChain")
|
||||
|| (name == "ERE - EtherCore")
|
||||
|| (name == "BSC - Binance Smart Chain")
|
||||
}
|
||||
|
||||
function networkIsRsk() {
|
||||
var name = networks[DOM.network.val()].name;
|
||||
return (name == "R-BTC - RSK")
|
||||
|| (name == "tR-BTC - RSK Testnet");
|
||||
}
|
||||
|
||||
function networkHasSegwit() {
|
||||
@@ -2022,6 +2226,13 @@
|
||||
setHdCoin(161);
|
||||
},
|
||||
},
|
||||
{
|
||||
name: "AGM - Argoneum",
|
||||
onSelect: function() {
|
||||
network = libs.bitcoin.networks.argoneum;
|
||||
setHdCoin(421);
|
||||
},
|
||||
},
|
||||
{
|
||||
name: "ARYA - Aryacoin",
|
||||
onSelect: function() {
|
||||
@@ -2029,6 +2240,13 @@
|
||||
setHdCoin(357);
|
||||
},
|
||||
},
|
||||
{
|
||||
name: "ATOM - Cosmos Hub",
|
||||
onSelect: function() {
|
||||
network = libs.bitcoin.networks.bitcoin;
|
||||
setHdCoin(118);
|
||||
},
|
||||
},
|
||||
{
|
||||
name: "AUR - Auroracoin",
|
||||
onSelect: function() {
|
||||
@@ -2171,6 +2389,13 @@
|
||||
setHdCoin(183);
|
||||
},
|
||||
},
|
||||
{
|
||||
name: "BSC - Binance Smart Chain",
|
||||
onSelect: function() {
|
||||
network = libs.bitcoin.networks.bitcoin;
|
||||
setHdCoin(60);
|
||||
},
|
||||
},
|
||||
{
|
||||
name: "BSV - BitcoinSV",
|
||||
onSelect: function() {
|
||||
@@ -2270,6 +2495,14 @@
|
||||
setHdCoin(186);
|
||||
},
|
||||
},
|
||||
{
|
||||
name: "CRP - CranePay",
|
||||
onSelect: function() {
|
||||
network = libs.bitcoin.networks.cranepay;
|
||||
setHdCoin(2304);
|
||||
},
|
||||
},
|
||||
|
||||
{
|
||||
name: "CRW - Crown (Legacy)",
|
||||
onSelect: function() {
|
||||
@@ -2478,6 +2711,20 @@
|
||||
setHdCoin(40);
|
||||
},
|
||||
},
|
||||
{
|
||||
name: "FIO - Foundation for Interwallet Operability",
|
||||
onSelect: function() {
|
||||
network = libs.bitcoin.networks.bitcoin;
|
||||
setHdCoin(235);
|
||||
},
|
||||
},
|
||||
{
|
||||
name: "FIRO - Firo (Zcoin rebrand)",
|
||||
onSelect: function() {
|
||||
network = libs.bitcoin.networks.firo;
|
||||
setHdCoin(136);
|
||||
},
|
||||
},
|
||||
{
|
||||
name: "FIX - FIX",
|
||||
onSelect: function() {
|
||||
@@ -2562,6 +2809,12 @@
|
||||
setHdCoin(1);
|
||||
},
|
||||
},
|
||||
{
|
||||
name: "HNS - Handshake",
|
||||
onSelect: function() {
|
||||
setHdCoin(5353);
|
||||
},
|
||||
},
|
||||
{
|
||||
name: "HNC - Helleniccoin",
|
||||
onSelect: function() {
|
||||
@@ -2736,6 +2989,14 @@
|
||||
setHdCoin(214);
|
||||
},
|
||||
},
|
||||
{
|
||||
name: "MOAC - MOAC",
|
||||
segwitAvailable: false,
|
||||
onSelect: function() {
|
||||
network = libs.bitcoin.networks.bitcoin;
|
||||
setHdCoin(314);
|
||||
},
|
||||
},
|
||||
{
|
||||
name: "MUSIC - Musicoin",
|
||||
segwitAvailable: false,
|
||||
@@ -2744,6 +3005,13 @@
|
||||
setHdCoin(184);
|
||||
},
|
||||
},
|
||||
{
|
||||
name: "NANO - Nano",
|
||||
onSelect: function() {
|
||||
network = network = libs.nanoUtil.dummyNetwork;
|
||||
setHdCoin(165);
|
||||
},
|
||||
},
|
||||
{
|
||||
name: "NAV - Navcoin",
|
||||
onSelect: function() {
|
||||
@@ -2957,16 +3225,16 @@
|
||||
},
|
||||
},
|
||||
{
|
||||
name: "RBTC - RSK",
|
||||
name: "R-BTC - RSK",
|
||||
onSelect: function() {
|
||||
network = libs.bitcoin.networks.rubycoin;
|
||||
network = libs.bitcoin.networks.rsk;
|
||||
setHdCoin(137);
|
||||
},
|
||||
},
|
||||
{
|
||||
name: "tRBTC - RSK Testnet",
|
||||
name: "tR-BTC - RSK Testnet",
|
||||
onSelect: function() {
|
||||
network = libs.bitcoin.networks.rubycoin;
|
||||
network = libs.bitcoin.networks.rsktestnet;
|
||||
setHdCoin(37310);
|
||||
},
|
||||
},
|
||||
@@ -2984,6 +3252,13 @@
|
||||
setHdCoin(4);
|
||||
},
|
||||
},
|
||||
{
|
||||
name: "RITO - Ritocoin",
|
||||
onSelect: function() {
|
||||
network = libs.bitcoin.networks.ritocoin;
|
||||
setHdCoin(19169);
|
||||
},
|
||||
},
|
||||
{
|
||||
name: "RVR - RevolutionVR",
|
||||
onSelect: function() {
|
||||
@@ -2998,6 +3273,13 @@
|
||||
setHdCoin(19165);
|
||||
},
|
||||
},
|
||||
{
|
||||
name: "SCRIBE - Scribe",
|
||||
onSelect: function() {
|
||||
network = libs.bitcoin.networks.scribe;
|
||||
setHdCoin(545);
|
||||
},
|
||||
},
|
||||
{
|
||||
name: "SLS - Salus",
|
||||
onSelect: function() {
|
||||
@@ -3075,6 +3357,27 @@
|
||||
setHdCoin(105);
|
||||
},
|
||||
},
|
||||
{
|
||||
name: "SUGAR - Sugarchain",
|
||||
onSelect: function() {
|
||||
network = libs.bitcoin.networks.sugarchain;
|
||||
setHdCoin(408);
|
||||
},
|
||||
},
|
||||
{
|
||||
name: "TUGAR - Sugarchain Testnet",
|
||||
onSelect: function() {
|
||||
network = libs.bitcoin.networks.sugarchaintestnet;
|
||||
setHdCoin(408);
|
||||
},
|
||||
},
|
||||
{
|
||||
name: "SWTC - Jingtum",
|
||||
onSelect: function() {
|
||||
network = libs.bitcoin.networks.bitcoin;
|
||||
setHdCoin(315);
|
||||
},
|
||||
},
|
||||
{
|
||||
name: "TSTRAT - Stratis Testnet",
|
||||
onSelect: function() {
|
||||
@@ -3110,6 +3413,12 @@
|
||||
setHdCoin(159);
|
||||
},
|
||||
},
|
||||
{
|
||||
name: "TRX - Tron",
|
||||
onSelect: function() {
|
||||
setHdCoin(195);
|
||||
},
|
||||
},
|
||||
{
|
||||
name: "TWINS - TWINS",
|
||||
onSelect: function() {
|
||||
@@ -3266,12 +3575,19 @@
|
||||
},
|
||||
},
|
||||
{
|
||||
name: "XZC - Zcoin",
|
||||
name: "XZC - Zcoin (rebranded to Firo)",
|
||||
onSelect: function() {
|
||||
network = libs.bitcoin.networks.zcoin;
|
||||
setHdCoin(136);
|
||||
},
|
||||
},
|
||||
{
|
||||
name: "ZBC - ZooBlockchain",
|
||||
onSelect: function () {
|
||||
network = libs.bitcoin.networks.zoobc;
|
||||
setHdCoin(883);
|
||||
},
|
||||
},
|
||||
{
|
||||
name: "ZCL - Zclassic",
|
||||
onSelect: function() {
|
||||
@@ -3326,6 +3642,46 @@
|
||||
}
|
||||
]
|
||||
|
||||
// RSK - RSK functions - begin
|
||||
function stripHexPrefix(address) {
|
||||
if (typeof address !== "string") {
|
||||
throw new Error("address parameter should be a string.");
|
||||
}
|
||||
|
||||
var hasPrefix = (address.substring(0, 2) === "0x" ||
|
||||
address.substring(0, 2) === "0X");
|
||||
|
||||
return hasPrefix ? address.slice(2) : address;
|
||||
};
|
||||
|
||||
function toChecksumAddressForRsk(address, chainId = null) {
|
||||
if (typeof address !== "string") {
|
||||
throw new Error("address parameter should be a string.");
|
||||
}
|
||||
|
||||
if (!/^(0x)?[0-9a-f]{40}$/i.test(address)) {
|
||||
throw new Error("Given address is not a valid RSK address: " + address);
|
||||
}
|
||||
|
||||
var stripAddress = stripHexPrefix(address).toLowerCase();
|
||||
var prefix = chainId != null ? chainId.toString() + "0x" : "";
|
||||
var keccakHash = libs.ethUtil.keccak256(prefix + stripAddress)
|
||||
.toString("hex")
|
||||
.replace(/^0x/i, "");
|
||||
var checksumAddress = "0x";
|
||||
|
||||
for (var i = 0; i < stripAddress.length; i++) {
|
||||
checksumAddress +=
|
||||
parseInt(keccakHash[i], 16) >= 8 ?
|
||||
stripAddress[i].toUpperCase() :
|
||||
stripAddress[i];
|
||||
}
|
||||
|
||||
return checksumAddress;
|
||||
}
|
||||
|
||||
// RSK - RSK functions - end
|
||||
|
||||
// ELA - Elastos functions - begin
|
||||
function displayBip44InfoForELA() {
|
||||
if (!isELA()) {
|
||||
|
||||
10
src/js/jingtum-util.js
Normal file
10
src/js/jingtum-util.js
Normal 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)
|
||||
}
|
||||
|
||||
@@ -164,6 +164,36 @@ libs.bitcoin.networks.regtest.p2wshInP2sh = {
|
||||
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',
|
||||
@@ -452,7 +482,7 @@ libs.bitcoin.networks.bitcore.p2wpkhInP2sh = {
|
||||
libs.bitcoin.networks.monacoin.p2wpkh = {
|
||||
baseNetwork: "monacoin",
|
||||
messagePrefix: '\x18Monacoin Signed Message:\n',
|
||||
bech32: 'monacoin',
|
||||
bech32: 'mona',
|
||||
bip32: {
|
||||
public: 0x0488b21e,
|
||||
private: 0x0488ade4
|
||||
@@ -465,7 +495,7 @@ libs.bitcoin.networks.monacoin.p2wpkh = {
|
||||
libs.bitcoin.networks.monacoin.p2wpkhInP2sh = {
|
||||
baseNetwork: "monacoin",
|
||||
messagePrefix: '\x18Monacoin Signed Message:\n',
|
||||
bech32: 'monacoin',
|
||||
bech32: 'mona',
|
||||
bip32: {
|
||||
public: 0x0488b21e,
|
||||
private: 0x0488ade4
|
||||
@@ -683,4 +713,56 @@ libs.bitcoin.networks.deeponion.p2wpkhInP2sh = {
|
||||
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
|
||||
};
|
||||
|
||||
})();
|
||||
|
||||
197
src/js/wordlist_portuguese.js
Normal file
197
src/js/wordlist_portuguese.js
Normal 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 it is too large
Load Diff
Reference in New Issue
Block a user