-
Notifications
You must be signed in to change notification settings - Fork 98
feat(principal): export the base32Encode and base32Decode functions
#1159
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
Conversation
|
For what it's worth, the functions encodeBase32 and decodeBase32 are available in Those are e.g. used in |
|
@q-uint how often does it happen that your only dependency is I feel like the principal submodule is not the right place from where to export those utility functions. Who needs those functions shouldn't search for them into the principal submodule in my opinion. |
|
It seems like this is more of a personal preference. With bindgen, in my opinion, you don’t need all these dependencies, and it’s generally not a good practice, imo, to rely on them unnecessarily. My current dependency list is: I prefer to keep it this way. Feel free to close this. |
Why do we expose |
That's true, we added it upon request in #1077. So it makes sense to also re-export base32 utils. Would you like to add a |
Not a breaking change since these functions are not exposed. In preparation of #1159.
|
@q-uint you can update your branch now |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@q-uint can you update the changelog as well?
## [Unreleased]
+ - feat(principal): export the `base32Encode` and `base32Decode` functions
## [4.0.5] - 2025-09-30Review dismissed by automation script.
Review dismissed by automation script.
base32Encode and base32Decode functions
|
Merged! I'll release 4.1.0 soon. Thanks a lot for the contribution! |
|
@icp-sdk/core@4.1.0 is out with your contribution! Thanks again! |
Description
ICRC1 account textual representations require both CRC32 (already exposed) and Base32 encoding. This PR exposes the existing internal Base32 implementation, allowing users to display ICRC1 accounts without adding any new dependencies.
Details:
Motivation
Library users can now generate and display ICRC1 account strings directly, using only
@icp-sdk/core/principal.Checklist:
@ilbertt 😉