nip04Decrypt method

  1. @override
Future<Map> nip04Decrypt(
  1. String ciphertext,
  2. String currentUser,
  3. String pubKey,
  4. String? id,
)
override

Implementation

@override
Future<Map<dynamic, dynamic>> nip04Decrypt(
  String ciphertext,
  String currentUser,
  String pubKey,
  String? id,
) async {
  final arguments = {
    "type": "nip04_decrypt",
    "uri_data": ciphertext,
    "current_user": currentUser,
    "pubKey": pubKey,
    "id": id,
  };

  final data = await methodChannel.invokeMethod<Map<dynamic, dynamic>>(
    'nostrsigner',
    arguments,
  );

  return data ?? {};
}