# Issue an Asset Tutorial In this tutorial, we will walk through the steps to issue an asset on the Stellar test network. :::note If you'd like to interact with an asset issued on the Stellar network in smart contracts, you can create or deploy the [Stellar Asset Contract](https://developers.stellar.org/docs/tokens/stellar-asset-contract.md) for that asset. ::: ## Prerequisites You must ensure you have the required amount of XLM to create your issuing and distribution accounts and cover the minimum balance and transaction fees. If you’re issuing an asset on the testnet, you can fund your account by getting test XLM from friendbot. If you’re issuing an asset in production, you will need to acquire XLM from another wallet or exchange. If you’d like to avoid your users having to deal with transaction fees, consider using fee-bump transactions. Read more in our [Fee-Bump Transaction Guide](https://developers.stellar.org/docs/build/guides/transactions/fee-bump-transactions.md). Learn about the testnet and mainnet in our [Networks section](https://developers.stellar.org/docs/networks.md). Learn more about fees in our [Fees, Resource Limits, and Metering section](https://developers.stellar.org/docs/learn/fundamentals/fees-resource-limits-metering.md). ## Foundational tools ### Issuer account keypair First, you must generate a unique keypair. The public key will act as your [issuing identity](https://developers.stellar.org/docs/learn/fundamentals/stellar-data-structures/assets.md#issuer) on the network, while you use the secret key to sign transactions. :::info Your account address will not change once you issue your asset, even if you modify its [signers](https://developers.stellar.org/docs/learn/fundamentals/transactions/signatures-multisig.md). Many issuers employ [vanity public keys](https://github.com/JFWooten4/stellar-vanity-toolkit) related to their asset. For instance, you might configure a custom signer in [base32](https://developers.stellar.org/docs/learn/glossary.md#account-id) like `GASTRO...USD`. ::: :::note Many users secure their issuing account with cold storage techniques, such as a hardware wallet or multisignature setup. This adds an extra layer of protection by keeping your secret key offline or requiring multiple approvals for transactions. ::: ### Distribution account keypair Your asset can be issued and transferred between accounts through a payment, contract, or claimable balance. Although it is not required to create a distribution account, it is best practice, so we will do so in this example. Read more in our [Issuing and Distribution Accounts section](https://developers.stellar.org/docs/tokens/control-asset-access.md#issuing-and-distribution-accounts). #### Three Operations ##### Generate a new keypair ##### Import an existing keypair ##### Employ [multiple signatures](https://developers.stellar.org/docs/learn/fundamentals/transactions/signatures-multisig.md) :::danger Be careful when working with raw secret keys. If you don't have issuer trustline [clawback](https://developers.stellar.org/docs/build/guides/transactions/clawbacks.md) enabled, any misstep here could permanently render assets lost. Many users put their first few projects on [testnet](https://developers.stellar.org/docs/networks.md#testnet) or try out [Quests](https://developers.stellar.org/docs/learn/interactive/quest.md) which provide a low-stakes introductory sandbox. ::: ### Local asset object The asset object is a combination of your [code](https://developers.stellar.org/docs/tokens/control-asset-access.md#naming-an-asset) and your issuing public key. After your issuance, anyone can search the network for your unique asset. :::info While anyone can create an asset, there may be real-world [compliance](https://developers.stellar.org/docs/tokens/anatomy-of-an-asset.md#compliance) implications relevant to your use case. ::: :::note You’ll want to make sure you publish information about your asset to establish trust with your users and prevent errors. Learn how to do so with our [Publish Information About Your Asset section](https://developers.stellar.org/docs/tokens/publishing-asset-info.md). ::: ## Network transactions ### Build transaction to establish distributor trustline Accounts must establish a [trustline](https://developers.stellar.org/docs/learn/fundamentals/stellar-data-structures/accounts.md#trustlines) with the issuing account to hold that issuer’s asset. This is true for all assets except for the network’s native token, [Lumens](https://developers.stellar.org/docs/learn/fundamentals/lumens.md). :::note If you’d like to avoid your users having to deal with trustlines or XLM, consider using sponsored reserves. Read more in our [Sponsored Reserves guide](https://developers.stellar.org/docs/build/guides/transactions/sponsored-reserves.md). ::: ### Issuer payment to distributor Payments are the most popular operation to actually issue (or mint) your asset, compared to [other issuances](https://developers.stellar.org/docs/learn/fundamentals/transactions/list-of-operations.md#path-payment-strict-send). A payment creates the amount of an asset specified, up to [the maximum 64-bit integer](https://developers.stellar.org/docs/learn/fundamentals/stellar-data-structures/assets.md#amount-precision). Relevantly, you do not need to scale up the issuing amount of your asset by the XDR [minimum increment](https://developers.stellar.org/docs/learn/fundamentals/stellar-data-structures/assets.md#amount-precision). :::note You can also create a market directly from the issuing account and issue tokens via trading. ::: ### Optional transactions #### Configure maximum supply :::danger This section details how to lock your account with the purpose of limiting the supply of your issued asset. However, locking your account means you’ll never be able to do anything with it ever again—whether that’s adjusting signers, changing the home domain, claiming any held XLM, or any other operation. Your account will be completely frozen. ::: You can permanently configure the exact number of an asset that will ever exist. Learn more about asset supply in our section on [Limiting the Supply of an Asset](https://developers.stellar.org/docs/tokens/control-asset-access.md#limiting-the-supply-of-an-asset) #### Approve distributor trustline If you enable the [authorization flag](https://developers.stellar.org/docs/tokens/control-asset-access.md#authorization-required-0x1), the issuing account also needs to approve the distributor account's trustline request before the issuing payment. You will need to do this for all new accounts when set for your asset. ## Full Code Sample