UNPKG

@iam4x/bsc-scan

Version:

An efficient BNB and token balance scanner

19 lines 846 B
/** * Split an array per `size` items. * * @param {T[]} input * @param {number} size * @return {T[][]} An array of arrays of the specified type. * @template T */ export declare const chunk: <T>(input: T[], size: number) => T[][]; /** * Batch the function calls to `handler` per `size` items. * * @param {(addresses: string[] | number[]) => Promise<BigNumber[]>} handler A function that takes a batch of addresses and returns the balance for the addresses. * @param {number} size The size of the batches. * @param {string[] | number[]} addresses The addresses to batch. * @return {Promise<BigNumber[]>} A promise with the balances. */ export declare const batch: <T = bigint>(handler: (addresses: string[] | number[]) => Promise<T[]>, size: number, addresses: string[] | number[]) => Promise<T[]>; //# sourceMappingURL=batch.d.ts.map