currentMempoolContains method
Returns a CurrentMempoolContainsRes object for the transaction at the given transactionId.
transactionIdBytes is an List of integers representing the transaction ID to retrieve
transactionIdString is an String representing the transaction ID to retrieve
options is an CallOptions for runtime options with RPC
Throws an Exception if transaction ID validation fails or an error occurs during the RPC request.
Implementation
Future<CurrentMempoolContainsRes> currentMempoolContains({
List<int> transactionIdBytes = const [],
String transactionIdString = "",
CallOptions? options,
}) async {
if (transactionIdBytes.isEmpty && transactionIdString.isEmpty) {
throw Exception(ErrorMessages.missingTransactionId);
}
final CurrentMempoolContainsReq request = CurrentMempoolContainsReq(
transactionId: !transactionIdBytes.isEmpty
? getTransactionIdFromList(transactionIdBytes)
: getTransactionIdFromString(transactionIdString));
final CurrentMempoolContainsRes response = await nodeStub.currentMempoolContains(
request,
options: options,
);
return response;
}