> **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.toDataColumns

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

Build the 128 PeerDAS data columns from a list of blobs (EIP-7594).

For each column index `i ∈ [0, 128)`, produces a [`BlobCells.DataColumn`](/docs/utilities/blobcells/types#datacolumn) containing one cell + one cell proof per blob (at column `i` of each blob's extended form), alongside the blob-level commitments needed to verify them.

## Imports

```ts
import { BlobCells } from 'viem/utils'
```

## Examples

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

const blobs = Blobs.from('0xdeadbeef')
const columns = BlobCells.toDataColumns(blobs, { kzg }) // 128 columns
```

## Definition

```ts
function toDataColumns<blobs, as>(
  blobs: blobs | Blobs.Blobs<Hex.Hex> | Blobs.Blobs<Bytes.Bytes>,
  options: toDataColumns.Options<as>,
): toDataColumns.ReturnType<as>
```

## Parameters

### blobs

* **Type:** `blobs | Blobs.Blobs<Hex.Hex> | Blobs.Blobs<Bytes.Bytes>`

The blobs to convert.

### options

* **Type:** `toDataColumns.Options<as>`

Options.

#### options.as

* **Type:** `"Bytes" | "Hex" | as`
* **Optional**

Return type.

#### options.kzg

* **Type:** `Pick`

KZG implementation.

## Return Type

128 data columns.

`toDataColumns.ReturnType<as>`
