mirror of
https://github.com/oceanprotocol/ocean.js.git
synced 2024-11-26 20:39:05 +01:00
Adding event to DDO (#965)
This commit is contained in:
parent
e3dfca6768
commit
b72ff97c63
@ -8,6 +8,7 @@ import { BestPrice } from './interfaces/BestPrice'
|
||||
import { DataTokenInfo } from './interfaces/DataTokenInfo'
|
||||
import { PurgatoryData } from './interfaces/PurgatoryData'
|
||||
import { Credentials } from './interfaces/Credentials'
|
||||
import { Event } from './interfaces/Event'
|
||||
/**
|
||||
* DID Descriptor Object.
|
||||
* Contains all the data related to an asset.
|
||||
@ -67,6 +68,8 @@ export class DDO {
|
||||
|
||||
public chainId?: number
|
||||
|
||||
public event?: Event
|
||||
|
||||
public constructor(ddo: Partial<DDO> = {}) {
|
||||
Object.assign(this, ddo, {
|
||||
created: (ddo && ddo.created) || new Date().toISOString().replace(/\.[0-9]{3}/, '')
|
||||
|
7
src/ddo/interfaces/Event.d.ts
vendored
Normal file
7
src/ddo/interfaces/Event.d.ts
vendored
Normal file
@ -0,0 +1,7 @@
|
||||
export interface Event {
|
||||
blockNo: number
|
||||
contract: string
|
||||
from: string
|
||||
txid: string
|
||||
update: boolean
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user