Merge branch 'master' into master

This commit is contained in:
Suat Özgür
2019-05-25 14:18:15 +02:00
committed by GitHub
9 changed files with 28076 additions and 67 deletions

View File

@@ -917,7 +917,11 @@
|| (networks[DOM.network.val()].name == "MUSIC - Musicoin")
|| (networks[DOM.network.val()].name == "POA - Poa")
|| (networks[DOM.network.val()].name == "EXP - Expanse")
|| (networks[DOM.network.val()].name == "CLO - Callisto")) {
|| (networks[DOM.network.val()].name == "CLO - Callisto")
|| (networks[DOM.network.val()].name == "DXN - DEXON")
|| (networks[DOM.network.val()].name == "ELLA - Ellaism")
|| (networks[DOM.network.val()].name == "ESN - Ethersocial Network")
) {
var privKeyBuffer = keyPair.d.toBuffer(32);
privkey = privKeyBuffer.toString('hex');
var addressBuffer = ethUtil.privateToAddress(privKeyBuffer);
@@ -927,6 +931,7 @@
privkey = ethUtil.addHexPrefix(privkey);
pubkey = ethUtil.addHexPrefix(pubkey);
}
// Stellar is different
if (networks[DOM.network.val()].name == "XLM - Stellar") {
var purpose = parseIntNoNaN(DOM.bip44purpose.val(), 44);
@@ -939,6 +944,15 @@
privkey = keypair.secret();
pubkey = address = keypair.publicKey();
}
if ((networks[DOM.network.val()].name == "NAS - Nebulas")) {
var NasAccount = require("nebulas-account");
var privKeyBuffer = keyPair.d.toBuffer(32);
var nebulasAccount = new NasAccount();
nebulasAccount.setPrivateKey(privKeyBuffer);
address = nebulasAccount.getAddressString();
privkey = nebulasAccount.getPrivateKeyString();
pubkey = nebulasAccount.getPublicKeyString();
}
// Ripple values are different
if (networks[DOM.network.val()].name == "XRP - Ripple") {
privkey = convertRipplePriv(privkey);
@@ -954,6 +968,13 @@
address = bchaddr.toBitpayAddress(address);
}
}
// Bitcoin Cash address format may vary
if (networks[DOM.network.val()].name == "SLP - Simple Ledger Protocol") {
var bchAddrType = DOM.bitcoinCashAddressType.filter(":checked").val();
if (bchAddrType == "cashaddr") {
address = bchaddr.toSlpAddress(address);
}
}
// Segwit addresses are different
if (isSegwit) {
if (!segwitAvailable) {
@@ -972,6 +993,11 @@
address = bitcoinjs.bitcoin.address.fromOutputScript(scriptpubkey, network)
}
}
if ((networks[DOM.network.val()].name == "CRW - Crown")) {
address = bitcoinjs.bitcoin.networks.crown.toNewAddress(address);
}
addAddressToList(indexText, address, pubkey, privkey);
if (isLast) {
hidePending();
@@ -1679,6 +1705,13 @@
setHdCoin(220);
},
},
{
name: "BOLI - Bolivarcoin",
onSelect: function() {
network = bitcoinjs.bitcoin.networks.bolivarcoin;
setHdCoin(278);
},
},
{
name: "BCA - Bitcoin Atom",
onSelect: function() {
@@ -1720,7 +1753,7 @@
network = bitcoinjs.bitcoin.networks.blocknode;
setHdCoin(2941);
},
},
},
{
name: "tBND - Blocknode Testnet",
onSelect: function() {
@@ -1741,6 +1774,13 @@
network = bitcoinjs.bitcoin.networks.bitsend;
setHdCoin(91);
},
},
{
name: "BST - BlockStamp",
onSelect: function() {
network = bitcoinjs.bitcoin.networks.blockstamp;
setHdCoin(254);
},
},
{
name: "BTA - Bata",
@@ -1862,6 +1902,13 @@
setHdCoin(186);
},
},
{
name: "CRW - Crown (Legacy)",
onSelect: function() {
network = bitcoinjs.bitcoin.networks.crown;
setHdCoin(72);
},
},
{
name: "CRW - Crown",
onSelect: function() {
@@ -1925,6 +1972,13 @@
setHdCoin(3);
},
},
{
name: "DXN - DEXON",
onSelect: function() {
network = bitcoinjs.bitcoin.networks.bitcoin;
setHdCoin(237);
},
},
{
name: "ECN - Ecoin",
onSelect: function() {
@@ -1946,6 +2000,14 @@
setHdCoin(78);
},
},
{
name: "ELLA - Ellaism",
segwitAvailable: false,
onSelect: function() {
network = bitcoinjs.bitcoin.networks.bitcoin;
setHdCoin(163);
},
},
{
name: "EMC2 - Einsteinium",
onSelect: function() {
@@ -1960,6 +2022,14 @@
setHdCoin(151);
},
},
{
name: "ESN - Ethersocial Network",
segwitAvailable: false,
onSelect: function() {
network = bitcoinjs.bitcoin.networks.bitcoin;
setHdCoin(31102);
},
},
{
name: "ETC - Ethereum Classic",
segwitAvailable: false,
@@ -2139,6 +2209,14 @@
setHdCoin(114);
},
},
{
name: "LKR - Lkrcoin",
segwitAvailable: false,
onSelect: function() {
network = bitcoinjs.bitcoin.networks.lkrcoin;
setHdCoin(557);
},
},
{
name: "LTC - Litecoin",
onSelect: function() {
@@ -2212,6 +2290,13 @@
setHdCoin(130);
},
},
{
name: "NAS - Nebulas",
onSelect: function() {
network = bitcoinjs.bitcoin.networks.bitcoin;
setHdCoin(2718);
},
},
{
name: "NEBL - Neblio",
onSelect: function() {
@@ -2226,6 +2311,13 @@
setHdCoin(25);
},
},
{
name: "NIX - NIX Platform",
onSelect: function() {
network = bitcoinjs.bitcoin.networks.nix;
setHdCoin(400);
},
},
{
name: "NLG - Gulden",
onSelect: function() {
@@ -2452,6 +2544,13 @@
setHdCoin(111);
},
},
{
name: "SLP - Simple Ledger Protocol",
onSelect: function() {
DOM.bitcoinCashAddressTypeContainer.removeClass("hidden");
setHdCoin(245);
},
},
{
name: "SLR - Solarcoin",
onSelect: function() {