UNPKG

@exromany/lido-csm-sdk

Version:

[![GitHub license](https://img.shields.io/github/license/lidofinance/lido-csm-sdk?color=limegreen)](https://github.com/lidofinance/lido-csm-sdk/blob/main/LICENSE.txt) [![Version npm](https://img.shields.io/npm/v/@lidofinance/lido-csm-sdk?label=version)](h

18 lines 506 B
export const filterBatches = (allBatches) => { const result = []; let nextIndex = 0n; for (const batch of allBatches) { if (!nextIndex || nextIndex >= batch.batchIndex) { result.push(transformBatch(batch)); nextIndex = batch.nextBatchIndex; } } return result; }; const transformBatch = (batch) => { return { nodeOperatorId: batch.nodeOperatorId, keysCount: batch.keysCount, }; }; //# sourceMappingURL=filter-batches.js.map