# Blobs.toCellProofs

Compute the flat list of PeerDAS (EIP-7594) cell KZG proofs for a list of [`Blobs.Blobs`](/api/Blobs/types#blobs). Returns `128 * blobs.length` proofs, where `proofs[i * 128 + j]` is the proof for cell `j` of `blobs[i]`'s extended form.

## Imports

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

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

## Examples

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

const blobs = Blobs.from('0xdeadbeef')
const cellProofs = Blobs.toCellProofs(blobs, { kzg }) // [!code focus]
```

### Configuring Return Type

It is possible to configure the return type with the `as` option.

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

const blobs = Blobs.from('0xdeadbeef')
const cellProofs = Blobs.toCellProofs(blobs, {
  as: 'Bytes', // [!code focus]
  kzg
})
// @log: [Uint8Array [ ... ], Uint8Array [ ... ], ...]
```

## Definition

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

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

## Parameters

### blobs

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

The [`Blobs.Blobs`](/api/Blobs/types#blobs) to transform to cell proofs.

### options

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

Options.

#### options.as

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

Return type.

#### options.kzg

* **Type:** `Pick`

KZG implementation.

## Return Type

The flat list of cell KZG proofs.

`toCellProofs.ReturnType<as>`
