-
Notifications
You must be signed in to change notification settings - Fork 47
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
Comments
This will be a welcome addition. |
YPUBs are now supported as of v2.6. |
Thanks! Off-topic: @SamouraiDev please don't write me using keybase, but use my email stick@satoshilabs.com. Thanks! |
@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)? |
Actually, should mention both since BIP49 XPUBs are still accepted. |
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 |
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.
The text was updated successfully, but these errors were encountered: