Class CreateTokenExtensions
Extension methods for creating new fungible token definitions on the network.
Inherited Members
Namespace: Hiero
Assembly: Hiero.dll
Syntax
public static class CreateTokenExtensions
Methods
| Edit this page View SourceCreateTokenAsync(ConsensusClient, CreateTokenParams, Action<IConsensusContext>?)
Creates a new token with the given create parameters.
Declaration
public static Task<CreateTokenReceipt> CreateTokenAsync(this ConsensusClient client, CreateTokenParams createParameters, Action<IConsensusContext>? configure = null)
Parameters
| Type | Name | Description |
|---|---|---|
| ConsensusClient | client | The Consensus Node Client orchestrating the creation. |
| CreateTokenParams | createParameters | Details regarding the token to instantiate. |
| Action<IConsensusContext> | configure | Optional callback method providing an opportunity to modify the execution configuration for just this method call. It is executed prior to submitting the request to the network. |
Returns
| Type | Description |
|---|---|
| Task<CreateTokenReceipt> | A transaction receipt with a description of the newly created token. |
Exceptions
| Type | Condition |
|---|---|
| ArgumentOutOfRangeException | If required arguments are missing. |
| InvalidOperationException | If required context configuration is missing. |
| PrecheckException | If the gateway node create rejected the request upon submission. |
| ConsensusException | If the network was unable to come to consensus before the duration of the transaction expired. |
| TransactionException | If the network rejected the create request as invalid or had missing data. |