getTransactionById method
//////////////////////////
Transactions
Returns a TransactionResponse object for the transaction at the given transactionId
and confidence
.
transactionId
is a List<int> representing the transaction id to retrieve
confidence
is a double representing the confidence factor of the transaction to retrieve.
options
is a CallOptions
object that can be used to set additional options for the RPC request.
Throws an Exception if an error occurs during the RPC request.
Implementation
/// Returns a [TransactionResponse] object for the transaction at the given [transactionId] and [confidence].
///
/// [transactionId] is a [List<int>] representing the transaction id to retrieve
///
/// [confidence] is a [double] representing the confidence factor of the transaction to retrieve.
///
/// [options] is a [CallOptions] object that can be used to set additional options for the RPC request.
///
/// Throws an [Exception] if an error occurs during the RPC request.
Future<TransactionResponse> getTransactionById({
required int transactionId,
double? confidence,
CallOptions? options,
}) async {
final GetTransactionByIdRequest request = GetTransactionByIdRequest(
confidenceFactor: getConfidenceFactorFromDouble(confidence),
transactionId: getTransactionIdFromInt(transactionId),
);
final TransactionResponse response = await genusTransactionStub.getTransactionById(
request,
options: options,
);
return response;
}