mirror of
https://github.com/OneKeyHQ/bip39.git
synced 2026-04-07 03:12:14 +00:00
Compare commits
26 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
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 |
13
changelog.md
13
changelog.md
@@ -1,3 +1,16 @@
|
||||
# 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
|
||||
|
||||
@@ -87,3 +87,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);
|
||||
};
|
||||
|
||||
|
||||
4
libs/combined/package.json
Normal file → Executable file
4
libs/combined/package.json
Normal file → Executable file
@@ -11,13 +11,17 @@
|
||||
"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",
|
||||
"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",
|
||||
"handshake-util": "1.2.0",
|
||||
"fast-levenshtein": "2.0.6",
|
||||
"groestlcoinjs-lib": "git://github.com/Groestlcoin/groestlcoinjs-lib.git#3.3.2",
|
||||
"javascript-biginteger": "0.9.2",
|
||||
"jsrsasign": "^8.0.15",
|
||||
"kjua": "0.6.0",
|
||||
"nebulas": "0.5.6",
|
||||
"stellar-base": "^0.10.0",
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
<div class="container">
|
||||
|
||||
<h1 class="text-center">Mnemonic Code Converter</h1>
|
||||
<p class="version">v0.4.2</p>
|
||||
<p class="version">v0.4.3</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>.
|
||||
@@ -963,8 +963,10 @@
|
||||
<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/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>
|
||||
|
||||
File diff suppressed because one or more lines are too long
@@ -581,6 +581,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: {
|
||||
@@ -1175,6 +1186,31 @@ libs.bitcoin.networks.revolutionvr = {
|
||||
wif: 0xc6,
|
||||
};
|
||||
|
||||
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: {
|
||||
@@ -1739,6 +1775,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 +1809,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
|
||||
};
|
||||
|
||||
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);
|
||||
}
|
||||
157
src/js/index.js
157
src/js/index.js
@@ -1140,6 +1140,40 @@
|
||||
}
|
||||
}
|
||||
|
||||
// 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
|
||||
if (networks[DOM.network.val()].name == "XLM - Stellar") {
|
||||
var purpose = parseIntNoNaN(DOM.bip44purpose.val(), 44);
|
||||
@@ -1165,6 +1199,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);
|
||||
@@ -1231,6 +1270,12 @@
|
||||
privkey = eosUtil.bufferToPrivate(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));
|
||||
}
|
||||
|
||||
//Groestlcoin Addresses are different
|
||||
if(isGRS()) {
|
||||
|
||||
@@ -1832,6 +1877,7 @@
|
||||
|| (name == "EWT - EnergyWeb")
|
||||
|| (name == "PIRL - Pirl")
|
||||
|| (name == "MIX - MIX")
|
||||
|| (name == "MOAC - MOAC")
|
||||
|| (name == "MUSIC - Musicoin")
|
||||
|| (name == "POA - Poa")
|
||||
|| (name == "EXP - Expanse")
|
||||
@@ -1843,6 +1889,12 @@
|
||||
|| (name == "ERE - EtherCore")
|
||||
}
|
||||
|
||||
function networkIsRsk() {
|
||||
var name = networks[DOM.network.val()].name;
|
||||
return (name == "R-BTC - RSK")
|
||||
|| (name == "tR-BTC - RSK Testnet");
|
||||
}
|
||||
|
||||
function networkHasSegwit() {
|
||||
var n = network;
|
||||
if ("baseNetwork" in network) {
|
||||
@@ -2024,6 +2076,13 @@
|
||||
setHdCoin(161);
|
||||
},
|
||||
},
|
||||
{
|
||||
name: "AGM - Argoneum",
|
||||
onSelect: function() {
|
||||
network = libs.bitcoin.networks.argoneum;
|
||||
setHdCoin(421);
|
||||
},
|
||||
},
|
||||
{
|
||||
name: "ARYA - Aryacoin",
|
||||
onSelect: function() {
|
||||
@@ -2272,6 +2331,14 @@
|
||||
setHdCoin(186);
|
||||
},
|
||||
},
|
||||
{
|
||||
name: "CRP - CranePay",
|
||||
onSelect: function() {
|
||||
network = libs.bitcoin.networks.cranepay;
|
||||
setHdCoin(2304);
|
||||
},
|
||||
},
|
||||
|
||||
{
|
||||
name: "CRW - Crown (Legacy)",
|
||||
onSelect: function() {
|
||||
@@ -2480,6 +2547,13 @@
|
||||
setHdCoin(40);
|
||||
},
|
||||
},
|
||||
{
|
||||
name: "FIO - Foundation for Interwallet Operability",
|
||||
onSelect: function() {
|
||||
network = libs.bitcoin.networks.bitcoin;
|
||||
setHdCoin(235);
|
||||
},
|
||||
},
|
||||
{
|
||||
name: "FIX - FIX",
|
||||
onSelect: function() {
|
||||
@@ -2564,6 +2638,12 @@
|
||||
setHdCoin(1);
|
||||
},
|
||||
},
|
||||
{
|
||||
name: "HNS - Handshake",
|
||||
onSelect: function() {
|
||||
setHdCoin(5353);
|
||||
},
|
||||
},
|
||||
{
|
||||
name: "HNC - Helleniccoin",
|
||||
onSelect: function() {
|
||||
@@ -2738,6 +2818,14 @@
|
||||
setHdCoin(214);
|
||||
},
|
||||
},
|
||||
{
|
||||
name: "MOAC - MOAC",
|
||||
segwitAvailable: false,
|
||||
onSelect: function() {
|
||||
network = libs.bitcoin.networks.bitcoin;
|
||||
setHdCoin(314);
|
||||
},
|
||||
},
|
||||
{
|
||||
name: "MUSIC - Musicoin",
|
||||
segwitAvailable: false,
|
||||
@@ -2959,16 +3047,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);
|
||||
},
|
||||
},
|
||||
@@ -3077,6 +3165,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() {
|
||||
@@ -3328,6 +3437,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)
|
||||
}
|
||||
|
||||
@@ -163,6 +163,36 @@ libs.bitcoin.networks.regtest.p2wshInP2sh = {
|
||||
scriptHash: 0xc4,
|
||||
wif: 0xef
|
||||
};
|
||||
|
||||
libs.bitcoin.networks.cranepay.p2wpkhInP2sh = {
|
||||
baseNetwork: "cranepay",
|
||||
messagePrefix: '\x18Bitcoin Signed Message:\n',
|
||||
bech32: 'cp',
|
||||
bip32: {
|
||||
public: 0x049d7cb2,
|
||||
private: 0x049d7878
|
||||
},
|
||||
pubKeyHash: 28,
|
||||
scriptHash: 10,
|
||||
wif: 123
|
||||
};
|
||||
|
||||
// bech32
|
||||
libs.bitcoin.networks.cranepay.p2wpkh = {
|
||||
baseNetwork: "cranepay",
|
||||
messagePrefix: '\x18Bitcoin Signed Message:\n',
|
||||
bech32: 'cp',
|
||||
bip32: {
|
||||
public: 0x04b24746,
|
||||
private: 0x04b2430c
|
||||
},
|
||||
pubKeyHash: 28,
|
||||
scriptHash: 10,
|
||||
wif: 123
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
libs.bitcoin.networks.litecoin.p2wpkh = {
|
||||
baseNetwork: "litecoin",
|
||||
@@ -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
|
||||
};
|
||||
|
||||
})();
|
||||
|
||||
@@ -464,6 +464,16 @@ it('Allows selection of ripple', function(done) {
|
||||
};
|
||||
testNetwork(done, params);
|
||||
});
|
||||
it('Allows selection of jingtum', function(done) {
|
||||
var params = {
|
||||
selectText: "SWTC - Jingtum",
|
||||
phrase: "ill clump only blind unit burden thing track silver cloth review awake useful craft whale all satisfy else trophy sunset walk vanish hope valve",
|
||||
firstAddress: "jffSYWyxcr9t6DHHdAj2yUXrCsioU66xjm",
|
||||
firstPubKey: "029dfcb278148874dd7e7109001593d7f410909e7bbcbcc3cc19ecb476c8bf8d84",
|
||||
firstPrivKey: "02bdfe14bdd75514e714db7b8cbbae87b2ab8d7a050c3e441d687b7c4ef17d1f",
|
||||
};
|
||||
testNetwork(done, params);
|
||||
});
|
||||
it('Allows selection of casinocoin', function(done) {
|
||||
var params = {
|
||||
selectText: "CSC - CasinoCoin",
|
||||
@@ -1195,6 +1205,15 @@ it('Allows selection of Feathercoin', function(done) {
|
||||
};
|
||||
testNetwork(done, params);
|
||||
});
|
||||
it('Allows selection of FIO', function(done) {
|
||||
var params = {
|
||||
selectText: "FIO - Foundation for Interwallet Operability",
|
||||
phrase: "valley alien library bread worry brother bundle hammer loyal barely dune brave",
|
||||
firstPubKey: "FIO5kJKNHwctcfUM5XZyiWSqSTM5HTzznJP9F3ZdbhaQAHEVq575o",
|
||||
firstPrivKey: "5Kbb37EAqQgZ9vWUHoPiC2uXYhyGSFNbL6oiDp24Ea1ADxV1qnu",
|
||||
};
|
||||
testNetwork(done, params);
|
||||
});
|
||||
it('Allows selection of Firstcoin', function(done) {
|
||||
var params = {
|
||||
selectText: "FRST - Firstcoin",
|
||||
@@ -1665,6 +1684,26 @@ it('Allows selection of Stratis Test', function(done) {
|
||||
};
|
||||
testNetwork(done, params);
|
||||
});
|
||||
it('Allows selection of Sugarchain', function(done) {
|
||||
var params = {
|
||||
selectText: "SUGAR - Sugarchain",
|
||||
phrase: "abandon abandon ability",
|
||||
firstAddress: "SYnd31fYr39VgKju87Vz1sYBmEeHg5cudk",
|
||||
firstPubKey: "035bc9fa22eff2246ec07bb09c9e32f5f9fee517b4f49a8f117508f8fb41905b25",
|
||||
firstPrivKey: "L2G3axGdZv5EV8osAsBPMese74i4dTHaGvxDh7DsRF5Ky6hKkPDY",
|
||||
};
|
||||
testNetwork(done, params);
|
||||
});
|
||||
it('Allows selection of Sugarchain Testnet', function(done) {
|
||||
var params = {
|
||||
selectText: "TUGAR - Sugarchain Testnet",
|
||||
phrase: "abandon abandon ability",
|
||||
firstAddress: "TkoRzLZQyaY88dAACNVwUFMYekR7pv6CbY",
|
||||
firstPubKey: "035bc9fa22eff2246ec07bb09c9e32f5f9fee517b4f49a8f117508f8fb41905b25",
|
||||
firstPrivKey: "cSd33sGUzymVeaH8ZGzWiyNhjJ1UHuPGLy6goXgNvMjLDqioARWW",
|
||||
};
|
||||
testNetwork(done, params);
|
||||
});
|
||||
it('Allows selection of Syscoin', function(done) {
|
||||
var params = {
|
||||
selectText: "SYS - Syscoin",
|
||||
@@ -1896,6 +1935,16 @@ it('Allows selection of Monkey Project', function(done) {
|
||||
testNetwork(done, params);
|
||||
});
|
||||
|
||||
it('Allows selection of MOAC', function(done) {
|
||||
var params = {
|
||||
selectText: "MOAC - MOAC",
|
||||
phrase: "ill clump only blind unit burden thing track silver cloth review awake useful craft whale all satisfy else trophy sunset walk vanish hope valve",
|
||||
firstAddress: "0xa1350EA5707247e0092Ab780A0CDbeA9c8C7Acb5",
|
||||
firstPubKey: "0x0376b024c6068c9fda7e91779e115dcd3a70584fd6984e6dd25da144c46ca259c6",
|
||||
firstPrivKey: "0x2515f9db03c1e56de393648eabf35d288f730aadce5d30865c52e72b28e303c9",
|
||||
};
|
||||
testNetwork(done, params);
|
||||
});
|
||||
it('Allows selection of Musicoin', function(done) {
|
||||
var params = {
|
||||
selectText: "MUSIC - Musicoin",
|
||||
@@ -2178,21 +2227,41 @@ it('Allows selection of EtherCore', function(done) {
|
||||
});
|
||||
it('Allows selection of RBTC - RSK', function(done) {
|
||||
var params = {
|
||||
selectText: "RBTC - RSK",
|
||||
selectText: "R-BTC - RSK",
|
||||
phrase: "abandon abandon ability",
|
||||
firstAddress: "RGtz5TDdtviAZ9haz1YAUNQzcGVFm5bQrP",
|
||||
firstPubKey: "0219d9b5087ab68edc8a714969d8cb70e7159417b47a05932b227e6f417c7962b9",
|
||||
firstPrivKey: "UsiDPMcpYqCwtzGXo4wiPZp7cwBaKdmbmseioTc1rFQsg21adFc8",
|
||||
firstAddress: "0x37CA764c4b2fe819108448b80d2F35921b035931",
|
||||
firstPubKey: "0x0219d9b5087ab68edc8a714969d8cb70e7159417b47a05932b227e6f417c7962b9",
|
||||
firstPrivKey: "0x6e6f48cc422825f7fd68f2200d3dde757849f15342f252eeb0bc4ebc46089fe1",
|
||||
};
|
||||
testNetwork(done, params);
|
||||
});
|
||||
it('Allows selection of tRBTC - RSK Testnet', function(done) {
|
||||
var params = {
|
||||
selectText: "tRBTC - RSK Testnet",
|
||||
selectText: "tR-BTC - RSK Testnet",
|
||||
phrase: "abandon abandon ability",
|
||||
firstAddress: "RHkrWgnSdJHxQAqEsMErhUUa4icXY6xUUC",
|
||||
firstPubKey: "03f77eb7bd83e92ef47be1abddae7f71fb0bc8a7a1ee4b193662a86ed2705ffc5b",
|
||||
firstPrivKey: "UpqfuSEDKoacrPh4wMV4sJZqCB6DJfYe81oWBr4eb7y9FWQWoo2A",
|
||||
firstAddress: "0x176484B5a155Fe802aCB26055eb1c193D5A576d5",
|
||||
firstPubKey: "0x03f77eb7bd83e92ef47be1abddae7f71fb0bc8a7a1ee4b193662a86ed2705ffc5b",
|
||||
firstPrivKey: "0x18c2400d2f818d28b80d0e31235873bfeef644fc45fd702f54ae0d422cff6ab3",
|
||||
};
|
||||
testNetwork(done, params);
|
||||
});
|
||||
it('Allows selection of Argoneum', function(done) {
|
||||
var params = {
|
||||
selectText: "AGM - Argoneum",
|
||||
phrase: "abandon abandon ability",
|
||||
firstAddress: "MWgLPvJkaJwH6hrXFs1MimAC4FwC1kYRhe",
|
||||
firstPubKey: "0348e5252045fee1d3b1e5bce25dbc16284d5b6c3bfff9c305d4ffa6078c16f3f8",
|
||||
firstPrivKey: "VJXpuMEFnK8USLyo5tgF7M4cBXU44U8MUor1KRTQ6t9DVno9AAgg",
|
||||
};
|
||||
testNetwork(done, params);
|
||||
});
|
||||
it('Allows selection of CranePay', function(done) {
|
||||
var params = {
|
||||
selectText: "CRP - CranePay",
|
||||
phrase: "abandon abandon ability",
|
||||
firstAddress: "CcUHPqgmef1BmgWFa9g3YNc8scgVXVh8ip",
|
||||
firstPubKey: "0392af9ea9dc78170c6f68c50bac926f960e50769295f539ac6382a3af2b928740",
|
||||
firstPrivKey: "KHTCAvKHKg1WdLoDSg3VjjyZK5Wk1ihzJENpp2YMb1RmAxrCZrXX",
|
||||
};
|
||||
testNetwork(done, params);
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user