didwebvh_signing_local

pub package

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.

Libraries

didwebvh_signing_local
Local Ed25519 Signer implementation for did:webvh — a faithful Dart port of didwebvh-java's didwebvh-signing-local module.