java.lang.Object
com.hedera.hashgraph.sdk.AccountInfo
Current information about an account, including the balance.
-
Field Summary
FieldsModifier and TypeFieldDescriptionfinal AccountIdThe account ID for which this information applies.final StringThe memo associated with the accountfinal PublicKeyThe public key which aliases to this account.final DurationThe duration for expiration time will extend every this many seconds.final HbarThe current balance of account.final StringThe Contract Account ID comprising both the contract instance and the cryptocurrency account owned by the contract instance, in the format used by Solidity.final longThe ethereum transaction nonce associated with this account.final InstantThe time at which this account is set to expire.final List<HbarAllowance> Deprecated.final booleanIf true, then this account has been deleted, it will disappear when it expires, and all transactions for it will fail except the transaction to extend its expiration date.final booleanIf true, no transaction can transfer to this account unless signed by this account's key.final KeyThe key for the account, which must sign in order to transfer out, or to modify the account in any way other than extending its expiration date.final LedgerIdThe ledger ID the response was returned from; please see HIP-198 for the network-specific IDs.All the livehashes attached to the account (each of which is a hash along with the keys that authorized it and can delete it)final intThe maximum number of tokens that an Account can be implicitly associated with.final longThe number of NFTs owned by this accountfinal AccountIdThe Account ID of the account to which this is proxy staked.final HbarThe total proxy staked to this account.final HbarThe threshold amount for which an account record is created (and this account charged for them) for any transaction above this amount.final HbarThe threshold amount for which an account record is created (and this account charged for them) for any send/withdraw transaction.final StakingInfoStaking metadata for this account.final List<TokenAllowance> Deprecated.final List<TokenNftAllowance> Deprecated.final Map<TokenId, TokenRelationship> -
Method Summary
Modifier and TypeMethodDescriptionstatic AccountInfofromBytes(byte[] bytes) Retrieve the account info from a protobuf byte array.(package private) static AccountInfofromProtobuf(CryptoGetInfoResponse.AccountInfo accountInfo) Retrieve the account info from a protobuf.byte[]toBytes()Extract a byte array representation.(package private) CryptoGetInfoResponse.AccountInfoConvert an account info object into a protobuf.toString()
-
Field Details
-
accountId
The account ID for which this information applies. -
contractAccountId
The Contract Account ID comprising both the contract instance and the cryptocurrency account owned by the contract instance, in the format used by Solidity. -
isDeleted
public final boolean isDeletedIf true, then this account has been deleted, it will disappear when it expires, and all transactions for it will fail except the transaction to extend its expiration date. -
proxyAccountId
The Account ID of the account to which this is proxy staked. If proxyAccountID is null, or is an invalid account, or is an account that isn't a node, then this account is automatically proxy staked to a node chosen by the network, but without earning payments. If the proxyAccountID account refuses to accept proxy staking , or if it is not currently running a node, then it will behave as if proxyAccountID was null. -
proxyReceived
The total proxy staked to this account. -
key
The key for the account, which must sign in order to transfer out, or to modify the account in any way other than extending its expiration date. -
balance
The current balance of account. -
sendRecordThreshold
The threshold amount for which an account record is created (and this account charged for them) for any send/withdraw transaction. -
receiveRecordThreshold
The threshold amount for which an account record is created (and this account charged for them) for any transaction above this amount. -
isReceiverSignatureRequired
public final boolean isReceiverSignatureRequiredIf true, no transaction can transfer to this account unless signed by this account's key. -
expirationTime
The time at which this account is set to expire. -
autoRenewPeriod
The duration for expiration time will extend every this many seconds. If there are insufficient funds, then it extends as long as possible. If it is empty when it expires, then it is deleted. -
liveHashes
All the livehashes attached to the account (each of which is a hash along with the keys that authorized it and can delete it) -
tokenRelationships
-
accountMemo
The memo associated with the account -
ownedNfts
public final long ownedNftsThe number of NFTs owned by this account -
maxAutomaticTokenAssociations
public final int maxAutomaticTokenAssociationsThe maximum number of tokens that an Account can be implicitly associated with. -
aliasKey
The public key which aliases to this account. -
ledgerId
The ledger ID the response was returned from; please see HIP-198 for the network-specific IDs. -
ethereumNonce
public final long ethereumNonceThe ethereum transaction nonce associated with this account. -
hbarAllowances
Deprecated.List of Hbar allowances -
tokenAllowances
Deprecated.List of token allowances -
tokenNftAllowances
Deprecated.List of NFT allowances -
stakingInfo
Staking metadata for this account.
-
-
Method Details
-
fromProtobuf
Retrieve the account info from a protobuf.- Parameters:
accountInfo- the account info protobuf- Returns:
- the account info object
-
fromBytes
public static AccountInfo fromBytes(byte[] bytes) throws com.google.protobuf.InvalidProtocolBufferException Retrieve the account info from a protobuf byte array.- Parameters:
bytes- a byte array representing the protobuf- Returns:
- the account info object
- Throws:
com.google.protobuf.InvalidProtocolBufferException- when there is an issue with the protobuf
-
toProtobuf
CryptoGetInfoResponse.AccountInfo toProtobuf()Convert an account info object into a protobuf.- Returns:
- the protobuf object
-
toString
-
toBytes
public byte[] toBytes()Extract a byte array representation.- Returns:
- a byte array representation
-