Skip to content

WtrN/did_key_dart

Repository files navigation

did_key_dart

A Dart package for generating and resolving Decentralized Identifiers (DIDs) using various cryptographic algorithms.

Features

  • Generate DIDs using P-256 and P-384, P-521 key algorithms.
  • Resolve DIDs to obtain public keys.

Getting started

To use this package, add did_key_dart as a dependency in your pubspec.yaml file:

dependencies:
  did_key_dart: ^0.1.0

Usage

Generate a DID

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}');
}

Resolve a DID

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');
}

Additional information

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

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages