From e0111575df9e93e96b3b54362078ea14c7fed7a7 Mon Sep 17 00:00:00 2001 From: alexcos20 Date: Fri, 3 Dec 2021 00:30:27 -0800 Subject: [PATCH] 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