## 4 The System Proposal: An Introduction
### ABCDE Method: On-Chain Subsystem
#### 4.3.5. Decentralised IDentities and Verifiable Files  
Veramo uses ERC1056 as the DID standard, and EIP-1812 as the standard for the claims registry (ref. [45] and [[https://eips.ethereum.org/EIPS/eip-1056](https://eips.ethereum.org/EIPS/eip-1056)]([https://eips.ethereum.org/EIPS/eip-1056](https://eips.ethereum.org/EIPS/eip-1056)) (accessed on 8 April 2022)). EIP-1812 is the method proposed for the management of Off-Chain Verifiable Claims [46, 47]. Through this EIP the claims can be stored off chain and verified on-chain by Solidity Smart Contracts, by the implementation of state channel, or by the use of off-chain libraries. The previous standards are ERC-735 and ERC-780. These standards manage claims living on chain (ref. [48] and [[https://github.com/ethereum/EIPS/issues/780](https://github.com/ethereum/EIPS/issues/780)]([https://github.com/ethereum/EIPS/issues/780](https://github.com/ethereum/EIPS/issues/780)) (accessed on 8 April 2022)), as a result in some circumstances, for example where the EU GDPR rules must be respected, storing claims on chain containing personal information on a public database is illegal. To implement the logic that manages the storage of the files's hashes, and some of their key features, such as their status, we can refer to the Ethereum claims registry implemented by ERC780, that must be customized to accomplish the requirements of our system and that just has to memorize the information in agreement with the EU GDPR rules. For example, regarding the notarised files, we can assume that only the owner of the identity, which the file's hash refers to, can add the hash in the registry. Regarding the verifiable files, we can assume that only the owner of the identity, which the features refer to, can add these data in the registry, and only the issuer of these files can modify their status. We can customize the ERC780 contract, called EthereumClaimsRegistry.sol contract, replacing the mapping named _registry_ with two mappings, the _notarisedFilesRegistry_ and _verifiableFilesRegistry_ mapping. In solidity the mapping is a data structure. The first mapping manages the notarised files and could be defined as follows:  
\[mapping(address=>mapping(uint=>string))\]  
\[public\quad notarisedFilesRegistry;\]  
where _notarisedFilesRegistry_ maps keys of type _address_ to a new mapping, that maps _uint_, that is a counter, to _string_. The keys are the addresses of the DID to which the values of type _string_ refers. The values of type _string_ are the hashes of the files uploaded in the external database. So, for example this data structure could be defined as:  
\[notarisedFilesRegistry[identity][counter][hash].\]  
Figure 6. ESSIF DID document. The second mapping manages the verifiable files and could be defined as:  
\[mapping(address=>mapping(uint=>\]  
\[mapping(string=>mapping(address=>mapping(bytes=>string)))\]  
\[public\quad verifiableFilesRegistry;\]  
where _notarisedFilesRegistry_ is similar to the previous one but it adds to the previous structure data another mapping that maps values of type _address_, that refer to the address of the issuer that issued the file associated with the hash, to the mapping that maps values of type _bytes_, that refer to the proofs generated by the issuer, to values of type _string_ that represent the status of that file. So, for example this second data structure could be defined as:  
\[verifiableFilesRegistry[identity][counter][hash]\]  
\[[issuer][proof][status].\]  
Through this standard the proposal could implement a public distributed registry to collect useful data about building DID files and manage the stored data. In fact the ECR780 defines for example the functions for adding claims, for getting claims, and for removing claims, and defines two events, to track the claims issued and removed. The proposal provides that the identity of the verifiable files' issuer is recovered through his/her address, the so called _msg.sender_ in Solidity language.