Functions

compactAddLength

▸ compactAddLength(input: Uint8Array): Uint8Array

Defined in compact/addLength.ts:20

name: compactAddLength

description: Adds a length prefix to the input value

example:

import { compactAddLength } from '@polkadot/util';

console.log(compactAddLength(new Uint8Array([0xde, 0xad, 0xbe, 0xef]))); // Uint8Array([4 << 2, 0xde, 0xad, 0xbe, 0xef])
1
2
3

Parameters:

Name Type
input Uint8Array

Returns: Uint8Array


Last Updated: 2/26/2019, 11:35:18 AM