@fruitsjs/core
Version:
Principal package with functions and models for building Fruits Eco-Blockchain applications.
14 lines (12 loc) • 446 B
text/typescript
import {ChainService} from '../../../service/chainService';
import {Asset} from '../../../typings/asset';
/**
* Use with [[ApiComposer]] and belongs to [[AssetApi]].
*
* See details at [[AssetApi.getAsset]]
* @module core.api.factories
* */
export const getAsset = (service: ChainService):
(assetId: string) => Promise<Asset> =>
(assetId: string): Promise<Asset> =>
service.query('getAsset', {asset: assetId});