Class CryptoCreateTransactionBody

java.lang.Object
com.google.protobuf.AbstractMessageLite<CryptoCreateTransactionBody,CryptoCreateTransactionBody.Builder>
com.google.protobuf.GeneratedMessageLite<CryptoCreateTransactionBody,CryptoCreateTransactionBody.Builder>
com.hedera.hashgraph.sdk.proto.CryptoCreateTransactionBody
All Implemented Interfaces:
com.google.protobuf.MessageLite, com.google.protobuf.MessageLiteOrBuilder, CryptoCreateTransactionBodyOrBuilder

@Generated public final class CryptoCreateTransactionBody extends com.google.protobuf.GeneratedMessageLite<CryptoCreateTransactionBody,CryptoCreateTransactionBody.Builder> implements CryptoCreateTransactionBodyOrBuilder

 Create a new account.

 If the auto_renew_account field is set, the key of the referenced account
 MUST sign this transaction.<br/>
 Current limitations REQUIRE that `shardID` and `realmID` both MUST be `0`.
 This is expected to change in the future.

 ### Block Stream Effects
 The newly created account SHALL be included in State Changes.
 
Protobuf type proto.CryptoCreateTransactionBody
  • Field Details

    • KEY_FIELD_NUMBER

      public static final int KEY_FIELD_NUMBER
      See Also:
    • INITIALBALANCE_FIELD_NUMBER

      public static final int INITIALBALANCE_FIELD_NUMBER
      See Also:
    • PROXYACCOUNTID_FIELD_NUMBER

      public static final int PROXYACCOUNTID_FIELD_NUMBER
      See Also:
    • SENDRECORDTHRESHOLD_FIELD_NUMBER

      public static final int SENDRECORDTHRESHOLD_FIELD_NUMBER
      See Also:
    • RECEIVERECORDTHRESHOLD_FIELD_NUMBER

      public static final int RECEIVERECORDTHRESHOLD_FIELD_NUMBER
      See Also:
    • RECEIVERSIGREQUIRED_FIELD_NUMBER

      public static final int RECEIVERSIGREQUIRED_FIELD_NUMBER
      See Also:
    • AUTORENEWPERIOD_FIELD_NUMBER

      public static final int AUTORENEWPERIOD_FIELD_NUMBER
      See Also:
    • SHARDID_FIELD_NUMBER

      public static final int SHARDID_FIELD_NUMBER
      See Also:
    • REALMID_FIELD_NUMBER

      public static final int REALMID_FIELD_NUMBER
      See Also:
    • NEWREALMADMINKEY_FIELD_NUMBER

      public static final int NEWREALMADMINKEY_FIELD_NUMBER
      See Also:
    • MEMO_FIELD_NUMBER

      public static final int MEMO_FIELD_NUMBER
      See Also:
    • MAX_AUTOMATIC_TOKEN_ASSOCIATIONS_FIELD_NUMBER

      public static final int MAX_AUTOMATIC_TOKEN_ASSOCIATIONS_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:
    • ALIAS_FIELD_NUMBER

      public static final int ALIAS_FIELD_NUMBER
      See Also:
    • HOOK_CREATION_DETAILS_FIELD_NUMBER

      public static final int HOOK_CREATION_DETAILS_FIELD_NUMBER
      See Also:
    • DELEGATION_ADDRESS_FIELD_NUMBER

      public static final int DELEGATION_ADDRESS_FIELD_NUMBER
      See Also:
  • Method Details

    • getStakedIdCase

      public CryptoCreateTransactionBody.StakedIdCase getStakedIdCase()
      Specified by:
      getStakedIdCase in interface CryptoCreateTransactionBodyOrBuilder
    • hasKey

      public boolean hasKey()
       *
       The identifying key for this account.
       This key represents the account owner, and is required for most actions
       involving this account that do not modify the account itself. This key
       may also identify the account for smart contracts.
       <p>
       This field is REQUIRED.
       This `Key` MUST NOT be an empty `KeyList` and MUST contain at least one
       "primitive" (i.e. cryptographic) key value.
       
      .proto.Key key = 1;
      Specified by:
      hasKey in interface CryptoCreateTransactionBodyOrBuilder
      Returns:
      Whether the key field is set.
    • getKey

      public Key getKey()
       *
       The identifying key for this account.
       This key represents the account owner, and is required for most actions
       involving this account that do not modify the account itself. This key
       may also identify the account for smart contracts.
       <p>
       This field is REQUIRED.
       This `Key` MUST NOT be an empty `KeyList` and MUST contain at least one
       "primitive" (i.e. cryptographic) key value.
       
      .proto.Key key = 1;
      Specified by:
      getKey in interface CryptoCreateTransactionBodyOrBuilder
      Returns:
      The key.
    • getInitialBalance

      public long getInitialBalance()
       *
       An amount, in tinybar, to deposit to the newly created account.
       <p>
       The deposited amount SHALL be debited to the "payer" account for this
       transaction.
       
      uint64 initialBalance = 2;
      Specified by:
      getInitialBalance in interface CryptoCreateTransactionBodyOrBuilder
      Returns:
      The initialBalance.
    • hasProxyAccountID

      @Deprecated public boolean hasProxyAccountID()
      Deprecated.
       *
       Use `staked_id` instead.<br/>
       An account identifier for a staking proxy.
       
      .proto.AccountID proxyAccountID = 3 [deprecated = true];
      Specified by:
      hasProxyAccountID in interface CryptoCreateTransactionBodyOrBuilder
      Returns:
      Whether the proxyAccountID field is set.
    • getProxyAccountID

      @Deprecated public AccountID getProxyAccountID()
      Deprecated.
       *
       Use `staked_id` instead.<br/>
       An account identifier for a staking proxy.
       
      .proto.AccountID proxyAccountID = 3 [deprecated = true];
      Specified by:
      getProxyAccountID in interface CryptoCreateTransactionBodyOrBuilder
      Returns:
      The proxyAccountID.
    • getSendRecordThreshold

      @Deprecated public long getSendRecordThreshold()
      Deprecated.
      proto.CryptoCreateTransactionBody.sendRecordThreshold is deprecated. See crypto_create.proto;l=71
       *
       Removed prior to the first available history, and may be related to an
       early design dead-end.<br/>
       An amount below which record stream records would not be created for
       a transaction that reduces this account balance.
       
      uint64 sendRecordThreshold = 6 [deprecated = true];
      Specified by:
      getSendRecordThreshold in interface CryptoCreateTransactionBodyOrBuilder
      Returns:
      The sendRecordThreshold.
    • getReceiveRecordThreshold

      @Deprecated public long getReceiveRecordThreshold()
      Deprecated.
      proto.CryptoCreateTransactionBody.receiveRecordThreshold is deprecated. See crypto_create.proto;l=79
       *
       Removed prior to the first available history, and may be related to an
       early design dead-end.<br/>
       An amount below which record stream records would not be created for
       a transaction that increases this account balance.
       
      uint64 receiveRecordThreshold = 7 [deprecated = true];
      Specified by:
      getReceiveRecordThreshold in interface CryptoCreateTransactionBodyOrBuilder
      Returns:
      The receiveRecordThreshold.
    • getReceiverSigRequired

      public boolean getReceiverSigRequired()
       *
       A flag indicating the account holder must authorize all incoming
       token transfers.
       <p>
       If this flag is set then any transaction that would result in adding
       hbar or other tokens to this account balance MUST be signed by the
       identifying key of this account (that is, the `key` field).<br/>
       If this flag is set, then the account key (`key` field) MUST sign
       this create transaction, in addition to the transaction payer.
       
      bool receiverSigRequired = 8;
      Specified by:
      getReceiverSigRequired in interface CryptoCreateTransactionBodyOrBuilder
      Returns:
      The receiverSigRequired.
    • hasAutoRenewPeriod

      public boolean hasAutoRenewPeriod()
       *
       The duration between account automatic renewals.<br/>
       All entities in state may be charged "rent" occasionally (typically
       every 90 days) to prevent unnecessary growth of the ledger. This value
       sets the interval between such events for this account.
       <p>
       If the account balance (in HBAR) is insufficient to pay the full renewal
       fee, the entire HBAR balance SHALL be consumed and the expiration for
       the account SHALL be extended as far as the available balance can
       support.<br/>
       If the account HBAR balance is `0` when the account must be renewed, then
       the account SHALL be deleted, and subsequently removed from state.
       
      .proto.Duration autoRenewPeriod = 9;
      Specified by:
      hasAutoRenewPeriod in interface CryptoCreateTransactionBodyOrBuilder
      Returns:
      Whether the autoRenewPeriod field is set.
    • getAutoRenewPeriod

      public Duration getAutoRenewPeriod()
       *
       The duration between account automatic renewals.<br/>
       All entities in state may be charged "rent" occasionally (typically
       every 90 days) to prevent unnecessary growth of the ledger. This value
       sets the interval between such events for this account.
       <p>
       If the account balance (in HBAR) is insufficient to pay the full renewal
       fee, the entire HBAR balance SHALL be consumed and the expiration for
       the account SHALL be extended as far as the available balance can
       support.<br/>
       If the account HBAR balance is `0` when the account must be renewed, then
       the account SHALL be deleted, and subsequently removed from state.
       
      .proto.Duration autoRenewPeriod = 9;
      Specified by:
      getAutoRenewPeriod in interface CryptoCreateTransactionBodyOrBuilder
      Returns:
      The autoRenewPeriod.
    • hasShardID

      public boolean hasShardID()
       *
       The shard in which this account is created
       <p>
       Currently, this MUST be `0`.<br/>
       If the desired shard is `0`, this SHOULD NOT be set.
       
      .proto.ShardID shardID = 10;
      Specified by:
      hasShardID in interface CryptoCreateTransactionBodyOrBuilder
      Returns:
      Whether the shardID field is set.
    • getShardID

      public ShardID getShardID()
       *
       The shard in which this account is created
       <p>
       Currently, this MUST be `0`.<br/>
       If the desired shard is `0`, this SHOULD NOT be set.
       
      .proto.ShardID shardID = 10;
      Specified by:
      getShardID in interface CryptoCreateTransactionBodyOrBuilder
      Returns:
      The shardID.
    • hasRealmID

      public boolean hasRealmID()
       *
       The realm in which this account is created.
       <p>
       The shard number for this realm MUST match the value in `shardID`.<br/>
       Currently, this MUST be `0` for both fields.<br/>
       If the desired realm is `0`, this SHOULD NOT be set.
       
      .proto.RealmID realmID = 11;
      Specified by:
      hasRealmID in interface CryptoCreateTransactionBodyOrBuilder
      Returns:
      Whether the realmID field is set.
    • getRealmID

      public RealmID getRealmID()
       *
       The realm in which this account is created.
       <p>
       The shard number for this realm MUST match the value in `shardID`.<br/>
       Currently, this MUST be `0` for both fields.<br/>
       If the desired realm is `0`, this SHOULD NOT be set.
       
      .proto.RealmID realmID = 11;
      Specified by:
      getRealmID in interface CryptoCreateTransactionBodyOrBuilder
      Returns:
      The realmID.
    • hasNewRealmAdminKey

      @Deprecated public boolean hasNewRealmAdminKey()
      Deprecated.
       *
       This field was never actually used or enabled, and is not expected to
       ever be used in the future.<br/>
       
      .proto.Key newRealmAdminKey = 12 [deprecated = true];
      Specified by:
      hasNewRealmAdminKey in interface CryptoCreateTransactionBodyOrBuilder
      Returns:
      Whether the newRealmAdminKey field is set.
    • getNewRealmAdminKey

      @Deprecated public Key getNewRealmAdminKey()
      Deprecated.
       *
       This field was never actually used or enabled, and is not expected to
       ever be used in the future.<br/>
       
      .proto.Key newRealmAdminKey = 12 [deprecated = true];
      Specified by:
      getNewRealmAdminKey in interface CryptoCreateTransactionBodyOrBuilder
      Returns:
      The newRealmAdminKey.
    • getMemo

      public String 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 = 13;
      Specified by:
      getMemo in interface CryptoCreateTransactionBodyOrBuilder
      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 = 13;
      Specified by:
      getMemoBytes in interface CryptoCreateTransactionBodyOrBuilder
      Returns:
      The bytes for memo.
    • getMaxAutomaticTokenAssociations

      public int getMaxAutomaticTokenAssociations()
       *
       A maximum number of tokens that can be auto-associated
       with this account.<br/>
       By default this value is 0 for all accounts except for automatically
       created accounts (e.g. smart contracts), which default to -1.
       <p>
       If this value is `0`, then this account MUST manually associate to
       a token before holding or 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_automatic_token_associations = 14;
      Specified by:
      getMaxAutomaticTokenAssociations in interface CryptoCreateTransactionBodyOrBuilder
      Returns:
      The maxAutomaticTokenAssociations.
    • hasStakedAccountId

      public boolean hasStakedAccountId()
       *
       ID of the account to which this account is staking its balances.
       <p>
       If this account is not currently staking its balances, then this
       field, if set, MUST be the sentinel value of `0.0.0`.
       
      .proto.AccountID staked_account_id = 15;
      Specified by:
      hasStakedAccountId in interface CryptoCreateTransactionBodyOrBuilder
      Returns:
      Whether the stakedAccountId field is set.
    • getStakedAccountId

      public AccountID getStakedAccountId()
       *
       ID of the account to which this account is staking its balances.
       <p>
       If this account is not currently staking its balances, then this
       field, if set, MUST be the sentinel value of `0.0.0`.
       
      .proto.AccountID staked_account_id = 15;
      Specified by:
      getStakedAccountId in interface CryptoCreateTransactionBodyOrBuilder
      Returns:
      The stakedAccountId.
    • hasStakedNodeId

      public boolean hasStakedNodeId()
       *
       ID of 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`.<br/>
       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.
       
      int64 staked_node_id = 16;
      Specified by:
      hasStakedNodeId in interface CryptoCreateTransactionBodyOrBuilder
      Returns:
      Whether the stakedNodeId field is set.
    • getStakedNodeId

      public long getStakedNodeId()
       *
       ID of 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`.<br/>
       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.
       
      int64 staked_node_id = 16;
      Specified by:
      getStakedNodeId in interface CryptoCreateTransactionBodyOrBuilder
      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, if this value is set.
       
      bool decline_reward = 17;
      Specified by:
      getDeclineReward in interface CryptoCreateTransactionBodyOrBuilder
      Returns:
      The declineReward.
    • getAlias

      public com.google.protobuf.ByteString getAlias()
       *
       Bytes to be used as the account's alias.
       <p>
       This value, if set, MUST be one of the following values<br/>
       <ul>
       <li>The 32-byte serialized form of the ED25519 account key.</li>
       <li>The 33-byte _compressed_ serialized form of the ECDSA(secp256k1)
       account key.</li>
       <li>The 20-byte EVM address derived from a keccak-256 hash of the
       ECDSA(secp256k1) account key</li>
       </ul>
       All aliases within the network MUST be unique. If this value matches an
       existing account alias, this `create` transaction SHALL fail.<br/>
       If an account exists with a particular alias value, any transaction to
       transfer value _to_ that alias SHALL deposit the transferred value in
       the existing account, and SHALL NOT assess an account creation fee.<br/>
       Once set, an account alias is immutable and MUST NOT be changed.
       
      bytes alias = 18;
      Specified by:
      getAlias in interface CryptoCreateTransactionBodyOrBuilder
      Returns:
      The alias.
    • getHookCreationDetailsList

      public List<HookCreationDetails> getHookCreationDetailsList()
       *
       Details of hooks to add immediately after creating this account.
       
      repeated .com.hedera.hapi.node.hooks.HookCreationDetails hook_creation_details = 19;
      Specified by:
      getHookCreationDetailsList in interface CryptoCreateTransactionBodyOrBuilder
    • getHookCreationDetailsOrBuilderList

      public List<? extends HookCreationDetailsOrBuilder> getHookCreationDetailsOrBuilderList()
       *
       Details of hooks to add immediately after creating this account.
       
      repeated .com.hedera.hapi.node.hooks.HookCreationDetails hook_creation_details = 19;
    • getHookCreationDetailsCount

      public int getHookCreationDetailsCount()
       *
       Details of hooks to add immediately after creating this account.
       
      repeated .com.hedera.hapi.node.hooks.HookCreationDetails hook_creation_details = 19;
      Specified by:
      getHookCreationDetailsCount in interface CryptoCreateTransactionBodyOrBuilder
    • getHookCreationDetails

      public HookCreationDetails getHookCreationDetails(int index)
       *
       Details of hooks to add immediately after creating this account.
       
      repeated .com.hedera.hapi.node.hooks.HookCreationDetails hook_creation_details = 19;
      Specified by:
      getHookCreationDetails in interface CryptoCreateTransactionBodyOrBuilder
    • getHookCreationDetailsOrBuilder

      public HookCreationDetailsOrBuilder getHookCreationDetailsOrBuilder(int index)
       *
       Details of hooks to add immediately after creating this account.
       
      repeated .com.hedera.hapi.node.hooks.HookCreationDetails hook_creation_details = 19;
    • getDelegationAddress

      public com.google.protobuf.ByteString getDelegationAddress()
       *
       The initial delegated contract address to set for the new account.
       <p>
       If set, the value MUST be 20 bytes long (EVM address).
       A value of `0x0000000000000000000000000000000000000000` will be ignored.
      
       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 = 20;
      Specified by:
      getDelegationAddress in interface CryptoCreateTransactionBodyOrBuilder
      Returns:
      The delegationAddress.
    • parseFrom

      public static CryptoCreateTransactionBody parseFrom(ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException
      Throws:
      com.google.protobuf.InvalidProtocolBufferException
    • parseFrom

      public static CryptoCreateTransactionBody parseFrom(ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
      Throws:
      com.google.protobuf.InvalidProtocolBufferException
    • parseFrom

      public static CryptoCreateTransactionBody parseFrom(com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException
      Throws:
      com.google.protobuf.InvalidProtocolBufferException
    • parseFrom

      public static CryptoCreateTransactionBody parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
      Throws:
      com.google.protobuf.InvalidProtocolBufferException
    • parseFrom

      public static CryptoCreateTransactionBody parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException
      Throws:
      com.google.protobuf.InvalidProtocolBufferException
    • parseFrom

      public static CryptoCreateTransactionBody parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
      Throws:
      com.google.protobuf.InvalidProtocolBufferException
    • parseFrom

      public static CryptoCreateTransactionBody parseFrom(InputStream input) throws IOException
      Throws:
      IOException
    • parseFrom

      public static CryptoCreateTransactionBody parseFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
      Throws:
      IOException
    • parseDelimitedFrom

      public static CryptoCreateTransactionBody parseDelimitedFrom(InputStream input) throws IOException
      Throws:
      IOException
    • parseDelimitedFrom

      public static CryptoCreateTransactionBody parseDelimitedFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
      Throws:
      IOException
    • parseFrom

      public static CryptoCreateTransactionBody parseFrom(com.google.protobuf.CodedInputStream input) throws IOException
      Throws:
      IOException
    • parseFrom

      public static CryptoCreateTransactionBody parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
      Throws:
      IOException
    • newBuilder

      public static CryptoCreateTransactionBody.Builder newBuilder()
    • newBuilder

    • dynamicMethod

      protected final Object dynamicMethod(com.google.protobuf.GeneratedMessageLite.MethodToInvoke method, Object arg0, Object arg1)
      Specified by:
      dynamicMethod in class com.google.protobuf.GeneratedMessageLite<CryptoCreateTransactionBody,CryptoCreateTransactionBody.Builder>
    • getDefaultInstance

      public static CryptoCreateTransactionBody getDefaultInstance()
    • parser

      public static com.google.protobuf.Parser<CryptoCreateTransactionBody> parser()