ecashaddrjs
Version:
eCash cashaddr address format support for Node.js and web browsers.
14 lines (13 loc) • 675 B
TypeScript
/**
* Converts an array of integers made up of 'from' bits into an
* array of integers made up of 'to' bits. The output array is
* zero-padded if necessary, unless strict mode is true.
* Throws a {@link ValidationError} if input is invalid.
* Original by Pieter Wuille: https://github.com/sipa/bech32.
*
* @param data Array of integers made up of 'from' bits.
* @param from Length in bits of elements in the input array.
* @param to Length in bits of elements in the output array.
* @param strictMode Require the conversion to be completed without padding.
*/
export default function (data: Uint8Array, from: number, to: number, strictMode?: boolean): Uint8Array;