getStorageNoncePublicKey method
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),
),
);
if (result.exception?.linkException != null) {
throw ArchethicConnectionException(
result.exception!.linkException.toString(),
);
}
return result.parsedData!.storageNoncePublicKey ?? '';
}