getTransaction method
- String transactionHash
Clients will poll this to tell when the transaction has been completed. See: https://soroban.stellar.org/api/methods/getTransaction
Implementation
Future<GetTransactionResponse> getTransaction(String transactionHash) async {
if (!this.acknowledgeExperimental) {
printExperimentalFlagErr();
return GetTransactionResponse.fromJson(_experimentalErr);
}
JsonRpcMethod getTransactionStatus =
JsonRpcMethod("getTransaction", args: transactionHash);
dio.Response response = await _dio.post(_serverUrl,
data: json.encode(getTransactionStatus),
options: dio.Options(headers: _headers));
if (enableLogging) {
print("getTransaction response: $response");
}
return GetTransactionResponse.fromJson(response.data);
}