Skip to content
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 raw bytes instead of strings as the leaf type #75

Open
CarsonCase opened this issue Nov 5, 2024 · 0 comments
Open

Use raw bytes instead of strings as the leaf type #75

CarsonCase opened this issue Nov 5, 2024 · 0 comments

Comments

@CarsonCase
Copy link

I'm using Merkly at the moment in a Solidity smart contract project, as merkle trees have a lot of uses in Blockchain. Libraries like eth-abi will deliver encoded objects as bytes that can then be used in smart contract calls. For this reason, I have a bit of trouble using Merkly as it stands, as these raw byte arrays are not always convertible to utf-8 and merkly uses the default string encoding function (utf8) and doesn't allow for it to be tweaked. Of course another feature option would be to allow for custom string encoding, but I think it might be easier and more flexible to just accept leafs as bytes instead of or in addition to strings.

I have pretty amateur Python experience but since I need this feature for myself anyways, I may push a pull request in case anyone else comes across this issue in the future

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant