Last updated
Was this helpful?
Last updated
Was this helpful?
Creating tokens with the Hedera Token Service (HTS) is a streamlined process designed to help developers issue both fungible and non-fungible tokens quickly and securely on the Hedera network. Whether you’re launching digital currencies, loyalty points, or unique digital collectibles, HTS offers a robust framework for token creation and management. During the token creation process, you can customize properties like the token name, symbol, supply details, and administrative keys. Once the transaction is processed, a unique token ID is generated, which serves as the reference for all future token operations.
Before initiating the token creation process, clearly define the token’s properties. Depending on the type of token you're creating, the required properties may vary. See examples below.
➡ The full list of token properties can be found on the page.
Use the HTS API to create a token creation transaction that incorporates all the defined properties. Ensure that you:
Specify the treasury account.
Include the necessary administrative keys (such as the admin key).
Confirm that the initiating account has sufficient funds (in tinybars) to cover the transaction fee.
Use the required treasury or admin keys to sign the transaction securely before submitting the signed transaction to the Hedera network. The network processes the transaction and, upon successful execution, generates a unique token ID.
Once the network confirms the transaction, get the transaction receipt, which includes the new token ID generated from the previous step. Use queries such as the TokenInfoQuery
to confirm the token’s properties and ensure that all configurations are correctly set.
Mutable Tokens: These tokens can be updated after creation (e.g., changes to supply or metadata) and require keys that are set during creation by designating keys (such as the admin key) that authorize changes.
Immutable Tokens: Once created, these tokens cannot be changed. No administrative keys are assigned, ensuring that the token’s properties remain fixed by omitting or restricting the relevant keys (e.g., by not assigning an admin key) to prevent modifications.
Token operations require specific keys to ensure that only authorized actions are executed:
On the Hedera network, the consensus nodes and mirror nodes perform two distinct operations at various layers of the Hedera stack.
Consensus nodes are responsible for executing all state-changing transactions, including HTS token creation, minting, burning, and transfers. They validate and order transactions, ensuring finality and security. Once transactions are processed, they generate transaction receipts containing details like the token ID.
Mirror nodes provide a data layer for querying real-time and historical ledger information without impacting network performance. Developers can use them to fetch token details, track NFT ownership history, and view token transaction logs. By leveraging mirror nodes, developers can access detailed insights into their token’s history and state without requiring direct interaction with consensus nodes.
Admin Key
Grants full control over token configuration, including updating properties. Used for governance and administrative tasks, such as freezing or pausing.
Supply Key
Allows minting and burning of tokens to adjust the total supply. Ensures control over token issuance and circulation.
Freeze Key
Enables freezing or unfreezing token transfers for specific accounts. Used to enforce restrictions during investigations or compliance checks.
KYC Key
Enforces KYC compliance, allowing only approved accounts to transact with tokens. Ensures regulatory compliance for sensitive use cases.
Wipe Key
Allows removal of tokens from specific accounts. Used for refunding or correcting token allocations.
Pause Key
Allows pausing or unpausing token transactions. Pausing a token prevents the token from participating in all transactions.
Fee Schedule Key
Allows adjustments to the token’s custom fee schedule, providing flexibility in managing transaction costs.
Metadata Key
The key which can update the metadata of an NFT. This key is used to sign and authorize the transaction to update the metadata of NFTs. This value can be null.