UNPKG

@dip1059/bitcoinjs-lib

Version:

bitcoinjs-lib with some other btc based network support. Cloned from https://github.com/junderw/bitcoinjs-lib/tree/cashv5

15 lines (14 loc) 749 B
/** * 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 {Uint8Array} data Array of integers made up of 'from' bits. * @param {number} from Length in bits of elements in the input array. * @param {number} to Length in bits of elements in the output array. * @param {bool} strictMode Require the conversion to be completed without padding. * @returns {Uint8Array} */ export declare function convertBits(data: Uint8Array, from: number, to: number, strictMode?: boolean): Uint8Array;