Query a IoTeX DID
IoTeX clients can query a DID's current hash and URI given a DID string whether they own the DID or not. Here is a draft DID hash/URI read implementation:
1
// For reference only and subject to change
2
3
function getHash(string did) public view returns (bytes32) {
4
require(dids[did].exist, "did does not exist");
5
return dids[did].hash;
6
}
7
8
function getURI(string did) public view returns (string) {
9
require(dids[did].exist, "did does not exist");
10
return dids[did].uri;
11
}
Copied!
Last modified 6mo ago
Export as PDF
Copy link