private static Optional<TransactionType> getTransactionType(final Bytes opaqueBytes) {
    try {
      byte transactionTypeByte = opaqueBytes.get(0);
      return Optional.of(TransactionType.of(transactionTypeByte));
    } catch (IllegalArgumentException ex) {
      return Optional.empty();
    }
  }
Retrieves the transaction type from the provided bytes. The method attempts to extract the
first byte from the input bytes and interpret it as a transaction type. If the byte does not
correspond to a valid transaction type, the method returns an empty Optional.

@param opaqueBytes the bytes from which to extract the transaction type
@return an Optional containing the TransactionType if the first byte of the input corresponds
    to a valid transaction type, or an empty Optional if it does not
ethereum/core/src/main/java/org/hyperledger/besu/ethereum/core/encoding/TransactionDecoder.java