Bit-Wasp/bitcoin-lib-php

Electrum 2.0 xpub

Closed this issue · 3 comments

It seems the format for an electrum xpub has changed.

In your electrumtest.php file the MPK format is 819519e966729f31e1855eb75133d9e7f0c31abaadd8f184870d62771c62c2e759406ace1dee933095d15e4c719617e252f32dc0465393055f867aee9357cd52

The format Electrum gives now is xpub661MyMwAqRbcFuGfayWGmjEAGo3uUjcDnhDgcCz5DMSEYy7KDsoKJZvoYZhWgP784ehgkctHKXZ47kHgUKqEpDw1xrUa8WBqQg3YKnSUzS5

afk11 commented

You are indeed correct that Electrum has changed - it has adopted BIP32 instead of a custom algorithm. However, the Electrum class in this library is meant to deal with the older algorithm as it's unique to electrum. You should use the BIP32 library for your xpubs, not Electrum.

afk11 commented

OK to close this?

Yes. Thank you for the helpful answer!