Compare commits

...

32 Commits

Author SHA1 Message Date
Ian Coleman
90f7a5ec93 Release v0.4.2 2020-02-07 21:26:43 +11:00
Ian Coleman
dd496c82c1 Fix ethereum private key format 2020-02-07 21:25:57 +11:00
Ian Coleman
1dafc30db4 Test pubkey and privkey for all coins 2020-02-07 20:59:19 +11:00
Ian Coleman
927450e169 Release v0.4.1 2020-02-06 20:14:00 +11:00
Ian Coleman
a67554c649 Add tests for RSK network and testnet 2020-02-06 20:11:09 +11:00
Ian Coleman
0bc6361db4 Fix ethercore test 2020-02-06 20:10:52 +11:00
iancoleman
a98d40c43d Merge pull request #397 from aitorp6/master
Added DeepOnion Segwit parameters
2020-02-06 15:00:02 +11:00
iancoleman
54a8e781b4 Merge pull request #396 from ilanolkies/patch-2
Add network
2020-02-06 14:59:34 +11:00
iancoleman
c1d6274224 Merge pull request #393 from ethercore/master
Add EtherCore
2020-02-06 14:58:06 +11:00
aitorp6
c16661aeea Added DeepOnion Segwit parameters 2020-02-04 10:47:11 +01:00
Ilan
e9491c7efd Add network
Based on https://github.com/rsksmart/RSKIPs/blob/master/IPs/RSKIP57.md
2020-01-22 12:16:51 -03:00
Ian Coleman
d07983bc1f Catch nebulas error on some chrome configs
See #395
2020-01-08 17:31:14 +11:00
Ian Coleman
3aa7677ace Directly export libraries where they're required 2020-01-08 17:30:16 +11:00
EtherCore Contributor
9e04576e2f add testcase for ethercore 2020-01-02 00:53:17 +09:00
EtherCore Contributor
8131a07115 Add EtherCore 2020-01-02 00:45:48 +09:00
iancoleman
181b5d61e3 Merge pull request #390 from matthewleon/bugfix/eth-xpub-derivation
Bugfix/eth xpub derivation
2019-12-20 15:58:26 +11:00
Matthew Leon
4dfc681f71 fix Ethereum xpub derivation 2019-12-19 15:37:08 -05:00
Matthew Leon
dfb4fd1be5 add failing test for ETH xpub derivation
see https://github.com/iancoleman/bip39/issues/169
2019-12-19 15:35:31 -05:00
Ian Coleman
aa793f572f Release v0.4.0 2019-12-19 14:48:25 +11:00
Ian Coleman
6973e692b0 Minify third party libraries 2019-12-19 14:32:13 +11:00
Ian Coleman
22f8766947 Replace most libraries with combined libs 2019-12-19 14:21:33 +11:00
Ian Coleman
8017442c50 Add experimental incomplete combined js libs 2019-12-19 14:21:25 +11:00
Ian Coleman
82cf26c1cb Text for multibit mentions change addresses
Closes #376
2019-12-18 11:19:47 +11:00
Ian Coleman
206cbafceb Remove pending from some tests using chrome
Unfortunately firefox pending tests still do not work.
2019-12-18 10:57:29 +11:00
Ian Coleman
9cf02dd452 Make seed field editable 2019-12-18 10:32:25 +11:00
Ian Coleman
f12242014d Add bitcoin regtest params 2019-12-18 09:51:00 +11:00
Ian Coleman
244c76022a Convert mnemonic to hex entropy instead of binary 2019-12-18 09:07:17 +11:00
Ian Coleman
516c16d721 Allow manual override for entropy type 2019-12-17 14:10:45 +11:00
Ian Coleman
f7e9fdf002 Generate addresses for P2WSH and P2WSH-P2SH 2019-12-17 11:46:07 +11:00
Ian Coleman
5c203fab6a Add P2WSH and P2WSH-P2SH for bitcoin and testnet
Address generation still to come.
2019-12-16 13:27:15 +11:00
iancoleman
40d542ba58 Merge pull request #385 from hladik-dan/master
Add Czech language
2019-12-09 09:16:01 +11:00
Daniel Hladík
cc3c35487f Add Czech language 2019-12-06 20:21:43 +01:00
33 changed files with 3995 additions and 196720 deletions

View File

@@ -1,3 +1,26 @@
# 0.4.2
* Fix ethereum private key format
# 0.4.1
* Fix no loading on chrome with third-party cookies blocked
* Add EtherCore
* Add RSK network
* Add DeepOnion segwit parameters
* Fix ethereum xpub derivation
# 0.4.0
* Third party libraries deduplicated and minified
* Add text reminder for multibit wallet change addresses
* Seed field can be edited
* Add bitcoin regtest parameters
* Mnemonic conversion to entropy is hex encoded instead of binary
* Entropy type can be manually selected
* Add Bitcoin P2WSH and P2WSH-P2SH
* Add Czech language
# 0.3.14
* Ethereum uses standard BIP44 as per majority of wallets (Issue 378)

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

@@ -0,0 +1,89 @@
/* base-x */
module.exports.basex = require('base-x')
/* bchaddrjs */
module.exports.bchaddr = require('bchaddrjs')
/* bchaddrjs slp */
module.exports.bchaddrSlp = require('bchaddrjs-slp')
/* biginteger */
module.exports.BigInteger = require('javascript-biginteger')
/* bitcoinjs-bip38 */
module.exports.bip38 = require('bip38')
/* bitcoinjs-lib */
module.exports.bitcoin = require('bitcoinjs-lib')
/* buffer */
module.exports.buffer = require('buffer');
/* elastos */
// See https://github.com/iancoleman/bip39/pull/368
// and https://github.com/johnnynanjiang/Elastos.SDK.Keypair.Javascript/tree/iancoleman-bip39
module.exports.elastosjs = require('elastos-wallet-js')
/* ethereum-util */
module.exports.ethUtil = require('ethereumjs-util')
/* fast-levenshtein */
module.exports.levenshtein = require('fast-levenshtein')
/* groestlcoin */
module.exports.groestlcoinjs = require('groestlcoinjs-lib')
/* groestlcoin bip38 */
module.exports.groestlcoinjsBip38 = require('bip38grs')
/* kjua qr codes */
module.exports.kjua = require('kjua')
/* nebulas */
try {
module.exports.nebulas = require('nebulas')
}
catch (e) {
console.warn("Error loading nebulas library");
console.warn(e);
};
/* stellar-util */
let StellarBase = require('stellar-base');
let edHd = require('ed25519-hd-key');
module.exports.stellarUtil = {
getKeypair: function (path, seed) {
const result = edHd.derivePath(path, seed);
return StellarBase.Keypair.fromRawEd25519Seed(result.key);
},
dummyNetwork: {
bip32: {public: 0, private: 0},
messagePrefix: '',
pubKeyHash: 0,
scriptHash: 0,
wif: 0,
},
}
/* unorm */
module.exports.unorm = require('unorm')
/* zxcvbn */
module.exports.zxcvbn = require('zxcvbn')

17
libs/combined/npm-shrinkwrap.json generated Normal file
View File

@@ -0,0 +1,17 @@
{
"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"
}
}
}
}
}
}
}

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

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,31 @@
{
"name": "bip39-tool-external-libs",
"version": "0.4.0",
"scripts": {
"build": "browserify index.js --standalone libs | uglifyjs -c > ../../src/js/bip39-libs.js"
},
"dependencies": {
"base-x": "3.0.7",
"bchaddrjs": "0.4.4",
"bchaddrjs-slp": "git://github.com/simpleledger/bchaddrjs.git#af16e44a6bfbe4b3980a62dba50e2f68ed864c6b",
"bip38": "2.0.2",
"bip38grs": "git://github.com/Groestlcoin/bip38grs.git#091975b01679b74dc0a4136bb743fe17791b0151",
"bitcoinjs-lib": "git://github.com/iancoleman/bitcoinjs-lib.git#v3.3.2_16bit",
"buffer": "5.4.3",
"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",
"javascript-biginteger": "0.9.2",
"kjua": "0.6.0",
"nebulas": "0.5.6",
"stellar-base": "^0.10.0",
"unorm": "1.6.0",
"zxcvbn": "4.4.2"
},
"devDependencies": {
"browserify": "^16.2.3",
"uglify-es": "^3.3.9"
}
}

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

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

View File

@@ -106,3 +106,6 @@ body {
.visual-privacy .private-data {
display: none;
}
.text-weight-normal {
font-weight: normal !important;
}

View File

@@ -15,7 +15,7 @@
<div class="container">
<h1 class="text-center">Mnemonic Code Converter</h1>
<p class="version">v0.3.14</p>
<p class="version">v0.4.2</p>
<hr>
<div class="row">
<div class="col-md-12">
@@ -123,12 +123,42 @@
<div class="col-sm-3">
<p>Valid entropy values include:</p>
<ul>
<li><strong>Binary</strong> [0-1]<br>101010011</li>
<li><strong>Base 6</strong> [0-5]<br>123434014</li>
<li><strong>Dice</strong> [1-6]<br>62535634</li>
<li><strong>Base 10</strong> [0-9]<br>90834528</li>
<li><strong>Hex</strong> [0-9A-F]<br>4187a8bfd9</li>
<li><strong>Card</strong> [A2-9TJQK][CDHS]<br>ahqs9dtc</li>
<li>
<label>
<input type="radio" name="entropy-type" value="binary">
<strong>Binary</strong> [0-1]<br>101010011
</label>
</li>
<li>
<label>
<input type="radio" name="entropy-type" value="base 6">
<strong>Base 6</strong> [0-5]<br>123434014
</label>
</li>
<li>
<label>
<input type="radio" name="entropy-type" value="dice">
<strong>Dice</strong> [1-6]<br>62535634
</label>
</li>
<li>
<label>
<input type="radio" name="entropy-type" value="base 10">
<strong>Base 10</strong> [0-9]<br>90834528
</label>
</li>
<li>
<label>
<input type="radio" name="entropy-type" value="hexadecimal" checked>
<strong>Hex</strong> [0-9A-F]<br>4187a8bfd9
</label>
</li>
<li>
<label>
<input type="radio" name="entropy-type" value="card">
<strong>Card</strong> [A2-9TJQK][CDHS]<br>ahqs9dtc
</label>
</li>
</ul>
</div>
</div>
@@ -163,6 +193,7 @@
<a href="#french" title="French">Français</a>
<a href="#italian" title="Italian">Italiano</a>
<a href="#korean" title="Korean">한국어</a>
<a href="#czech" title="Czech">Čeština</a>
</div>
</div>
</div>
@@ -190,7 +221,7 @@
<div class="form-group">
<label for="seed" class="col-sm-2 control-label">BIP39 Seed</label>
<div class="col-sm-10">
<textarea id="seed" class="seed private-data form-control" readonly="readonly" data-show-qr autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false"></textarea>
<textarea id="seed" class="seed private-data form-control" data-show-qr autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false"></textarea>
</div>
</div>
<div class="form-group">
@@ -365,6 +396,7 @@
<div class="col-sm-10">
<p class="form-control no-border">
<span>Use path <code>m/0'/0</code>.</span>
<span>For change addresses use path <code>m/0'/1</code>.</span>
</p>
<p class="form-control no-border">
<span>For more info see</span>
@@ -508,6 +540,8 @@
<select class="form-control bip141-semantics">
<option value="p2wpkh">P2WPKH</option>
<option value="p2wpkh-p2sh" selected>P2WPKH nested in P2SH</option>
<option value="p2wsh">P2WSH (1-of-1 multisig)</option>
<option value="p2wsh-p2sh">P2WSH nested in P2SH (1-of-1 multisig)</option>
</select>
</div>
</div>
@@ -923,25 +957,13 @@
<td class="privkey private-data"><span data-show-qr></span></td>
</tr>
</script>
<script src="js/polyfill.es6.js"></script>
<script src="js/basex.js"></script>
<script src="js/unorm.js"></script>
<script src="js/jquery-3.2.1.js"></script>
<script src="js/bootstrap-3.3.7.js"></script>
<script src="js/levenshtein.js"></script>
<script src="js/kjua-0.1.1.min.js"></script>
<script src="js/bitcoinjs-3.3.2.js"></script>
<script src="js/bip39-libs.js"></script>
<script src="js/bitcoinjs-extensions.js"></script>
<script src="js/bitcoinjs-bip38-2.0.2.js"></script>
<script src="js/groestlcoinjs-3.3.2.js"></script>
<script src="js/groestlcoinjs-bip38-2.0.2.js"></script>
<script src="js/elastos-1.0.9.min.js"></script>
<script src="js/segwit-parameters.js"></script>
<script src="js/ethereumjs-util.js"></script>
<script src="js/ripple-util.js"></script>
<script src="js/casinocoin-util.js"></script>
<script src="js/bchaddrjs-0.2.1.js"></script>
<script src="js/nebulas-account.js"></script>
<script src="js/eos-util.js"></script>
<script src="js/sjcl-bip39.js"></script>
<script src="js/wordlist_english.js"></script>
@@ -952,11 +974,9 @@
<script src="js/wordlist_french.js"></script>
<script src="js/wordlist_italian.js"></script>
<script src="js/wordlist_korean.js"></script>
<script src="js/wordlist_czech.js"></script>
<script src="js/jsbip39.js"></script>
<script src="js/biginteger.js"></script>
<script src="js/zxcvbn.js"></script>
<script src="js/entropy.js"></script>
<script src="js/stellar-util.js"></script>
<script src="js/index.js"></script>
</body>
</html>

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

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

File diff suppressed because one or more lines are too long

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

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

File diff suppressed because one or more lines are too long

View File

@@ -16,7 +16,7 @@
window.Entropy = new (function() {
var TWO = new BigInteger(2);
var TWO = new libs.BigInteger.BigInteger(2);
// matchers returns an array of the matched events for each type of entropy.
// eg
@@ -67,9 +67,9 @@ window.Entropy = new (function() {
return ints;
}
this.fromString = function(rawEntropyStr) {
this.fromString = function(rawEntropyStr, baseStr) {
// Find type of entropy being used (binary, hex, dice etc)
var base = getBase(rawEntropyStr);
var base = getBase(rawEntropyStr, baseStr);
// Convert dice to base6 entropy (ie 1-6 to 0-5)
// This is done by changing all 6s to 0s
if (base.str == "dice") {
@@ -103,11 +103,11 @@ window.Entropy = new (function() {
// Convert base.ints to BigInteger.
// Due to using unusual bases, eg cards of base52, this is not as simple as
// using BigInteger.parse()
var entropyInt = BigInteger.ZERO;
var entropyInt = libs.BigInteger.BigInteger.ZERO;
for (var i=base.ints.length-1; i>=0; i--) {
var thisInt = BigInteger.parse(base.ints[i]);
var thisInt = libs.BigInteger.BigInteger.parse(base.ints[i]);
var power = (base.ints.length - 1) - i;
var additionalEntropy = BigInteger.parse(base.asInt).pow(power).multiply(thisInt);
var additionalEntropy = libs.BigInteger.BigInteger.parse(base.asInt).pow(power).multiply(thisInt);
entropyInt = entropyInt.add(additionalEntropy);
}
// Convert entropy to binary
@@ -166,13 +166,14 @@ window.Entropy = new (function() {
return s;
}
function getBase(str) {
function getBase(str, baseStr) {
// Need to get the lowest base for the supplied entropy.
// This prevents interpreting, say, dice rolls as hexadecimal.
var binaryMatches = matchers.binary(str);
var hexMatches = matchers.hex(str);
var autodetect = baseStr === undefined;
// Find the lowest base that can be used, whilst ignoring any irrelevant chars
if (binaryMatches.length == hexMatches.length && hexMatches.length > 0) {
if ((binaryMatches.length == hexMatches.length && hexMatches.length > 0 && autodetect) || baseStr === "binary") {
var ints = binaryMatches.map(function(i) { return parseInt(i, 2) });
return {
ints: ints,
@@ -183,7 +184,7 @@ window.Entropy = new (function() {
}
}
var cardMatches = matchers.card(str);
if (cardMatches.length >= hexMatches.length / 2) {
if ((cardMatches.length >= hexMatches.length / 2 && autodetect) || baseStr === "card") {
var ints = convertCardsToInts(cardMatches);
return {
ints: ints,
@@ -194,7 +195,7 @@ window.Entropy = new (function() {
}
}
var diceMatches = matchers.dice(str);
if (diceMatches.length == hexMatches.length && hexMatches.length > 0) {
if ((diceMatches.length == hexMatches.length && hexMatches.length > 0 && autodetect) || baseStr === "dice") {
var ints = diceMatches.map(function(i) { return parseInt(i) });
return {
ints: ints,
@@ -205,7 +206,7 @@ window.Entropy = new (function() {
}
}
var base6Matches = matchers.base6(str);
if (base6Matches.length == hexMatches.length && hexMatches.length > 0) {
if ((base6Matches.length == hexMatches.length && hexMatches.length > 0 && autodetect) || baseStr === "base 6") {
var ints = base6Matches.map(function(i) { return parseInt(i) });
return {
ints: ints,
@@ -216,7 +217,7 @@ window.Entropy = new (function() {
}
}
var base10Matches = matchers.base10(str);
if (base10Matches.length == hexMatches.length && hexMatches.length > 0) {
if ((base10Matches.length == hexMatches.length && hexMatches.length > 0 && autodetect) || baseStr === "base 10") {
var ints = base10Matches.map(function(i) { return parseInt(i) });
return {
ints: ints,
@@ -327,7 +328,7 @@ window.Entropy = new (function() {
// Math.LOG2E
// log2(8) gave 2.9999999999999996 which when floored causes issues.
// So instead use the BigInteger library to get it right.
return BigInteger.log(x) / BigInteger.log(2);
return libs.BigInteger.BigInteger.log(x) / libs.BigInteger.BigInteger.log(2);
};
// Depends on BigInteger
@@ -335,9 +336,9 @@ window.Entropy = new (function() {
if (n == 0) {
return 1;
}
f = BigInteger.ONE;
f = libs.BigInteger.BigInteger.ONE;
for (var i=1; i<=n; i++) {
f = f.multiply(new BigInteger(i));
f = f.multiply(new libs.BigInteger.BigInteger(i));
}
return f;
}

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because one or more lines are too long

View File

@@ -1,138 +0,0 @@
// source
// https://github.com/hiddentao/fast-levenshtein/blob/2.0.6/levenshtein.js
(function() {
'use strict';
var collator;
try {
collator = (typeof Intl !== "undefined" && typeof Intl.Collator !== "undefined") ? Intl.Collator("generic", { sensitivity: "base" }) : null;
} catch (err){
console.log("Collator could not be initialized and wouldn't be used");
}
// arrays to re-use
var prevRow = [],
str2Char = [];
/**
* Based on the algorithm at http://en.wikipedia.org/wiki/Levenshtein_distance.
*/
var Levenshtein = {
/**
* Calculate levenshtein distance of the two strings.
*
* @param str1 String the first string.
* @param str2 String the second string.
* @param [options] Additional options.
* @param [options.useCollator] Use `Intl.Collator` for locale-sensitive string comparison.
* @return Integer the levenshtein distance (0 and above).
*/
get: function(str1, str2, options) {
var useCollator = (options && collator && options.useCollator);
var str1Len = str1.length,
str2Len = str2.length;
// base cases
if (str1Len === 0) return str2Len;
if (str2Len === 0) return str1Len;
// two rows
var curCol, nextCol, i, j, tmp;
// initialise previous row
for (i=0; i<str2Len; ++i) {
prevRow[i] = i;
str2Char[i] = str2.charCodeAt(i);
}
prevRow[str2Len] = str2Len;
var strCmp;
if (useCollator) {
// calculate current row distance from previous row using collator
for (i = 0; i < str1Len; ++i) {
nextCol = i + 1;
for (j = 0; j < str2Len; ++j) {
curCol = nextCol;
// substution
strCmp = 0 === collator.compare(str1.charAt(i), String.fromCharCode(str2Char[j]));
nextCol = prevRow[j] + (strCmp ? 0 : 1);
// insertion
tmp = curCol + 1;
if (nextCol > tmp) {
nextCol = tmp;
}
// deletion
tmp = prevRow[j + 1] + 1;
if (nextCol > tmp) {
nextCol = tmp;
}
// copy current col value into previous (in preparation for next iteration)
prevRow[j] = curCol;
}
// copy last col value into previous (in preparation for next iteration)
prevRow[j] = nextCol;
}
}
else {
// calculate current row distance from previous row without collator
for (i = 0; i < str1Len; ++i) {
nextCol = i + 1;
for (j = 0; j < str2Len; ++j) {
curCol = nextCol;
// substution
strCmp = str1.charCodeAt(i) === str2Char[j];
nextCol = prevRow[j] + (strCmp ? 0 : 1);
// insertion
tmp = curCol + 1;
if (nextCol > tmp) {
nextCol = tmp;
}
// deletion
tmp = prevRow[j + 1] + 1;
if (nextCol > tmp) {
nextCol = tmp;
}
// copy current col value into previous (in preparation for next iteration)
prevRow[j] = curCol;
}
// copy last col value into previous (in preparation for next iteration)
prevRow[j] = nextCol;
}
}
return nextCol;
}
};
// amd
if (typeof define !== "undefined" && define !== null && define.amd) {
define(function() {
return Levenshtein;
});
}
// commonjs
else if (typeof module !== "undefined" && module !== null && typeof exports !== "undefined" && module.exports === exports) {
module.exports = Levenshtein;
}
// web worker
else if (typeof self !== "undefined" && typeof self.postMessage === 'function' && typeof self.importScripts === 'function') {
self.Levenshtein = Levenshtein;
}
// browser main thread
else if (typeof window !== "undefined" && window !== null) {
window.Levenshtein = Levenshtein;
}
}());

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

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

View File

@@ -2,7 +2,7 @@
// p2wpkh
bitcoinjs.bitcoin.networks.bitcoin.p2wpkh = {
libs.bitcoin.networks.bitcoin.p2wpkh = {
baseNetwork: "bitcoin",
messagePrefix: '\x18Bitcoin Signed Message:\n',
bech32: 'bc',
@@ -15,7 +15,7 @@ bitcoinjs.bitcoin.networks.bitcoin.p2wpkh = {
wif: 0x80
};
bitcoinjs.bitcoin.networks.testnet.p2wpkh = {
libs.bitcoin.networks.testnet.p2wpkh = {
baseNetwork: "testnet",
messagePrefix: '\x18Bitcoin Signed Message:\n',
bech32: 'tb',
@@ -28,9 +28,22 @@ bitcoinjs.bitcoin.networks.testnet.p2wpkh = {
wif: 0xef
};
libs.bitcoin.networks.regtest.p2wpkh = {
baseNetwork: "regtest",
messagePrefix: '\x18Bitcoin Signed Message:\n',
bech32: 'bcrt',
bip32: {
public: 0x045f1cf6,
private: 0x045f18bc
},
pubKeyHash: 0x6f,
scriptHash: 0xc4,
wif: 0xef
};
// p2wpkh in p2sh
bitcoinjs.bitcoin.networks.bitcoin.p2wpkhInP2sh = {
libs.bitcoin.networks.bitcoin.p2wpkhInP2sh = {
baseNetwork: "bitcoin",
messagePrefix: '\x18Bitcoin Signed Message:\n',
bech32: 'bc',
@@ -43,7 +56,7 @@ bitcoinjs.bitcoin.networks.bitcoin.p2wpkhInP2sh = {
wif: 0x80
};
bitcoinjs.bitcoin.networks.testnet.p2wpkhInP2sh = {
libs.bitcoin.networks.testnet.p2wpkhInP2sh = {
baseNetwork: "testnet",
messagePrefix: '\x18Bitcoin Signed Message:\n',
bech32: 'tb',
@@ -56,7 +69,102 @@ bitcoinjs.bitcoin.networks.testnet.p2wpkhInP2sh = {
wif: 0xef
};
bitcoinjs.bitcoin.networks.litecoin.p2wpkh = {
libs.bitcoin.networks.regtest.p2wpkhInP2sh = {
baseNetwork: "regtest",
messagePrefix: '\x18Bitcoin Signed Message:\n',
bech32: 'bcrt',
bip32: {
public: 0x044a5262,
private: 0x044a4e28
},
pubKeyHash: 0x6f,
scriptHash: 0xc4,
wif: 0xef
};
// p2wsh
libs.bitcoin.networks.bitcoin.p2wsh = {
baseNetwork: "bitcoin",
messagePrefix: '\x18Bitcoin Signed Message:\n',
bech32: 'bc',
bip32: {
public: 0x02aa7ed3,
private: 0x02aa7a99
},
pubKeyHash: 0x00,
scriptHash: 0x05,
wif: 0x80
};
libs.bitcoin.networks.testnet.p2wsh = {
baseNetwork: "testnet",
messagePrefix: '\x18Bitcoin Signed Message:\n',
bech32: 'tb',
bip32: {
public: 0x02575483,
private: 0x02575048
},
pubKeyHash: 0x6f,
scriptHash: 0xc4,
wif: 0xef
};
libs.bitcoin.networks.regtest.p2wsh = {
baseNetwork: "regtest",
messagePrefix: '\x18Bitcoin Signed Message:\n',
bech32: 'bcrt',
bip32: {
public: 0x02575483,
private: 0x02575048
},
pubKeyHash: 0x6f,
scriptHash: 0xc4,
wif: 0xef
};
// p2wsh in p2sh
libs.bitcoin.networks.bitcoin.p2wshInP2sh = {
baseNetwork: "bitcoin",
messagePrefix: '\x18Bitcoin Signed Message:\n',
bech32: 'bc',
bip32: {
public: 0x0295b43f,
private: 0x0295b005
},
pubKeyHash: 0x00,
scriptHash: 0x05,
wif: 0x80
};
libs.bitcoin.networks.testnet.p2wshInP2sh = {
baseNetwork: "testnet",
messagePrefix: '\x18Bitcoin Signed Message:\n',
bech32: 'tb',
bip32: {
public: 0x024289ef,
private: 0x024285b5
},
pubKeyHash: 0x6f,
scriptHash: 0xc4,
wif: 0xef
};
libs.bitcoin.networks.regtest.p2wshInP2sh = {
baseNetwork: "regtest",
messagePrefix: '\x18Bitcoin Signed Message:\n',
bech32: 'bcrt',
bip32: {
public: 0x024289ef,
private: 0x024285b5
},
pubKeyHash: 0x6f,
scriptHash: 0xc4,
wif: 0xef
};
libs.bitcoin.networks.litecoin.p2wpkh = {
baseNetwork: "litecoin",
messagePrefix: '\x19Litecoin Signed Message:\n',
bech32: 'ltc',
@@ -69,7 +177,7 @@ bitcoinjs.bitcoin.networks.litecoin.p2wpkh = {
wif: 0xb0
};
bitcoinjs.bitcoin.networks.litecoin.p2wpkhInP2sh = {
libs.bitcoin.networks.litecoin.p2wpkhInP2sh = {
baseNetwork: "litecoin",
messagePrefix: '\x19Litecoin Signed Message:\n',
bech32: 'ltc',
@@ -82,7 +190,7 @@ bitcoinjs.bitcoin.networks.litecoin.p2wpkhInP2sh = {
wif: 0xb0
};
bitcoinjs.bitcoin.networks.fujicoin.p2wpkh = {
libs.bitcoin.networks.fujicoin.p2wpkh = {
baseNetwork: "fujicoin",
messagePrefix: '\x19FujiCoin Signed Message:\n',
bech32: 'fc',
@@ -95,7 +203,7 @@ bitcoinjs.bitcoin.networks.fujicoin.p2wpkh = {
wif: 0xa4
};
bitcoinjs.bitcoin.networks.fujicoin.p2wpkhInP2sh = {
libs.bitcoin.networks.fujicoin.p2wpkhInP2sh = {
baseNetwork: "fujicoin",
messagePrefix: '\x19FujiCoin Signed Message:\n',
bech32: 'fc',
@@ -108,7 +216,7 @@ bitcoinjs.bitcoin.networks.fujicoin.p2wpkhInP2sh = {
wif: 0xa4
};
bitcoinjs.bitcoin.networks.vertcoin.p2wpkh = {
libs.bitcoin.networks.vertcoin.p2wpkh = {
baseNetwork: "vertcoin",
messagePrefix: '\x18Vertcoin Signed Message:\n',
bech32: 'vtc',
@@ -121,7 +229,7 @@ bitcoinjs.bitcoin.networks.vertcoin.p2wpkh = {
wif: 0x80
};
bitcoinjs.bitcoin.networks.vertcoin.p2wpkhInP2sh = {
libs.bitcoin.networks.vertcoin.p2wpkhInP2sh = {
baseNetwork: "vertcoin",
messagePrefix: '\x18Vertcoin Signed Message:\n',
bip32: {
@@ -133,7 +241,7 @@ bitcoinjs.bitcoin.networks.vertcoin.p2wpkhInP2sh = {
wif: 0x80
};
bitcoinjs.bitcoin.networks.bgold.p2wpkh = {
libs.bitcoin.networks.bgold.p2wpkh = {
baseNetwork: "bgold",
messagePrefix: '\x1DBitcoin Gold Signed Message:\n',
bech32: 'btg',
@@ -146,7 +254,7 @@ bitcoinjs.bitcoin.networks.bgold.p2wpkh = {
wif: 0x80,
};
bitcoinjs.bitcoin.networks.bgold.p2wpkhInP2sh = {
libs.bitcoin.networks.bgold.p2wpkhInP2sh = {
baseNetwork: "bgold",
messagePrefix: '\x1DBitcoin Gold Signed Message:\n',
bech32: 'btg',
@@ -159,7 +267,7 @@ bitcoinjs.bitcoin.networks.bgold.p2wpkhInP2sh = {
wif: 0x80,
};
bitcoinjs.bitcoin.networks.digibyte.p2wpkh = {
libs.bitcoin.networks.digibyte.p2wpkh = {
baseNetwork: "digibyte",
messagePrefix: 'x19DigiByte Signed Message:\n',
bech32: 'dgb',
@@ -172,7 +280,7 @@ bitcoinjs.bitcoin.networks.digibyte.p2wpkh = {
wif: 0x80
};
bitcoinjs.bitcoin.networks.digibyte.p2wpkhInP2sh = {
libs.bitcoin.networks.digibyte.p2wpkhInP2sh = {
baseNetwork: "digibyte",
messagePrefix: '\x19DigiByte Signed Message:\n',
bech32: 'dgb',
@@ -185,7 +293,7 @@ bitcoinjs.bitcoin.networks.digibyte.p2wpkhInP2sh = {
wif: 0x80
};
bitcoinjs.bitcoin.networks.blockstamp.p2wpkh = {
libs.bitcoin.networks.blockstamp.p2wpkh = {
baseNetwork: "blockstamp",
messagePrefix: '\x18BlockStamp Signed Message:\n',
bech32: 'bc',
@@ -198,7 +306,7 @@ bitcoinjs.bitcoin.networks.blockstamp.p2wpkh = {
wif: 0x80,
};
bitcoinjs.bitcoin.networks.blockstamp.p2wpkhInP2sh = {
libs.bitcoin.networks.blockstamp.p2wpkhInP2sh = {
baseNetwork: "blockstamp",
messagePrefix: '\x18BlockStamp Signed Message:\n',
bech32: 'bc',
@@ -211,7 +319,7 @@ bitcoinjs.bitcoin.networks.blockstamp.p2wpkhInP2sh = {
wif: 0x80,
};
bitcoinjs.bitcoin.networks.nix.p2wpkh = {
libs.bitcoin.networks.nix.p2wpkh = {
baseNetwork: "nix",
messagePrefix: '\x18Nix Signed Message:\n',
bech32: 'nix',
@@ -224,7 +332,7 @@ bitcoinjs.bitcoin.networks.nix.p2wpkh = {
wif: 0x80,
};
bitcoinjs.bitcoin.networks.nix.p2wpkhInP2sh = {
libs.bitcoin.networks.nix.p2wpkhInP2sh = {
baseNetwork: "nix",
messagePrefix: '\x18Nix Signed Message:\n',
bech32: 'nix',
@@ -237,7 +345,7 @@ bitcoinjs.bitcoin.networks.nix.p2wpkhInP2sh = {
wif: 0x80,
};
bitcoinjs.bitcoin.networks.cpuchain.p2wpkh = {
libs.bitcoin.networks.cpuchain.p2wpkh = {
baseNetwork: "cpuchain",
messagePrefix: '\x1DCPUchain Signed Message:\n',
bech32: 'cpu',
@@ -250,7 +358,7 @@ bitcoinjs.bitcoin.networks.cpuchain.p2wpkh = {
wif: 0x80,
};
bitcoinjs.bitcoin.networks.cpuchain.p2wpkhInP2sh = {
libs.bitcoin.networks.cpuchain.p2wpkhInP2sh = {
baseNetwork: "cpuchain",
messagePrefix: '\x1DCPUchain Signed Message:\n',
bech32: 'cpu',
@@ -263,7 +371,7 @@ bitcoinjs.bitcoin.networks.cpuchain.p2wpkhInP2sh = {
wif: 0x80,
};
bitcoinjs.bitcoin.networks.monkeyproject.p2wpkh = {
libs.bitcoin.networks.monkeyproject.p2wpkh = {
baseNetwork: "monkeyproject",
messagePrefix: 'Monkey Signed Message:\n',
bech32: 'monkey',
@@ -276,7 +384,7 @@ bitcoinjs.bitcoin.networks.monkeyproject.p2wpkh = {
wif: 0x37
};
bitcoinjs.bitcoin.networks.monkeyproject.p2wpkhInP2sh = {
libs.bitcoin.networks.monkeyproject.p2wpkhInP2sh = {
baseNetwork: "monkeyproject",
messagePrefix: 'Monkey Signed Message:\n',
bech32: 'monkey',
@@ -289,7 +397,7 @@ bitcoinjs.bitcoin.networks.monkeyproject.p2wpkhInP2sh = {
wif: 0x37
};
bitcoinjs.bitcoin.networks.atom.p2wpkh = {
libs.bitcoin.networks.atom.p2wpkh = {
baseNetwork: "atom",
messagePrefix: '\x18Bitcoin Atom Signed Message:\n',
bech32: 'atom',
@@ -302,7 +410,7 @@ bitcoinjs.bitcoin.networks.atom.p2wpkh = {
wif: 0x80
};
bitcoinjs.bitcoin.networks.atom.p2wpkhInP2sh = {
libs.bitcoin.networks.atom.p2wpkhInP2sh = {
baseNetwork: "atom",
messagePrefix: '\x18Bitcoin Atom Signed Message:\n',
bech32: 'atom',
@@ -315,7 +423,7 @@ bitcoinjs.bitcoin.networks.atom.p2wpkhInP2sh = {
wif: 0x80
};
bitcoinjs.bitcoin.networks.bitcore.p2wpkh = {
libs.bitcoin.networks.bitcore.p2wpkh = {
baseNetwork: "bitcore",
messagePrefix: '\x18BitCore Signed Message:\n',
bech32: 'bitcore',
@@ -328,7 +436,7 @@ bitcoinjs.bitcoin.networks.bitcore.p2wpkh = {
wif: 0x80
};
bitcoinjs.bitcoin.networks.bitcore.p2wpkhInP2sh = {
libs.bitcoin.networks.bitcore.p2wpkhInP2sh = {
baseNetwork: "bitcore",
messagePrefix: '\x18BitCore Signed Message:\n',
bech32: 'bitcore',
@@ -341,7 +449,7 @@ bitcoinjs.bitcoin.networks.bitcore.p2wpkhInP2sh = {
wif: 0x80
};
bitcoinjs.bitcoin.networks.monacoin.p2wpkh = {
libs.bitcoin.networks.monacoin.p2wpkh = {
baseNetwork: "monacoin",
messagePrefix: '\x18Monacoin Signed Message:\n',
bech32: 'monacoin',
@@ -354,7 +462,7 @@ bitcoinjs.bitcoin.networks.monacoin.p2wpkh = {
wif: 0xb0
};
bitcoinjs.bitcoin.networks.monacoin.p2wpkhInP2sh = {
libs.bitcoin.networks.monacoin.p2wpkhInP2sh = {
baseNetwork: "monacoin",
messagePrefix: '\x18Monacoin Signed Message:\n',
bech32: 'monacoin',
@@ -367,7 +475,7 @@ bitcoinjs.bitcoin.networks.monacoin.p2wpkhInP2sh = {
wif: 0xb0
};
bitcoinjs.bitcoin.networks.syscoin.p2wpkh = {
libs.bitcoin.networks.syscoin.p2wpkh = {
baseNetwork: "syscoin",
messagePrefix: '\x18Syscoin Signed Message:\n',
bech32: 'sys',
@@ -380,7 +488,7 @@ bitcoinjs.bitcoin.networks.syscoin.p2wpkh = {
wif: 0x80
};
bitcoinjs.bitcoin.networks.syscoin.p2wpkhInP2sh = {
libs.bitcoin.networks.syscoin.p2wpkhInP2sh = {
baseNetwork: "syscoin",
messagePrefix: '\x18Syscoin Signed Message:\n',
bech32: 'sys',
@@ -393,7 +501,7 @@ bitcoinjs.bitcoin.networks.syscoin.p2wpkhInP2sh = {
wif: 0x80
};
bitcoinjs.bitcoin.networks.viacoin.p2wpkh = {
libs.bitcoin.networks.viacoin.p2wpkh = {
baseNetwork: "viacoin",
messagePrefix: '\x18Viacoin Signed Message:\n',
bech32: 'viacoin',
@@ -406,7 +514,7 @@ bitcoinjs.bitcoin.networks.viacoin.p2wpkh = {
wif: 0xc7
};
bitcoinjs.bitcoin.networks.viacoin.p2wpkhInP2sh = {
libs.bitcoin.networks.viacoin.p2wpkhInP2sh = {
baseNetwork: "viacoin",
messagePrefix: '\x18Viacoin Signed Message:\n',
bech32: 'viacoin',
@@ -419,7 +527,7 @@ bitcoinjs.bitcoin.networks.viacoin.p2wpkhInP2sh = {
wif: 0xc7
};
bitcoinjs.bitcoin.networks.dogecointestnet.p2wpkh = {
libs.bitcoin.networks.dogecointestnet.p2wpkh = {
baseNetwork: "dogecointestnet",
messagePrefix: '\x19Dogecoin Signed Message:\n',
bech32: 'dogecointestnet',
@@ -432,7 +540,7 @@ bitcoinjs.bitcoin.networks.dogecointestnet.p2wpkh = {
wif: 0xf1
};
bitcoinjs.bitcoin.networks.dogecointestnet.p2wpkhInP2sh = {
libs.bitcoin.networks.dogecointestnet.p2wpkhInP2sh = {
baseNetwork: "dogecointestnet",
messagePrefix: '\x19Dogecoin Signed Message:\n',
bech32: 'dogecointestnet',
@@ -445,7 +553,7 @@ bitcoinjs.bitcoin.networks.dogecointestnet.p2wpkhInP2sh = {
wif: 0xf1
};
bitcoinjs.bitcoin.networks.dogecointestnet.p2wpkh = {
libs.bitcoin.networks.dogecointestnet.p2wpkh = {
baseNetwork: "dogecointestnet",
messagePrefix: '\x19Dogecoin Signed Message:\n',
bech32: 'dogecointestnet',
@@ -458,7 +566,7 @@ bitcoinjs.bitcoin.networks.dogecointestnet.p2wpkh = {
wif: 0xf1
};
bitcoinjs.bitcoin.networks.dogecointestnet.p2wpkhInP2sh = {
libs.bitcoin.networks.dogecointestnet.p2wpkhInP2sh = {
baseNetwork: "dogecointestnet",
messagePrefix: '\x19Dogecoin Signed Message:\n',
bech32: 'dogecointestnet',
@@ -471,7 +579,7 @@ bitcoinjs.bitcoin.networks.dogecointestnet.p2wpkhInP2sh = {
wif: 0xf1
};
bitcoinjs.bitcoin.networks.litecointestnet.p2wpkh = {
libs.bitcoin.networks.litecointestnet.p2wpkh = {
baseNetwork: "litecointestnet",
messagePrefix: '\x18Litecoin Signed Message:\n',
bech32: 'litecointestnet',
@@ -484,7 +592,7 @@ bitcoinjs.bitcoin.networks.litecointestnet.p2wpkh = {
wif: 0xef
};
bitcoinjs.bitcoin.networks.litecointestnet.p2wpkhInP2sh = {
libs.bitcoin.networks.litecointestnet.p2wpkhInP2sh = {
baseNetwork: "litecointestnet",
messagePrefix: '\x18Litecoin Signed Message:\n',
bech32: 'litecointestnet',
@@ -497,7 +605,7 @@ bitcoinjs.bitcoin.networks.litecointestnet.p2wpkhInP2sh = {
wif: 0xef
};
bitcoinjs.bitcoin.networks.groestlcoin.p2wpkh = {
libs.bitcoin.networks.groestlcoin.p2wpkh = {
baseNetwork: "groestlcoin",
messagePrefix: '\x19GroestlCoin Signed Message:\n',
bech32: 'grs',
@@ -510,7 +618,7 @@ bitcoinjs.bitcoin.networks.groestlcoin.p2wpkh = {
wif: 0x80,
};
bitcoinjs.bitcoin.networks.groestlcointestnet.p2wpkh = {
libs.bitcoin.networks.groestlcointestnet.p2wpkh = {
baseNetwork: "groestlcointestnet",
messagePrefix: '\x19GroestlCoin Signed Message:\n',
bech32: 'tgrs',
@@ -523,7 +631,7 @@ bitcoinjs.bitcoin.networks.groestlcointestnet.p2wpkh = {
wif: 0xef
};
bitcoinjs.bitcoin.networks.groestlcoin.p2wpkhInP2sh = {
libs.bitcoin.networks.groestlcoin.p2wpkhInP2sh = {
baseNetwork: "groestlcoin",
messagePrefix: '\x19GroestlCoin Signed Message:\n',
bech32: 'grs',
@@ -536,7 +644,7 @@ bitcoinjs.bitcoin.networks.groestlcoin.p2wpkhInP2sh = {
wif: 0x80,
};
bitcoinjs.bitcoin.networks.groestlcointestnet.p2wpkhInP2sh = {
libs.bitcoin.networks.groestlcointestnet.p2wpkhInP2sh = {
baseNetwork: "groestlcointestnet",
messagePrefix: '\x19GroestlCoin Signed Message:\n',
bech32: 'tgrs',
@@ -549,4 +657,30 @@ bitcoinjs.bitcoin.networks.groestlcointestnet.p2wpkhInP2sh = {
wif: 0xef
};
libs.bitcoin.networks.deeponion.p2wpkh = {
baseNetwork: "deeponion",
messagePrefix: '\x18DeepOnion Signed Message:\n',
bech32: 'dpn',
bip32: {
public: 0x0488b21e,
private: 0x0488ade4
},
pubKeyHash: 0x1f,
scriptHash: 0x4e,
wif: 0x9f
};
libs.bitcoin.networks.deeponion.p2wpkhInP2sh = {
baseNetwork: "deeponion",
messagePrefix: '\x18DeepOnion Signed Message:\n',
bech32: 'dpn',
bip32: {
public: 0x0488b21e,
private: 0x0488ade4
},
pubKeyHash: 0x1f,
scriptHash: 0x4e,
wif: 0x9f
};
})();

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

14
src/js/wordlist_czech.js Normal file

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because it is too large Load Diff