UNPKG

388 BTypeScriptView Raw
1import { BN } from '../bn/index.js';
2/**
3 * @name compactToU8a
4 * @description Encodes a number into a compact representation
5 * @example
6 * <BR>
7 *
8 * ```javascript
9 * import { compactToU8a } from '@polkadot/util';
10 *
11 * console.log(compactToU8a(511, 32)); // Uint8Array([0b11111101, 0b00000111])
12 * ```
13 */
14export declare function compactToU8a(value: BN | bigint | number): Uint8Array;