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) @Nullable AccountIdThe account to be paid for queries and transactions sent to this node.A node's service IP addresses and ports.(package private) @Nullable com.google.protobuf.ByteStringA hash of the X509 cert used for gRPC traffic to this node.(package private) @Nullable StringA description of the node, with UTF-8 encoding up to 100 bytes.(package private) longA non-sequential identifier for the node.(package private) @Nullable 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.@Nullable AccountIdExtract the account id.Extract the list of addresses.@Nullable com.google.protobuf.ByteStringExtract the certificate hash.@Nullable StringExtract the description.longExtract the node id.@Nullable StringExtract the public key.longgetStake()Extract the tiny stake.setAccountId(AccountId accountId) Assign the account id.setAddresses(List<Endpoint> addresses) Assign the list of addresses.@Nullable NodeAddresssetCertHash(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
@Nullable String publicKeyThe RSA public key of the node. -
accountId
@Nullable AccountId accountIdThe 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
@Nullable String descriptionA 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
public @Nullable 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
-