Skip to content

purplebase/amber_signer

Repository files navigation

amber_signer

Amber signer for models.

Usage

The constructor needs a ref, so you can initialize it in a custom initialization provider, for example.

AmberSigner? amberSigner; // or: late final AmberSigner amberSigner;

final customInitializationProvider = FutureProvider((ref) async {
  await ref.read(initializationProvider(StorageConfiguration(...)).future);
  amberSigner = AmberSigner(ref);
});

Then just sign partial events:

final note = await PartialNote('hello world').signWith(amberSigner!);

// If Amber manages multiple keys, specify which:
await PartialNote('test').signWith(amberSigner!, withPubkey: pubkey);

License

MIT

About

No description, website, or topics provided.

Resources

License

Stars

1 star

Watchers

1 watching

Forks

Packages

 
 
 

Contributors