Class AccountInfo

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

public final class AccountInfo extends Object
Current information about an account, including the balance.
  • Field Details

    • accountId

      public final AccountId accountId
      The account ID for which this information applies.
    • contractAccountId

      public final String 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 isDeleted
      If 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

      @Nullable public final AccountId 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

      public final Hbar proxyReceived
      The total proxy staked to this account.
    • key

      public final Key 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

      public final Hbar balance
      The current balance of account.
    • sendRecordThreshold

      public final Hbar sendRecordThreshold
      The threshold amount for which an account record is created (and this account charged for them) for any send/withdraw transaction.
    • receiveRecordThreshold

      public final Hbar 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 isReceiverSignatureRequired
      If true, no transaction can transfer to this account unless signed by this account's key.
    • expirationTime

      public final Instant expirationTime
      The time at which this account is set to expire.
    • autoRenewPeriod

      public final Duration 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

      public final List<LiveHash> 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

      public final Map<TokenId,TokenRelationship> tokenRelationships
    • accountMemo

      public final String accountMemo
      The memo associated with the account
    • ownedNfts

      public final long ownedNfts
      The number of NFTs owned by this account
    • maxAutomaticTokenAssociations

      public final int maxAutomaticTokenAssociations
      The maximum number of tokens that an Account can be implicitly associated with.
    • aliasKey

      @Nullable public final PublicKey aliasKey
      The public key which aliases to this account.
    • ledgerId

      public final LedgerId ledgerId
      The ledger ID the response was returned from; please see HIP-198 for the network-specific IDs.
    • ethereumNonce

      public final long ethereumNonce
      The ethereum transaction nonce associated with this account.
    • hbarAllowances

      @Deprecated public final List<HbarAllowance> hbarAllowances
      Deprecated.
      List of Hbar allowances
    • tokenAllowances

      @Deprecated public final List<TokenAllowance> tokenAllowances
      Deprecated.
      List of token allowances
    • tokenNftAllowances

      @Deprecated public final List<TokenNftAllowance> tokenNftAllowances
      Deprecated.
      List of NFT allowances
    • stakingInfo

      @Nullable public final StakingInfo stakingInfo
      Staking metadata for this account.
  • Method Details

    • fromProtobuf

      static AccountInfo fromProtobuf(CryptoGetInfoResponse.AccountInfo accountInfo)
      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

      Convert an account info object into a protobuf.
      Returns:
      the protobuf object
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • toBytes

      public byte[] toBytes()
      Extract a byte array representation.
      Returns:
      a byte array representation