1
0
mirror of https://github.com/oceanprotocol/ocean.js.git synced 2024-11-26 20:39:05 +01:00

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
This commit is contained in:
Jamie Hewitt 2022-11-15 23:23:24 +03:00 committed by GitHub
parent b9b55fe170
commit 4abe5fc451
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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}