Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Whive #1

Merged
merged 1 commit into from
Apr 4, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions src/js/bitcoinjs-extensions.js
Original file line number Diff line number Diff line change
Expand Up @@ -1910,3 +1910,15 @@ libs.bitcoin.networks.particl = {
scriptHash: 0x3c,
wif: 0x6c,
};

//add for whive
libs.bitcoin.networks.whive = {
messagePrefix: '\x18Whive Signed Message:\n',
bip32: {
public: 0x0488B21E,
private: 0x0488ADE4,
},
pubKeyHash: 0x49,
scriptHash: 0xb3,
wif: 0x80,
};
8 changes: 8 additions & 0 deletions src/js/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -3637,6 +3637,14 @@
setHdCoin(181);
},
},
{
name: "WHIVE - Whive",
onSelect: function() {
network = libs.bitcoin.networks.whive;
setHdCoin(658);
},
},

{
name: "XAX - Artax",
onSelect: function() {
Expand Down
10 changes: 10 additions & 0 deletions tests/spec/tests.js
Original file line number Diff line number Diff line change
Expand Up @@ -1878,6 +1878,16 @@ it('Allows selection of Unobtanium', function(done) {
};
testNetwork(done, params);
});
it('Allows selection of Whive', function(done) {
var params = {
selectText: "WHIVE - Whive",
phrase: "abandon abandon ability",
firstAddress: "wv1qw63vtfh5pdd9j6kdmeu6vkddjx77rqsu9drarf",
firstPubKey: "001476a2c5a6f40b5a596acdde79a659ad91bde1821c",
firstPrivKey: "L1oAC6Lxi1Z8ewPNFASmAMvvagjHbJKmF8sb43kyXFniWnmradme",
};
testNetwork(done, params);
});
it('Allows selection of Vcash', function(done) {
var params = {
selectText: "XVC - Vcash",
Expand Down