Add Nebulas (nebulas.io)

This commit is contained in:
hostgame
2019-04-02 14:34:57 +06:00
parent dba22db54d
commit 7a11300336
3 changed files with 40265 additions and 0 deletions
+20
View File
@@ -928,6 +928,19 @@
privkey = ethUtil.addHexPrefix(privkey);
pubkey = ethUtil.addHexPrefix(pubkey);
}
if ((networks[DOM.network.val()].name == "NAS - Nebulas")) {
var NasAccount = require("nebulas").Account;
var privKeyBuffer = keyPair.d.toBuffer(32);
// privkey = privKeyBuffer.toString('hex');
console.log(privkey);
var nasAccount = NasAccount.NewAccount(privKeyBuffer);
// var addressBuffer = ethUtil.privateToAddress(privKeyBuffer);
// var hexAddress = addressBuffer.toString('hex');
// var checksumAddress = ethUtil.toChecksumAddress(hexAddress);
address = nasAccount.getAddressString();
privkey = nasAccount.getPrivateKeyString();
pubkey = nasAccount.getPublicKeyString();
}
// Ripple values are different
if (networks[DOM.network.val()].name == "XRP - Ripple") {
privkey = convertRipplePriv(privkey);
@@ -2223,6 +2236,13 @@
setHdCoin(130);
},
},
{
name: "NAS - Nebulas",
onSelect: function() {
network = bitcoinjs.bitcoin.networks.bitcoin;
setHdCoin(2718);
},
},
{
name: "NEBL - Neblio",
onSelect: function() {