sign method

Future<void> sign(
  1. Nip01Event event
)

low-level method, should not be used directly in most cases, use broadcast instead which calls signing on the signer

Implementation

Future<void> sign(Nip01Event event) async {
  Account? account = getLoggedAccount();
  if (account != null && account.signer.canSign()) {
    return account.signer.sign(event);
  }
  throw Exception("Cannot sign");
}