encrypt method
Implementation
@override
Future<String?> encrypt(String msg, String destPubKey, {String? id}) async {
if (privateKey == null || privateKey!.isEmpty) {
throw Exception('Private key is required for encryption');
}
final crypto = await _getCrypto();
final result = await crypto
.nip04Encrypt(privateKey!.toJS, destPubKey.toJS, msg.toJS)
.toDart;
return result.toDart;
}