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:
parent
2d4cd891b3
commit
05efcc3ff1
@ -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) || []
|
||||
|
Loading…
Reference in New Issue
Block a user