A Dart package for generating and resolving Decentralized Identifiers (DIDs) using various cryptographic algorithms.
- Generate DIDs using P-256 and P-384, P-521 key algorithms.
- Resolve DIDs to obtain public keys.
To use this package, add did_key_dart
as a dependency in your pubspec.yaml
file:
dependencies:
did_key_dart: ^0.1.0
import 'package:did_key_dart/did_key_dart.dart';
void main() {
final driver = DIDKeyDriver();
final result = driver.generateDID(keyAlgorithm: P256());
print('DID: ${result.did}');
print('Private Key: ${result.privateKey}');
}
import 'package:did_key_dart/did_key_dart.dart';
void main() {
final driver = DIDKeyDriver();
final publicKey = driver.getPublicKeyFromDID('did:key:z...');
print('Public Key: $publicKey');
}
For more information, visit the documentation. To contribute to this package, please submit a pull request or file an issue on GitHub. We welcome contributions and feedback from the commun