Skip to main content

dostr_signer 0.2.0 copy "dostr_signer: ^0.2.0" to clipboard
dostr_signer: ^0.2.0 copied to clipboard

The NostrSigner interface that signers implement, and the accounts and AuthPolicy that decide when one is revealed to a relay (NIP-42) or Blossom.

example/dostr_signer_example.dart

import 'package:dostr_nip01/dostr_nip01.dart';
import 'package:dostr_signer/dostr_signer.dart';

/// Returns null when the request is rejected, cancelled, or fails.
Future<Nip01Event?> signNote(NostrSigner signer, String text) async {
  try {
    return await signer.sign(
      Nip01Event(
        pubkey: signer.publicKey,
        kind: Nip01Event.kTextNoteKind,
        tags: [],
        content: text,
      ),
    );
  } on SignerRequestException {
    return null;
  }
}
0
likes
160
points
24
downloads

Documentation

API reference

Publisher

unverified uploader

Weekly Downloads

The NostrSigner interface that signers implement, and the accounts and AuthPolicy that decide when one is revealed to a relay (NIP-42) or Blossom.

Repository (GitHub)
View/report issues

Topics

#nostr #dostr #authentication

License

MIT (license)

Dependencies

dostr_nip01

More

Packages that depend on dostr_signer