@xylabs/hex
Version:
Base functionality used throughout XY Labs TypeScript/JavaScript libraries
10 lines • 626 B
TypeScript
import type { AssertConfig } from './assert.ts';
import type { Hex } from './hex/index.ts';
export type HashBitLength = 32 | 64 | 128 | 256 | 512 | 1024 | 2048 | 4096;
export declare const HashBitLength: HashBitLength[];
export declare const isHashBitLength: (value: unknown) => value is HashBitLength;
export type Hash = Exclude<Hex, 'reserved-hash-value'>;
export declare const isHash: (value: unknown, bitLength?: HashBitLength) => value is Hash;
export declare function asHash(value: unknown): Hash | undefined;
export declare function asHash(value: unknown, assert: AssertConfig): Hash;
//# sourceMappingURL=hash.d.ts.map