getTransaction method

Future<GetTransactionResponse> getTransaction(
  1. 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 {
  JsonRpcMethod getTransactionStatus =
      JsonRpcMethod("getTransaction", args: {'hash': 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);
}