didwebvh_signing_local 0.1.2
didwebvh_signing_local: ^0.1.2 copied to clipboard
Local in-memory Ed25519 Signer for did:webvh (async, JWK in/out) built on package:cryptography. A faithful Dart port of didwebvh-java's didwebvh-signing-local module.
didwebvh_signing_local #
LocalKeySigner — an in-memory Ed25519 implementation of didwebvh's
async Signer, backed by package:cryptography,
with JWK-style key import/export. Drop it into any didwebvh operation
(create / update / migrate / deactivate).
A faithful port of the reference Java library
didwebvh-java
(didwebvh-signing-local module).
Install #
dart pub add didwebvh didwebvh_signing_local
Usage #
import 'dart:io';
import 'package:didwebvh/didwebvh.dart';
import 'package:didwebvh_signing_local/didwebvh_signing_local.dart';
final signer = await LocalKeySigner.generate();
final created = await DidWebVh.create('example.com', signer).execute();
// Persist the key material — required to sign every future update.
await File('did-secrets.json').writeAsString(signer.toJson());
// Later: reload and keep signing.
final reloaded = LocalKeySigner.fromJson(await File('did-secrets.json').readAsString());
See example/ for a full
create → sign → resolve round-trip.
License #
Apache-2.0.