# Blobs

Utility functions for working with [EIP-4844](https://eips.ethereum.org/EIPS/eip-4844) Blobs.

## Functions

| Name                | Description                         |
| ------------------- | ----------------------------------- |
| [`Blobs.commitmentsToVersionedHashes`](/api/Blobs/commitmentsToVersionedHashes) | Transform a list of Commitments to Blob Versioned Hashes. |
| [`Blobs.commitmentToVersionedHash`](/api/Blobs/commitmentToVersionedHash) | Transform a Commitment to its Blob Versioned Hash. |
| [`Blobs.from`](/api/Blobs/from) | Transforms arbitrary data to [`Blobs.Blobs`](/api/Blobs/types#blobs). |
| [`Blobs.to`](/api/Blobs/to) | Transforms Ox-shaped [`Blobs.Blobs`](/api/Blobs/types#blobs) into the originating data. |
| [`Blobs.toBytes`](/api/Blobs/toBytes) | Transforms Ox-shaped [`Blobs.Blobs`](/api/Blobs/types#blobs) into the originating data. |
| [`Blobs.toCellProofs`](/api/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. |
| [`Blobs.toCommitments`](/api/Blobs/toCommitments) | Compute commitments from a list of [`Blobs.Blobs`](/api/Blobs/types#blobs). |
| [`Blobs.toHex`](/api/Blobs/toHex) | Transforms Ox-shaped [`Blobs.Blobs`](/api/Blobs/types#blobs) into the originating data. |
| [`Blobs.toVersionedHashes`](/api/Blobs/toVersionedHashes) | Compute Blob Versioned Hashes from a list of [`Blobs.Blobs`](/api/Blobs/types#blobs). |

## Errors

| Name                | Description                         |
| ------------------- | ----------------------------------- |
| [`Blobs.BlobSizeTooLargeError`](/api/Blobs/errors#blobsblobsizetoolargeerror) | Thrown when the blob size is too large. |
| [`Blobs.EmptyBlobError`](/api/Blobs/errors#blobsemptybloberror) | Thrown when the blob is empty. |
| [`Blobs.EmptyBlobVersionedHashesError`](/api/Blobs/errors#blobsemptyblobversionedhasheserror) | Thrown when the blob versioned hashes are empty. |
| [`Blobs.InvalidVersionedHashSizeError`](/api/Blobs/errors#blobsinvalidversionedhashsizeerror) | Thrown when the blob versioned hash size is invalid. |
| [`Blobs.InvalidVersionedHashVersionError`](/api/Blobs/errors#blobsinvalidversionedhashversionerror) | Thrown when the blob versioned hash version is invalid. |

## Types

| Name                | Description                         |
| ------------------- | ----------------------------------- |
| [`Blobs.Blob`](/api/Blobs/types#blobsblob) | Root type for a Blob. |
| [`Blobs.Blobs`](/api/Blobs/types#blobsblobs) | A list of [`Blobs.Blob`](/api/Blobs/types#blob). |
