@chainsafe/eth2.0-utils
Version:
Utilities required across multiple lodestar packages
13 lines (12 loc) • 440 B
TypeScript
/// <reference types="node" />
import { bytes } from "@chainsafe/eth2.0-types";
/**
* Return a byte array from a number or BigInt
*/
export declare function intToBytes(value: bigint | number, length: number): bytes;
/**
* Convert byte array in LE to integer.
*/
export declare function bytesToInt(value: bytes): number;
export declare function bytesToBigInt(value: bytes): bigint;
export declare function toHex(buffer: Buffer): string;