import { type BytesToHexErrorType } from '../encoding/toHex.js'; import type { ErrorType } from '../errors/utils.js'; import { type Sha256ErrorType } from '../hash/sha256.js'; import type { Bytes, Hex } from '../types/data.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' ? Bytes : never) | (to extends 'hex' ? Hex : never); export type CommitmentToVersionedHashErrorType = Sha256ErrorType | BytesToHexErrorType | ErrorType; /** * Transform a commitment to it's versioned hash. * * @example * ```ts * import { Blobs } from 'viem' * import { kzg } from './kzg' * * const blobs = Blobs.from({ data: '0x1234' }) * const [commitment] = Blobs.toCommitments({ blobs, kzg }) * const versionedHash = Blobs.commitmentToVersionedHash({ commitment }) * ``` */ export declare function commitmentToVersionedHash(parameters: CommitmentToVersionedHashParameters): CommitmentToVersionedHashReturnType; export {}; //# sourceMappingURL=commitmentToVersionedHash.d.ts.map