/** * Original work Copyright (c) 2019 Burst Apps Team */ import {ChainService} from '../../../service/chainService'; import {Block} from '../../../typings/block'; /** * Use with [[ApiComposer]] and belongs to [[BlockApi]]. * * See details at [[BlockApi.getBlockByTimestamp]] * @module core.api.factories */ export const getBlockByTimestamp = (service: ChainService): (timestamp: number, includeTransactions: boolean) => Promise => (timestamp: number, includeTransactions: boolean): Promise => service.query('getBlock', { timestamp, includeTransactions });