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

Support for Segwit XPUBs #16

Closed
prusnak opened this issue Oct 20, 2017 · 6 comments
Closed

Support for Segwit XPUBs #16

prusnak opened this issue Oct 20, 2017 · 6 comments

Comments

@prusnak
Copy link

prusnak commented Oct 20, 2017

Accept Segwit XPUBs starting with "ypub" - see https://github.com/spesmilo/electrum/blob/0a648e2b1cdb7852d80c0626c62984ef01c1c7e9/lib/bitcoin.py#L50 for magic constants (0x049d7cb2 for segwit p2sh).

By using a different magic for Segwit XPUBs, you don't need to ask user what kind of XPUB is being scanned.

Suggestion: just detect automatically, don't ask user.

@SamouraiDev
Copy link
Member

This will be a welcome addition.

@SamouraiDev
Copy link
Member

YPUBs are now supported as of v2.6.

@prusnak
Copy link
Author

prusnak commented Nov 20, 2017

Thanks!

Off-topic: @SamouraiDev please don't write me using keybase, but use my email stick@satoshilabs.com. Thanks!

@janklosowski
Copy link

@SamouraiDev When you add a new Segwit wallet, it's described as "Segwit XPUB (BIP49)". Shouldn't it be referred as YPUB (consistently with the Samourai app)?

@SamouraiDev
Copy link
Member

Actually, should mention both since BIP49 XPUBs are still accepted.

@prusnak
Copy link
Author

prusnak commented Jan 3, 2018

JFYI: https://github.com/bitcoin/bips/blob/master/bip-0084.mediawiki

If you plan to include support for Native Segwit zpubs, https://iancoleman.io/bip39/ has already implemented the change

The same link https://github.com/spesmilo/electrum/blob/0a648e2b1cdb7852d80c0626c62984ef01c1c7e9/lib/bitcoin.py#L50 contains constants for zpub: 0x4b24746

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

No branches or pull requests

3 participants