The method provides a new DID derived from Root Identity, saves its DID Document in DID Store, and returns to DID Document.
It's worth noting that this function doesn't need to provide a DID Store, which is provided by Root Identity (the associated DID Store is recorded by Root Identity during the generation).
overwrite indicates whether the existing DID needs to be overwritten. When overwrite is true, it will overwrite the existing DID and return to the newly generated DID Document object; when overwrite is false, NULL is returned if DID already exists.
The method derives the index DID of Root Identity - its parameters are the same as RootIdentity_NewDID.
voidDIDDocument_Destroy(DIDDocument *document);
If the generated DID Document is not used, it needs to be destroyed with this method.
DID *RootIdentity_GetDIDByIndex(RootIdentity *rootidentity,int index);
This method is used to get the DID object, and DID Document is not generated or saved. It is mainly used for users to obtain DID objects to perform other DID operations.