Class RegisteredNode

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

public final class RegisteredNode extends Object
Class representing single registered node in the network state. Each registered node in the network state SHALL represent a single non-consensus node that is registered on the network. Registered node identifiers SHALL only be unique within a single realm and shard combination.
  • Field Details

    • registeredNodeId

      @Nonnegative public final long registeredNodeId
      A registered node identifier.
    • adminKey

      public final Key adminKey
      An administrative key controlled by the node operator.
    • description

      public final String description
      A short description of the node.
    • serviceEndpoints

      public final List<RegisteredServiceEndpoint> serviceEndpoints
      A list of service endpoints for client calls.
  • Constructor Details

    • RegisteredNode

      RegisteredNode(long registeredNodeId, Key adminKey, String description, List<RegisteredServiceEndpoint> serviceEndpoint)
      Constructor.
      Parameters:
      registeredNodeId - the registered node identifier.
      adminKey - the admin key.
      description - the description of the node.
      serviceEndpoint - the list of service endpoints.
  • Method Details

    • fromProtobuf

      static RegisteredNode fromProtobuf(RegisteredNode registeredNode)
      Extract the registeredNode from the protobuf.
      Parameters:
      registeredNode - the protobuf
      Returns:
      this the contract object
    • fromJson

      static RegisteredNode fromJson(com.google.gson.JsonObject json)
      Parses a single node entry from the Mirror Node 'registered_nodes' array.
      Parameters:
      json - the json containing specific data for registered node
      Returns:
      this
    • fromBytes

      public static RegisteredNode fromBytes(byte[] bytes) throws com.google.protobuf.InvalidProtocolBufferException
      Extract the registeredNode from a byte array.
      Parameters:
      bytes - the byte array
      Returns:
      RegisteredNode the extracted registeredNode
      Throws:
      com.google.protobuf.InvalidProtocolBufferException - when there is an issue with the protobuf
    • toProtobuf

      RegisteredNode toProtobuf()
      Build the protobuf.
      Returns:
      this the protobuf representation
    • toBytes

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

      public String toString()
      Overrides:
      toString in class Object