Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
public iterBlocks(options: IterOptions = {}): AsyncIterable {
return AsyncIterableX.from(this.getProvider()).pipe(flatMap((provider) => provider.iterBlocks(options)));
}
public iterActionsRaw(options: IterOptions = {}): AsyncIterable {
return AsyncIterableX.from(this.iterBlocks(options)).pipe(
flatMap(async (block) => {
const actions = _.flatten(
block.transactions.map((transaction) => {
if (transaction.type === 'InvocationTransaction') {
return [...transaction.invocationData.actions];
}
return [];
}),
);
return AsyncIterableX.of(...actions);
}),
);
}
public iterActionsRaw(options: IterOptions = {}): AsyncIterable {
return AsyncIterableX.from(this.getProvider()).pipe(
flatMap((provider) => provider.iterActionsRaw(options)),
);
}