OceanProtocolEnterprise / ocean-node

Apache License 2.0
0 stars 1 forks source link

Decentralized storage (IPFS/IPNS or similar) as DDO metadata storage (including media files) #1

Open MBadea17 opened 8 months ago

MBadea17 commented 8 months ago

Feature # 66. Later edit by @alexcos20 :

Status-quo: Whenever an asset is published, the coresponding DDO is published at the smartcontract level (using setMetaData or updateMetaData - where an event is emited which contains the DDO). DDO can be unecrypted or encrypted (see flags option). DDO (which is a JSON Object) has a lot of fields (see https://docs.oceanprotocol.com/developers/ddo-specification)

Request: add additional types of storages (beside on-chain), so publisher can have more control on the DDO

How to:

Example :

{
   "remote":  {
        "type": "url",
        "url": "https://url.com/ddo_x.json",
        "method": "GET",
    }
}

Encryption:
We should add two extra fields on the Storage spec (for all types of storages):

So, a fully encrypted DDO stored on IPFS will look like:

{
   "remote":  {
        "type": "ipfs",
        "hash": "12334343",
        "encryptedBy": "16Uiu2HAmUWwsSj39eAfi3GG9U2niNKi3FVxh3eTwyRxbs8cwCq72"
        "encryptMethod": "ecies"
    }
}

The indexing flow should be:

The decrypt endpoint flow should be:

Tasks: