mirror of
https://github.com/oceanprotocol/docs.git
synced 2024-11-26 19:49:26 +01:00
Issue-#908: Fix image and did-ddo page link
This commit is contained in:
parent
572cae1393
commit
43d9265bd6
@ -15,7 +15,7 @@ Decentralized identifiers (DIDs) are a type of identifier that enable verifiable
|
|||||||
|
|
||||||
A DID Document (DDO) is a 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 a JSON blob that holds information about the DID. Given a DID, a _resolver_ will return the DDO of that DID.
|
||||||
|
|
||||||
## Rules for DIDs & DDOs
|
## Rules for DID & DDO
|
||||||
|
|
||||||
An _asset_ in Ocean represents a downloadable file, compute service, or similar. Each asset is a _resource_ under the control of a _publisher_. The Ocean network itself does _not_ store the actual resource (e.g. files).
|
An _asset_ in Ocean represents a downloadable file, compute service, or similar. Each asset is a _resource_ under the control of a _publisher_. The Ocean network itself does _not_ store the actual resource (e.g. files).
|
||||||
|
|
||||||
@ -129,7 +129,7 @@ Example:
|
|||||||
An asset of type `algorithm` has additional attributes under `metadata.algorithm`, describing the algorithm and the Docker environment it is supposed to be run under.
|
An asset of type `algorithm` has additional attributes under `metadata.algorithm`, describing the algorithm and the Docker environment it is supposed to be run under.
|
||||||
|
|
||||||
| Attribute | Type | Required | Description |
|
| Attribute | Type | Required | Description |
|
||||||
| --------------- | --------------------------- | -------- | ------------------------------------------------------------------------------------------ |
|
| ------------------------ | ------------------------------------------- | -------- | ------------------------------------------------------------------------------------------ |
|
||||||
| **`language`** | `string` | | Language used to implement the software. |
|
| **`language`** | `string` | | Language used to implement the software. |
|
||||||
| **`version`** | `string` | | Version of the software preferably in [SemVer](https://semver.org) notation. E.g. `1.0.0`. |
|
| **`version`** | `string` | | Version of the software preferably in [SemVer](https://semver.org) notation. E.g. `1.0.0`. |
|
||||||
| **`consumerParameters`** | [Consumer Parameters](#consumer-parameters) | | An object the defines required consumer input before running the algorithm |
|
| **`consumerParameters`** | [Consumer Parameters](#consumer-parameters) | | An object the defines required consumer input before running the algorithm |
|
||||||
@ -163,7 +163,7 @@ The `container` object has the following attributes defining the Docker image fo
|
|||||||
"tag": "latest",
|
"tag": "latest",
|
||||||
"checksum": "44e10daa6637893f4276bb8d7301eb35306ece50f61ca34dcab550"
|
"checksum": "44e10daa6637893f4276bb8d7301eb35306ece50f61ca34dcab550"
|
||||||
},
|
},
|
||||||
"consumerParameters":{},
|
"consumerParameters": {}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -176,7 +176,7 @@ Services define the access for an asset, and each service is represented by its
|
|||||||
An asset should have at least one service to be actually accessible, and can have as many services which make sense for a specific use case.
|
An asset should have at least one service to be actually accessible, and can have as many services which make sense for a specific use case.
|
||||||
|
|
||||||
| Attribute | Type | Required | Description |
|
| Attribute | Type | Required | Description |
|
||||||
| ---------------------- | --------------------------- | ------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------- |
|
| ------------------------ | ------------------------------------------- | ------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||||
| **`id`** | `string` | **✓** | Unique ID |
|
| **`id`** | `string` | **✓** | Unique ID |
|
||||||
| **`type`** | `string` | **✓** | Type of service (`access`, `compute`, `wss`, etc. |
|
| **`type`** | `string` | **✓** | Type of service (`access`, `compute`, `wss`, etc. |
|
||||||
| **`name`** | `string` | | Service friendly name |
|
| **`name`** | `string` | | Service friendly name |
|
||||||
@ -186,7 +186,7 @@ An asset should have at least one service to be actually accessible, and can hav
|
|||||||
| **`files`** | [Files](#files) | **✓** | Encrypted file URLs. |
|
| **`files`** | [Files](#files) | **✓** | Encrypted file URLs. |
|
||||||
| **`timeout`** | `number` | **✓** | Describing how long the service can be used after consumption is initiated. A timeout of `0` represents no time limit. Expressed in seconds. |
|
| **`timeout`** | `number` | **✓** | Describing how long the service can be used after consumption is initiated. A timeout of `0` represents no time limit. Expressed in seconds. |
|
||||||
| **`compute`** | [Compute](#compute-options) | **✓** (for compute assets only) | If service is of `type` `compute`, holds information about the compute-related privacy settings & resources. |
|
| **`compute`** | [Compute](#compute-options) | **✓** (for compute assets only) | If service is of `type` `compute`, holds information about the compute-related privacy settings & resources. |
|
||||||
| **`consumerParameters`** | [Consumer Parameters](#consumer-parameters) | | An object the defines required consumer input before consuming the asset|
|
| **`consumerParameters`** | [Consumer Parameters](#consumer-parameters) | | An object the defines required consumer input before consuming the asset |
|
||||||
|
|
||||||
#### Files
|
#### Files
|
||||||
|
|
||||||
@ -202,7 +202,6 @@ Example:
|
|||||||
|
|
||||||
During the publish process, file URLs must be encrypted with a respective _Provider_ API call before storing the DDO on-chain. For this an array of objects defining the storage access details are sent.
|
During the publish process, file URLs must be encrypted with a respective _Provider_ API call before storing the DDO on-chain. For this an array of objects defining the storage access details are sent.
|
||||||
|
|
||||||
|
|
||||||
Type of objects supported :
|
Type of objects supported :
|
||||||
|
|
||||||
<table>
|
<table>
|
||||||
@ -240,10 +239,10 @@ First class integrations supported in the future :
|
|||||||
<td>"ipfs"</td><td>IPFS files</td>
|
<td>"ipfs"</td><td>IPFS files</td>
|
||||||
<td>
|
<td>
|
||||||
|
|
||||||
```json
|
```json
|
||||||
[
|
[
|
||||||
{
|
{
|
||||||
"type":"ipfs",
|
"type": "ipfs",
|
||||||
"hash": "XXX"
|
"hash": "XXX"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
@ -257,7 +256,6 @@ First class integrations supported in the future :
|
|||||||
<tr><td>"sql"</td><td>Sql connection, dataset is generated by a query</td><td> </td></tr>
|
<tr><td>"sql"</td><td>Sql connection, dataset is generated by a query</td><td> </td></tr>
|
||||||
</table>
|
</table>
|
||||||
|
|
||||||
|
|
||||||
A service can contain multiple files, using multiple storage types.
|
A service can contain multiple files, using multiple storage types.
|
||||||
|
|
||||||
Example:
|
Example:
|
||||||
@ -268,7 +266,6 @@ Example:
|
|||||||
"type": "url",
|
"type": "url",
|
||||||
"url": "https://url.com/file1.csv",
|
"url": "https://url.com/file1.csv",
|
||||||
"method": "GET"
|
"method": "GET"
|
||||||
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"type": "ipfs",
|
"type": "ipfs",
|
||||||
@ -377,7 +374,6 @@ An asset with a service of `type` `compute` has the following additional attribu
|
|||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
|
|
||||||
|
|
||||||
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 |
|
||||||
@ -456,27 +452,26 @@ It's an array of elements, each element object defines a field.
|
|||||||
An element looks like:
|
An element looks like:
|
||||||
|
|
||||||
```json
|
```json
|
||||||
{
|
{
|
||||||
"name":"hometown",
|
"name": "hometown",
|
||||||
"type": "text",
|
"type": "text",
|
||||||
"label": "Hometown",
|
"label": "Hometown",
|
||||||
"required": true,
|
"required": true,
|
||||||
"description":"What is your hometown?",
|
"description": "What is your hometown?",
|
||||||
"default": "Nowhere",
|
"default": "Nowhere",
|
||||||
"options": []
|
"options": []
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
where:
|
where:
|
||||||
|
|
||||||
- name = defines the parameter name (this is sent as HTTP param or key towards algo)
|
- name = defines the parameter name (this is sent as HTTP param or key towards algo)
|
||||||
- type = defines the form type (text, number, select, boolean)
|
- type = defines the form type (text, number, select, boolean)
|
||||||
- label = defines the label which is displayed
|
- label = defines the label which is displayed
|
||||||
- required = if this field is mandatory to have a consumer input.
|
- required = if this field is mandatory to have a consumer input.
|
||||||
- default = default value
|
- default = default value
|
||||||
- description = description of this element
|
- description = description of this element
|
||||||
- options = for select types, a list of options
|
- options = for select types, a list of options
|
||||||
|
|
||||||
|
|
||||||
Example:
|
Example:
|
||||||
|
|
||||||
@ -536,7 +531,6 @@ Algorithms will have access to a JSON file located at /data/inputs/algoCustomDat
|
|||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
||||||
### Credentials
|
### Credentials
|
||||||
|
|
||||||
By default, a consumer can access a resource if they have 1 datatoken. _Credentials_ allow the publisher to optionally specify more fine-grained permissions.
|
By default, a consumer can access a resource if they have 1 datatoken. _Credentials_ allow the publisher to optionally specify more fine-grained permissions.
|
||||||
@ -622,14 +616,14 @@ Each asset has a state, which is held by the NFT contract. The possible states a
|
|||||||
|
|
||||||
The following fields are added by _Aquarius_ in its DDO response for convenience reasons, where an asset returned by _Aquarius_ inherits the DDO fields stored on-chain.
|
The following fields are added by _Aquarius_ in its DDO response for convenience reasons, where an asset returned by _Aquarius_ inherits the DDO fields stored on-chain.
|
||||||
|
|
||||||
These additional fields are never stored on-chain, and are never taken into consideration when [hashing the DDO](#ddo-hash).
|
These additional fields are never stored on-chain, and are never taken into consideration when [hashing the DDO](#ddo-checksum).
|
||||||
|
|
||||||
### NFT
|
### NFT
|
||||||
|
|
||||||
The `nft` object contains information about the ERC721 NFT contract which represents the intellectual property of the publisher.
|
The `nft` object contains information about the ERC721 NFT contract which represents the intellectual property of the publisher.
|
||||||
|
|
||||||
| Attribute | Type | Description |
|
| Attribute | Type | Description |
|
||||||
| ------------- | ---------------------- | ------------------------------------------------------------------------- |
|
| -------------- | ---------------------- | ------------------------------------------------------------------------- |
|
||||||
| **`address`** | `string` | Contract address of the deployed ERC721 NFT contract. |
|
| **`address`** | `string` | Contract address of the deployed ERC721 NFT contract. |
|
||||||
| **`name`** | `string` | Name of NFT set in contract. |
|
| **`name`** | `string` | Name of NFT set in contract. |
|
||||||
| **`symbol`** | `string` | Symbol of NFT set in contract. |
|
| **`symbol`** | `string` | Symbol of NFT set in contract. |
|
||||||
@ -736,7 +730,7 @@ Example:
|
|||||||
The `stats` section contains different statistics fields.
|
The `stats` section contains different statistics fields.
|
||||||
|
|
||||||
| Attribute | Type | Description |
|
| Attribute | Type | Description |
|
||||||
| -------------- | -------- | ------------------------------------------------------------------------------------------------------------- |
|
| ------------ | -------- | ------------------------------------------------------------------------------------------------------------ |
|
||||||
| **`orders`** | `number` | How often an asset was ordered, meaning how often it was either downloaded or used as part of a compute job. |
|
| **`orders`** | `number` | How often an asset was ordered, meaning how often it was either downloaded or used as part of a compute job. |
|
||||||
|
|
||||||
Example:
|
Example:
|
||||||
@ -767,7 +761,8 @@ Example:
|
|||||||
"author": "OPF",
|
"author": "OPF",
|
||||||
"license": "https://market.oceanprotocol.com/terms"
|
"license": "https://market.oceanprotocol.com/terms"
|
||||||
},
|
},
|
||||||
"services": [{
|
"services": [
|
||||||
|
{
|
||||||
"id": "1",
|
"id": "1",
|
||||||
"type": "access",
|
"type": "access",
|
||||||
"files": "0x044736da6dae39889ff570c34540f24e5e084f4e5bd81eff3691b729c2dd1465ae8292fc721e9d4b1f10f56ce12036c9d149a4dab454b0795bd3ef8b7722c6001e0becdad5caeb2005859642284ef6a546c7ed76f8b350480691f0f6c6dfdda6c1e4d50ee90e83ce3cb3ca0a1a5a2544e10daa6637893f4276bb8d7301eb35306ece50f61ca34dcab550b48181ec81673953d4eaa4b5f19a45c0e9db4cd9729696f16dd05e0edb460623c843a263291ebe757c1eb3435bb529cc19023e0f49db66ef781ca692655992ea2ca7351ac2882bf340c9d9cb523b0cbcd483731dc03f6251597856afa9a68a1e0da698cfc8e81824a69d92b108023666ee35de4a229ad7e1cfa9be9946db2d909735",
|
"files": "0x044736da6dae39889ff570c34540f24e5e084f4e5bd81eff3691b729c2dd1465ae8292fc721e9d4b1f10f56ce12036c9d149a4dab454b0795bd3ef8b7722c6001e0becdad5caeb2005859642284ef6a546c7ed76f8b350480691f0f6c6dfdda6c1e4d50ee90e83ce3cb3ca0a1a5a2544e10daa6637893f4276bb8d7301eb35306ece50f61ca34dcab550b48181ec81673953d4eaa4b5f19a45c0e9db4cd9729696f16dd05e0edb460623c843a263291ebe757c1eb3435bb529cc19023e0f49db66ef781ca692655992ea2ca7351ac2882bf340c9d9cb523b0cbcd483731dc03f6251597856afa9a68a1e0da698cfc8e81824a69d92b108023666ee35de4a229ad7e1cfa9be9946db2d909735",
|
||||||
@ -776,7 +771,8 @@ Example:
|
|||||||
"datatokenAddress": "0x123",
|
"datatokenAddress": "0x123",
|
||||||
"serviceEndpoint": "https://myprovider.com",
|
"serviceEndpoint": "https://myprovider.com",
|
||||||
"timeout": 0,
|
"timeout": 0,
|
||||||
"consumerParameters": [{
|
"consumerParameters": [
|
||||||
|
{
|
||||||
"name": "surname",
|
"name": "surname",
|
||||||
"type": "text",
|
"type": "text",
|
||||||
"label": "Name",
|
"label": "Name",
|
||||||
@ -807,7 +803,8 @@ Example:
|
|||||||
"allowRawAlgorithm": false,
|
"allowRawAlgorithm": false,
|
||||||
"allowNetworkAccess": true,
|
"allowNetworkAccess": true,
|
||||||
"publisherTrustedAlgorithmPublishers": ["0x234", "0x235"],
|
"publisherTrustedAlgorithmPublishers": ["0x234", "0x235"],
|
||||||
"publisherTrustedAlgorithms": [{
|
"publisherTrustedAlgorithms": [
|
||||||
|
{
|
||||||
"did": "did:op:123",
|
"did": "did:op:123",
|
||||||
"filesChecksum": "100",
|
"filesChecksum": "100",
|
||||||
"containerSectionChecksum": "200"
|
"containerSectionChecksum": "200"
|
||||||
@ -822,14 +819,18 @@ Example:
|
|||||||
}
|
}
|
||||||
],
|
],
|
||||||
"credentials": {
|
"credentials": {
|
||||||
"allow": [{
|
"allow": [
|
||||||
|
{
|
||||||
"type": "address",
|
"type": "address",
|
||||||
"values": ["0x123", "0x456"]
|
"values": ["0x123", "0x456"]
|
||||||
}],
|
}
|
||||||
"deny": [{
|
],
|
||||||
|
"deny": [
|
||||||
|
{
|
||||||
"type": "address",
|
"type": "address",
|
||||||
"values": ["0x2222", "0x333"]
|
"values": ["0x2222", "0x333"]
|
||||||
}]
|
}
|
||||||
|
]
|
||||||
},
|
},
|
||||||
|
|
||||||
"nft": {
|
"nft": {
|
||||||
@ -842,7 +843,8 @@ Example:
|
|||||||
"tokenURI": "xxx"
|
"tokenURI": "xxx"
|
||||||
},
|
},
|
||||||
|
|
||||||
"datatokens": [{
|
"datatokens": [
|
||||||
|
{
|
||||||
"address": "0x000000",
|
"address": "0x000000",
|
||||||
"name": "Datatoken 1",
|
"name": "Datatoken 1",
|
||||||
"symbol": "DT-1",
|
"symbol": "DT-1",
|
||||||
|
Binary file not shown.
Before Width: | Height: | Size: 48 KiB After Width: | Height: | Size: 63 KiB |
@ -20,7 +20,7 @@
|
|||||||
|
|
||||||
- group: Specifying Assets
|
- group: Specifying Assets
|
||||||
items:
|
items:
|
||||||
- title: DIDs & DDOs
|
- title: DID & DDO
|
||||||
link: /concepts/did-ddo/
|
link: /concepts/did-ddo/
|
||||||
|
|
||||||
- group: Contribute
|
- group: Contribute
|
||||||
|
Loading…
x
Reference in New Issue
Block a user