Add CRW - Crown

This commit is contained in:
mikeyb
2017-07-01 15:38:46 -07:00
parent f1e5d48491
commit 0921f37077
4 changed files with 64 additions and 0 deletions

View File

@@ -19902,6 +19902,16 @@ bitcoin.networks.clam = {
wif: 0x85,
};
bitcoin.networks.crown = {
bip32: {
public: 0x0488b21e,
private: 0x0488ade4
},
pubKeyHash: 0x00,
scriptHash: 0x05,
wif: 0x80,
};
bitcoin.networks.dash = {
bip32: {
public: 0x0488b21e,
@@ -44811,6 +44821,13 @@ window.Entropy = new (function() {
DOM.bip44coin.val(23);
},
},
{
name: "CRW - Crown",
onSelect: function() {
network = bitcoin.networks.crown;
DOM.bip44coin.val(72);
},
},
{
name: "Dogecoin",
onSelect: function() {

View File

@@ -35,6 +35,16 @@ bitcoin.networks.clam = {
wif: 0x85,
};
bitcoin.networks.crown = {
bip32: {
public: 0x0488b21e,
private: 0x0488ade4
},
pubKeyHash: 0x00,
scriptHash: 0x05,
wif: 0x80,
};
bitcoin.networks.dash = {
bip32: {
public: 0x0488b21e,

View File

@@ -1077,6 +1077,13 @@
DOM.bip44coin.val(23);
},
},
{
name: "CRW - Crown",
onSelect: function() {
network = bitcoin.networks.crown;
DOM.bip44coin.val(72);
},
},
{
name: "Dogecoin",
onSelect: function() {

View File

@@ -571,6 +571,36 @@ page.open(url, function(status) {
});
},
// Network can be set to crown
function() {
page.open(url, function(status) {
// set the phrase and coin
var expected = "18pWSwSUAQdiwMHUfFZB1fM2xue9X1FqE5";
page.evaluate(function() {
$(".phrase").val("abandon abandon ability");
$(".phrase").trigger("input");
$(".network option[selected]").removeAttr("selected");
$(".network option").filter(function() {
return $(this).html() == "CRW - Crown";
}).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("CRW address is incorrect");
console.log("Expected: " + expected);
console.log("Actual: " + actual);
fail();
}
next();
});
});
},
// Network can be set to dash
function() {
page.open(url, function(status) {