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