Skip to content

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

@CarsonCase

Description

@CarsonCase

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

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions