I'm trying to mentally put together the relationship between the various types of accounts involved in SPL tokens according to the Solana Cookbook: The cookbook says:
This mint account is later used to mint tokens to a token account and create the initial supply.
Additionally Solana Token Creator docs say:
Creating a Solana token requires the following steps:
Creating a new Mint account
Creating an associated token account
Minting an amount of the token to the associated token account
Adding the token metadata to the mint account
My understanding is that this means:
Every Token mint has:
- Mint account - used to mint tokens (but does not store tokens)
- Token Account - where new tokens are created. Associated Token Accounts are the most common way of making token accounts.
Every user account has
- A native Sol balance
- 0 or more Associated token accounts (at lease one for every token type that belongs to this user account)
I have guessed the following: after I have created tokens into the mint's token account, token are sent to users from the mint's token account (which may be an ATA) to the user's Token Account (which may also be an ATA).
Is this correct? Or are tokens minted directly to user's token accounts?