> **Can't find what you're looking for?** Use `search_docs` on the docs MCP server at `https://v3.viem.sh/api/mcp` to find what you need.

# BlobCells

:::info
`BlobCells` is a re-export of ox's [`BlobCells`](https://oxlib.sh/api/BlobCells). Refer to the ox documentation for the full reference.
:::

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 'viem/utils'
import { kzg } from './kzg'

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

## Functions

| Name                | Description                         |
| ------------------- | ----------------------------------- |
| [`BlobCells.fromBlob`](/docs/utilities/blobcells/fromBlob) | Compute the cells and KZG proofs for a single blob (PeerDAS, EIP-7594). |
| [`BlobCells.recover`](/docs/utilities/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`](/docs/utilities/blobcells/toDataColumns) | Build the 128 PeerDAS data columns from a list of blobs (EIP-7594). |
| [`BlobCells.verify`](/docs/utilities/blobcells/verify) | Verify a batch of cell KZG proofs against their commitments (PeerDAS, EIP-7594). |

## Errors

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

## Types

| Name                | Description                         |
| ------------------- | ----------------------------------- |
| [`BlobCells.Cell`](/docs/utilities/blobcells/types#blobcellscell) | Root type for a Cell. |
| [`BlobCells.CellIndex`](/docs/utilities/blobcells/types#blobcellscellindex) | The 0-based index of a cell within an extended blob (0…127). |
| [`BlobCells.CellProof`](/docs/utilities/blobcells/types#blobcellscellproof) | Root type for a cell KZG proof. |
| [`BlobCells.ColumnIndex`](/docs/utilities/blobcells/types#blobcellscolumnindex) | The 0-based index of a column across all blobs in a block (0…127). |
| [`BlobCells.DataColumn`](/docs/utilities/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. |
