/** * Original work Copyright (c) 2019 Burst Apps Team */ import {ChainService} from '../../../service/chainService'; import {Account} from '../../../typings/account'; import {GetAccountArgs} from '../../../typings/args/getAccountArgs'; /** * Use with [[ApiComposer]] and belongs to [[AccountApi]]. * * See details at [[AccountApi.getAccount]] * @module core.api.factories */ export const getAccount = (service: ChainService): (args: GetAccountArgs) => Promise => (args: GetAccountArgs): Promise => { const params = { account: args.accountId, height : args.commitmentAtHeight, getCommittedAmount : args.includeCommittedAmount, estimateCommitment : args.includeEstimatedCommitment }; return service.query('getAccount', params); };