java.lang.Object
com.hedera.hashgraph.sdk.AccountBalance
This class represents the account balance object
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic AccountBalancefromBytes(byte[] data) Convert a byte array to an account balance object.(package private) static AccountBalancefromProtobuf(CryptoGetAccountBalanceResponse protobuf) Convert the protobuf object to an account balance object.com.google.protobuf.ByteStringtoBytes()Convert the account balance object to a byte array.(package private) CryptoGetAccountBalanceResponseConvert an account balance object into a protobuf.toString()
-
Field Details
-
hbars
The Hbar balance of the account -
token
Deprecated.- Use `tokens` instead -
tokens
-
tokenDecimals
-
-
Constructor Details
-
AccountBalance
-
-
Method Details
-
fromProtobuf
Convert the protobuf object to an account balance object.- Parameters:
protobuf- protobuf response object- Returns:
- the converted account balance object
-
fromBytes
public static AccountBalance fromBytes(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException Convert a byte array to an account balance object.- Parameters:
data- the byte array- Returns:
- the converted account balance object
- Throws:
com.google.protobuf.InvalidProtocolBufferException- when there is an issue with the protobuf
-
toProtobuf
CryptoGetAccountBalanceResponse toProtobuf()Convert an account balance object into a protobuf.- Returns:
- the protobuf object
-
toBytes
public com.google.protobuf.ByteString toBytes()Convert the account balance object to a byte array.- Returns:
- the converted account balance object
-
toString
-