# BlobCells

Cell-level helpers for [PeerDAS (EIP-7594)](https://eips.ethereum.org/EIPS/eip-7594):
deriving the 128 cells and cell KZG proofs of an extended blob, and verifying
cell proofs against blob commitments.

## Examples

```ts twoslash
// @noErrors
import { BlobCells, Blobs } from 'ox'
import { kzg } from './kzg'

const [blob] = Blobs.from('0xdeadbeef')
const { cells, proofs } = BlobCells.fromBlob(blob, { kzg })
```

## Functions

| Name                | Description                         |
| ------------------- | ----------------------------------- |
| [`BlobCells.fromBlob`](/api/BlobCells/fromBlob) | Compute the cells and KZG proofs for a single blob (PeerDAS, EIP-7594). |
| [`BlobCells.recover`](/api/BlobCells/recover) | Reconstruct all 128 cells (and their KZG proofs) of an extended blob from at least 64 known cells (PeerDAS, EIP-7594). |
| [`BlobCells.toDataColumns`](/api/BlobCells/toDataColumns) | Build the 128 PeerDAS data columns from a list of blobs (EIP-7594). |
| [`BlobCells.verify`](/api/BlobCells/verify) | Verify a batch of cell KZG proofs against their commitments (PeerDAS, EIP-7594). |

## Errors

| Name                | Description                         |
| ------------------- | ----------------------------------- |
| [`BlobCells.InsufficientCellsError`](/api/BlobCells/errors#blobcellsinsufficientcellserror) | Thrown when fewer than [`BlobCells.cellsPerExtBlob`](/api/BlobCells)/2 cells are passed to [`BlobCells.recover`](/api/BlobCells/recover). |
| [`BlobCells.MismatchedLengthsError`](/api/BlobCells/errors#blobcellsmismatchedlengthserror) | Thrown when two parallel input arrays have different lengths. |

## Types

| Name                | Description                         |
| ------------------- | ----------------------------------- |
| [`BlobCells.Cell`](/api/BlobCells/types#blobcellscell) | Root type for a Cell. |
| [`BlobCells.CellIndex`](/api/BlobCells/types#blobcellscellindex) | The 0-based index of a cell within an extended blob (0…127). |
| [`BlobCells.CellProof`](/api/BlobCells/types#blobcellscellproof) | Root type for a cell KZG proof. |
| [`BlobCells.ColumnIndex`](/api/BlobCells/types#blobcellscolumnindex) | The 0-based index of a column across all blobs in a block (0…127). |
| [`BlobCells.DataColumn`](/api/BlobCells/types#blobcellsdatacolumn) | A PeerDAS data column for a single block: one cell + cell proof per blob, plus the blob-level commitments needed to verify them. |
