1
0
mirror of https://github.com/oceanprotocol/docs.git synced 2024-11-26 19:49:26 +01:00
This commit is contained in:
alexcos20 2021-10-09 06:03:02 -07:00
parent 5ca7156e47
commit 08925a8e53

View File

@ -385,6 +385,7 @@ This section is auto-completed by aquarius.
## DDO Hash
In order to ensure the integrity, a hash is computed for each DDO, following the next steps:
- remove `event` object from root (if exists)
@ -392,7 +393,8 @@ In order to ensure the integrity, a hash is computed for each DDO, following the
- hash = sha256(JSON.stringify(DDO))
The hash is used when publishing/update metadata using setMetaData function in ERC721 contract and it is stored in the event generated by the ERC721 contract:
```
```solidity
event MetadataCreated(
address indexed createdBy,
uint8 state,
@ -420,7 +422,8 @@ Aquarius should always chech the hash after data is decrypted(provider api calle
## Full DDO Example:
```
```json
{
"@context": ["https://w3id.org/did/v1"],
"id": "did:op:ACce67694eD2848dd683c651Dab7Af823b7dd123",