Skip to content
This repository has been archived by the owner on May 19, 2023. It is now read-only.

feat: expose contenthash helper methods #123

Open
bguiz opened this issue Dec 23, 2020 · 0 comments
Open

feat: expose contenthash helper methods #123

bguiz opened this issue Dec 23, 2020 · 0 comments

Comments

@bguiz
Copy link

bguiz commented Dec 23, 2020

What

  • src/contenthash-helper.ts contains encode and decode methods --> expose these under rns.utils.

Why

  • Code which uses rns.js as a dependency may need to convert between the two forms, because:
    • rns.contenthash(name) (getter) returns in decoded form
    • rns.setContenthash(name, contenthash) (setter) has parameter in encoded form
    • do own assessment of validity, by catching errors thrown by these helper function
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant