@exromany/lido-csm-sdk
Version:
[](https://github.com/lidofinance/lido-csm-sdk/blob/main/LICENSE.txt) [](h
22 lines • 647 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.filterBatches = void 0;
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;
};
exports.filterBatches = filterBatches;
const transformBatch = (batch) => {
return {
nodeOperatorId: batch.nodeOperatorId,
keysCount: batch.keysCount,
};
};
//# sourceMappingURL=filter-batches.js.map