-
Notifications
You must be signed in to change notification settings - Fork 16
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
Use @spartan-hc/holo-hash for managing holo-hashes #259
Conversation
@jost-s do you see value in this? |
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.
Yes, I do see value in this. Looks good to me
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.
Yes, that's the way to go, use HoloHash | Uint8Array
for input to maintain compatibility.
Other than that, the transpiler didn't complain and everything seems to work fine.
Co-authored-by: Jost Schulte <[email protected]>
Ready to merge then? |
Yes, thanks for starting this off! |
Here is a quick example of how we could start using a library to manage holo-hashes while preserving legacy support.
Most of the helper functions in utils could be replaced by the native methods on
HoloHash
instances.sliceDhtLocation
=><HoloHash>.getDHTLocation
sliceCore32
=><HoloHash>.getHash
sliceHashType
=><HoloHash>.getPrefix