@dfinity/utils
Version:
A collection of utilities and constants for NNS/SNS projects.
11 lines (10 loc) • 793 B
TypeScript
export declare const uint8ArrayToBigInt: (array: Uint8Array) => bigint;
export declare const bigIntToUint8Array: (value: bigint) => Uint8Array;
export declare const numberToUint8Array: (value: number) => Uint8Array;
export declare const arrayBufferToUint8Array: (buffer: ArrayBuffer) => Uint8Array;
export declare const uint8ArrayToArrayOfNumber: (array: Uint8Array) => Array<number>;
export declare const arrayOfNumberToUint8Array: (numbers: Array<number>) => Uint8Array;
export declare const asciiStringToByteArray: (text: string) => Array<number>;
export declare const hexStringToUint8Array: (hexString: string) => Uint8Array;
export declare const uint8ArrayToHexString: (bytes: Uint8Array | number[]) => string;
export declare const candidNumberArrayToBigInt: (array: number[]) => bigint;