-
-
Notifications
You must be signed in to change notification settings - Fork 275
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
Find proper types #35
Comments
These types are not "native" types in any programming language as in most programming languages that are being used for sharding have to check inputs and outputs and define these types themselves. If you look at the ssz codebase (https://github.com/ChainSafeSystems/ssz-js), this is what was done. Note that hash32, in particular, is effectively bytes but with some caveats. Again, look through the ssz code. |
I have been experimenting with how we can enforce these types in typescript here. it's really just a wrapper for BigNumber that enforces size. Still early days but I think a construct like this is achievable and could make our lives easy. It could also be extensible for types like |
May seem ugly but I think an alias to |
@aunyks were discussing this in the currently open pr |
I think we can close this per #62 which is now closed? |
We need to find proper typescript types for (or write them ourselves):
David's library should do the trick for uints.
As for hash32 bits and bytes unsure.The text was updated successfully, but these errors were encountered: