1
0
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:
Matthias Kretschmann 2020-10-08 12:11:21 +02:00
parent aa58431629
commit d3b47d618b
Signed by: m
GPG Key ID: 606EEEF3C479A91F
3 changed files with 10 additions and 5 deletions

View File

@ -4,6 +4,7 @@ import { Proof } from './interfaces/Proof'
import { PublicKey } from './interfaces/PublicKey'
import { Service, ServiceType } from './interfaces/Service'
import Web3Provider from '../datatokens/Web3Provider'
import { BestPrice } from './interfaces/BestPrice'
/**
* DID Descriptor Object.
* Contains all the data related to an asset.
@ -51,11 +52,7 @@ export class DDO {
public proof: Proof
public dtBalance: number
public OceanBalance: number
public dtPrice: number
public price: BestPrice
public constructor(ddo: Partial<DDO> = {}) {
Object.assign(this, ddo, {

View File

@ -0,0 +1,7 @@
export interface BestPrice {
type: 'pool' | 'exchange'
address: string
value: number
ocean?: number
datatoken?: number
}

View File

@ -1,5 +1,6 @@
export * from './AdditionalInformation'
export * from './Authentication'
export * from './BestPrice'
export * from './Curation'
export * from './EditableMetadata'
export * from './EditableMetadataLinks'