mirror of
https://github.com/oceanprotocol/docs.git
synced 2024-11-26 19:49:26 +01:00
add nft to enhanced DDO section
This commit is contained in:
parent
cd47fd60c3
commit
691bf70881
@ -1,5 +1,5 @@
|
|||||||
---
|
---
|
||||||
title: DIDs & DDOs - Asset Identifiers & Objects
|
title: DIDs & DDOs
|
||||||
description: Specification of Ocean asset identifiers and objects using DIDs & DDOs
|
description: Specification of Ocean asset identifiers and objects using DIDs & DDOs
|
||||||
slug: /concepts/did-ddo/
|
slug: /concepts/did-ddo/
|
||||||
section: concepts
|
section: concepts
|
||||||
@ -13,8 +13,7 @@ Decentralized identifiers (DIDs) are a type of identifier that enables verifiabl
|
|||||||
|
|
||||||
A DID Document (DDO) is JSON blob that holds information about the DID. Given a DID, a _resolver_ will return the DDO of that DID.
|
A DID Document (DDO) is JSON blob that holds information about the DID. Given a DID, a _resolver_ will return the DDO of that DID.
|
||||||
|
|
||||||
If a DID is the index key in a key-value pair, then the DID Document is the value to which the index key points.
|
If a DID is the index key in a key-value pair, then the DID Document is the value to which the index key points. The combination of a DID and its associated DID Document forms the root record for a decentralized identifier.
|
||||||
The combination of a DID and its associated DID Document forms the root record for a decentralized identifier.
|
|
||||||
|
|
||||||
DIDs and DDOs follow the [specification defined by the World Wide Web Consortium (W3C)](https://w3c-ccg.github.io/did-spec/).
|
DIDs and DDOs follow the [specification defined by the World Wide Web Consortium (W3C)](https://w3c-ccg.github.io/did-spec/).
|
||||||
|
|
||||||
@ -113,17 +112,15 @@ The object has the following attributes.
|
|||||||
| **`tags`** | Array of Text | No | Array of keywords or tags used to describe this content. Empty by default. |
|
| **`tags`** | Array of Text | No | Array of keywords or tags used to describe this content. Empty by default. |
|
||||||
| **`additionalInformation`** | Object | No | Stores additional information, this is customizable by publisher |
|
| **`additionalInformation`** | Object | No | Stores additional information, this is customizable by publisher |
|
||||||
|
|
||||||
Depending on the asset type (dataset, algorithm), there are different metadata attributes supported:
|
|
||||||
|
|
||||||
### Algorithm attributes
|
### Algorithm attributes
|
||||||
|
|
||||||
An asset of type `algorithm` has the following additional attributes under `algorithm` in metadata object:
|
An asset of type `algorithm` has the following additional attributes under `algorithm` in metadata object:
|
||||||
|
|
||||||
| Attribute | Type | Required | Description |
|
| Attribute | Type | Required | Description |
|
||||||
| --------------- | ------------------ | -------- | -------------------------------------------------------- |
|
| --------------- | ------------------ | -------- | ------------------------------------------------------- |
|
||||||
| **`language`** | `string` | no | Language used to implement the software |
|
| **`language`** | `string` | no | Language used to implement the software |
|
||||||
| **`version`** | `string` | no | Version of the software. |
|
| **`version`** | `string` | no | Version of the software. |
|
||||||
| **`container`** | `Container Object` | yes | Object describing the Docker container image.(see below) |
|
| **`container`** | `Container Object` | yes | Object describing the Docker container image. See below |
|
||||||
|
|
||||||
The `container` object has the following attributes:
|
The `container` object has the following attributes:
|
||||||
|
|
||||||
@ -136,38 +133,37 @@ The `container` object has the following attributes:
|
|||||||
|
|
||||||
## Services
|
## Services
|
||||||
|
|
||||||
| Attribute | Type | Required | Description |
|
| Attribute | Type | Required | Description |
|
||||||
| ---------------------- | --------------------- | -------- | ----------------------------------------------------------------------------------------------------------------------------------------- |
|
| ---------------------- | --------------------- | -------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------- |
|
||||||
| **`type`** | Text | **Yes** | Type of service (access, compute, wss, etc |
|
| **`type`** | Text | **Yes** | Type of service (access, compute, wss, etc |
|
||||||
| **`name`** | Text | No | Service friendly name |
|
| **`name`** | Text | No | Service friendly name |
|
||||||
| **`description`** | Text | No | Service description |
|
| **`description`** | Text | No | Service description |
|
||||||
| **`datatokenAddress`** | Text | Yes | Datatoken address |
|
| **`datatokenAddress`** | Text | Yes | Datatoken address |
|
||||||
| **`providerEndpoint`** | Text | **Yes** | Provider URI |
|
| **`providerEndpoint`** | Text | **Yes** | Provider URI |
|
||||||
| **`timeout`** | Number | **Yes** | describing how long the sevice can be used after consumption is initiated. A timeout of 0 represents no time limit. Expressed in seconds. |
|
| **`timeout`** | Number | **Yes** | describing how long the sevice can be used after consumption is initiated. A timeout of 0 represents no time limit. Expressed in seconds. |
|
||||||
| **`files`** | Array of files object | **No ** | Array of `File` objects including the encrypted file urls that overwrites the root files object for this service [Files](#files) |
|
| **`files`** | Array of files object | **Yes** | Array of `File` objects for publishing. These will be transformed to `encryptedFiles` during publish process. See [Files](#files) |
|
||||||
|
| **`privacy`** | Object | **Yes for compute assets** | If asset is of compute `type`, holds information about the compute-ralyted privacy settings. |
|
||||||
|
|
||||||
Depending on the service type, the following attributes are applied:
|
### Compute Privacy Attributes
|
||||||
|
|
||||||
### Compute datasets attributes
|
An asset with a service of `type` `compute` has the following additional attributes under the `privacy` object. This object is required if the asset is of `type` `compute`.
|
||||||
|
|
||||||
An asset with a service of type `compute` has the following additional attributes under `privacy` object :
|
|
||||||
|
|
||||||
| Attribute | Type | Required | Description |
|
| Attribute | Type | Required | Description |
|
||||||
| ------------------------------------------ | ------------------------------------- | -------- | ------------------------------------------------------------------------------------------------------------------ |
|
| ------------------------------------------ | ------------------------------------- | -------- | ------------------------------------------------------------------------------------------------------------------ |
|
||||||
| **`allowRawAlgorithm`** | `boolean` | yes | If True, a drag & drop algo can be runned |
|
| **`allowRawAlgorithm`** | `boolean` | yes | If `true`, a drag & drop algorithm can be run |
|
||||||
| **`allowNetworkAccess`** | `boolean` | yes | If True, the algo job will have network access (stil WIP) |
|
| **`allowNetworkAccess`** | `boolean` | yes | If `true`, the algorithm job will have network access (still WIP) |
|
||||||
| **`publisherTrustedAlgorithmPublishers `** | Array of `String` | yes | If Empty , then any published algo is allowed. Otherwise, only published algorithms by some publishers are allowed |
|
| **`publisherTrustedAlgorithmPublishers `** | Array of `String` | yes | If Empty , then any published algo is allowed. Otherwise, only published algorithms by some publishers are allowed |
|
||||||
| **`publisherTrustedAlgorithms `** | Array of `publisherTrustedAlgorithms` | yes | If Empty , then any published algo is allowed. (see below) |
|
| **`publisherTrustedAlgorithms `** | Array of `publisherTrustedAlgorithms` | yes | If Empty , then any published algo is allowed. (see below) |
|
||||||
|
|
||||||
The `publisherTrustedAlgorithms ` is an array of objects with the following structure:
|
The `publisherTrustedAlgorithms ` is an array of objects with the following structure:
|
||||||
|
|
||||||
| Attribute | Type | Required | Description |
|
| Attribute | Type | Required | Description |
|
||||||
| ------------------------------ | -------- | -------- | ------------------------------------------------------------------ |
|
| ------------------------------ | -------- | -------- | -------------------------------------------------------------- |
|
||||||
| **`did`** | `string` | yes | The did of the algo which is trusted by the publisher. |
|
| **`did`** | `string` | yes | The DID of the algorithm which is trusted by the publisher. |
|
||||||
| **`filesChecksum`** | `string` | yes | Hash of ( algorithm's encryptedFiles + files section (as string) ) |
|
| **`filesChecksum`** | `string` | yes | Hash of algorithm's encryptedFiles + files section (as string) |
|
||||||
| **`containerSectionChecksum`** | `string` | yes | Hash of the algorithm container section (as string) |
|
| **`containerSectionChecksum`** | `string` | yes | Hash of the algorithm container section (as string) |
|
||||||
|
|
||||||
To produce filesChecksum:
|
To produce `filesChecksum`:
|
||||||
|
|
||||||
```js
|
```js
|
||||||
sha256(
|
sha256(
|
||||||
@ -176,7 +172,7 @@ sha256(
|
|||||||
)
|
)
|
||||||
```
|
```
|
||||||
|
|
||||||
To produce containerSectionChecksum:
|
To produce `containerSectionChecksum`:
|
||||||
|
|
||||||
```js
|
```js
|
||||||
sha256(
|
sha256(
|
||||||
@ -349,15 +345,41 @@ _Aquarius_ should always check the hash after data is decrypted via a _Provider_
|
|||||||
|
|
||||||
The following fields are added by Aquarius in its DDO response for convenience reasons. These are never stored on chain, and not taken into consideration when [hashing the DDO](#ddo-hash).
|
The following fields are added by Aquarius in its DDO response for convenience reasons. These are never stored on chain, and not taken into consideration when [hashing the DDO](#ddo-hash).
|
||||||
|
|
||||||
|
### NFT
|
||||||
|
|
||||||
|
The `nft` object contains information on the NFT contract.
|
||||||
|
|
||||||
|
| Attribute | Type | Description |
|
||||||
|
| ------------- | -------- | --------------------------------------------- |
|
||||||
|
| **`address`** | `string` | Contract address of the deployed NFT contract |
|
||||||
|
| **`name`** | `string` | Name of NFT set in contract |
|
||||||
|
| **`symbol`** | `string` | Symbol of NFT set in contract |
|
||||||
|
| **`owner`** | `string` | ETH account address of the NFT owner |
|
||||||
|
|
||||||
|
Example:
|
||||||
|
|
||||||
|
```json
|
||||||
|
{
|
||||||
|
"nft": {
|
||||||
|
"adddress": "0x000000",
|
||||||
|
"name": "Ocean Protocol Asset v4",
|
||||||
|
"symbol": "OCEAN-A-v4",
|
||||||
|
"owner": "0x0000000"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
### Status
|
### Status
|
||||||
|
|
||||||
The `status` object contains the following attributes:
|
The `status` object contains attributes for marketplaces to implement various visibility states for an asset.
|
||||||
|
|
||||||
| Attribute | Type | Required | Description |
|
| Attribute | Type | Description |
|
||||||
| --------------------- | --------- | -------- | ------------------------------------------------------------------------- |
|
| --------------------- | --------- | ------------------------------------------------------------------------- |
|
||||||
| **`state`** | `number` | yes | State of the asset reflecting the NFT contract value. See [State](#state) |
|
| **`state`** | `number` | State of the asset reflecting the NFT contract value. See [State](#state) |
|
||||||
| **`isListed`** | `boolean` | no | If this asset should be displayed |
|
| **`isListed`** | `boolean` | If this asset should be displayed |
|
||||||
| **`isOrderDisabled`** | `boolean` | no | If this asset has ordering disabled |
|
| **`isOrderDisabled`** | `boolean` | If this asset has ordering disabled |
|
||||||
|
|
||||||
|
Example:
|
||||||
|
|
||||||
```json
|
```json
|
||||||
{
|
{
|
||||||
@ -371,7 +393,7 @@ The `status` object contains the following attributes:
|
|||||||
|
|
||||||
### Events
|
### Events
|
||||||
|
|
||||||
The `events` section contains informations about the transactions that created or updated the DDO.
|
The `events` section contains information about the transactions that created or updated the DDO which can be useful for displaying a metadata history for provenance reasons.
|
||||||
|
|
||||||
Example:
|
Example:
|
||||||
|
|
||||||
@ -390,9 +412,9 @@ Example:
|
|||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
### Stats
|
### Statistics
|
||||||
|
|
||||||
The `stats` section contains different statics fields.
|
The `stats` section contains different statistics fields.
|
||||||
|
|
||||||
Example:
|
Example:
|
||||||
|
|
||||||
@ -455,6 +477,12 @@ Example:
|
|||||||
},
|
},
|
||||||
|
|
||||||
// Enhanced Aquarius response begins here
|
// Enhanced Aquarius response begins here
|
||||||
|
"nft": {
|
||||||
|
"adddress": "0x000000",
|
||||||
|
"name": "Ocean Protocol Asset v4",
|
||||||
|
"symbol": "OCEAN-A-v4",
|
||||||
|
"owner": "0x0000000"
|
||||||
|
},
|
||||||
"status": {
|
"status": {
|
||||||
"state": 0,
|
"state": 0,
|
||||||
"isListed": true,
|
"isListed": true,
|
||||||
|
Loading…
Reference in New Issue
Block a user