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

small adjustments

This commit is contained in:
Bogdan Fazakas 2021-11-15 10:51:26 +02:00
parent cd942b7f10
commit 084076e938
3 changed files with 33 additions and 20 deletions

View File

@ -35,9 +35,21 @@ export interface AssetNft {
* @type {number} * @type {number}
*/ */
state: 0 | 1 | 2 | 3 | 4 state: 0 | 1 | 2 | 3 | 4
/**
* Contains the date of NFT creation.
* @type {string}
*/
created: string
} }
export interface AssetDatatoken { export interface AssetDatatoken {
/**
* Contract address of the deployed ERC20 contract.
* @type {string}
*/
address: string
/** /**
* Name of NFT set in contract. * Name of NFT set in contract.
* @type {string} * @type {string}
@ -50,12 +62,6 @@ export interface AssetDatatoken {
*/ */
symbol: string symbol: string
/**
* Contract address of the deployed ERC20 contract.
* @type {string}
*/
address: string
/** /**
* ID of the service the datatoken is attached to. * ID of the service the datatoken is attached to.
* @type {string} * @type {string}
@ -68,6 +74,7 @@ export interface AssetLastEvent {
block: number block: number
from: string from: string
contract: string contract: string
datetime: string
} }
export class Asset extends DDO { export class Asset extends DDO {
@ -93,17 +100,17 @@ export class Asset extends DDO {
* The stats section contains different statistics fields. * The stats section contains different statistics fields.
* @type {string} * @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. * If asset is listed in purgatory and reason.
* @type {string} * @type {string}
*/ */
isInPurgatory: string isInPurgatory: string
}
/**
* Name of NFT set in contract.
* @type {AssetDatatoken}
*/
dataTokenInfo: AssetDatatoken // To be removed
} }

View File

@ -8,7 +8,7 @@ import { Credentials } from './Credentials'
*/ */
export class DDO { export class DDO {
/** /**
* Contexts used for validation.. * Contexts used for validation.
* @type {string[]} * @type {string[]}
*/ */
public '@context': string[] public '@context': string[]

View File

@ -89,6 +89,12 @@ export interface ServiceComputeOptions {
} }
export interface Service { export interface Service {
/**
* Unique ID
* @type {string}
*/
id: string
/** /**
* Type of service (access, compute, wss. * Type of service (access, compute, wss.
* @type {string} * @type {string}
@ -133,7 +139,7 @@ export interface Service {
/** /**
* If service is of typecompute, holds information about the compute-related privacy settings & resources. * If service is of typecompute, holds information about the compute-related privacy settings & resources.
* @type {string} * @type {ServiceComputeOptions}
*/ */
compute?: ServiceComputeOptions compute?: ServiceComputeOptions
} }