Skip to content

purplebase/amber_signer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

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

Watchers

Forks

Packages

No packages published

Languages