Merge pull request #521 from 7h3v01c3/master

Added Divi
This commit is contained in:
iancoleman
2021-10-08 14:15:04 +11:00
committed by GitHub
3 changed files with 56 additions and 0 deletions

View File

@@ -691,6 +691,28 @@ libs.bitcoin.networks.digitalcoin = {
wif: 0x9e,
};
libs.bitcoin.networks.divi = {
messagePrefix: '\x19Divi Signed Message:\n',
bip32: {
public: 0x022d2533,
private: 0x0221312b,
},
pubKeyHash: 0x1e,
scriptHash: 0x0d,
wif: 0xd4,
};
libs.bitcoin.networks.divitestnet = {
messagePrefix: '\x19Divi Signed Message:\n',
bip32: {
public: 0x3a8061a0,
private: 0x3a805837,
},
pubKeyHash: 0x8b,
scriptHash: 0x13,
wif: 0xef,
};
libs.bitcoin.networks.ecoin = {
messagePrefix: '\x18eCoin Signed Message:\n',
bip32: {

View File

@@ -2639,6 +2639,20 @@
setHdCoin(18);
},
},
{
name: "DIVI - DIVI",
onSelect: function() {
network = libs.bitcoin.networks.divi;
setHdCoin(301);
},
},
{
name: "DIVI - DIVI Testnet",
onSelect: function() {
network = libs.bitcoin.networks.divitestnet;
setHdCoin(1);
},
},
{
name: "DMD - Diamond",
onSelect: function() {

View File

@@ -625,6 +625,26 @@ it('Allows selection of dash testnet', function(done) {
};
testNetwork(done, params);
});
it('Allows selection of divi', function(done) {
var params = {
selectText: "DIVI - Divi",
phrase: "abandon abandon ability",
firstAddress: "DLeGz7jqF1y1cmfEkSeRBkQPK8vTZ8rHt4",
firstPubKey: "032ade8a36983a1efcc40d64b2a1a52cc26a908f7dc2fa222f43598812dd10d8bc",
firstPrivKey: "YWG1Fht24fMUntuAhVRMPSj2eVN7BxkM7SuuqRhg1ibsTNbr31VF",
};
testNetwork(done, params);
});
it('Allows selection of divi testnet', function(done) {
var params = {
selectText: "DIVI - Divi Testnet",
phrase: "abandon abandon ability",
firstAddress: "yB5U384n6dGkVE3by5y9VdvHHPwPg68fQj",
firstPubKey: "0382a5450765e2025bdb5f7d109c9254a11ef97a566228bf171d80ecb348763bb0",
firstPrivKey: "cV3coiYD2NhHKfhC6Gb8DzpvPzcGYYExYxuNxpUtKq3VUJrkFLZx",
};
testNetwork(done, params);
});
it('Allows selection of game', function(done) {
var params = {
selectText: "GAME - GameCredits",