Git Product home page Git Product logo

Comments (5)

ansermino avatar ansermino commented on June 26, 2024 2

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 hash32.

from lodestar.

Mikerah avatar Mikerah commented on June 26, 2024

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.

from lodestar.

aunyks avatar aunyks commented on June 26, 2024

May seem ugly but I think an alias to Array<Boolean> would suffice for a Bits type.

from lodestar.

GregTheGreek avatar GregTheGreek commented on June 26, 2024

@aunyks were discussing this in the currently open pr

from lodestar.

GregTheGreek avatar GregTheGreek commented on June 26, 2024

I think we can close this per #62 which is now closed?

from lodestar.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.