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

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

Compute the cells and KZG proofs for a single blob (PeerDAS, EIP-7594).

Returns 128 cells (each 2048 bytes) and 128 cell-level KZG proofs (each 48 bytes).

## Imports

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

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

## Definition

```ts
function fromBlob<blob, as>(
  blob: blob | Hex.Hex | Bytes.Bytes,
  options: fromBlob.Options<as>,
): fromBlob.ReturnType<as>
```

## Parameters

### blob

* **Type:** `blob | Hex.Hex | Bytes.Bytes`

The blob to convert.

### options

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

Options.

#### options.as

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

Return type.

#### options.kzg

* **Type:** `Pick`

KZG implementation.

## Return Type

The cells and proofs.

`fromBlob.ReturnType<as>`
