did_key_dart 0.1.1 copy "did_key_dart: ^0.1.1" to clipboard
did_key_dart: ^0.1.1 copied to clipboard

A Dart package for generating and resolving Decentralized Identifiers (DIDs) using various cryptographic algorithms, including P-256 and Ed25519. This package provides functionality to create DIDs, re [...]

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

1
likes
150
points
62
downloads

Publisher

unverified uploader

Weekly Downloads

A Dart package for generating and resolving Decentralized Identifiers (DIDs) using various cryptographic algorithms, including P-256 and Ed25519. This package provides functionality to create DIDs, resolve them to obtain public keys.

Repository (GitHub)
View/report issues

Documentation

API reference

License

MIT (license)

Dependencies

base_x, crypto_keys, jose, pointycastle, quiver

More

Packages that depend on did_key_dart