@fruitsjs/core
Version:
Principal package with functions and models for building Fruits Eco-Blockchain applications.
18 lines (15 loc) • 559 B
text/typescript
import {ChainService} from '../../../service/chainService';
import {Block} from '../../../typings/block';
/**
* Use with [[ApiComposer]] and belongs to [[BlockApi]].
*
* See details at [[BlockApi.getBlockById]]
* @module core.api.factories
*/
export const getBlockById = (service: ChainService):
(block: string, includeTransactions: boolean) => Promise<Block> =>
(block: string, includeTransactions: boolean): Promise<Block> =>
service.query('getBlock', {
block,
includeTransactions
});