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

Merge pull request #363 from oceanprotocol/feature/ddo_datatokenInfo

add ddo.datatokeninfo
This commit is contained in:
Alex Coseru 2020-10-14 21:18:24 +03:00 committed by GitHub
commit aaec41aac4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 14 additions and 0 deletions

View File

@ -5,6 +5,7 @@ import { PublicKey } from './interfaces/PublicKey'
import { Service, ServiceType } from './interfaces/Service'
import Web3Provider from '../datatokens/Web3Provider'
import { BestPrice } from './interfaces/BestPrice'
import { DataTokenInfo } from './interfaces/DataTokenInfo'
/**
* DID Descriptor Object.
* Contains all the data related to an asset.
@ -54,6 +55,8 @@ export class DDO {
public price: BestPrice
public dataTokenInfo?: DataTokenInfo
public constructor(ddo: Partial<DDO> = {}) {
Object.assign(this, ddo, {
created: (ddo && ddo.created) || new Date().toISOString().replace(/\.[0-9]{3}/, '')

View File

@ -0,0 +1,11 @@
export interface DataTokenInfo {
address: string
name: string
symbol: string
blob: string
decimals: number
totalSupply: number
cap: number
minter: string
minterBalance: number
}