Skip to content

Blobs

Utility functions for working with EIP-4844 Blobs.

Functions

NameDescription
Blobs.commitmentsToVersionedHashesTransform a list of Commitments to Blob Versioned Hashes.
Blobs.commitmentToVersionedHashTransform a Commitment to its Blob Versioned Hash.
Blobs.fromTransforms arbitrary data to Blobs.Blobs.
Blobs.sidecarsToVersionedHashesTransforms a list of Blobs.BlobSidecars to their Blob Versioned Hashes.
Blobs.toTransforms Ox-shaped Blobs.Blobs into the originating data.
Blobs.toBytesTransforms Ox-shaped Blobs.Blobs into the originating data.
Blobs.toCommitmentsCompute commitments from a list of Blobs.Blobs.
Blobs.toHexTransforms Ox-shaped Blobs.Blobs into the originating data.
Blobs.toProofsCompute the proofs for a list of Blobs.Blobs and their commitments.
Blobs.toSidecarsTransforms Blobs.Blobs into a Blobs.BlobSidecars array.
Blobs.toVersionedHashesCompute Blob Versioned Hashes from a list of Blobs.Blobs.

Errors

NameDescription
Blobs.BlobSizeTooLargeErrorThrown when the blob size is too large.
Blobs.EmptyBlobErrorThrown when the blob is empty.
Blobs.EmptyBlobVersionedHashesErrorThrown when the blob versioned hashes are empty.
Blobs.InvalidVersionedHashSizeErrorThrown when the blob versioned hash size is invalid.
Blobs.InvalidVersionedHashVersionErrorThrown when the blob versioned hash version is invalid.

Types

NameDescription
Blobs.BlobRoot type for a Blob.
Blobs.BlobsA list of Blobs.Blob.
Blobs.BlobSidecarType for a Blob Sidecar that contains a blob, as well as its KZG commitment and proof.
Blobs.BlobSidecarsA list of Blobs.BlobSidecar.