libs: add handshake support

This commit is contained in:
Javed Khan
2020-04-02 23:18:04 +05:30
parent 54600393af
commit 0e1fd95302
4 changed files with 15 additions and 1 deletions

View File

@@ -87,3 +87,5 @@ module.exports.unorm = require('unorm')
/* zxcvbn */
module.exports.zxcvbn = require('zxcvbn')
module.exports.handshake = require('handshake-util')

View File

@@ -15,6 +15,7 @@
"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",

File diff suppressed because one or more lines are too long

View File

@@ -1140,6 +1140,11 @@
}
}
// 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);
@@ -2570,6 +2575,12 @@
setHdCoin(1);
},
},
{
name: "HNS - Handshake",
onSelect: function() {
setHdCoin(5353);
},
},
{
name: "HNC - Helleniccoin",
onSelect: function() {