Self-Managed Contract Interface
Our DID design allows each manufacture or entity to have its own namespace, which stores and manages DIDs through a self-managed DID contract. A self-managed contract could have customized business logic to adapt the application's needs but has to implement the SelfManagedDID interface, defined as follows:
The following part of this document specifies the IoTeX implementation of the SelfManagedDID interface with DID Method [did:io]
.
Method Name
We use the iotex
to be our method name and a formal DID using this method need begin with following prefix: did:io
. Furthermore, all the characters in the prefix need to be in lowercase. The string after prefix is the unique IoTeX account address of the registered user/device.
Generate a unique ID string
Every user or device needs to register its own DID by uploading its UUID under a namespace, DID document hash, and DID document URI. Then a unique idstring
is created as follows:
Construct the
iotex
method prefix, i.e.did:io
.Append the UUID (IoTeX account address) to the prefix. The UUID must match caller's address.
The provided DID document hash and URI would be stored in the contract along the unique
idstring
.
The DID structure looks like follows:
Example
An example IoTeX DID:
Last updated