From 2dcc7eb9b8ab91a03bd2cb18b64d7a95b9069eb8 Mon Sep 17 00:00:00 2001 From: Anamaria Loznianu Date: Tue, 4 Oct 2022 14:26:15 +0300 Subject: [PATCH] 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.