From e0111575df9e93e96b3b54362078ea14c7fed7a7 Mon Sep 17 00:00:00 2001 From: alexcos20 Date: Fri, 3 Dec 2021 00:30:27 -0800 Subject: [PATCH 1/7] add multiple storage types --- content/concepts/did-ddo.md | 60 +++++++++++++++++++++++++++++++++++-- 1 file changed, 58 insertions(+), 2 deletions(-) diff --git a/content/concepts/did-ddo.md b/content/concepts/did-ddo.md index b2ab357e..d81294c6 100644 --- a/content/concepts/did-ddo.md +++ b/content/concepts/did-ddo.md @@ -196,12 +196,68 @@ 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 strings with one or multiple URLs is what gets encrypted and send to _Provider_: +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 : + + + + + + + + + + +
KeyDescriptionExample
'url'Static URL. Contains url and HTTP method ```json -["https://url.com/file1.csv", "https://url.com/file2.csv"] +[ + { + "url":{ + "url":"https://url.com/file1.csv", + "method":"GET" + } + }, + { + "url":{ + "url":"https://url.com/file2.csv", + "method":"POST" + } + } +] ``` +
+ +First class integrations supported in the future : + + + + + + + + + + + + + + + +
KeyDescriptionExample
"ipfs"IPFS files + + ```json +[ + { "ipfs": { "hash":"XXX"}} +] +``` +
"filecoin"Filecoin storage 
"arwave"Arwave 
"storj"Storj 
"sql"Sql connection, dataset is generated by a query 
+ + +A service can contain multiple files, using multiple storage types. + + To get information about the files after encryption, the `/fileinfo` endpoint of _Provider_ returns based on a passed DID an array of file metadata: ```json From 523a2875dd36655e429a0aeb7d44b695427bb036 Mon Sep 17 00:00:00 2001 From: alexcos20 Date: Fri, 3 Dec 2021 00:32:15 -0800 Subject: [PATCH 2/7] add multi type example --- content/concepts/did-ddo.md | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/content/concepts/did-ddo.md b/content/concepts/did-ddo.md index d81294c6..1d59608f 100644 --- a/content/concepts/did-ddo.md +++ b/content/concepts/did-ddo.md @@ -257,6 +257,22 @@ First class integrations supported in the future : A service can contain multiple files, using multiple storage types. +Example: +```json +[ + { + "url":{ + "url":"https://url.com/file1.csv", + "method":"GET" + } + }, + { + "ipfs":{ + "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: From 1e2c782e13dd836842d349c54ba52c82b28eda65 Mon Sep 17 00:00:00 2001 From: alexcos20 Date: Fri, 3 Dec 2021 00:35:20 -0800 Subject: [PATCH 3/7] fix lint --- content/concepts/did-ddo.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/content/concepts/did-ddo.md b/content/concepts/did-ddo.md index 1d59608f..74960eb8 100644 --- a/content/concepts/did-ddo.md +++ b/content/concepts/did-ddo.md @@ -246,6 +246,7 @@ First class integrations supported in the future : { "ipfs": { "hash":"XXX"}} ] ``` + "filecoin"Filecoin storage  @@ -258,6 +259,7 @@ First class integrations supported in the future : A service can contain multiple files, using multiple storage types. Example: + ```json [ { From 4cb2d017d3a309b287bb822a4f8fb1e483676bfe Mon Sep 17 00:00:00 2001 From: alexcos20 Date: Fri, 3 Dec 2021 00:37:28 -0800 Subject: [PATCH 4/7] formatting --- content/concepts/did-ddo.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/content/concepts/did-ddo.md b/content/concepts/did-ddo.md index 74960eb8..8ccee86a 100644 --- a/content/concepts/did-ddo.md +++ b/content/concepts/did-ddo.md @@ -197,6 +197,8 @@ 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. + + Type of objects supported : From 0bfb12c403334131e8c8037de59bc8f3cd42c2b8 Mon Sep 17 00:00:00 2001 From: alexcos20 Date: Fri, 3 Dec 2021 00:39:46 -0800 Subject: [PATCH 5/7] add details to fileinfo --- content/concepts/did-ddo.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/content/concepts/did-ddo.md b/content/concepts/did-ddo.md index 8ccee86a..aff47921 100644 --- a/content/concepts/did-ddo.md +++ b/content/concepts/did-ddo.md @@ -278,15 +278,17 @@ Example: ] ``` -To get information about the files after encryption, the `/fileinfo` endpoint of _Provider_ returns based on a passed DID an array of file metadata: +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): ```json [ { + "type":"url", "contentLength": 100, "contentType": "application/json" }, { + "type":"url", "contentLength": 130, "contentType": "application/text" } From 93abc7db1a7a4d9b8ad6ba69a5f0598ad990424b Mon Sep 17 00:00:00 2001 From: alexcos20 Date: Fri, 3 Dec 2021 00:41:06 -0800 Subject: [PATCH 6/7] formatting --- content/concepts/did-ddo.md | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/content/concepts/did-ddo.md b/content/concepts/did-ddo.md index aff47921..58d660c6 100644 --- a/content/concepts/did-ddo.md +++ b/content/concepts/did-ddo.md @@ -214,15 +214,15 @@ Type of objects supported : ```json [ { - "url":{ - "url":"https://url.com/file1.csv", - "method":"GET" + "url": { + "url": "https://url.com/file1.csv", + "method": "GET" } }, { - "url":{ - "url":"https://url.com/file2.csv", - "method":"POST" + "url": { + "url": "https://url.com/file2.csv", + "method": "POST" } } ] @@ -245,7 +245,7 @@ First class integrations supported in the future : ```json [ - { "ipfs": { "hash":"XXX"}} + { "ipfs": { "hash": "XXX"}} ] ``` @@ -266,13 +266,13 @@ Example: [ { "url":{ - "url":"https://url.com/file1.csv", - "method":"GET" + "url": "https://url.com/file1.csv", + "method": "GET" } }, { - "ipfs":{ - "hash":"XXXX" + "ipfs": { + "hash": "XXXX" } } ] @@ -283,12 +283,12 @@ To get information about the files after encryption, the `/fileinfo` endpoint of ```json [ { - "type":"url", + "type": "url", "contentLength": 100, "contentType": "application/json" }, { - "type":"url", + "type": "url", "contentLength": 130, "contentType": "application/text" } From 0160fddb49c4c6d78918c2c3ff977593a754ec0b Mon Sep 17 00:00:00 2001 From: alexcos20 Date: Tue, 7 Dec 2021 02:06:32 -0800 Subject: [PATCH 7/7] update --- content/concepts/did-ddo.md | 37 ++++++++++++++++--------------------- 1 file changed, 16 insertions(+), 21 deletions(-) diff --git a/content/concepts/did-ddo.md b/content/concepts/did-ddo.md index 58d660c6..d4c41f55 100644 --- a/content/concepts/did-ddo.md +++ b/content/concepts/did-ddo.md @@ -203,7 +203,7 @@ Type of objects supported :
- + @@ -214,16 +214,9 @@ Type of objects supported : ```json [ { - "url": { - "url": "https://url.com/file1.csv", - "method": "GET" - } - }, - { - "url": { - "url": "https://url.com/file2.csv", - "method": "POST" - } + "type": "url", + "url": "https://url.com/file1.csv", + "method": "GET" } ] ``` @@ -235,7 +228,7 @@ First class integrations supported in the future :
KeyType Description Example
- + @@ -245,7 +238,10 @@ First class integrations supported in the future : ```json [ - { "ipfs": { "hash": "XXX"}} + { + "type":"ipfs", + "hash": "XXX" + } ] ``` @@ -265,15 +261,14 @@ Example: ```json [ { - "url":{ - "url": "https://url.com/file1.csv", - "method": "GET" - } + "type": "url", + "url": "https://url.com/file1.csv", + "method": "GET" + }, { - "ipfs": { - "hash": "XXXX" - } + "type": "ipfs", + "hash": "XXXX" } ] ``` @@ -288,7 +283,7 @@ To get information about the files after encryption, the `/fileinfo` endpoint of "contentType": "application/json" }, { - "type": "url", + "type": "ipfs", "contentLength": 130, "contentType": "application/text" }
KeyType Description Example