diff --git a/src/ddo/Asset.ts b/src/ddo/Asset.ts index fa4deb23..180aeb0c 100644 --- a/src/ddo/Asset.ts +++ b/src/ddo/Asset.ts @@ -35,9 +35,21 @@ export interface AssetNft { * @type {number} */ state: 0 | 1 | 2 | 3 | 4 + + /** + * Contains the date of NFT creation. + * @type {string} + */ + created: string } export interface AssetDatatoken { + /** + * Contract address of the deployed ERC20 contract. + * @type {string} + */ + address: string + /** * Name of NFT set in contract. * @type {string} @@ -50,12 +62,6 @@ export interface AssetDatatoken { */ symbol: string - /** - * Contract address of the deployed ERC20 contract. - * @type {string} - */ - address: string - /** * ID of the service the datatoken is attached to. * @type {string} @@ -68,6 +74,7 @@ export interface AssetLastEvent { block: number from: string contract: string + datetime: string } export class Asset extends DDO { @@ -93,17 +100,17 @@ export class Asset extends DDO { * The stats section contains different statistics fields. * @type {string} */ - stats: { consume: number } + stats: { + /** + * How often an asset was consumed, meaning how often it was either downloaded or used as part of a compute job. + * @type {string} + */ + consume: number - /** - * If asset is listed in purgatory and reason. - * @type {string} - */ - isInPurgatory: string - - /** - * Name of NFT set in contract. - * @type {AssetDatatoken} - */ - dataTokenInfo: AssetDatatoken // To be removed + /** + * If asset is listed in purgatory and reason. + * @type {string} + */ + isInPurgatory: string + } } diff --git a/src/ddo/DDO.ts b/src/ddo/DDO.ts index 465e4aab..8808b384 100644 --- a/src/ddo/DDO.ts +++ b/src/ddo/DDO.ts @@ -8,7 +8,7 @@ import { Credentials } from './Credentials' */ export class DDO { /** - * Contexts used for validation.. + * Contexts used for validation. * @type {string[]} */ public '@context': string[] diff --git a/src/ddo/Service.ts b/src/ddo/Service.ts index 12922209..c5b447b7 100644 --- a/src/ddo/Service.ts +++ b/src/ddo/Service.ts @@ -89,6 +89,12 @@ export interface ServiceComputeOptions { } export interface Service { + /** + * Unique ID + * @type {string} + */ + id: string + /** * Type of service (access, compute, wss. * @type {string} @@ -133,7 +139,7 @@ export interface Service { /** * If service is of typecompute, holds information about the compute-related privacy settings & resources. - * @type {string} + * @type {ServiceComputeOptions} */ compute?: ServiceComputeOptions }