Merge pull request #506 from tecnovert/master

Add Particl support
This commit is contained in:
iancoleman
2021-10-08 13:50:31 +11:00
committed by GitHub
3 changed files with 32 additions and 2 deletions

View File

@@ -1876,3 +1876,15 @@ libs.bitcoin.networks.argoneum = {
scriptHash: 0x61,
wif: 0xbf
};
libs.bitcoin.networks.particl = {
messagePrefix: '\x18Bitcoin Signed Message:\n',
bech32: 'pw',
bip32: {
public: 0x696e82d1,
private: 0x8f1daeb8,
},
pubKeyHash: 0x38,
scriptHash: 0x3c,
wif: 0x6c,
};

View File

@@ -1434,14 +1434,14 @@
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());
@@ -3182,6 +3182,13 @@
setHdCoin(174);
},
},
{
name: "PART - Particl",
onSelect: function() {
network = libs.bitcoin.networks.particl;
setHdCoin(44);
},
},
{
name: "PHR - Phore",
onSelect: function() {

View File

@@ -2409,6 +2409,17 @@ it('Allows selection of ZooBlockchain', function(done) {
testNetwork(done, params);
});
it('Allows selection of Particl', function(done) {
var params = {
selectText: "PART - Particl",
phrase: "abandon abandon ability",
firstAddress: "Pjf2jj1E4GLJnyZA6jNN25Ajn4wHDahuL5",
firstPubKey: "039d803bfa8bd30c9e74c14a8785cee64b696b56e10d7545ad3fbf954c40cbfda2",
firstPrivKey: "H79cmSqW1uYVbi14c8VH5eH9UdpjhuvGmXFV8zhkcfR84TEUWfHp",
};
testNetwork(done, params);
});
// BIP39 seed is set from phrase
it('Sets the bip39 seed from the prhase', function(done) {
driver.findElement(By.css('.phrase'))