mirror of
https://github.com/OneKeyHQ/bip39.git
synced 2026-04-05 18:43:47 +00:00
Merge pull request #492 from HildisviniOttar/master
Support THORChain (RUNE) m/44/931
This commit is contained in:
@@ -1423,11 +1423,18 @@
|
||||
pubkey = CosmosBufferToPublic(keyPair.getPublicKeyBuffer(), hrp);
|
||||
privkey = keyPair.d.toBuffer().toString("base64");
|
||||
}
|
||||
|
||||
if (networks[DOM.network.val()].name == "RUNE - THORChain") {
|
||||
const hrp = "thor";
|
||||
address = CosmosBufferToAddress(keyPair.getPublicKeyBuffer(), hrp);
|
||||
pubkey = keyPair.getPublicKeyBuffer().toString("hex");
|
||||
privkey = keyPair.d.toBuffer().toString("hex");
|
||||
}
|
||||
|
||||
if (networks[DOM.network.val()].name == "XWC - Whitecoin"){
|
||||
address = XWCbufferToAddress(keyPair.getPublicKeyBuffer());
|
||||
pubkey = XWCbufferToPublic(keyPair.getPublicKeyBuffer());
|
||||
privkey = XWCbufferToPrivate(keyPair.d.toBuffer(32));
|
||||
|
||||
}
|
||||
|
||||
if (networks[DOM.network.val()].name == "LUNA - Terra") {
|
||||
@@ -3299,6 +3306,13 @@
|
||||
setHdCoin(19169);
|
||||
},
|
||||
},
|
||||
{
|
||||
name: "RUNE - THORChain",
|
||||
onSelect: function() {
|
||||
network = libs.bitcoin.networks.bitcoin;
|
||||
setHdCoin(931);
|
||||
},
|
||||
},
|
||||
{
|
||||
name: "RVR - RevolutionVR",
|
||||
onSelect: function() {
|
||||
|
||||
@@ -1695,6 +1695,16 @@ it('Allows selection of Rubycoin', function(done) {
|
||||
};
|
||||
testNetwork(done, params);
|
||||
});
|
||||
it('Allows selection of THORChain', function(done) {
|
||||
var params = {
|
||||
selectText: "RUNE - THORChain",
|
||||
phrase: "flip vicious divorce angle toward say derive blue refuse load word creek once expire bounce",
|
||||
firstAddress: "thor1zp3yx758t64vqvu8776vnwd0udrs2vwuxhc4ep",
|
||||
firstPubKey: "02fa85b75ef37fe3a4f4a6d62352aa7de070d2b39af9c55be26f079d01f406851d",
|
||||
firstPrivKey: "6020c0d5a9a8689c491c6a8f36beb70bf459e129e1428fed64aaf594beee54a6",
|
||||
};
|
||||
testNetwork(done, params);
|
||||
});
|
||||
it('Allows selection of Salus', function(done) {
|
||||
var params = {
|
||||
selectText: "SLS - Salus",
|
||||
|
||||
Reference in New Issue
Block a user