How does Veramo store dids on ethereum blockchain and how can we fetch it? #873
-
I am new to blockchain technology. I came across DIDs which led me to Veramo. But I am not able to understand how it is storing DIDs on the blockchain. I tried to look for the DIDs generated by Veramo on Ethrescan but it doesn't exist. How can I fetch it from the blockchain? When I dug deep I found out uPort uses a proxy contract, identity manager contract, and relayer contract but didn't get how ether did registry contract is associated with all these contracts. Also somewhere it was mentioned that Veramo doesn't function on contract-based dids, then how is it able to interact with blockchain without meta transactions? For Veramo I could only find one contract that's the "https://github.com/uport-project/ethr-did-registry/blob/develop/contracts/EthereumDIDRegistry.sol" contract. I tried to use the "0xdCa7EF03e98e0DC2B855bE647C39ABe984fcF21B" in remix but I am not sure how to get the parameter values that it requires to execute any function. For example in the function-------> How to get values of (address identity, uint8 sigV, bytes32 sigR, bytes32 sigS, bytes32 hash)? How are these values passed to the contract? My basic requirement is to fetch the DIDs from the blockchain that I have generated using Veramo to check if it actually exists on the blockchain. Please can anyone help? |
Beta Was this translation helpful? Give feedback.
Replies: 6 comments 16 replies
-
That's a great question and you are almost there with ethr-did-registry, that is indeed the contract that holds the data related to Transactions are needed only when you want to update the DID document, to change the owner or add new keys and services. The relevant docs for how this happens can be found in the did:ethr spec. |
Beta Was this translation helpful? Give feedback.
-
@mirceanis I get that creating a did doesn't involve interaction with the blockchain. But storing it on the blockchain is a transaction right? I am not able to understand how Veramo stores did on the blockchain. Does it use another smart contract to do it? Because the 'ethr-did-registry' contract only has methods that operate on/return information about the dids that are already stored on blockchain (i.e. the changes made to the did document). So my question is --> Please correct me if I am wrong and clarify my doubts. |
Beta Was this translation helpful? Give feedback.
-
@mirceanis What do you mean by this, "When an Ethereum address is created, it does not have to be registered on-chain, it already exists as far as the chain is concerned in the incredibly vast space of Ethereum addresses" ,Can you please explain this in details. Do you mean that when a did is created it references to already existing blockchain addresses or an new address is created first then it refers to the dids. |
Beta Was this translation helpful? Give feedback.
-
@mirceanis
|
Beta Was this translation helpful? Give feedback.
-
@mirceanis We are thinking to implement DID using private network. Is it possible? Do you have any future plans to provide did method for private network as well? |
Beta Was this translation helpful? Give feedback.
-
@mirceanis I need a suggestion with the below scenario- |
Beta Was this translation helpful? Give feedback.
That's a great question and you are almost there with ethr-did-registry, that is indeed the contract that holds the data related to
did:ethr
identifiers.The reason you don't see anything related to new DIDs on the block explorer is that for
did:ethr
creation happens without a transaction. To create a DID you generate an ethereum keypair and prependdid:ethr:
to the hex string encoding of the public key, or to the corresponding ethereum address.Transactions are needed only when you want to update the DID document, to change the owner or add new keys and services.
The relevant docs for how this happens can be found in the did:ethr spec.
The same repository contains the code for the refere…