deth
Version:
Ethereum node focused on Developer Experience
11 lines (10 loc) • 411 B
TypeScript
/// <reference types="node" />
import { Opaque } from 'ts-essentials';
/**
* A hexadecimal string representing a hash.
* Always prefixed with 0x, always lowercase and of length 66.
*/
export declare type Hash = Opaque<'Hash', string>;
export declare function makeHash(value: string): Hash;
export declare function bufferToHash(buffer: Buffer): Hash;
export declare function hashToBuffer(hash: Hash): Buffer;