fairDataSociety / bmt-js

Binary Merkle Tree operations on data
4 stars 6 forks source link

feat: added spanValue for BMT smart contracts #11

Closed molekilla closed 2 years ago

molekilla commented 2 years ago

Reference: https://github.com/fairDataSociety/bmt-js/issues/10

nugaon commented 2 years ago

you have to keep littleEndian for span serialization of swarm hashes, and create a helper method to serialize the span value into bigEndian if you need.

Even better would be maybe a breaking change, where we keep spanValue as number | BigInt, but for that, you have to make the span serialization in the logic.

molekilla commented 2 years ago

resolved by https://github.com/fairDataSociety/fdp-contracts/pull/20/commits/e44adf093fc394b2fbd0cd2927b1f528d33188da