private boolean applyFilters(
      final PendingTransaction pendingTransaction, final List<Filter> filters)
      throws InvalidJsonRpcParameters {
    boolean isValid = true;
    for (Filter filter : filters) {
      final Predicate predicate = filter.getPredicate();
      final String value = filter.getFieldValue();
      switch (filter.getFieldName()) {
        case FROM_FIELD:
          isValid = validateFrom(pendingTransaction, predicate, value);
          break;
        case TO_FIELD:
          isValid = validateTo(pendingTransaction, predicate, value);
          break;
        case GAS_PRICE_FIELD:
          isValid =
              validateWei(
                  pendingTransaction.getTransaction().getGasPrice().get(), predicate, value);
          break;
        case GAS_FIELD:
          isValid =
              validateWei(
                  Wei.of(pendingTransaction.getTransaction().getGasLimit()), predicate, value);
          break;
        case VALUE_FIELD:
          isValid = validateWei(pendingTransaction.getTransaction().getValue(), predicate, value);
          break;
        case NONCE_FIELD:
          isValid = validateNonce(pendingTransaction, predicate, value);
          break;
      }
      if (!isValid) {
        return false;
      }
    }
    return true;
  }
This class allows to filter a list of pending transactions

<p>Here is the list of fields that can be used to filter a transaction : from, to, gas, gasPrice,
value, nonce
ethereum/api/src/main/java/org/hyperledger/besu/ethereum/api/jsonrpc/internal/results/transaction/pool/PendingTransactionFilter.java