From 2dcc7eb9b8ab91a03bd2cb18b64d7a95b9069eb8 Mon Sep 17 00:00:00 2001 From: Anamaria Loznianu Date: Tue, 4 Oct 2022 14:26:15 +0300 Subject: [PATCH 1/9] Added GraphQL & On-Chain as objects supported --- core-concepts/did-ddo.md | 79 +++++++++++++++++++++++++++++----------- 1 file changed, 57 insertions(+), 22 deletions(-) diff --git a/core-concepts/did-ddo.md b/core-concepts/did-ddo.md index 33a7a2b2..c20d1cf8 100644 --- a/core-concepts/did-ddo.md +++ b/core-concepts/did-ddo.md @@ -219,39 +219,74 @@ During the publish process, file URLs must be encrypted with a respective _Provi where "files" contains one or more storage objects. -Type of objects supported : +**Type of objects supported:** -| Type | Description | Example | -| ----- | ---------------------------------------- | ----------------------------------------------------------------- | -| `url` | Static URL. Contains url and HTTP method |
[
| -| { | | | +***`URL`*** + +Static URL. Contains url and HTTP method. ``` -"type": "url", -"url": "https://url.com/file1.csv", -"method": "GET", -"headers": - [ - {"Authorization": "Bearer 123"}, - {"APIKEY": "124"}, - ] +{ + "type": "url", + "url": "https://url.com/file1.csv", + "method": "GET", + "headers": + [ + {"Authorization": "Bearer 123"}, + {"APIKEY": "124"}, + ] +} ``` -} ] | -First class integrations supported in the future : +***`IPFS`*** -| Type | Description | Example | -| ------ | ----------- | ----------------------------------------------------------------- | -| `ipfs` | IPFS files |
[
| -| { | | | +IPFS files. ``` -"type": "ipfs", -"hash": "XXX" +{ + "type": "ipfs", + "hash": "XXX" +} ``` -} ] | | `filecoin` | Filecoin storage | | | `arwave` | Arwave | | | `storj` | Storj | | | `sql` | Sql connection, dataset is generated by a query | | +***`GraphQL`*** + +Use GraphQL querys as datasource. + +``` +{ + "type": "graphql", + "url": "http://172.15.0.15:8000/subgraphs/name/oceanprotocol/ocean-subgraph", + "query": """ + query{ + nfts(orderBy: createdTimestamp,orderDirection:desc){ + id + symbol + createdTimestamp + } + } + """ +} +``` + +***`On-Chain`*** + +Use a smart contract as datasource. + +``` +{ + "type": "smartcontract", + "address": "0x8149276f275EEFAc110D74AFE8AFECEaeC7d1593", + "abi": { + "inputs": [], + "name": "swapOceanFee", + "outputs": [{"internalType": "uint256", "name": "", "type": "uint256"}], + "stateMutability": "view", + "type": "function", + } +} +``` A service can contain multiple files, using multiple storage types. From 48e0ff680842203109203d93b46021c83d652956 Mon Sep 17 00:00:00 2001 From: Anamaria Loznianu Date: Tue, 4 Oct 2022 15:09:40 +0300 Subject: [PATCH 2/9] Delete extra space --- core-concepts/did-ddo.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core-concepts/did-ddo.md b/core-concepts/did-ddo.md index c20d1cf8..5fe3dd0f 100644 --- a/core-concepts/did-ddo.md +++ b/core-concepts/did-ddo.md @@ -256,7 +256,7 @@ Use GraphQL querys as datasource. ``` { - "type": "graphql", + "type": "graphql", "url": "http://172.15.0.15:8000/subgraphs/name/oceanprotocol/ocean-subgraph", "query": """ query{ From 6c6ee1cf1ed9d42b022347c83c8e160ef05564c3 Mon Sep 17 00:00:00 2001 From: Anamaria Loznianu Date: Tue, 4 Oct 2022 15:14:52 +0300 Subject: [PATCH 3/9] Alignment fix --- core-concepts/did-ddo.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core-concepts/did-ddo.md b/core-concepts/did-ddo.md index 5fe3dd0f..bb144da5 100644 --- a/core-concepts/did-ddo.md +++ b/core-concepts/did-ddo.md @@ -258,7 +258,7 @@ Use GraphQL querys as datasource. { "type": "graphql", "url": "http://172.15.0.15:8000/subgraphs/name/oceanprotocol/ocean-subgraph", - "query": """ + "query": """ query{ nfts(orderBy: createdTimestamp,orderDirection:desc){ id From 80d6b5b2cac42111992e47cf32d79112aa9e6c78 Mon Sep 17 00:00:00 2001 From: Anamaria Loznianu Date: Tue, 4 Oct 2022 15:24:12 +0300 Subject: [PATCH 4/9] Added back future integrations on the list --- core-concepts/did-ddo.md | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/core-concepts/did-ddo.md b/core-concepts/did-ddo.md index bb144da5..535daeb7 100644 --- a/core-concepts/did-ddo.md +++ b/core-concepts/did-ddo.md @@ -256,7 +256,7 @@ Use GraphQL querys as datasource. ``` { - "type": "graphql", + "type": "graphql", "url": "http://172.15.0.15:8000/subgraphs/name/oceanprotocol/ocean-subgraph", "query": """ query{ @@ -288,6 +288,12 @@ Use a smart contract as datasource. } ``` +First class integrations supported in the future : +***`Filecoin`*** +***`Arwave`*** +***`Storj`*** +***`SQL`*** + A service can contain multiple files, using multiple storage types. Example: From 64fc688b873693cba50a2a0a59a0257c9ad1eba5 Mon Sep 17 00:00:00 2001 From: Anamaria Loznianu Date: Tue, 4 Oct 2022 15:31:15 +0300 Subject: [PATCH 5/9] Added Arweave to the storage types --- core-concepts/did-ddo.md | 19 ++++++++++++++++--- 1 file changed, 16 insertions(+), 3 deletions(-) diff --git a/core-concepts/did-ddo.md b/core-concepts/did-ddo.md index 535daeb7..535b6fd2 100644 --- a/core-concepts/did-ddo.md +++ b/core-concepts/did-ddo.md @@ -259,13 +259,13 @@ Use GraphQL querys as datasource. "type": "graphql", "url": "http://172.15.0.15:8000/subgraphs/name/oceanprotocol/ocean-subgraph", "query": """ - query{ + query{ nfts(orderBy: createdTimestamp,orderDirection:desc){ id symbol createdTimestamp } - } + } """ } ``` @@ -288,9 +288,22 @@ Use a smart contract as datasource. } ``` +***`Arweave`*** + +Arweave Transaction ID. + +``` +{ + { + "type": "arweave", + "transactionId": "a4qJoQZa1poIv5guEzkfgZYSAD0uYm7Vw4zm_tCswVQ", + } +} +``` + + First class integrations supported in the future : ***`Filecoin`*** -***`Arwave`*** ***`Storj`*** ***`SQL`*** From 1d3c5ef639db8907669ecb02c9ce65cb1fe94c7e Mon Sep 17 00:00:00 2001 From: Anamaria Loznianu Date: Tue, 4 Oct 2022 15:34:49 +0300 Subject: [PATCH 6/9] Minor change on the query parameter --- core-concepts/did-ddo.md | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/core-concepts/did-ddo.md b/core-concepts/did-ddo.md index 535b6fd2..d98152c0 100644 --- a/core-concepts/did-ddo.md +++ b/core-concepts/did-ddo.md @@ -258,15 +258,13 @@ Use GraphQL querys as datasource. { "type": "graphql", "url": "http://172.15.0.15:8000/subgraphs/name/oceanprotocol/ocean-subgraph", - "query": """ - query{ + "query": """query{ nfts(orderBy: createdTimestamp,orderDirection:desc){ id symbol createdTimestamp } - } - """ + }""" } ``` From 390a3ebb2a1c83adcceb28475bdc4dac06414661 Mon Sep 17 00:00:00 2001 From: Anamaria Loznianu Date: Wed, 5 Oct 2022 11:47:29 +0300 Subject: [PATCH 7/9] Added more information on arweave, graphql and ipfs --- core-concepts/did-ddo.md | 32 ++++++++++++++++++++++++++------ 1 file changed, 26 insertions(+), 6 deletions(-) diff --git a/core-concepts/did-ddo.md b/core-concepts/did-ddo.md index d98152c0..51028507 100644 --- a/core-concepts/did-ddo.md +++ b/core-concepts/did-ddo.md @@ -223,7 +223,12 @@ where "files" contains one or more storage objects. ***`URL`*** -Static URL. Contains url and HTTP method. +Static URLs. + +Parameters: +* `url` - File url +* `method` - The HTTP method +* `headers` - Additional HTTP headers ``` { @@ -238,10 +243,12 @@ Static URL. Contains url and HTTP method. } ``` - ***`IPFS`*** -IPFS files. +The [Interplanetary File System](https://ipfs.tech/) (IPFS) is a distributed file storage protocol that allows computers all over the globe to store and serve files as part of a giant peer-to-peer network. Any computer, anywhere in the world, can download the IPFS software and start hosting and serving files. + +Parameters: +* `hash' - The file hash ``` { @@ -252,7 +259,11 @@ IPFS files. ***`GraphQL`*** -Use GraphQL querys as datasource. +[GraphQL](https://graphql.org/) is a query language for APIs and a runtime for fulfilling those queries with your existing data. + +Parameters: +* `url` - Server endpoint url +* `query` - The query to be executed ``` { @@ -270,7 +281,13 @@ Use GraphQL querys as datasource. ***`On-Chain`*** -Use a smart contract as datasource. +Use a smart contract as data source. + +Parameters: + +* `chainId` - The chainId used to query the contract +* `address` - The smartcontract address +* `abi` - The function abi (NOT the entire contract abi) ``` { @@ -288,7 +305,10 @@ Use a smart contract as datasource. ***`Arweave`*** -Arweave Transaction ID. +[Arweave](https://www.arweave.org/) is a decentralized data storage that allows to permanently store files over a distributed network of computers. + +Parameters: +* `transactionId` - The transaction identifier ``` { From cf51555775f45f6ba1016e810bdc04f9817d3d14 Mon Sep 17 00:00:00 2001 From: Anamaria Loznianu Date: Wed, 5 Oct 2022 11:49:44 +0300 Subject: [PATCH 8/9] Parameter fix --- core-concepts/did-ddo.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core-concepts/did-ddo.md b/core-concepts/did-ddo.md index 51028507..25baf6ca 100644 --- a/core-concepts/did-ddo.md +++ b/core-concepts/did-ddo.md @@ -248,7 +248,7 @@ Parameters: The [Interplanetary File System](https://ipfs.tech/) (IPFS) is a distributed file storage protocol that allows computers all over the globe to store and serve files as part of a giant peer-to-peer network. Any computer, anywhere in the world, can download the IPFS software and start hosting and serving files. Parameters: -* `hash' - The file hash +* `hash` - The file hash ``` { From 621754e355865070a917cec2f3440e3ceae95bd0 Mon Sep 17 00:00:00 2001 From: Anamaria Loznianu Date: Wed, 5 Oct 2022 11:54:53 +0300 Subject: [PATCH 9/9] Minor ui display change --- core-concepts/did-ddo.md | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/core-concepts/did-ddo.md b/core-concepts/did-ddo.md index 25baf6ca..0cc87d54 100644 --- a/core-concepts/did-ddo.md +++ b/core-concepts/did-ddo.md @@ -221,7 +221,7 @@ where "files" contains one or more storage objects. **Type of objects supported:** -***`URL`*** +**`URL`** Static URLs. @@ -243,7 +243,7 @@ Parameters: } ``` -***`IPFS`*** +**`IPFS`** The [Interplanetary File System](https://ipfs.tech/) (IPFS) is a distributed file storage protocol that allows computers all over the globe to store and serve files as part of a giant peer-to-peer network. Any computer, anywhere in the world, can download the IPFS software and start hosting and serving files. @@ -257,7 +257,7 @@ Parameters: } ``` -***`GraphQL`*** +**`GraphQL`** [GraphQL](https://graphql.org/) is a query language for APIs and a runtime for fulfilling those queries with your existing data. @@ -279,7 +279,7 @@ Parameters: } ``` -***`On-Chain`*** +**`On-Chain`** Use a smart contract as data source. @@ -303,7 +303,7 @@ Parameters: } ``` -***`Arweave`*** +**`Arweave`** [Arweave](https://www.arweave.org/) is a decentralized data storage that allows to permanently store files over a distributed network of computers. @@ -321,9 +321,9 @@ Parameters: First class integrations supported in the future : -***`Filecoin`*** -***`Storj`*** -***`SQL`*** +**`Filecoin`** +**`Storj`** +**`SQL`** A service can contain multiple files, using multiple storage types.