DDO Schema
mermaid
classDiagram
class `W3C Verifiable Presentation` {
}
class `OE Service Credential` {
}
class `W3C Verifiable Credential` {
}
class CredentialSubject {
}
`W3C Verifiable Presentation` "1" --> "1..*" `OE Service Credential` : contains
`OE Service Credential` "1" --> "1" CredentialSubject : defines
`W3C Verifiable Credential` <|-- `OE Service Credential` : is a type of
Verifiable Presentation (off-chain metadata object)
Attribute | Type | Description | Required |
---|---|---|---|
@context | Array of string | The value of the @context property MUST be an ordered set where the first item is a URL with the value https://www.w3.org/ns/credentials/v2 . Subsequent items in the ordered set MUST be composed of any combination of URLs and/or objects, where each is processable as a JSON-LD Context. | ✅ |
type | Array of string | ["VerifiablePresentation", "OceanEnterpriseServicePresentation"] | ✅ |
verifiableCredential | Array of VerifiableCredential | Contains Verifiable credentials in enveloped format (EnvelopedVerifiableCredential ) . | ✅ |
OE Service Credential (DDO)
This is a W3C verifiable credential.
Attribute | Type | Description | Required |
---|---|---|---|
@context | Array of string | The value of the @context property MUST be an ordered set where the first item is a URL with the value https://www.w3.org/ns/credentials/v2 . Subsequent items in the ordered set MUST be composed of any combination of URLs and/or objects, where each is processable as a JSON-LD Context. | ✅ |
id | string (URL) | If present, the value of the id property MUST be a single URL, which MAY be dereferenceable. It is RECOMMENDED that the URL in the id be one which, if dereferenceable, results in a document containing machine-readable information about the id . | The id property is OPTIONAL. |
type | Array of string | ["VerifiableCredential", "OceanEnterpriseServiceCredential"] | ✅ |
credentialSubject | credentialSubject | A verifiable credential MUST have a credentialSubject property. | ✅ |
issuer | string (URL) | A verifiable credential MUST have an issuer property. The value of the issuer property MUST be either a URL, or an object containing an id property whose value is a URL; in either case, the issuer selects this URL to identify itself in a globally unambiguous way. It is RECOMMENDED that the URL be one which, if dereferenced, results in a controller document, as defined in [VC-DATA-INTEGRITY] or [VC-JOSE-COSE], about the issuer that can be used to verify the information expressed in the credential. More info here. | ✅ |
version | string | Version number of "OE Service Credential" standard in SemVer notation referring to this DDO spec version, like 1.0.0 . |
credentialSubject
mermaid
---
title: CredentialSubject
---
classDiagram
class CredentialSubject {
}
class Metadata {
}
class Credentials {
}
class AlgorithmMetadata["AlgorithmMetadata\n(for algorithm type)"] {
}
class Container {
}
class Service {
}
class ConsumerParameters["Consumer\nParameters"] {
}
class Compute {
}
CredentialSubject "1" --> "1" Metadata
CredentialSubject "1" --> "0..*" Credentials
CredentialSubject "1" --> "1..*" Service
Metadata "1" --> "0..1" AlgorithmMetadata
AlgorithmMetadata "1" --> "1" Container
AlgorithmMetadata "1" --> "0..*" ConsumerParameters
Service "1" --> "0..1" Compute
Service "1" --> "0..*" ConsumerParameters
Attribute | Type | Description | Required |
---|---|---|---|
id | If present, the value of the id property MUST be a single URL, which MAY be dereferenceable. It is RECOMMENDED that the URL in the id be one which, if dereferenceable, results in a document containing machine-readable information about the id . | The id property is OPTIONAL. | |
metadata | metadata | ✅ | |
services | Array of service | ✅ | |
credentials | credentials | ✅ TODO discuss new secure default | |
chainId | number | Stores the chainId of the network the DDO was published to. | ✅ |
nftAddress | string | NFT contract linked to this asset | ✅ |