Create DIDs from RootIdentity
In the Elastos DID SDK, all ordinary DIDs are created from RootIdentity, each of which corresponds to an integer index value that ranges from 0 to 2,147,483,647. There is a unique correspondence between each index value and the DID created - that is, the index value is always consistent with the DID it creates.
When creating a DID from RootIdentity, DIDdocument and PrivateKey corresponding to it will be saved by default to the DIDStore where RootIdentity is located. Instead of being published automatically, the newly created DID is only a local DID object. If it needs to be published, it needs to be done so explicitly - see Publish DID for details.
Create DIDs with the Default Index
To create DIDs with the default index, there's no need to specify the index value. RootIdentity will create DIDs with the next available index of the current record and automatically update the next available index (this method is recommended to create new DIDs).
Create DIDs with the Specified Index
To create DIDs with the specified index, the specified index value is not managed by RootIdentity. Therefore, developers or applications should manage available indexes to avoid conflicts caused by repeated use of indexes.
Create DIDs with RootIdentity
Synchronize DIDs from the IDchain (Synchronous Operation)
Synchronize DIDs from the Chain (Asynchronous Operation)
Recreate DID Objects and their Files
If you need to recreate DIDs that have already been developed, this process will fail by default because of the DIDs that already exist. So, we can recreate the DIDs using the method with overwrite parameters. If the overwriting is true, the DID SDK will ignore the already existing DID object, recreate the corresponding DID file, and regenerate its corresponding PrivateKey.
Export Mnemonic
Last updated