getStorageNoncePublicKey method

Future<String> getStorageNoncePublicKey()

Implementation

Future<String> getStorageNoncePublicKey() async {
  const body = 'query {sharedSecrets {storageNoncePublicKey}}';
  log(
    'getStorageNoncePublicKey: requestHttp.body=$body',
    logsActivation: logsActivation,
  );

  final result = await _client
      .withLogger(
        'getStorageNoncePublicKey',
        logsActivation: logsActivation,
      )
      .query(
        QueryOptions(
          document: gql(body),
          parserFn: (object) => SharedSecrets.fromJson(object),
        ),
      );

  manageLinkException(result);
  return result.parsedData!.storageNoncePublicKey ?? '';
}