mirror of
https://github.com/OneKeyHQ/bip39.git
synced 2026-05-13 12:15:04 +00:00
Add Slimcoin
This commit is contained in:
@@ -75,3 +75,23 @@ bitcoin.networks.peercoin = {
|
|||||||
wif: 0xb7,
|
wif: 0xb7,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
bitcoin.networks.slimcoin = {
|
||||||
|
bip32: {
|
||||||
|
public: 0xef6adf10,
|
||||||
|
private: 0xef69ea80
|
||||||
|
},
|
||||||
|
pubKeyHash: 0x3f,
|
||||||
|
scriptHash: 0x7d,
|
||||||
|
wif: 0x46,
|
||||||
|
};
|
||||||
|
|
||||||
|
bitcoin.networks.slimcointn = {
|
||||||
|
bip32: {
|
||||||
|
public: 0x043587CF,
|
||||||
|
private: 0x04358394
|
||||||
|
},
|
||||||
|
pubKeyHash: 0x6f,
|
||||||
|
scriptHash: 0xc4,
|
||||||
|
wif: 0x57,
|
||||||
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -1162,6 +1162,20 @@
|
|||||||
DOM.bip44coin.val(1);
|
DOM.bip44coin.val(1);
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
name: "Slimcoin",
|
||||||
|
onSelect: function() {
|
||||||
|
network = bitcoin.networks.slimcoin;
|
||||||
|
DOM.bip44coin.val(63);
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "Slimcoin Testnet",
|
||||||
|
onSelect: function() {
|
||||||
|
network = bitcoin.networks.slimcointn;
|
||||||
|
DOM.bip44coin.val(111);
|
||||||
|
},
|
||||||
|
},
|
||||||
{
|
{
|
||||||
name: "Viacoin",
|
name: "Viacoin",
|
||||||
onSelect: function() {
|
onSelect: function() {
|
||||||
|
|||||||
@@ -723,6 +723,66 @@ page.open(url, function(status) {
|
|||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|
||||||
|
// Network can be set to Slimcoin
|
||||||
|
function() {
|
||||||
|
page.open(url, function(status) {
|
||||||
|
// set the phrase and coin
|
||||||
|
var expected = "SNzPi1CafHFm3WWjRo43aMgiaEEj3ogjww";
|
||||||
|
page.evaluate(function() {
|
||||||
|
$(".phrase").val("abandon abandon ability");
|
||||||
|
$(".phrase").trigger("input");
|
||||||
|
$(".network option[selected]").removeAttr("selected");
|
||||||
|
$(".network option").filter(function() {
|
||||||
|
return $(this).html() == "Slimcoin";
|
||||||
|
}).prop("selected", true);
|
||||||
|
$(".network").trigger("change");
|
||||||
|
});
|
||||||
|
// check the address is generated correctly
|
||||||
|
waitForGenerate(function() {
|
||||||
|
var actual = page.evaluate(function() {
|
||||||
|
return $(".address:first").text();
|
||||||
|
});
|
||||||
|
if (actual != expected) {
|
||||||
|
console.log("Slimcoin address is incorrect");
|
||||||
|
console.log("Expected: " + expected);
|
||||||
|
console.log("Actual: " + actual);
|
||||||
|
fail();
|
||||||
|
}
|
||||||
|
next();
|
||||||
|
});
|
||||||
|
});
|
||||||
|
},
|
||||||
|
|
||||||
|
// Network can be set to Slimcointn
|
||||||
|
function() {
|
||||||
|
page.open(url, function(status) {
|
||||||
|
// set the phrase and coin
|
||||||
|
var expected = "n3nMgWufTek5QQAr6uwMhg5xbzj8xqc4Dq";
|
||||||
|
page.evaluate(function() {
|
||||||
|
$(".phrase").val("abandon abandon ability");
|
||||||
|
$(".phrase").trigger("input");
|
||||||
|
$(".network option[selected]").removeAttr("selected");
|
||||||
|
$(".network option").filter(function() {
|
||||||
|
return $(this).html() == "Slimcoin Testnet";
|
||||||
|
}).prop("selected", true);
|
||||||
|
$(".network").trigger("change");
|
||||||
|
});
|
||||||
|
// check the address is generated correctly
|
||||||
|
waitForGenerate(function() {
|
||||||
|
var actual = page.evaluate(function() {
|
||||||
|
return $(".address:first").text();
|
||||||
|
});
|
||||||
|
if (actual != expected) {
|
||||||
|
console.log("Slimcoin testnet address is incorrect");
|
||||||
|
console.log("Expected: " + expected);
|
||||||
|
console.log("Actual: " + actual);
|
||||||
|
fail();
|
||||||
|
}
|
||||||
|
next();
|
||||||
|
});
|
||||||
|
});
|
||||||
|
},
|
||||||
|
|
||||||
// BIP39 seed is set from phrase
|
// BIP39 seed is set from phrase
|
||||||
function() {
|
function() {
|
||||||
page.open(url, function(status) {
|
page.open(url, function(status) {
|
||||||
|
|||||||
Reference in New Issue
Block a user