mirror of
https://github.com/oceanprotocol/docs.git
synced 2024-11-26 19:49:26 +01:00
Update DDO spec to v4.1.0 (#1029)
* update to ddo 4.1.0 and add headers for url types * update all refs to 4.1.0
This commit is contained in:
parent
63780c0a16
commit
bd97c3b979
@ -5,7 +5,7 @@ slug: /concepts/did-ddo/
|
||||
section: concepts
|
||||
---
|
||||
|
||||
**v4.0.0**
|
||||
**v4.1.0**
|
||||
|
||||
## Overview
|
||||
|
||||
@ -80,7 +80,7 @@ A DDO in Ocean has these required attributes:
|
||||
| ----------------- | --------------------------- | -------------------------------------------------------------------------------------------------------------- |
|
||||
| **`@context`** | Array of `string` | Contexts used for validation. |
|
||||
| **`id`** | `string` | Computed as `sha256(address of ERC721 contract + chainId)`. |
|
||||
| **`version`** | `string` | Version information in [SemVer](https://semver.org) notation referring to this DDO spec version, like `4.0.0`. |
|
||||
| **`version`** | `string` | Version information in [SemVer](https://semver.org) notation referring to this DDO spec version, like `4.1.0`. |
|
||||
| **`chainId`** | `number` | Stores chainId of the network the DDO was published to. |
|
||||
| **`nftAddress`** | `string` | NFT contract linked to this asset |
|
||||
| **`metadata`** | [Metadata](#metadata) | Stores an object describing the asset. |
|
||||
@ -202,7 +202,17 @@ 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, you need to send the following object to Provider:
|
||||
```json
|
||||
{
|
||||
"datatokenAddress":"0x1",
|
||||
"nftAddress": "0x2",
|
||||
"files": [
|
||||
...
|
||||
]
|
||||
}
|
||||
```
|
||||
where "files" contains one or more storage objects.
|
||||
|
||||
Type of objects supported :
|
||||
|
||||
@ -221,7 +231,12 @@ Type of objects supported :
|
||||
{
|
||||
"type": "url",
|
||||
"url": "https://url.com/file1.csv",
|
||||
"method": "GET"
|
||||
"method": "GET",
|
||||
"headers":
|
||||
[
|
||||
{"Authorization": "Bearer 123"},
|
||||
{"APIKEY": "124"},
|
||||
]
|
||||
}
|
||||
]
|
||||
```
|
||||
@ -263,7 +278,10 @@ A service can contain multiple files, using multiple storage types.
|
||||
Example:
|
||||
|
||||
```json
|
||||
[
|
||||
{
|
||||
"datatokenAddress":"0x1",
|
||||
"nftAddress": "0x2",
|
||||
"files": [
|
||||
{
|
||||
"type": "url",
|
||||
"url": "https://url.com/file1.csv",
|
||||
@ -274,6 +292,7 @@ Example:
|
||||
"hash": "XXXX"
|
||||
}
|
||||
]
|
||||
}
|
||||
```
|
||||
|
||||
To get information about the files after encryption, the `/fileinfo` endpoint of _Provider_ returns based on a passed DID an array of file metadata (based on the file type):
|
||||
@ -741,7 +760,7 @@ Example:
|
||||
{
|
||||
"@context": ["https://w3id.org/did/v1"],
|
||||
"id": "did:op:ACce67694eD2848dd683c651Dab7Af823b7dd123",
|
||||
"version": "4.0.0",
|
||||
"version": "4.1.0",
|
||||
"chainId": 1,
|
||||
"nftAddress": "0x123",
|
||||
"metadata": {
|
||||
|
Loading…
Reference in New Issue
Block a user