UNPKG

391 BTypeScriptView Raw
1/**
2 * @name compactAddLength
3 * @description Adds a length prefix to the input value
4 * @example
5 * <BR>
6 *
7 * ```javascript
8 * import { compactAddLength } from '@polkadot/util';
9 *
10 * console.log(compactAddLength(new Uint8Array([0xde, 0xad, 0xbe, 0xef]))); // Uint8Array([4 << 2, 0xde, 0xad, 0xbe, 0xef])
11 * ```
12 */
13export declare function compactAddLength(input: Uint8Array): Uint8Array;