}
}
+ // 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);