Class CreateAccountParams
Address creation parameters.
Inherited Members
Namespace: Hiero
Assembly: Hiero.dll
Syntax
public sealed class CreateAccountParams : TransactionParams<CreateAccountReceipt>
Examples
Create a new account funded with 1 HBAR from the client's Payer and authorized by the supplied endorsement:
// Create a new account funded with 1 HBAR from the client's Payer.
// `newAccountEndorsement` is the public key or key list that will
// authorize future transactions on the new account.
var receipt = await client.CreateAccountAsync(new CreateAccountParams
{
Endorsement = newAccountEndorsement,
InitialBalance = 100_000_000, // 1 HBAR in tinybars
Memo = "Created via Hiero SDK"
});
Console.WriteLine($"New account: {receipt.Address}");
Properties
| Edit this page View SourceAutoAssociationLimit
The maximum number of tokens or NFTs that this account may be implicitly associated with (by means of being made a treasury or other related actions).
Declaration
public int AutoAssociationLimit { get; set; }
Property Value
| Type | Description |
|---|---|
| int |
Remarks
Defaults to zero.
AutoRenewPeriod
The auto-renew period for the newly created account, it will continue to be renewed at the given interval for as long as the account contains hbars sufficient to cover the renewal charge.
Declaration
public TimeSpan AutoRenewPeriod { get; set; }
Property Value
| Type | Description |
|---|---|
| TimeSpan |
CancellationToken
Optional Cancellation token that can interrupt the creation process.
Declaration
public CancellationToken? CancellationToken { get; set; }
Property Value
| Type | Description |
|---|---|
| CancellationToken? |
DeclineStakeReward
Indicate to the network that this account does not wish to receive any earned staking rewards.
Declaration
public bool DeclineStakeReward { get; set; }
Property Value
| Type | Description |
|---|---|
| bool |
Endorsement
The public key structure representing the signature or signatures required to sign on behalf of this new account. It can represent a single Ed25519 key, set of n-of-m keys or any other key structure supported by the network.
Declaration
public Endorsement? Endorsement { get; set; }
Property Value
| Type | Description |
|---|---|
| Endorsement |
Hooks
Optional list of hooks to create on the account immediately after it is created.
Declaration
public IEnumerable<HookMetadata>? Hooks { get; set; }
Property Value
| Type | Description |
|---|---|
| IEnumerable<HookMetadata> |
InitialBalance
The initial balance that will be transferred from the Payer account to the new account upon creation.
Declaration
public ulong InitialBalance { get; set; }
Property Value
| Type | Description |
|---|---|
| ulong |
KeyAlias
Optional Alias value to use to identify this newly created account.
Declaration
public Endorsement? KeyAlias { get; set; }
Property Value
| Type | Description |
|---|---|
| Endorsement |
Memo
Short description of the account.
Declaration
public string? Memo { get; set; }
Property Value
| Type | Description |
|---|---|
| string |
ProxyAccount
The funds of this account will be staked to the node that this specified account is staked to and the specified account will receive the earned reward.
Declaration
public EntityId? ProxyAccount { get; set; }
Property Value
| Type | Description |
|---|---|
| EntityId |
Remarks
This value must be set to
null
or
<pre><code class="lang-csharp">None</code></pre>
if the
StakedNode
property is set.
RequireReceiveSignature
When creating a new account: the newly created account must sign any transaction transferring crypto into the newly created account.
Declaration
public bool RequireReceiveSignature { get; set; }
Property Value
| Type | Description |
|---|---|
| bool |
Signatory
Additional private key, keys or signing callback method required to create this account. Typically matches the Endorsement assigned to this new account.
Declaration
public Signatory? Signatory { get; set; }
Property Value
| Type | Description |
|---|---|
| Signatory |
Remarks
Keys/callbacks added here will be combined with those already identified in the client object's context when signing this transaction to change the state of this account.
StakedNode
The funds of this account will be staked to the gossip node with the given ID.
Declaration
public long? StakedNode { get; set; }
Property Value
| Type | Description |
|---|---|
| long? |
Remarks
Can not be greater than zero if the
ProxyAccount
property is set.