Class NetworkVersionInfo

java.lang.Object
com.hedera.hashgraph.sdk.NetworkVersionInfo

public class NetworkVersionInfo extends Object
Internal utility class.
  • Field Details

    • protobufVersion

      public final SemanticVersion protobufVersion
      Version of the protobuf schema in use by the network
    • servicesVersion

      public final SemanticVersion servicesVersion
      Version of the Hedera services in use by the network
  • Constructor Details

    • NetworkVersionInfo

      NetworkVersionInfo(SemanticVersion hapi, SemanticVersion hedera)
      Constructor.
      Parameters:
      hapi - the protobuf version
      hedera - the hedera version
  • Method Details

    • fromProtobuf

      protected static NetworkVersionInfo fromProtobuf(NetworkGetVersionInfoResponse proto)
      Create a network version info object from a protobuf.
      Parameters:
      proto - the protobuf
      Returns:
      the new network version object
    • fromBytes

      public static NetworkVersionInfo fromBytes(byte[] bytes) throws com.google.protobuf.InvalidProtocolBufferException
      Create a network version info object from a byte array.
      Parameters:
      bytes - the byte array
      Returns:
      the new network version object
      Throws:
      com.google.protobuf.InvalidProtocolBufferException - when there is an issue with the protobuf
    • toProtobuf

      protected NetworkGetVersionInfoResponse toProtobuf()
      Create the protobuf.
      Returns:
      the protobuf representation
    • toBytes

      public byte[] toBytes()
      Create the byte array.
      Returns:
      the byte array representation