Watch
1
0
Fork
You've already forked nexus
0
forked from Nexus/nexus

add support for initializing and resetting crypto identity

Fixes #137
This commit is contained in:
Henry Hiles 2026-10-16 10:49:04 -04:00
commit 23046f08a9
Signed by: Henry-Hiles
SSH key fingerprint: SHA256:VKQUdS31Q90KvX7EkKMHMBpUspcmItAh86a+v7PGiIs
8 changed files with 448 additions and 36 deletions

View file

@ -12,9 +12,23 @@ class const ClientState({
required final String? userId,
required final String? deviceId,
required final String? homeserverUrl,
final VerificationState verificationState = const .new(),
}) with _$ClientState {
Map<String, Object?> toJson() => _$ClientStateToJson(this);
factory ClientState.fromJson(Map<String, Object?> json) =>
_$ClientStateFromJson(json);
}
@Freezed(toJson: false, fromJson: false)
@JsonSerializable()
class const VerificationState({
final bool stateChecked = false,
final bool hasCrossSigning = false,
@JsonKey(name: "has_ssss") final bool hasSecretStorage = false,
}) with _$VerificationState {
Map<String, Object?> toJson() => _$VerificationStateToJson(this);
factory VerificationState.fromJson(Map<String, Object?> json) =>
_$VerificationStateFromJson(json);
}