You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
CheckDecode shaves off 1 version byte, but there are situations where there are for example 4 version bytes (xpub base58 encoding), or possibly none at all. I currently call this function and glue together the 4 byte version from the first byte returned and the first three bytes of the result, which is not ideal.
Actually, CheckDecode should not worry about the version at all, as that is not part of base58 check encoding. If there are version bytes and how they look like should be decided by the client.
Thoughts on how to fix it? For backwards compatibility, maybe it makes sense to add another function CheckDecodePlain that just decodes and returns the complete result without the first byte treated differently.
The text was updated successfully, but these errors were encountered:
Hi
https://github.com/btcsuite/btcutil/blob/02a4fd9de1d52e877491996349a92d54c653ccbf/base58/base58check.go#L43
CheckDecode shaves off 1 version byte, but there are situations where there are for example 4 version bytes (xpub base58 encoding), or possibly none at all. I currently call this function and glue together the 4 byte version from the first byte returned and the first three bytes of the result, which is not ideal.
Actually, CheckDecode should not worry about the version at all, as that is not part of base58 check encoding. If there are version bytes and how they look like should be decided by the client.
Thoughts on how to fix it? For backwards compatibility, maybe it makes sense to add another function
CheckDecodePlain
that just decodes and returns the complete result without the first byte treated differently.The text was updated successfully, but these errors were encountered: