Export/Import RootIdentity
DIDStore objects provide a method to export/import RootIdentity, which can export mnemonic, public, and private keys, as well as other data related to a specific RootIdentity to a JSON file. The PrivateKey is saved encrypted in the exported file, with the key being the password of the exported file set at the time of exporting. The exported JSON is a single autocorrelation file without any dependence, and the application can easily use the exported file to migrate the data of RootIdentity.
Export RootIdentity
Similar to the export of Store, the DIDStore input can also be objects such as FileHandle and OutputStream.
Import RootIdentity
Like the export of RootIdentity, objects such as FileHandle and InputStream can also be the input of RootIdentity import.
If the RootIdentity corresponding to the exported file already exists in DIDStore, then the import operation will overwrite the existing data of RootIdentity in the target store.
RootIdentity can also be backed up and restored by mnemonic. For specifics, see “Backup and Recovery of RootIdentity”.
Last updated