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 Dash network #236

Merged
merged 3 commits into from
Jan 31, 2016
Merged

add Dash network #236

merged 3 commits into from
Jan 31, 2016

Conversation

nmarley
Copy link
Contributor

@nmarley nmarley commented Jan 30, 2016

Enables library to be used for Dash projects as well.

$this->assertEquals(NetworkFactory::dashTestnet()->getAddressByte(), '8b');
$this->assertEquals(NetworkFactory::dashTestnet()->getP2shByte(), '13');
$this->assertEquals(NetworkFactory::dashTestnet()->getPrivByte(), 'ef');
$this->assertEquals(NetworkFactory::dashTestnet()->isTestnet(), true);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

https://travis-ci.org/Bit-Wasp/bitcoin-php/builds/105893301

Get this test working by adding a 4th param true in the NetworkFactory::dashTestnet()

@afk11
Copy link
Member

afk11 commented Jan 30, 2016

Great stuff, thanks! Can you check the above, you indicate that it's testnet by passing $bool (it defaults to false)

@afk11
Copy link
Member

afk11 commented Jan 30, 2016

#235 was merged, I'll tag a release once this goes in!

@nmarley
Copy link
Contributor Author

nmarley commented Jan 31, 2016

Ah, ok, sorry about that! Flagged Dash and Startcoin testnets correctly in 5e6f3e0.

@afk11 afk11 merged commit 5e6f3e0 into Bit-Wasp:master Jan 31, 2016
@afk11
Copy link
Member

afk11 commented Jan 31, 2016

Merged, thanks! v0.0.19.4

@nmarley nmarley deleted the dash branch February 10, 2016 16:52
@murich
Copy link
Contributor

murich commented Dec 18, 2017

$network = \BitWasp\Bitcoin\Network\NetworkFactory::dash();
$master = HierarchicalKeyFactory::fromExtended(
            "xpub68NZH1dmpQzLjmSkh1boBTzYoETTouKdsFK2eQRZXzVtqY9Emto6jmPJqRyuvvxPUTNbud4VmMfcRSR7FkCT6PNsGq6bwBPGrqE9bpyy4ps",
$network
 );

Results in

InvalidArgumentException [ 0 ]: HD key magic bytes do not match network magic bytes 

I got this xpub from https://iancoleman.io/bip39/#english

What could be potentially wrong here?

@nmarley
Copy link
Contributor Author

nmarley commented Dec 18, 2017

What could be potentially wrong here?

Looks like the HDKey version bytes weren't updated after the last change ~16 months ago:

dashpay/dash#926

@murich murich mentioned this pull request Dec 22, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants