-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: Added did:jwk p256 and code optimisation #2034
- Loading branch information
Showing
22 changed files
with
376 additions
and
728 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,31 @@ | ||
enum DidKeyType { secp256k1, p256, ebsiv3 } | ||
import 'package:altme/l10n/l10n.dart'; | ||
|
||
enum DidKeyType { secp256k1, p256, ebsiv3, jwkP256 } | ||
|
||
extension DidKeyTypeX on DidKeyType { | ||
String get formattedString { | ||
switch (this) { | ||
case DidKeyType.secp256k1: | ||
return 'did:key secp256k1'; | ||
case DidKeyType.p256: | ||
return 'did:key P-256'; | ||
case DidKeyType.ebsiv3: | ||
return 'did:key EBSI-V3'; | ||
case DidKeyType.jwkP256: | ||
return 'did:jwk P-256'; | ||
} | ||
} | ||
|
||
String getTitle(AppLocalizations l10n) { | ||
switch (this) { | ||
case DidKeyType.secp256k1: | ||
return l10n.manageKeyDecentralizedIDSecp256k1; | ||
case DidKeyType.p256: | ||
return l10n.keyDecentralizedIDP256; | ||
case DidKeyType.ebsiv3: | ||
return l10n.manageEbsiV3DecentralizedId; | ||
case DidKeyType.jwkP256: | ||
return l10n.jwkDecentralizedIDP256; | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.