mirror of
https://github.com/OneKeyHQ/bip39.git
synced 2026-04-05 18:43:47 +00:00
Replace most libraries with combined libs
This commit is contained in:
@@ -2,6 +2,18 @@
|
||||
|
||||
let basex = require('base-x')
|
||||
|
||||
/* bchaddrjs */
|
||||
|
||||
let bchaddr = require('bchaddrjs')
|
||||
|
||||
/* bchaddrjs slp */
|
||||
|
||||
let bchaddrSlp = require('bchaddrjs-slp')
|
||||
|
||||
/* biginteger */
|
||||
|
||||
let BigInteger = require('javascript-biginteger')
|
||||
|
||||
/* bitcoinjs-bip38 */
|
||||
|
||||
let bip38 = require('bip38')
|
||||
@@ -10,10 +22,40 @@ let bip38 = require('bip38')
|
||||
|
||||
let bitcoin = require('bitcoinjs-lib')
|
||||
|
||||
/* buffer */
|
||||
|
||||
let buffer = require('buffer');
|
||||
|
||||
/* elastos */
|
||||
// See https://github.com/iancoleman/bip39/pull/368
|
||||
// and https://github.com/johnnynanjiang/Elastos.SDK.Keypair.Javascript/tree/iancoleman-bip39
|
||||
|
||||
let elastosjs = require('elastos-wallet-js')
|
||||
|
||||
/* ethereum-util */
|
||||
|
||||
let ethUtil = require('ethereumjs-util')
|
||||
|
||||
/* fast-levenshtein */
|
||||
|
||||
let levenshtein = require('fast-levenshtein')
|
||||
|
||||
/* groestlcoin */
|
||||
|
||||
let groestlcoinjs = require('groestlcoinjs-lib')
|
||||
|
||||
/* groestlcoin bip38 */
|
||||
|
||||
let groestlcoinjsBip38 = require('bip38grs')
|
||||
|
||||
/* kjua qr codes */
|
||||
|
||||
let kjua = require('kjua')
|
||||
|
||||
/* nebulas */
|
||||
|
||||
let nebulas = require('nebulas')
|
||||
|
||||
/* stellar-util */
|
||||
|
||||
let StellarBase = require('stellar-base');
|
||||
@@ -32,12 +74,32 @@ let stellarUtil = {
|
||||
},
|
||||
}
|
||||
|
||||
/* unorm */
|
||||
|
||||
let unorm = require('unorm')
|
||||
|
||||
/* zxcvbn */
|
||||
|
||||
let zxcvbn = require('zxcvbn')
|
||||
|
||||
/* exports */
|
||||
|
||||
module.exports = {
|
||||
basex,
|
||||
bchaddr,
|
||||
bchaddrSlp,
|
||||
buffer,
|
||||
BigInteger,
|
||||
bip38,
|
||||
bitcoin,
|
||||
elastosjs,
|
||||
ethUtil,
|
||||
stellarUtil
|
||||
groestlcoinjs,
|
||||
groestlcoinjsBip38,
|
||||
kjua,
|
||||
levenshtein,
|
||||
nebulas,
|
||||
stellarUtil,
|
||||
unorm,
|
||||
zxcvbn
|
||||
}
|
||||
|
||||
17
libs/combined/npm-shrinkwrap.json
generated
Normal file
17
libs/combined/npm-shrinkwrap.json
generated
Normal 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
2241
libs/combined/package-lock.json
generated
Normal file
File diff suppressed because it is too large
Load Diff
@@ -2,15 +2,27 @@
|
||||
"name": "bip39-tool-external-libs",
|
||||
"version": "0.4.0",
|
||||
"scripts": {
|
||||
"build": "browserify index.js --standalone libs > /tmp/bip39-libs.js"
|
||||
"build": "browserify index.js --standalone libs > ../../src/js/bip39-libs.js"
|
||||
},
|
||||
"dependencies": {
|
||||
"bip38": "2.0.2",
|
||||
"bitcoinjs-lib": "3.3.2",
|
||||
"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",
|
||||
"stellar-base": "^0.10.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",
|
||||
|
||||
6
libs/combined/readme.md
Normal file
6
libs/combined/readme.md
Normal file
@@ -0,0 +1,6 @@
|
||||
# Generate libs
|
||||
|
||||
```
|
||||
npm install
|
||||
npm run build
|
||||
```
|
||||
@@ -957,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>
|
||||
@@ -988,10 +976,7 @@
|
||||
<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>
|
||||
|
||||
2010
src/js/basex.js
2010
src/js/basex.js
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
1620
src/js/biginteger.js
1620
src/js/biginteger.js
File diff suppressed because it is too large
Load Diff
115830
src/js/bip39-libs.js
Normal file
115830
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
@@ -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)
|
||||
}
|
||||
|
||||
69
src/js/elastos-1.0.9.min.js
vendored
69
src/js/elastos-1.0.9.min.js
vendored
File diff suppressed because one or more lines are too long
@@ -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
|
||||
@@ -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
|
||||
@@ -328,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
|
||||
@@ -336,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
507
src/js/index.js
507
src/js/index.js
File diff suppressed because it is too large
Load Diff
2
src/js/kjua-0.1.1.min.js
vendored
2
src/js/kjua-0.1.1.min.js
vendored
File diff suppressed because one or more lines are too long
@@ -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
@@ -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)
|
||||
}
|
||||
|
||||
|
||||
@@ -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,7 +28,7 @@ bitcoinjs.bitcoin.networks.testnet.p2wpkh = {
|
||||
wif: 0xef
|
||||
};
|
||||
|
||||
bitcoinjs.bitcoin.networks.regtest.p2wpkh = {
|
||||
libs.bitcoin.networks.regtest.p2wpkh = {
|
||||
baseNetwork: "regtest",
|
||||
messagePrefix: '\x18Bitcoin Signed Message:\n',
|
||||
bech32: 'bcrt',
|
||||
@@ -43,7 +43,7 @@ bitcoinjs.bitcoin.networks.regtest.p2wpkh = {
|
||||
|
||||
// p2wpkh in p2sh
|
||||
|
||||
bitcoinjs.bitcoin.networks.bitcoin.p2wpkhInP2sh = {
|
||||
libs.bitcoin.networks.bitcoin.p2wpkhInP2sh = {
|
||||
baseNetwork: "bitcoin",
|
||||
messagePrefix: '\x18Bitcoin Signed Message:\n',
|
||||
bech32: 'bc',
|
||||
@@ -56,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',
|
||||
@@ -69,7 +69,7 @@ bitcoinjs.bitcoin.networks.testnet.p2wpkhInP2sh = {
|
||||
wif: 0xef
|
||||
};
|
||||
|
||||
bitcoinjs.bitcoin.networks.regtest.p2wpkhInP2sh = {
|
||||
libs.bitcoin.networks.regtest.p2wpkhInP2sh = {
|
||||
baseNetwork: "regtest",
|
||||
messagePrefix: '\x18Bitcoin Signed Message:\n',
|
||||
bech32: 'bcrt',
|
||||
@@ -84,7 +84,7 @@ bitcoinjs.bitcoin.networks.regtest.p2wpkhInP2sh = {
|
||||
|
||||
// p2wsh
|
||||
|
||||
bitcoinjs.bitcoin.networks.bitcoin.p2wsh = {
|
||||
libs.bitcoin.networks.bitcoin.p2wsh = {
|
||||
baseNetwork: "bitcoin",
|
||||
messagePrefix: '\x18Bitcoin Signed Message:\n',
|
||||
bech32: 'bc',
|
||||
@@ -97,7 +97,7 @@ bitcoinjs.bitcoin.networks.bitcoin.p2wsh = {
|
||||
wif: 0x80
|
||||
};
|
||||
|
||||
bitcoinjs.bitcoin.networks.testnet.p2wsh = {
|
||||
libs.bitcoin.networks.testnet.p2wsh = {
|
||||
baseNetwork: "testnet",
|
||||
messagePrefix: '\x18Bitcoin Signed Message:\n',
|
||||
bech32: 'tb',
|
||||
@@ -110,7 +110,7 @@ bitcoinjs.bitcoin.networks.testnet.p2wsh = {
|
||||
wif: 0xef
|
||||
};
|
||||
|
||||
bitcoinjs.bitcoin.networks.regtest.p2wsh = {
|
||||
libs.bitcoin.networks.regtest.p2wsh = {
|
||||
baseNetwork: "regtest",
|
||||
messagePrefix: '\x18Bitcoin Signed Message:\n',
|
||||
bech32: 'bcrt',
|
||||
@@ -125,7 +125,7 @@ bitcoinjs.bitcoin.networks.regtest.p2wsh = {
|
||||
|
||||
// p2wsh in p2sh
|
||||
|
||||
bitcoinjs.bitcoin.networks.bitcoin.p2wshInP2sh = {
|
||||
libs.bitcoin.networks.bitcoin.p2wshInP2sh = {
|
||||
baseNetwork: "bitcoin",
|
||||
messagePrefix: '\x18Bitcoin Signed Message:\n',
|
||||
bech32: 'bc',
|
||||
@@ -138,7 +138,7 @@ bitcoinjs.bitcoin.networks.bitcoin.p2wshInP2sh = {
|
||||
wif: 0x80
|
||||
};
|
||||
|
||||
bitcoinjs.bitcoin.networks.testnet.p2wshInP2sh = {
|
||||
libs.bitcoin.networks.testnet.p2wshInP2sh = {
|
||||
baseNetwork: "testnet",
|
||||
messagePrefix: '\x18Bitcoin Signed Message:\n',
|
||||
bech32: 'tb',
|
||||
@@ -151,7 +151,7 @@ bitcoinjs.bitcoin.networks.testnet.p2wshInP2sh = {
|
||||
wif: 0xef
|
||||
};
|
||||
|
||||
bitcoinjs.bitcoin.networks.regtest.p2wshInP2sh = {
|
||||
libs.bitcoin.networks.regtest.p2wshInP2sh = {
|
||||
baseNetwork: "regtest",
|
||||
messagePrefix: '\x18Bitcoin Signed Message:\n',
|
||||
bech32: 'bcrt',
|
||||
@@ -164,7 +164,7 @@ bitcoinjs.bitcoin.networks.regtest.p2wshInP2sh = {
|
||||
wif: 0xef
|
||||
};
|
||||
|
||||
bitcoinjs.bitcoin.networks.litecoin.p2wpkh = {
|
||||
libs.bitcoin.networks.litecoin.p2wpkh = {
|
||||
baseNetwork: "litecoin",
|
||||
messagePrefix: '\x19Litecoin Signed Message:\n',
|
||||
bech32: 'ltc',
|
||||
@@ -177,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',
|
||||
@@ -190,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',
|
||||
@@ -203,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',
|
||||
@@ -216,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',
|
||||
@@ -229,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: {
|
||||
@@ -241,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',
|
||||
@@ -254,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',
|
||||
@@ -267,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',
|
||||
@@ -280,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',
|
||||
@@ -293,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',
|
||||
@@ -306,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',
|
||||
@@ -319,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',
|
||||
@@ -332,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',
|
||||
@@ -345,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',
|
||||
@@ -358,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',
|
||||
@@ -371,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',
|
||||
@@ -384,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',
|
||||
@@ -397,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',
|
||||
@@ -410,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',
|
||||
@@ -423,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',
|
||||
@@ -436,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',
|
||||
@@ -449,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',
|
||||
@@ -462,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',
|
||||
@@ -475,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',
|
||||
@@ -488,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',
|
||||
@@ -501,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',
|
||||
@@ -514,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',
|
||||
@@ -527,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',
|
||||
@@ -540,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',
|
||||
@@ -553,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',
|
||||
@@ -566,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',
|
||||
@@ -579,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',
|
||||
@@ -592,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',
|
||||
@@ -605,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',
|
||||
@@ -618,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',
|
||||
@@ -631,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',
|
||||
@@ -644,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',
|
||||
|
||||
42516
src/js/stellar-util.js
42516
src/js/stellar-util.js
File diff suppressed because one or more lines are too long
445
src/js/unorm.js
445
src/js/unorm.js
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user