ethereum / c-kzg-4844

A minimal implementation of the Polynomial Commitments API for EIP-4844 and EIP-7594, written in C.
Apache License 2.0
112 stars 105 forks source link

feat: add missing new functions for byte types #380

Closed mattsse closed 10 months ago

mattsse commented 10 months ago

currently there's no infallible way to create Bytes types

This adds new(array) -> Self functions

jtraglia commented 10 months ago

Hey @mattsse. There are functions for this here (might need to scroll btw):

https://github.com/ethereum/c-kzg-4844/blob/624aa60d01da524827123506975431aa5454c80d/bindings/rust/src/bindings/mod.rs#L487-L503

mattsse commented 10 months ago

ah

hmm, I think having a const fn new would still be useful if you want to define constants