mirror of
https://github.com/oceanprotocol/ocean.js.git
synced 2024-11-26 20:39:05 +01:00
BestPrice interface
This commit is contained in:
parent
aa58431629
commit
d3b47d618b
@ -4,6 +4,7 @@ import { Proof } from './interfaces/Proof'
|
|||||||
import { PublicKey } from './interfaces/PublicKey'
|
import { PublicKey } from './interfaces/PublicKey'
|
||||||
import { Service, ServiceType } from './interfaces/Service'
|
import { Service, ServiceType } from './interfaces/Service'
|
||||||
import Web3Provider from '../datatokens/Web3Provider'
|
import Web3Provider from '../datatokens/Web3Provider'
|
||||||
|
import { BestPrice } from './interfaces/BestPrice'
|
||||||
/**
|
/**
|
||||||
* DID Descriptor Object.
|
* DID Descriptor Object.
|
||||||
* Contains all the data related to an asset.
|
* Contains all the data related to an asset.
|
||||||
@ -51,11 +52,7 @@ export class DDO {
|
|||||||
|
|
||||||
public proof: Proof
|
public proof: Proof
|
||||||
|
|
||||||
public dtBalance: number
|
public price: BestPrice
|
||||||
|
|
||||||
public OceanBalance: number
|
|
||||||
|
|
||||||
public dtPrice: number
|
|
||||||
|
|
||||||
public constructor(ddo: Partial<DDO> = {}) {
|
public constructor(ddo: Partial<DDO> = {}) {
|
||||||
Object.assign(this, ddo, {
|
Object.assign(this, ddo, {
|
||||||
|
7
src/ddo/interfaces/BestPrice.ts
Normal file
7
src/ddo/interfaces/BestPrice.ts
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
export interface BestPrice {
|
||||||
|
type: 'pool' | 'exchange'
|
||||||
|
address: string
|
||||||
|
value: number
|
||||||
|
ocean?: number
|
||||||
|
datatoken?: number
|
||||||
|
}
|
@ -1,5 +1,6 @@
|
|||||||
export * from './AdditionalInformation'
|
export * from './AdditionalInformation'
|
||||||
export * from './Authentication'
|
export * from './Authentication'
|
||||||
|
export * from './BestPrice'
|
||||||
export * from './Curation'
|
export * from './Curation'
|
||||||
export * from './EditableMetadata'
|
export * from './EditableMetadata'
|
||||||
export * from './EditableMetadataLinks'
|
export * from './EditableMetadataLinks'
|
||||||
|
Loading…
x
Reference in New Issue
Block a user