From 4abe5fc451d7ed3e24d6aad66d3f55e0122c0952 Mon Sep 17 00:00:00 2001 From: Jamie Hewitt Date: Tue, 15 Nov 2022 23:23:24 +0300 Subject: [PATCH] Updating types to include the price which is sent from Aquarius (#1651) * Updating types to include the price which is sent from Aquarius * Adding comments for AssetPrice * Making Price required in Stats --- src/@types/Asset.ts | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/src/@types/Asset.ts b/src/@types/Asset.ts index 308026f3..a16cde98 100644 --- a/src/@types/Asset.ts +++ b/src/@types/Asset.ts @@ -90,6 +90,25 @@ export interface AssetDatatoken { serviceId: string } +export interface AssetPrice { + /** + * The price of the asset expressed as a number. If 0 then the price is FREE. + * @type {number} + */ + value: number + + /** + * The symbol that the price of the asset is expressed in. + * @type {string} + */ + tokenSymbol?: string + + /** + * The address of the token that the price needs to be paid in. + * @type {string} + */ + tokenAddress?: string +} export interface Stats { /** * How often an asset was consumed, meaning how often it was either downloaded or used as part of a compute job. @@ -97,6 +116,12 @@ export interface Stats { */ orders: number + /** + * Contains information about the price of this asset. + * @type {AssetPrice} + */ + price: AssetPrice + /** * Total amount of veOCEAN allocated on this asset. * @type {number}