import type { ErrorType } from '../errors/utils.js'; import type { Bytes, Hex } from '../types/data.js'; import type { BlobSidecars } from '../types/eip4844.js'; import type { Kzg } from '../types/kzg.js'; import type { OneOf } from '../types/utils.js'; import { type BlobsToCommitmentsErrorType } from './blobsToCommitments.js'; import { type BlobsToProofsErrorType } from './blobsToProofs.js'; import { type ToBlobsErrorType } from './toBlobs.js'; type To = 'hex' | 'bytes'; export type ToBlobSidecarsParameters = { /** Return type. */ to?: to | To | undefined; } & OneOf<{ /** Data to transform into blobs. */ data: data | Hex | Bytes; /** KZG implementation. */ kzg: Kzg; } | { /** Blobs. */ blobs: blobs | readonly Hex[] | readonly Bytes[]; /** Commitment for each blob. */ commitments: _blobsType | readonly Hex[] | readonly Bytes[]; /** Proof for each blob. */ proofs: _blobsType | readonly Hex[] | readonly Bytes[]; }>; export type ToBlobSidecarsReturnType = (to extends 'bytes' ? BlobSidecars : never) | (to extends 'hex' ? BlobSidecars : never); export type ToBlobSidecarsErrorType = BlobsToCommitmentsErrorType | ToBlobsErrorType | BlobsToProofsErrorType | ErrorType; /** * Transforms arbitrary data (or blobs, commitments, & proofs) into a sidecar array. * * @example * ```ts * import { toBlobSidecars, stringToHex } from 'viem' * * const sidecars = toBlobSidecars({ data: stringToHex('hello world') }) * ``` * * @example * ```ts * import { Blobs, Hex } from 'viem' * * const blobs = Blobs.from({ data: Hex.from('hello world') }) * const commitments = Blobs.toCommitments({ blobs, kzg }) * const proofs = Blobs.toProofs({ blobs, commitments, kzg }) * * const sidecars = Blobs.toSidecars({ blobs, commitments, proofs }) * ``` */ export declare function toBlobSidecars(parameters: ToBlobSidecarsParameters): ToBlobSidecarsReturnType; export {}; //# sourceMappingURL=toBlobSidecars.d.ts.map