-
Notifications
You must be signed in to change notification settings - Fork 140
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
bip32 should support ypub, zpub etc. #148
Comments
@benma hey. could you share your code? I'm also replacing version bytes but I have
Obviously doing something wrong. |
Thanks a lot! |
My opinion is libwally should not do this. bip32 has nothing to do with slip0132. |
@Fonta1n3 what is the disadvantage in supporting it? Note that Zpub, Ypub etc. are already pervasively used by Electrum and compatible wallets. If it is not supported by the library, weird workarounds like the one I linked above are necessary. |
Actually I couldn't manage libwally working with zpub even with substituting version bytes. I would be grateful if you could say how I can import zpub and derive native segwit addresses. |
This is what i use to convert: |
@Fonta1n3 are you using libwally-core in this project? If so, I don't understand why you prefer to re-implement xpub encoding almost completely than having it be supported upstream. |
@Fonta1n3 Thank you. I see I have to replace checksum also. |
The bip32 library only works with xpub/xprv.
If you want to use xpub/ypub/zpub etc. (see https://github.com/satoshilabs/slips/blob/master/slip-0132.md), the library gives you a hard time currently.
I currently work around it by using only the xprv/xpub versions, and then force overwriting the version bytes when serializing.
It would be great to keep the bip32 API flexible enough so that one can provide custom version bytes.
The text was updated successfully, but these errors were encountered: