java.lang.Object
com.google.protobuf.AbstractMessageLite<Account,Account.Builder>
com.google.protobuf.GeneratedMessageLite<Account,Account.Builder>
com.hedera.hashgraph.sdk.proto.Account
- All Implemented Interfaces:
com.google.protobuf.MessageLite,com.google.protobuf.MessageLiteOrBuilder,AccountOrBuilder
@Generated
public final class Account
extends com.google.protobuf.GeneratedMessageLite<Account,Account.Builder>
implements AccountOrBuilder
* A single Account in the Hedera distributed ledger. Each Account SHALL have a unique three-part identifier, a Key, and one or more token balances.<br/> Each Account SHALL have an alias, which has multiple forms, and MAY be set automatically.<br/> Several additional items SHALL be associated with the Account to enable full functionality.<br/> Assets SHALL be represented as linked-lists with only the "head" item referenced directly in the Account, and the remaining items SHALL be accessible via the token relation or unique tokens maps.<br/> Accounts, as most items in the network, SHALL have an expiration time, recorded as seconds since the epoch, and MUST be "renewed" for a small fee at expiration. This helps to reduce the amount of inactive accounts retained in state.<br/> Another account MAY be designated to pay any renewal fees and automatically renew an account for (by default) 30-90 days at a time as a means to optionally ensure important accounts remain active.<br/> Accounts MAY participate in securing the network by "staking" the account balances to a particular network node, and receive a portion of network fees as a reward. An account MAY optionally decline these rewards but still stake its balances.<br/> An account MAY optionally require that inbound transfer transactions be signed by that account as receiver (in addition to the sender's signature).<br/> As with all network entities, Account ID SHALL be represented as shard.realm.X.<br/> Alias and contractId SHALL be additional identifiers used to connect accounts to transactions before the account is fully enabled, or in EVM contracts.<br/> --- #### Alias There is considerable complexity with `alias` (aka `evm_address`) for Accounts. Much of this comes from the existence of a "hidden" alias for almost all accounts, and the reuse of the alias field for both EVM reference and "automatic" account creation. For the purposes of this specification, we will use the following terms for clarity. - `key_alias` is the account public key as a protobuf serialized message and used for auto-creation and subsequent lookup. This is only valid if the account key is a single `primitive` key, either ED25519 or ECDSA_SECP256K1. - `evm_address` exists for every account and is one of - `contract_address`, which is the 20 byte EVM contract address per EIP-1014 - `evm_key_address`, which is the keccak-256 hash of a ECDSA_SECP256K1 `primitive` key. - This is for accounts lazy-created from EVM public keys, when the corresponding ECDSA_SECP256K1 public key is presented in a transaction signed by the private key for that public key, the account is created that key assigned, and the protobuf-serialized form is set as the account alias. - `long_zero`, is a synthetic 20 byte address inferred for "normally" created accounts. It is constructed from the "standard" AccountID as follows. - 4 byte big-endian shard number - 8 byte big-endian realm number - 8 byte big-endian entity number The `alias` field in the `Account` message SHALL contain one of four values for any given account. - The `key_alias`, if the account was created by transferring HBAR to the account referenced by `key_alias`. - The `evm_key_address` if the account was created from an EVM public key - The `contract_address` if the account belongs to an EVM contract - Not-Set/null/Bytes.EMPTY (collectively `null`) if the account was created normally If the `alias` field of an `Account` is any form of `null`, then the account MAY be referenced by `alias` in an `AccountID` by using the `long_zero` address for the account. This "hidden default" alias SHALL NOT be stored, but is synthesized by the node software as needed, and may be synthesized by an EVM contract or client software as well. An AccountID in a transaction MAY reference an `Account` with `shard`.`realm`.`alias`.<br/> If the account `alias` field is set for an Account, that value SHALL be the account alias.<br/> If the account `alias` field is not set for an Account, the `long_zero` alias SHALL be the account alias.Protobuf type
proto.Account-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final class* A single Account in the Hedera distributed ledger.static enumNested classes/interfaces inherited from class com.google.protobuf.GeneratedMessageLite
com.google.protobuf.GeneratedMessageLite.DefaultInstanceBasedParser<T extends com.google.protobuf.GeneratedMessageLite<T,?>>, com.google.protobuf.GeneratedMessageLite.ExtendableBuilder<MessageType extends com.google.protobuf.GeneratedMessageLite.ExtendableMessage<MessageType, BuilderType>, BuilderType extends com.google.protobuf.GeneratedMessageLite.ExtendableBuilder<MessageType, BuilderType>>, com.google.protobuf.GeneratedMessageLite.ExtendableMessage<MessageType extends com.google.protobuf.GeneratedMessageLite.ExtendableMessage<MessageType, BuilderType>, BuilderType extends com.google.protobuf.GeneratedMessageLite.ExtendableBuilder<MessageType, BuilderType>>, com.google.protobuf.GeneratedMessageLite.ExtendableMessageOrBuilder<MessageType extends com.google.protobuf.GeneratedMessageLite.ExtendableMessage<MessageType, BuilderType>, BuilderType extends com.google.protobuf.GeneratedMessageLite.ExtendableBuilder<MessageType, BuilderType>>, com.google.protobuf.GeneratedMessageLite.GeneratedExtension<ContainingType extends com.google.protobuf.MessageLite, Type>, com.google.protobuf.GeneratedMessageLite.MethodToInvoke, com.google.protobuf.GeneratedMessageLite.SerializedForm Nested classes/interfaces inherited from class com.google.protobuf.AbstractMessageLite
com.google.protobuf.AbstractMessageLite.InternalOneOfEnum -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intFields inherited from class com.google.protobuf.GeneratedMessageLite
unknownFieldsFields inherited from class com.google.protobuf.AbstractMessageLite
memoizedHashCode -
Method Summary
Modifier and TypeMethodDescriptionprotected final ObjectdynamicMethod(com.google.protobuf.GeneratedMessageLite.MethodToInvoke method, Object arg0, Object arg1) * The unique ID of this account.com.google.protobuf.ByteStringgetAlias()* An account EVM alias.getApproveForAllNftAllowances(int index) * A list of non-fungible token (NFT) allowances approved by this account.int* A list of non-fungible token (NFT) allowances approved by this account.* A list of non-fungible token (NFT) allowances approved by this account.getApproveForAllNftAllowancesOrBuilder(int index) * A list of non-fungible token (NFT) allowances approved by this account.List<? extends AccountApprovalForAllAllowanceOrBuilder> * A list of non-fungible token (NFT) allowances approved by this account.* An account identifier for automatic renewal.<br/> This is the identifier of another account, in the same shard and realm as this account, that has signed a transaction allowing the network to use its balance, if needed, to automatically extend this account's expiration time during automatic renewal processing.long* A count of the number of seconds to extend this account's expiration.int* A count of smart contract key-value pairs.<br/> If this account is a smart-contract, this is the number of key-value pairs stored on the contract.getCryptoAllowances(int index) * A list of crypto (HBAR) allowances approved by this account.int* A list of crypto (HBAR) allowances approved by this account.* A list of crypto (HBAR) allowances approved by this account.getCryptoAllowancesOrBuilder(int index) * A list of crypto (HBAR) allowances approved by this account.List<? extends AccountCryptoAllowanceOrBuilder> * A list of crypto (HBAR) allowances approved by this account.boolean* A boolean indicating that this account has chosen to decline rewards for staking its balances.static Accountcom.google.protobuf.ByteString* The delegated contract address set for this account.boolean* A boolean indicating that this account is deleted.long* A nonce of this account for Ethereum interoperability.long* The current expiration time of this account, in seconds since the epoch.boolean* A flag indicating that the account is expired and pending removal.com.google.protobuf.ByteString* A contract storage key.<br/> This is the first key in the doubly-linked list of this contract's storage mappings.long* If the account has more than zero hooks in use, the id of the first hook in its doubly-linked list of hooks.* A NftID at the head of the linked list for this account from the unique tokens map.<br/> The unique token relations are connected by including the "next" and "previous" NftID in each Nft message.long* A serial number in the NftID at the head of the linked list for this account from unique tokens map.* A pending airdrop ID.<br/> This is the head of the linked list for this account from the account airdrops map.<br/> <p> The account airdrops SHALL be connected by including the "next" and "previous" `PendingAirdropID` in each `AccountAirdrop` message.<br/> This value SHALL NOT be empty if this account is "sender" for any pending airdrop, and SHALL be empty otherwise.* A token ID at the head of the linked list for this account from the token relations map.<br/> The token relations are connected by including the "next" and "previous" TokenID in each TokenRelation message.getKey()* The key to be used to sign transactions from this account, if any.int* A maximum for the number of tokens that can be automatically associated with this account.getMemo()* A short description of this account.com.google.protobuf.ByteString* A short description of this account.int* A count of tokens associated with this account.long* The number of storage slots in use by this account's EVM hooks.long* The number of hooks currently in use on this account.long* A number of non-fungible tokens (NTFs) owned by the account.long* A number of pending airdrops.int* A count of tokens with a positive balance associated with this account.int* A count of tokens for which this account is the treasury account.boolean* A boolean indicating that the account requires a receiver signature for inbound token transfer transactions.boolean* A boolean indicating that this account is owned by a smart contract.long* An amount of HBAR staked by this account at the start of the last reward period.* An identifier for the account to which this account is staking its balances as a proxy.long* An identifier for the node this account is staked to.long* The amount of HBAR staked to this account by others.long* If this account stakes to another account, this value SHALL be set to the time when the current period for staking and reward calculations began.long* The HBAR balance of this account, in tinybar (10<sup>-8</sup> HBAR).getTokenAllowances(int index) * A list of fungible token allowances approved by this account.int* A list of fungible token allowances approved by this account.* A list of fungible token allowances approved by this account.getTokenAllowancesOrBuilder(int index) * A list of fungible token allowances approved by this account.List<? extends AccountFungibleTokenAllowanceOrBuilder> * A list of fungible token allowances approved by this account.int* A count of used auto-association slots.boolean* The unique ID of this account.boolean* An account identifier for automatic renewal.<br/> This is the identifier of another account, in the same shard and realm as this account, that has signed a transaction allowing the network to use its balance, if needed, to automatically extend this account's expiration time during automatic renewal processing.boolean* A NftID at the head of the linked list for this account from the unique tokens map.<br/> The unique token relations are connected by including the "next" and "previous" NftID in each Nft message.boolean* A pending airdrop ID.<br/> This is the head of the linked list for this account from the account airdrops map.<br/> <p> The account airdrops SHALL be connected by including the "next" and "previous" `PendingAirdropID` in each `AccountAirdrop` message.<br/> This value SHALL NOT be empty if this account is "sender" for any pending airdrop, and SHALL be empty otherwise.boolean* A token ID at the head of the linked list for this account from the token relations map.<br/> The token relations are connected by including the "next" and "previous" TokenID in each TokenRelation message.booleanhasKey()* The key to be used to sign transactions from this account, if any.boolean* An identifier for the account to which this account is staking its balances as a proxy.boolean* An identifier for the node this account is staked to.static Account.Builderstatic Account.BuildernewBuilder(Account prototype) static AccountparseDelimitedFrom(InputStream input) static AccountparseDelimitedFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) static AccountparseFrom(byte[] data) static AccountparseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) static AccountparseFrom(com.google.protobuf.ByteString data) static AccountparseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) static AccountparseFrom(com.google.protobuf.CodedInputStream input) static AccountparseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) static AccountparseFrom(InputStream input) static AccountparseFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) static AccountparseFrom(ByteBuffer data) static AccountparseFrom(ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) static com.google.protobuf.Parser<Account> parser()Methods inherited from class com.google.protobuf.GeneratedMessageLite
createBuilder, createBuilder, emptyBooleanList, emptyDoubleList, emptyFloatList, emptyIntList, emptyLongList, emptyProtobufList, equals, getDefaultInstanceForType, getParserForType, getSerializedSize, hashCode, isInitialized, makeImmutable, mergeLengthDelimitedField, mergeUnknownFields, mergeVarintField, mutableCopy, mutableCopy, mutableCopy, mutableCopy, mutableCopy, mutableCopy, newBuilderForType, newMessageInfo, newRepeatedGeneratedExtension, newSingularGeneratedExtension, parseDelimitedFrom, parseDelimitedFrom, parseFrom, parseFrom, parseFrom, parseFrom, parseFrom, parseFrom, parseFrom, parseFrom, parseFrom, parseFrom, parsePartialFrom, parseUnknownField, registerDefaultInstance, toBuilder, toString, writeToMethods inherited from class com.google.protobuf.AbstractMessageLite
addAll, checkByteStringIsUtf8, toByteArray, toByteString, writeDelimitedTo, writeToMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface com.google.protobuf.MessageLiteOrBuilder
getDefaultInstanceForType, isInitialized
-
Field Details
-
ACCOUNT_ID_FIELD_NUMBER
public static final int ACCOUNT_ID_FIELD_NUMBER- See Also:
-
ALIAS_FIELD_NUMBER
public static final int ALIAS_FIELD_NUMBER- See Also:
-
KEY_FIELD_NUMBER
public static final int KEY_FIELD_NUMBER- See Also:
-
EXPIRATION_SECOND_FIELD_NUMBER
public static final int EXPIRATION_SECOND_FIELD_NUMBER- See Also:
-
TINYBAR_BALANCE_FIELD_NUMBER
public static final int TINYBAR_BALANCE_FIELD_NUMBER- See Also:
-
MEMO_FIELD_NUMBER
public static final int MEMO_FIELD_NUMBER- See Also:
-
DELETED_FIELD_NUMBER
public static final int DELETED_FIELD_NUMBER- See Also:
-
STAKED_TO_ME_FIELD_NUMBER
public static final int STAKED_TO_ME_FIELD_NUMBER- See Also:
-
STAKE_PERIOD_START_FIELD_NUMBER
public static final int STAKE_PERIOD_START_FIELD_NUMBER- See Also:
-
STAKED_ACCOUNT_ID_FIELD_NUMBER
public static final int STAKED_ACCOUNT_ID_FIELD_NUMBER- See Also:
-
STAKED_NODE_ID_FIELD_NUMBER
public static final int STAKED_NODE_ID_FIELD_NUMBER- See Also:
-
DECLINE_REWARD_FIELD_NUMBER
public static final int DECLINE_REWARD_FIELD_NUMBER- See Also:
-
RECEIVER_SIG_REQUIRED_FIELD_NUMBER
public static final int RECEIVER_SIG_REQUIRED_FIELD_NUMBER- See Also:
-
HEAD_TOKEN_ID_FIELD_NUMBER
public static final int HEAD_TOKEN_ID_FIELD_NUMBER- See Also:
-
HEAD_NFT_ID_FIELD_NUMBER
public static final int HEAD_NFT_ID_FIELD_NUMBER- See Also:
-
HEAD_NFT_SERIAL_NUMBER_FIELD_NUMBER
public static final int HEAD_NFT_SERIAL_NUMBER_FIELD_NUMBER- See Also:
-
NUMBER_OWNED_NFTS_FIELD_NUMBER
public static final int NUMBER_OWNED_NFTS_FIELD_NUMBER- See Also:
-
MAX_AUTO_ASSOCIATIONS_FIELD_NUMBER
public static final int MAX_AUTO_ASSOCIATIONS_FIELD_NUMBER- See Also:
-
USED_AUTO_ASSOCIATIONS_FIELD_NUMBER
public static final int USED_AUTO_ASSOCIATIONS_FIELD_NUMBER- See Also:
-
NUMBER_ASSOCIATIONS_FIELD_NUMBER
public static final int NUMBER_ASSOCIATIONS_FIELD_NUMBER- See Also:
-
SMART_CONTRACT_FIELD_NUMBER
public static final int SMART_CONTRACT_FIELD_NUMBER- See Also:
-
NUMBER_POSITIVE_BALANCES_FIELD_NUMBER
public static final int NUMBER_POSITIVE_BALANCES_FIELD_NUMBER- See Also:
-
ETHEREUM_NONCE_FIELD_NUMBER
public static final int ETHEREUM_NONCE_FIELD_NUMBER- See Also:
-
STAKE_AT_START_OF_LAST_REWARDED_PERIOD_FIELD_NUMBER
public static final int STAKE_AT_START_OF_LAST_REWARDED_PERIOD_FIELD_NUMBER- See Also:
-
AUTO_RENEW_ACCOUNT_ID_FIELD_NUMBER
public static final int AUTO_RENEW_ACCOUNT_ID_FIELD_NUMBER- See Also:
-
AUTO_RENEW_SECONDS_FIELD_NUMBER
public static final int AUTO_RENEW_SECONDS_FIELD_NUMBER- See Also:
-
CONTRACT_KV_PAIRS_NUMBER_FIELD_NUMBER
public static final int CONTRACT_KV_PAIRS_NUMBER_FIELD_NUMBER- See Also:
-
CRYPTO_ALLOWANCES_FIELD_NUMBER
public static final int CRYPTO_ALLOWANCES_FIELD_NUMBER- See Also:
-
APPROVE_FOR_ALL_NFT_ALLOWANCES_FIELD_NUMBER
public static final int APPROVE_FOR_ALL_NFT_ALLOWANCES_FIELD_NUMBER- See Also:
-
TOKEN_ALLOWANCES_FIELD_NUMBER
public static final int TOKEN_ALLOWANCES_FIELD_NUMBER- See Also:
-
NUMBER_TREASURY_TITLES_FIELD_NUMBER
public static final int NUMBER_TREASURY_TITLES_FIELD_NUMBER- See Also:
-
EXPIRED_AND_PENDING_REMOVAL_FIELD_NUMBER
public static final int EXPIRED_AND_PENDING_REMOVAL_FIELD_NUMBER- See Also:
-
FIRST_CONTRACT_STORAGE_KEY_FIELD_NUMBER
public static final int FIRST_CONTRACT_STORAGE_KEY_FIELD_NUMBER- See Also:
-
HEAD_PENDING_AIRDROP_ID_FIELD_NUMBER
public static final int HEAD_PENDING_AIRDROP_ID_FIELD_NUMBER- See Also:
-
NUMBER_PENDING_AIRDROPS_FIELD_NUMBER
public static final int NUMBER_PENDING_AIRDROPS_FIELD_NUMBER- See Also:
-
NUMBER_HOOKS_IN_USE_FIELD_NUMBER
public static final int NUMBER_HOOKS_IN_USE_FIELD_NUMBER- See Also:
-
FIRST_HOOK_ID_FIELD_NUMBER
public static final int FIRST_HOOK_ID_FIELD_NUMBER- See Also:
-
NUMBER_EVM_HOOK_STORAGE_SLOTS_FIELD_NUMBER
public static final int NUMBER_EVM_HOOK_STORAGE_SLOTS_FIELD_NUMBER- See Also:
-
DELEGATION_ADDRESS_FIELD_NUMBER
public static final int DELEGATION_ADDRESS_FIELD_NUMBER- See Also:
-
-
Method Details
-
getStakedIdCase
- Specified by:
getStakedIdCasein interfaceAccountOrBuilder
-
hasAccountId
public boolean hasAccountId()* The unique ID of this account. <p> An account ID, when assigned to this field, SHALL be of the form `shard.realm.number`.<br/> Transactions MAY reference the account by alias, but the account itself MUST always have a purely numeric identifier. This numeric ID is the value used to reference the account in query responses, transaction receipts, transaction records, and the block stream.
.proto.AccountID account_id = 1;- Specified by:
hasAccountIdin interfaceAccountOrBuilder- Returns:
- Whether the accountId field is set.
-
getAccountId
* The unique ID of this account. <p> An account ID, when assigned to this field, SHALL be of the form `shard.realm.number`.<br/> Transactions MAY reference the account by alias, but the account itself MUST always have a purely numeric identifier. This numeric ID is the value used to reference the account in query responses, transaction receipts, transaction records, and the block stream.
.proto.AccountID account_id = 1;- Specified by:
getAccountIdin interfaceAccountOrBuilder- Returns:
- The accountId.
-
getAlias
public com.google.protobuf.ByteString getAlias()* An account EVM alias. <p> This is a value used in some contexts to reference an account when the numeric account identifier is not available.<br/> This field, when set to a non-default value, is immutable and SHALL NOT be changed.
bytes alias = 2;- Specified by:
getAliasin interfaceAccountOrBuilder- Returns:
- The alias.
-
hasKey
public boolean hasKey()* The key to be used to sign transactions from this account, if any. <p> This key SHALL NOT be set for hollow accounts until the account is finalized.<br/> This key SHALL be set on all other accounts, except for certain immutable accounts (0.0.800 and 0.0.801) necessary for network function and otherwise secured by the governing council.
.proto.Key key = 3;- Specified by:
hasKeyin interfaceAccountOrBuilder- Returns:
- Whether the key field is set.
-
getKey
* The key to be used to sign transactions from this account, if any. <p> This key SHALL NOT be set for hollow accounts until the account is finalized.<br/> This key SHALL be set on all other accounts, except for certain immutable accounts (0.0.800 and 0.0.801) necessary for network function and otherwise secured by the governing council.
.proto.Key key = 3;- Specified by:
getKeyin interfaceAccountOrBuilder- Returns:
- The key.
-
getExpirationSecond
public long getExpirationSecond()* The current expiration time of this account, in seconds since the epoch. <p> For this purpose, `epoch` SHALL be the UNIX epoch with 0 at `1970-01-01T00:00:00.000Z`.<br/> This account SHALL be due standard renewal fees when the network consensus time exceeds this time.<br/> If rent and expiration are enabled for the network, and automatic renewal is enabled for this account, renewal fees SHALL be charged after this time, and, if charged, the expiration time SHALL be extended for another renewal period.<br/> This account MAY be expired and removed from state at any point after this time if not renewed.<br/> An account holder MAY extend this time by submitting an account update transaction to modify expiration time, subject to the current maximum expiration time for the network.
int64 expiration_second = 4;- Specified by:
getExpirationSecondin interfaceAccountOrBuilder- Returns:
- The expirationSecond.
-
getTinybarBalance
public long getTinybarBalance()* The HBAR balance of this account, in tinybar (10<sup>-8</sup> HBAR). <p> This value is a signed integer for efficiency, but MUST always be a whole number.
int64 tinybar_balance = 5;- Specified by:
getTinybarBalancein interfaceAccountOrBuilder- Returns:
- The tinybarBalance.
-
getMemo
* A short description of this account. <p> This value, if set, MUST NOT exceed `transaction.maxMemoUtf8Bytes` (default 100) bytes when encoded as UTF-8.
string memo = 6;- Specified by:
getMemoin interfaceAccountOrBuilder- Returns:
- The memo.
-
getMemoBytes
public com.google.protobuf.ByteString getMemoBytes()* A short description of this account. <p> This value, if set, MUST NOT exceed `transaction.maxMemoUtf8Bytes` (default 100) bytes when encoded as UTF-8.
string memo = 6;- Specified by:
getMemoBytesin interfaceAccountOrBuilder- Returns:
- The bytes for memo.
-
getDeleted
public boolean getDeleted()* A boolean indicating that this account is deleted.
bool deleted = 7;- Specified by:
getDeletedin interfaceAccountOrBuilder- Returns:
- The deleted.
-
getStakedToMe
public long getStakedToMe()* The amount of HBAR staked to this account by others.
int64 staked_to_me = 8;- Specified by:
getStakedToMein interfaceAccountOrBuilder- Returns:
- The stakedToMe.
-
getStakePeriodStart
public long getStakePeriodStart()* If this account stakes to another account, this value SHALL be set to the time when the current period for staking and reward calculations began.
int64 stake_period_start = 9;- Specified by:
getStakePeriodStartin interfaceAccountOrBuilder- Returns:
- The stakePeriodStart.
-
hasStakedAccountId
public boolean hasStakedAccountId()* An identifier for the account to which this account is staking its balances as a proxy. <p> If this account is not currently staking its balances, then this field, if set, SHALL be the sentinel value of `0.0.0`.
.proto.AccountID staked_account_id = 10;- Specified by:
hasStakedAccountIdin interfaceAccountOrBuilder- Returns:
- Whether the stakedAccountId field is set.
-
getStakedAccountId
* An identifier for the account to which this account is staking its balances as a proxy. <p> If this account is not currently staking its balances, then this field, if set, SHALL be the sentinel value of `0.0.0`.
.proto.AccountID staked_account_id = 10;- Specified by:
getStakedAccountIdin interfaceAccountOrBuilder- Returns:
- The stakedAccountId.
-
hasStakedNodeId
public boolean hasStakedNodeId()* An identifier for the node this account is staked to. <p> If this account is not currently staking its balances, then this field, if set, SHALL be the sentinel value of `-1`. Wallet software SHOULD surface staking issues to users and provide a simple mechanism to update staking to a new node ID in the event the prior staked node ID ceases to be valid. <p> <blockquote>Note: node IDs do fluctuate as node operators change. The Account owner MUST submit a new transaction to change this value if the current node ID changes or ceases to operate as a node. An account with an invalid `staked_node_id` SHALL NOT participate in staking until the `staked_node_id` is updated to a valid node ID. </blockquote>
int64 staked_node_id = 11;- Specified by:
hasStakedNodeIdin interfaceAccountOrBuilder- Returns:
- Whether the stakedNodeId field is set.
-
getStakedNodeId
public long getStakedNodeId()* An identifier for the node this account is staked to. <p> If this account is not currently staking its balances, then this field, if set, SHALL be the sentinel value of `-1`. Wallet software SHOULD surface staking issues to users and provide a simple mechanism to update staking to a new node ID in the event the prior staked node ID ceases to be valid. <p> <blockquote>Note: node IDs do fluctuate as node operators change. The Account owner MUST submit a new transaction to change this value if the current node ID changes or ceases to operate as a node. An account with an invalid `staked_node_id` SHALL NOT participate in staking until the `staked_node_id` is updated to a valid node ID. </blockquote>
int64 staked_node_id = 11;- Specified by:
getStakedNodeIdin interfaceAccountOrBuilder- Returns:
- The stakedNodeId.
-
getDeclineReward
public boolean getDeclineReward()* A boolean indicating that this account has chosen to decline rewards for staking its balances. <p> This account MAY still stake its balances, but SHALL NOT receive reward payments for doing so.
bool decline_reward = 12;- Specified by:
getDeclineRewardin interfaceAccountOrBuilder- Returns:
- The declineReward.
-
getReceiverSigRequired
public boolean getReceiverSigRequired()* A boolean indicating that the account requires a receiver signature for inbound token transfer transactions. <p> If this value is `true` then a transaction to transfer tokens to this account SHALL NOT succeed unless this account has signed the transfer transaction.
bool receiver_sig_required = 13;- Specified by:
getReceiverSigRequiredin interfaceAccountOrBuilder- Returns:
- The receiverSigRequired.
-
hasHeadTokenId
public boolean hasHeadTokenId()* A token ID at the head of the linked list for this account from the token relations map.<br/> The token relations are connected by including the "next" and "previous" TokenID in each TokenRelation message. The "head" item in that list is found by looking up the TokenRelation with this Account's account_id and this head_token_id. Each subsequent item in the list is found via similar lookup with both an AccountID and a TokenID.
.proto.TokenID head_token_id = 14;- Specified by:
hasHeadTokenIdin interfaceAccountOrBuilder- Returns:
- Whether the headTokenId field is set.
-
getHeadTokenId
* A token ID at the head of the linked list for this account from the token relations map.<br/> The token relations are connected by including the "next" and "previous" TokenID in each TokenRelation message. The "head" item in that list is found by looking up the TokenRelation with this Account's account_id and this head_token_id. Each subsequent item in the list is found via similar lookup with both an AccountID and a TokenID.
.proto.TokenID head_token_id = 14;- Specified by:
getHeadTokenIdin interfaceAccountOrBuilder- Returns:
- The headTokenId.
-
hasHeadNftId
public boolean hasHeadNftId()* A NftID at the head of the linked list for this account from the unique tokens map.<br/> The unique token relations are connected by including the "next" and "previous" NftID in each Nft message. The "head" item in that list is found by looking up the Nft with ID matching this head_nft_id. Each subsequent item in the list is found via similar lookup with the next or previous NftID.
.proto.NftID head_nft_id = 15;- Specified by:
hasHeadNftIdin interfaceAccountOrBuilder- Returns:
- Whether the headNftId field is set.
-
getHeadNftId
* A NftID at the head of the linked list for this account from the unique tokens map.<br/> The unique token relations are connected by including the "next" and "previous" NftID in each Nft message. The "head" item in that list is found by looking up the Nft with ID matching this head_nft_id. Each subsequent item in the list is found via similar lookup with the next or previous NftID.
.proto.NftID head_nft_id = 15;- Specified by:
getHeadNftIdin interfaceAccountOrBuilder- Returns:
- The headNftId.
-
getHeadNftSerialNumber
public long getHeadNftSerialNumber()* A serial number in the NftID at the head of the linked list for this account from unique tokens map. <p> This MUST match the `serial_number` field of `head_nft_id`.
int64 head_nft_serial_number = 16;- Specified by:
getHeadNftSerialNumberin interfaceAccountOrBuilder- Returns:
- The headNftSerialNumber.
-
getNumberOwnedNfts
public long getNumberOwnedNfts()* A number of non-fungible tokens (NTFs) owned by the account.
int64 number_owned_nfts = 17;- Specified by:
getNumberOwnedNftsin interfaceAccountOrBuilder- Returns:
- The numberOwnedNfts.
-
getMaxAutoAssociations
public int getMaxAutoAssociations()* A maximum for the number of tokens that can be automatically associated with this account. <p> If this is less than or equal to `used_auto_associations` (or 0), then this account MUST manually associate with a token before transacting in that token.<br/> This value may also be `-1` to indicate no limit.<br/> This value MUST NOT be less than `-1`.
int32 max_auto_associations = 18;- Specified by:
getMaxAutoAssociationsin interfaceAccountOrBuilder- Returns:
- The maxAutoAssociations.
-
getUsedAutoAssociations
public int getUsedAutoAssociations()* A count of used auto-association slots. <p> If this is greater than, or equal to, the current value of `max_auto_associations`, then this account MUST manually associate with a new token before transacting in that token.
int32 used_auto_associations = 19;- Specified by:
getUsedAutoAssociationsin interfaceAccountOrBuilder- Returns:
- The usedAutoAssociations.
-
getNumberAssociations
public int getNumberAssociations()* A count of tokens associated with this account. <p> This value determines a portion of the renewal fee for this account.
int32 number_associations = 20;- Specified by:
getNumberAssociationsin interfaceAccountOrBuilder- Returns:
- The numberAssociations.
-
getSmartContract
public boolean getSmartContract()* A boolean indicating that this account is owned by a smart contract.
bool smart_contract = 21;- Specified by:
getSmartContractin interfaceAccountOrBuilder- Returns:
- The smartContract.
-
getNumberPositiveBalances
public int getNumberPositiveBalances()* A count of tokens with a positive balance associated with this account. <p> If the account has a positive balance in any token, it SHALL NOT be deleted.
int32 number_positive_balances = 22;- Specified by:
getNumberPositiveBalancesin interfaceAccountOrBuilder- Returns:
- The numberPositiveBalances.
-
getEthereumNonce
public long getEthereumNonce()* A nonce of this account for Ethereum interoperability.
int64 ethereum_nonce = 23;- Specified by:
getEthereumNoncein interfaceAccountOrBuilder- Returns:
- The ethereumNonce.
-
getStakeAtStartOfLastRewardedPeriod
public long getStakeAtStartOfLastRewardedPeriod()* An amount of HBAR staked by this account at the start of the last reward period.
int64 stake_at_start_of_last_rewarded_period = 24;- Specified by:
getStakeAtStartOfLastRewardedPeriodin interfaceAccountOrBuilder- Returns:
- The stakeAtStartOfLastRewardedPeriod.
-
hasAutoRenewAccountId
public boolean hasAutoRenewAccountId()* An account identifier for automatic renewal.<br/> This is the identifier of another account, in the same shard and realm as this account, that has signed a transaction allowing the network to use its balance, if needed, to automatically extend this account's expiration time during automatic renewal processing. <p> If this is set, and this account lack sufficient HBAR balance to pay renewal fees when due, then the network SHALL deduct the necessary fees from the designated auto renew account, if that account has sufficient balance.
.proto.AccountID auto_renew_account_id = 25;- Specified by:
hasAutoRenewAccountIdin interfaceAccountOrBuilder- Returns:
- Whether the autoRenewAccountId field is set.
-
getAutoRenewAccountId
* An account identifier for automatic renewal.<br/> This is the identifier of another account, in the same shard and realm as this account, that has signed a transaction allowing the network to use its balance, if needed, to automatically extend this account's expiration time during automatic renewal processing. <p> If this is set, and this account lack sufficient HBAR balance to pay renewal fees when due, then the network SHALL deduct the necessary fees from the designated auto renew account, if that account has sufficient balance.
.proto.AccountID auto_renew_account_id = 25;- Specified by:
getAutoRenewAccountIdin interfaceAccountOrBuilder- Returns:
- The autoRenewAccountId.
-
getAutoRenewSeconds
public long getAutoRenewSeconds()* A count of the number of seconds to extend this account's expiration. <p> The network SHALL extend the account's expiration by this number of seconds, if funds are available, upon automatic renewal.<br/> This SHALL NOT apply if the account is already deleted upon expiration.<br/> If this is not provided in an allowed range on account creation, the transaction SHALL fail with INVALID_AUTO_RENEWAL_PERIOD. The default values for the minimum period and maximum period are currently 30 days and 90 days, respectively.
int64 auto_renew_seconds = 26;- Specified by:
getAutoRenewSecondsin interfaceAccountOrBuilder- Returns:
- The autoRenewSeconds.
-
getContractKvPairsNumber
public int getContractKvPairsNumber()* A count of smart contract key-value pairs.<br/> If this account is a smart-contract, this is the number of key-value pairs stored on the contract. <p> If this account is not a smart contract, this field SHALL NOT be used.<br/> This value SHALL determine a portion of the storage rental fees for the contract.
int32 contract_kv_pairs_number = 27;- Specified by:
getContractKvPairsNumberin interfaceAccountOrBuilder- Returns:
- The contractKvPairsNumber.
-
getCryptoAllowancesList
* A list of crypto (HBAR) allowances approved by this account. <p> If this is not empty, each allowance SHALL permit a specified "spender" account to spend this account's HBAR balance, up to a designated limit.<br/> This field SHALL permit spending only HBAR balance, not other tokens the account may hold. Allowances for other tokens SHALL be listed in the `token_allowances` field or the `approve_for_all_nft_allowances` field.
repeated .proto.AccountCryptoAllowance crypto_allowances = 28;- Specified by:
getCryptoAllowancesListin interfaceAccountOrBuilder
-
getCryptoAllowancesOrBuilderList
* A list of crypto (HBAR) allowances approved by this account. <p> If this is not empty, each allowance SHALL permit a specified "spender" account to spend this account's HBAR balance, up to a designated limit.<br/> This field SHALL permit spending only HBAR balance, not other tokens the account may hold. Allowances for other tokens SHALL be listed in the `token_allowances` field or the `approve_for_all_nft_allowances` field.
repeated .proto.AccountCryptoAllowance crypto_allowances = 28; -
getCryptoAllowancesCount
public int getCryptoAllowancesCount()* A list of crypto (HBAR) allowances approved by this account. <p> If this is not empty, each allowance SHALL permit a specified "spender" account to spend this account's HBAR balance, up to a designated limit.<br/> This field SHALL permit spending only HBAR balance, not other tokens the account may hold. Allowances for other tokens SHALL be listed in the `token_allowances` field or the `approve_for_all_nft_allowances` field.
repeated .proto.AccountCryptoAllowance crypto_allowances = 28;- Specified by:
getCryptoAllowancesCountin interfaceAccountOrBuilder
-
getCryptoAllowances
* A list of crypto (HBAR) allowances approved by this account. <p> If this is not empty, each allowance SHALL permit a specified "spender" account to spend this account's HBAR balance, up to a designated limit.<br/> This field SHALL permit spending only HBAR balance, not other tokens the account may hold. Allowances for other tokens SHALL be listed in the `token_allowances` field or the `approve_for_all_nft_allowances` field.
repeated .proto.AccountCryptoAllowance crypto_allowances = 28;- Specified by:
getCryptoAllowancesin interfaceAccountOrBuilder
-
getCryptoAllowancesOrBuilder
* A list of crypto (HBAR) allowances approved by this account. <p> If this is not empty, each allowance SHALL permit a specified "spender" account to spend this account's HBAR balance, up to a designated limit.<br/> This field SHALL permit spending only HBAR balance, not other tokens the account may hold. Allowances for other tokens SHALL be listed in the `token_allowances` field or the `approve_for_all_nft_allowances` field.
repeated .proto.AccountCryptoAllowance crypto_allowances = 28; -
getApproveForAllNftAllowancesList
* A list of non-fungible token (NFT) allowances approved by this account. <p> If this is not empty, each allowance permits a specified "spender" account to transfer _all_ of this account's non-fungible tokens from a particular collection.<br/> Allowances for a specific serial number MUST be directly associated with that specific non-fungible token, rather than the holding account.
repeated .proto.AccountApprovalForAllAllowance approve_for_all_nft_allowances = 29;- Specified by:
getApproveForAllNftAllowancesListin interfaceAccountOrBuilder
-
getApproveForAllNftAllowancesOrBuilderList
public List<? extends AccountApprovalForAllAllowanceOrBuilder> getApproveForAllNftAllowancesOrBuilderList()* A list of non-fungible token (NFT) allowances approved by this account. <p> If this is not empty, each allowance permits a specified "spender" account to transfer _all_ of this account's non-fungible tokens from a particular collection.<br/> Allowances for a specific serial number MUST be directly associated with that specific non-fungible token, rather than the holding account.
repeated .proto.AccountApprovalForAllAllowance approve_for_all_nft_allowances = 29; -
getApproveForAllNftAllowancesCount
public int getApproveForAllNftAllowancesCount()* A list of non-fungible token (NFT) allowances approved by this account. <p> If this is not empty, each allowance permits a specified "spender" account to transfer _all_ of this account's non-fungible tokens from a particular collection.<br/> Allowances for a specific serial number MUST be directly associated with that specific non-fungible token, rather than the holding account.
repeated .proto.AccountApprovalForAllAllowance approve_for_all_nft_allowances = 29;- Specified by:
getApproveForAllNftAllowancesCountin interfaceAccountOrBuilder
-
getApproveForAllNftAllowances
* A list of non-fungible token (NFT) allowances approved by this account. <p> If this is not empty, each allowance permits a specified "spender" account to transfer _all_ of this account's non-fungible tokens from a particular collection.<br/> Allowances for a specific serial number MUST be directly associated with that specific non-fungible token, rather than the holding account.
repeated .proto.AccountApprovalForAllAllowance approve_for_all_nft_allowances = 29;- Specified by:
getApproveForAllNftAllowancesin interfaceAccountOrBuilder
-
getApproveForAllNftAllowancesOrBuilder
* A list of non-fungible token (NFT) allowances approved by this account. <p> If this is not empty, each allowance permits a specified "spender" account to transfer _all_ of this account's non-fungible tokens from a particular collection.<br/> Allowances for a specific serial number MUST be directly associated with that specific non-fungible token, rather than the holding account.
repeated .proto.AccountApprovalForAllAllowance approve_for_all_nft_allowances = 29; -
getTokenAllowancesList
* A list of fungible token allowances approved by this account. <p> If this is not empty, each allowance permits a specified "spender" to spend this account's fungible tokens, of the designated type, up to a designated limit.
repeated .proto.AccountFungibleTokenAllowance token_allowances = 30;- Specified by:
getTokenAllowancesListin interfaceAccountOrBuilder
-
getTokenAllowancesOrBuilderList
* A list of fungible token allowances approved by this account. <p> If this is not empty, each allowance permits a specified "spender" to spend this account's fungible tokens, of the designated type, up to a designated limit.
repeated .proto.AccountFungibleTokenAllowance token_allowances = 30; -
getTokenAllowancesCount
public int getTokenAllowancesCount()* A list of fungible token allowances approved by this account. <p> If this is not empty, each allowance permits a specified "spender" to spend this account's fungible tokens, of the designated type, up to a designated limit.
repeated .proto.AccountFungibleTokenAllowance token_allowances = 30;- Specified by:
getTokenAllowancesCountin interfaceAccountOrBuilder
-
getTokenAllowances
* A list of fungible token allowances approved by this account. <p> If this is not empty, each allowance permits a specified "spender" to spend this account's fungible tokens, of the designated type, up to a designated limit.
repeated .proto.AccountFungibleTokenAllowance token_allowances = 30;- Specified by:
getTokenAllowancesin interfaceAccountOrBuilder
-
getTokenAllowancesOrBuilder
* A list of fungible token allowances approved by this account. <p> If this is not empty, each allowance permits a specified "spender" to spend this account's fungible tokens, of the designated type, up to a designated limit.
repeated .proto.AccountFungibleTokenAllowance token_allowances = 30; -
getNumberTreasuryTitles
public int getNumberTreasuryTitles()* A count of tokens for which this account is the treasury account. <p> Each native token is initially created with all tokens held by its treasury, and the owner of that account (which may be a smart contract) determines how those tokens are distributed.
uint32 number_treasury_titles = 31;- Specified by:
getNumberTreasuryTitlesin interfaceAccountOrBuilder- Returns:
- The numberTreasuryTitles.
-
getExpiredAndPendingRemoval
public boolean getExpiredAndPendingRemoval()* A flag indicating that the account is expired and pending removal. <p> When the network checks for entity expiration, it SHALL set this flag if the account expiration time has past and the account has no HBAR sufficient to pay current renewal fees.<br/> If the account has an auto-renew account set with an HBAR balance that could pay for an auto-renewal, then this flag SHALL NOT be set. This ensures the account is not encumbered during the time between expiration and when the auto-renewal processing renews the account.
bool expired_and_pending_removal = 32;- Specified by:
getExpiredAndPendingRemovalin interfaceAccountOrBuilder- Returns:
- The expiredAndPendingRemoval.
-
getFirstContractStorageKey
public com.google.protobuf.ByteString getFirstContractStorageKey()* A contract storage key.<br/> This is the first key in the doubly-linked list of this contract's storage mappings. <p> This value SHALL be empty if the account is not a contract or the contract has no storage mappings.
bytes first_contract_storage_key = 33;- Specified by:
getFirstContractStorageKeyin interfaceAccountOrBuilder- Returns:
- The firstContractStorageKey.
-
hasHeadPendingAirdropId
public boolean hasHeadPendingAirdropId()* A pending airdrop ID.<br/> This is the head of the linked list for this account from the account airdrops map.<br/> <p> The account airdrops SHALL be connected by including the "next" and "previous" `PendingAirdropID` in each `AccountAirdrop` message.<br/> This value SHALL NOT be empty if this account is "sender" for any pending airdrop, and SHALL be empty otherwise.
.proto.PendingAirdropId head_pending_airdrop_id = 34;- Specified by:
hasHeadPendingAirdropIdin interfaceAccountOrBuilder- Returns:
- Whether the headPendingAirdropId field is set.
-
getHeadPendingAirdropId
* A pending airdrop ID.<br/> This is the head of the linked list for this account from the account airdrops map.<br/> <p> The account airdrops SHALL be connected by including the "next" and "previous" `PendingAirdropID` in each `AccountAirdrop` message.<br/> This value SHALL NOT be empty if this account is "sender" for any pending airdrop, and SHALL be empty otherwise.
.proto.PendingAirdropId head_pending_airdrop_id = 34;- Specified by:
getHeadPendingAirdropIdin interfaceAccountOrBuilder- Returns:
- The headPendingAirdropId.
-
getNumberPendingAirdrops
public long getNumberPendingAirdrops()* A number of pending airdrops. <p> This count SHALL be used to calculate rent _without_ walking the linked list of pending airdrops associated to this account via the `head_pending_airdrop_id` field.<br/> This value MUST be updated for every airdrop, clam, or cancel transaction that designates this account as a receiver.<br/> This number MUST always match the count of entries in the "list" identified by `head_pending_airdrop_id`.
uint64 number_pending_airdrops = 35;- Specified by:
getNumberPendingAirdropsin interfaceAccountOrBuilder- Returns:
- The numberPendingAirdrops.
-
getNumberHooksInUse
public long getNumberHooksInUse()* The number of hooks currently in use on this account.
uint64 number_hooks_in_use = 36;- Specified by:
getNumberHooksInUsein interfaceAccountOrBuilder- Returns:
- The numberHooksInUse.
-
getFirstHookId
public long getFirstHookId()* If the account has more than zero hooks in use, the id of the first hook in its doubly-linked list of hooks.
int64 first_hook_id = 37;- Specified by:
getFirstHookIdin interfaceAccountOrBuilder- Returns:
- The firstHookId.
-
getNumberEvmHookStorageSlots
public long getNumberEvmHookStorageSlots()* The number of storage slots in use by this account's EVM hooks.
uint64 number_evm_hook_storage_slots = 38;- Specified by:
getNumberEvmHookStorageSlotsin interfaceAccountOrBuilder- Returns:
- The numberEvmHookStorageSlots.
-
getDelegationAddress
public com.google.protobuf.ByteString getDelegationAddress()* The delegated contract address set for this account. <p> If this field is set on the account, anytime a call is made to the account's address (either an EVM call within HSCS or a child call dispatched by CryptoTransfer) the EVM code of the contract referenced by `delegation_address` will be executed in the context of the account.
bytes delegation_address = 39;- Specified by:
getDelegationAddressin interfaceAccountOrBuilder- Returns:
- The delegationAddress.
-
parseFrom
public static Account parseFrom(ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException - Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
public static Account parseFrom(ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException - Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
public static Account parseFrom(com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException - Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
public static Account parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException - Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
public static Account parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException - Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
public static Account parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException - Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
- Throws:
IOException
-
parseFrom
public static Account parseFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException - Throws:
IOException
-
parseDelimitedFrom
- Throws:
IOException
-
parseDelimitedFrom
public static Account parseDelimitedFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException - Throws:
IOException
-
parseFrom
- Throws:
IOException
-
parseFrom
public static Account parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException - Throws:
IOException
-
newBuilder
-
newBuilder
-
dynamicMethod
protected final Object dynamicMethod(com.google.protobuf.GeneratedMessageLite.MethodToInvoke method, Object arg0, Object arg1) - Specified by:
dynamicMethodin classcom.google.protobuf.GeneratedMessageLite<Account,Account.Builder>
-
getDefaultInstance
-
parser
-