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:
commit
aaec41aac4
@ -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}/, '')
|
||||
|
11
src/ddo/interfaces/DataTokenInfo.ts
Normal file
11
src/ddo/interfaces/DataTokenInfo.ts
Normal 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
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user