UNPKG

761 BTypeScriptView Raw
1import type { HexString } from '@polkadot/util/types';
2export type { HexString } from '@polkadot/util/types';
3interface DualHash {
4 256: (u8a: Uint8Array) => Uint8Array;
5 512: (u8a: Uint8Array) => Uint8Array;
6}
7/** @internal */
8export declare function createAsHex<T extends (...args: never[]) => Uint8Array>(fn: T): (...args: Parameters<T>) => HexString;
9/** @internal */
10export declare function createBitHasher(bitLength: 256 | 512, fn: (data: string | Uint8Array, bitLength: 256 | 512, onlyJs?: boolean) => Uint8Array): (data: string | Uint8Array, onlyJs?: boolean) => Uint8Array;
11/** @internal */
12export declare function createDualHasher(wa: DualHash, js: DualHash): (value: string | Uint8Array, bitLength?: 256 | 512, onlyJs?: boolean) => Uint8Array;