celestiaorg / go-square

A library for encoding blobs into a 2D square of evenly sized chunks designed for sampling and reconstruction
Apache License 2.0
13 stars 16 forks source link

feat: support encoding and decoding of v1 shares #80

Closed cmwaters closed 2 months ago

cmwaters commented 2 months ago

This adds the logic of encoding and decoding the signer bytes to the share (only for the first share in the sequence and only for v1 share versions).

Since we're encapsulating the types, many of the length checks can be removed and thus much data in the square does not need to return an error.

cmwaters commented 2 months ago

@rootulp I will address your nits in a follow up PR (just so as to not block this)