getPublicKey method

  1. @override
Future<Map> getPublicKey({
  1. List<Permission>? permissions,
})
override

Implementation

@override
Future<Map<dynamic, dynamic>> getPublicKey(
    {List<Permission>? permissions}) async {
  final arguments = {
    "type": "get_public_key",
    "uri_data": "login",
  };

  if (permissions != null) {
    arguments['permissions'] = jsonEncode(permissions);
  }

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

  return data ?? {};
}