Delete a IoTeX DID
A registered DID can be deactivated anytime as long as the caller's address matches the address within the DID string. Once a DID is deactivated, the metadata of the corresponding document cannot be updated. Here is a draft DID hash/URI delete implementation:
1
// For reference only and subject to change
2
3
function deleteDID(string did) public onlyDIDOwner(did) {
4
dids[generateDIDString()].exist = false;
5
}
Copied!
Similar to previous cases, the contract checks the permission to ensure that only the DID creator can deactivate its own DID.
Last modified 6mo ago
Export as PDF
Copy link