This documentation is being updated, please check back soon for up to date content.
The DID contract on IoTeX testnet is: io1m3wjevwhz2s58sasq0wj4luxrnqt047s687zw8 The DID contract on IoTeX mainnet is TBD

Generate a DID Doc Template

Generate DID document template using an account from ioctl. The produced template can be modified as needed with its hash to be recalculated.
Example:

Upload a DID Doc

DID Doc can be uploaded to any publicly accessible content storage like S3 or IPFS or other cloud storage, as long as you end up with a URI which can retrieve you DID Doc. If you plan to use IPFS, you can either set up your own IPFS node or use service like https://pinata.cloud/ or upload via https://globalupload.io/. Exmaple:

Hash a DID Doc

DID register asked for a 32 bytes hash of the DID doc as an input. You could use any hashing algorithm to fit your need. Once you got your DID Doc hash, encode it to a hex string, to pass into ioctl. For simplicity, you can directly use the hex-encoded SHA256 hash string provided by ioctl did generate. But if you do need to generate a hash programmatically, here is a Go example to hash a DID doc using SHA512-256 and output a hex string:

Register a DID

Register a new DID with the corresponding doc to IoTeX.
Example:

Resovle DID

Resovle an IoTeX DID with our web resovler.
Exmaple:

Update DID

Update an existent DID.
Example:

Deregister DID

Deregister an existent DID.
Example:

Get DID hash

Get the hash of an existent DID doc.
Example:

Get DID URI

Get the URI of an existent DID doc.
Example:

Deploy DID contract with ioctl and solc

Deploy DID contract with ioctl and solc.First install ioctl and solc,and then prepare the DID contract files.
Example: