mirror of
https://github.com/OneKeyHQ/bip39.git
synced 2026-04-29 13:36:01 +00:00
Merge branch 'master' into nanocurrency
This commit is contained in:
+31
-6
@@ -1139,6 +1139,17 @@
|
||||
privkey = libs.ethUtil.bufferToHex(keyPair.d.toBuffer());
|
||||
}
|
||||
}
|
||||
//TRX is different
|
||||
if (networks[DOM.network.val()].name == "TRX - Tron") {
|
||||
keyPair = new libs.bitcoin.ECPair(keyPair.d, null, { network: network, compressed: false });
|
||||
var pubkeyBuffer = keyPair.getPublicKeyBuffer();
|
||||
var ethPubkey = libs.ethUtil.importPublic(pubkeyBuffer);
|
||||
var addressBuffer = libs.ethUtil.publicToAddress(ethPubkey);
|
||||
address = libs.bitcoin.address.toBase58Check(addressBuffer, 0x41);
|
||||
if (hasPrivkey) {
|
||||
privkey = keyPair.d.toBuffer().toString('hex');
|
||||
}
|
||||
}
|
||||
|
||||
// RSK values are different
|
||||
if (networkIsRsk()) {
|
||||
@@ -1275,8 +1286,8 @@
|
||||
|
||||
if (networks[DOM.network.val()].name == "EOS - EOSIO") {
|
||||
address = ""
|
||||
pubkey = eosUtil.bufferToPublic(keyPair.getPublicKeyBuffer());
|
||||
privkey = eosUtil.bufferToPrivate(keyPair.d.toBuffer(32));
|
||||
pubkey = EOSbufferToPublic(keyPair.getPublicKeyBuffer());
|
||||
privkey = EOSbufferToPrivate(keyPair.d.toBuffer(32));
|
||||
}
|
||||
|
||||
if (networks[DOM.network.val()].name == "FIO - Foundation for Interwallet Operability") {
|
||||
@@ -1735,7 +1746,7 @@
|
||||
var numberOfBits = entropy.binaryStr.length;
|
||||
var timeToCrack = "unknown";
|
||||
try {
|
||||
var z = libs.zxcvbn(entropy.base.parts.join(""));
|
||||
var z = libs.zxcvbn(entropy.base.events.join(""));
|
||||
timeToCrack = z.crack_times_display.offline_fast_hashing_1e10_per_second;
|
||||
if (z.feedback.warning != "") {
|
||||
timeToCrack = timeToCrack + " - " + z.feedback.warning;
|
||||
@@ -1754,7 +1765,7 @@
|
||||
DOM.entropyFiltered.html(entropy.cleanHtml);
|
||||
DOM.entropyType.text(entropyTypeStr);
|
||||
DOM.entropyCrackTime.text(timeToCrack);
|
||||
DOM.entropyEventCount.text(entropy.base.ints.length);
|
||||
DOM.entropyEventCount.text(entropy.base.events.length);
|
||||
DOM.entropyBits.text(numberOfBits);
|
||||
DOM.entropyWordCount.text(wordCount);
|
||||
DOM.entropyBinary.text(spacedBinaryStr);
|
||||
@@ -1779,8 +1790,8 @@
|
||||
// Detect duplicates
|
||||
var dupes = [];
|
||||
var dupeTracker = {};
|
||||
for (var i=0; i<entropy.base.parts.length; i++) {
|
||||
var card = entropy.base.parts[i];
|
||||
for (var i=0; i<entropy.base.events.length; i++) {
|
||||
var card = entropy.base.events[i];
|
||||
var cardUpper = card.toUpperCase();
|
||||
if (cardUpper in dupeTracker) {
|
||||
dupes.push(card);
|
||||
@@ -1896,6 +1907,7 @@
|
||||
|| (name == "ESN - Ethersocial Network")
|
||||
|| (name == "VET - VeChain")
|
||||
|| (name == "ERE - EtherCore")
|
||||
|| (name == "BSC - Binance Smart Chain")
|
||||
}
|
||||
|
||||
function networkIsRsk() {
|
||||
@@ -2241,6 +2253,13 @@
|
||||
setHdCoin(183);
|
||||
},
|
||||
},
|
||||
{
|
||||
name: "BSC - Binance Smart Chain",
|
||||
onSelect: function() {
|
||||
network = libs.bitcoin.networks.bitcoin;
|
||||
setHdCoin(60);
|
||||
},
|
||||
},
|
||||
{
|
||||
name: "BSV - BitcoinSV",
|
||||
onSelect: function() {
|
||||
@@ -3244,6 +3263,12 @@
|
||||
setHdCoin(159);
|
||||
},
|
||||
},
|
||||
{
|
||||
name: "TRX - Tron",
|
||||
onSelect: function() {
|
||||
setHdCoin(195);
|
||||
},
|
||||
},
|
||||
{
|
||||
name: "TWINS - TWINS",
|
||||
onSelect: function() {
|
||||
|
||||
Reference in New Issue
Block a user