import type { ErrorType } from '../../errors/utils.js'; import type { ByteArray, Hex } from '../../types/misc.js'; import { type BytesToHexErrorType } from '../encoding/toHex.js'; import { type Sha256ErrorType } from '../hash/sha256.js'; type To = 'hex' | 'bytes'; export type CommitmentToVersionedHashParameters = { /** Commitment from blob. */ commitment: commitment | Uint8Array | Hex; /** Return type. */ to?: to | To | undefined; /** Version to tag onto the hash. */ version?: number | undefined; }; export type CommitmentToVersionedHashReturnType = (to extends 'bytes' ? ByteArray : never) | (to extends 'hex' ? Hex : never); export type CommitmentToVersionedHashErrorType = Sha256ErrorType | BytesToHexErrorType | ErrorType; /** * Transform a commitment to it's versioned hash. * * @example * ```ts * import { * blobsToCommitments, * commitmentToVersionedHash, * toBlobs * } from 'viem' * import { kzg } from './kzg' * * const blobs = toBlobs({ data: '0x1234' }) * const [commitment] = blobsToCommitments({ blobs, kzg }) * const versionedHash = commitmentToVersionedHash({ commitment }) * ``` */ export declare function commitmentToVersionedHash(parameters: CommitmentToVersionedHashParameters): CommitmentToVersionedHashReturnType; export {}; //# sourceMappingURL=commitmentToVersionedHash.d.ts.map