sign method
Signs the given event and returns the signed event
Implementation
@override
Future<Nip01Event> sign(Nip01Event event) async {
if (privateKey == null || privateKey!.isEmpty) {
throw Exception('Private key is required for signing');
}
final crypto = await _getCrypto();
final signature = await crypto
.signEvent(privateKey!.toJS, event.id.toJS)
.toDart;
return event.copyWith(sig: signature.toDart);
}