public static RequestType of(final int serializedTypeValue) {
    return switch (serializedTypeValue) {
      case 0x00 -> DEPOSIT;
      case 0x01 -> WITHDRAWAL;
      case 0x02 -> CONSOLIDATION;
      default ->
          throw new InvalidRequestTypeException(
              String.format("Unsupported request type: 0x%02X", serializedTypeValue));
    };
  }
Returns the {@link RequestType} corresponding to the given serialized type value.

@param serializedTypeValue the serialized type value.
@return the corresponding {@link RequestType}.
@throws IllegalArgumentException if the serialized type value does not correspond to any {@link
    RequestType}.
datatypes/src/main/java/org/hyperledger/besu/datatypes/RequestType.java