getTransaction method

Future<GetTransactionResponse> getTransaction(
  1. String transactionHash
)
inherited

Clients will poll this to tell when the transaction has been completed. See: https://developers.stellar.org/network/soroban-rpc/api-reference/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);
}