java.lang.Object
com.hedera.hashgraph.sdk.NodeAddress
- All Implemented Interfaces:
Cloneable
The metadata for a Node – including IP Address, and the crypto account associated with the Node.
See Hedera Documentation
-
Field Summary
FieldsModifier and TypeFieldDescription(package private) AccountIdThe account to be paid for queries and transactions sent to this node.A node's service IP addresses and ports.(package private) com.google.protobuf.ByteStringA hash of the X509 cert used for gRPC traffic to this node.(package private) StringA description of the node, with UTF-8 encoding up to 100 bytes.(package private) longA non-sequential identifier for the node.(package private) StringThe RSA public key of the node.(package private) longThe amount of tinybars staked to the node. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionclone()cloneEndpoints(List<Endpoint> endpoints) (package private) static NodeAddressfromProtobuf(NodeAddress nodeAddress) Create a node from a protobuf.Extract the account id.Extract the list of addresses.com.google.protobuf.ByteStringExtract the certificate hash.Extract the description.longExtract the node id.Extract the public key.longgetStake()Extract the tiny stake.setAccountId(AccountId accountId) Assign the account id.setAddresses(List<Endpoint> addresses) Assign the list of addresses.setCertHash(com.google.protobuf.ByteString certHash) Assign the certificate hash.setDescription(String description) Assign the description.setNodeId(long nodeId) Assign the node id.setPublicKey(String publicKey) Assign the public key.setStake(long stake) Assign the tiny bar stake.(package private) NodeAddressConvert the node address object into a protobuf.toString()
-
Field Details
-
publicKey
The RSA public key of the node. -
accountId
The account to be paid for queries and transactions sent to this node. -
nodeId
long nodeIdA non-sequential identifier for the node. -
certHash
@Nullable com.google.protobuf.ByteString certHashA hash of the X509 cert used for gRPC traffic to this node. -
addresses
A node's service IP addresses and ports. -
description
A description of the node, with UTF-8 encoding up to 100 bytes. -
stake
long stakeThe amount of tinybars staked to the node.
-
-
Constructor Details
-
NodeAddress
NodeAddress()Constructor.
-
-
Method Details
-
fromProtobuf
Create a node from a protobuf.- Parameters:
nodeAddress- the protobuf- Returns:
- the new node
-
getPublicKey
Extract the public key.- Returns:
- the public key
-
setPublicKey
Assign the public key.- Parameters:
publicKey- the public key- Returns:
this
-
getAccountId
Extract the account id.- Returns:
- the account id
-
setAccountId
Assign the account id.- Parameters:
accountId- the account id- Returns:
this
-
getNodeId
public long getNodeId()Extract the node id.- Returns:
- the node id
-
setNodeId
Assign the node id.- Parameters:
nodeId- the node id- Returns:
this
-
getCertHash
@Nullable public com.google.protobuf.ByteString getCertHash()Extract the certificate hash.- Returns:
- the certificate hash
-
setCertHash
Assign the certificate hash.- Parameters:
certHash- the certificate hash- Returns:
this
-
getAddresses
Extract the list of addresses.- Returns:
- the list of addresses
-
setAddresses
Assign the list of addresses.- Parameters:
addresses- the list of addresses- Returns:
this
-
cloneEndpoints
-
getDescription
Extract the description.- Returns:
- the description
-
setDescription
Assign the description.- Parameters:
description- the description- Returns:
this
-
getStake
public long getStake()Extract the tiny stake.- Returns:
- the tiny stake
-
setStake
Assign the tiny bar stake.- Parameters:
stake- the tiny bar stake- Returns:
this
-
toProtobuf
NodeAddress toProtobuf()Convert the node address object into a protobuf.- Returns:
- the protobuf representation.
-
toString
-
clone
-