# BlobCells.toDataColumns

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

For each column index `i ∈ [0, 128)`, produces a [`BlobCells.DataColumn`](/api/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

:::code-group
```ts [Named]
import { BlobCells } from 'ox'
```

```ts [Entrypoint]
import * as BlobCells from 'ox/BlobCells'
```
:::

## Examples

```ts twoslash
// @noErrors
import { BlobCells, Blobs } from 'ox'
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>
```

**Source:** [src/core/BlobCells.ts](https://github.com/wevm/ox/blob/main/src/core/BlobCells.ts#L380)

## 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>`
