viem
Version:
11 lines • 712 B
TypeScript
import type { ErrorType } from '../../errors/utils.js';
import type { ByteArray, Hex } from '../../types/misc.js';
import { type IsHexErrorType } from '../data/isHex.js';
import { type ToBytesErrorType } from '../encoding/toBytes.js';
import { type ToHexErrorType } from '../encoding/toHex.js';
type To = 'hex' | 'bytes';
export type Keccak256Hash<to extends To> = (to extends 'bytes' ? ByteArray : never) | (to extends 'hex' ? Hex : never);
export type Keccak256ErrorType = IsHexErrorType | ToBytesErrorType | ToHexErrorType | ErrorType;
export declare function keccak256<to extends To = 'hex'>(value: Hex | ByteArray, to_?: to | undefined): Keccak256Hash<to>;
export {};
//# sourceMappingURL=keccak256.d.ts.map