1
0
mirror of https://github.com/oceanprotocol-archive/squid-js.git synced 2024-02-02 15:31:51 +01:00

added created attribute on DDO

This commit is contained in:
Pedro Gutiérrez 2019-02-13 14:31:33 +01:00 committed by Pedro Gutiérrez
parent 2d4cd891b3
commit 05efcc3ff1

View File

@ -38,13 +38,15 @@ export class DDO {
* DID, descentralized ID.
* @type {string}
*/
public id: string
public publicKey: PublicKey[]
public authentication: Authentication[]
public service: Service[]
public proof: Proof
id: string
created: string
publicKey: PublicKey[]
authentication: Authentication[]
service: Service[]
proof: Proof
public constructor(ddo?: Partial<DDO>) {
this.created = (ddo && ddo.created) || new Date(Date.now()).toISOString().replace(/\.[0-9]{3}/, "")
this.authentication = (ddo && ddo.authentication) || []
this.id = (ddo && ddo.id) || null
this.publicKey = (ddo && ddo.publicKey) || []