getCryptoIdentityState method
Returns the current state of the crypto identity.
The crypto identity is initialized if key backup and cross signing
are correctly set up. You can initialize a new account by using
Client.initCryptoIdentity().
The crypto identity is connected if this device has all the secrets
cached locally. This usually includes that this device has signed itself.
You can use Client.restoreCryptoIdentity() to connect or
Client.initCryptoIdentity() to wipe the current identity in case of
that you lost your recovery key / passphrase and have no other way
to restore.
Implementation
Future<({bool initialized, bool connected})> getCryptoIdentityState() async =>
(
initialized: (encryption?.keyManager.enabled ?? false) &&
(encryption?.crossSigning.enabled ?? false),
connected: ((await encryption?.keyManager.isCached()) ?? false) &&
((await encryption?.crossSigning.isCached()) ?? false),
);