@fruitsjs/core
Version:
Principal package with functions and models for building Fruits Eco-Blockchain applications.
16 lines (14 loc) • 457 B
text/typescript
import {ChainService} from '../../../service/chainService';
import {BlockId} from '../../..';
/**
* Use with [[ApiComposer]] and belongs to [[BlockApi]].
*
* See details at [[BlockApi.getBlockId]]
* @module core.api.factories
*/
export const getBlockId = (service: ChainService):
(height: number) => Promise<BlockId> =>
(height: number): Promise<BlockId> =>
service.query('getBlockId', {
height,
});