mirror of
https://github.com/pezkuwichain/pezkuwi-common.git
synced 2026-04-22 06:47:57 +00:00
15 lines
387 B
TypeScript
15 lines
387 B
TypeScript
import { BN } from '../bn/index.js';
|
|
/**
|
|
* @name compactToU8a
|
|
* @description Encodes a number into a compact representation
|
|
* @example
|
|
* <BR>
|
|
*
|
|
* ```javascript
|
|
* import { compactToU8a } from '@pezkuwi/util';
|
|
*
|
|
* console.log(compactToU8a(511, 32)); // Uint8Array([0b11111101, 0b00000111])
|
|
* ```
|
|
*/
|
|
export declare function compactToU8a(value: BN | bigint | number): Uint8Array;
|