These methods return instruction lists. Add them in order to a transaction and use the Transaction Service to compile, sign, and submit. See Instructions & Transactions.
CreateToken2022Mint
Creates and fully initializes a Token-2022 mint in one call. Returns the complete ordered instruction set:System::CreateAccount → extension pre-init instructions → initialize_mint → extension post-init instructions (e.g. token metadata, update fields).
Request
Pays for account creation. Must be a signer.
The mint account to create. Must be a signer (new keypair).
The authority that can mint new tokens.
Optional. Authority that can freeze token accounts. Omit to disable freeze.
Decimal precision. Common values:
9 (SOL-like), 6 (USDC-like), 0 (NFTs).Optional. Token-2022 extensions to enable at initialization. Extensions cannot be added after mint creation. Currently supported: metadata extension. Transfer hooks, transfer fees, and other extensions are coming soon.
Response
Ordered instructions. Submit in this exact order:
System::CreateAccount → extension pre-init → initialize_mint → extension post-init.Lamports deposited for rent exemption. Covers base mint size plus variable extension data.
Initial bytes allocated by
System::CreateAccount. Token-2022 may realloc beyond this for variable-length extension data.Code Examples
CreateSPLTokenMint
Creates and fully initializes a legacy SPL Token mint. ReturnsSystem::CreateAccount + initialize_mint + optional Metaplex CreateMetadataAccountV3. Space is always 82 bytes for SPL Token mints.
Request
Pays for account creation. Must be a signer.
The mint account to create. Must be a signer (new keypair).
The authority that can mint new tokens.
Optional. Authority that can freeze token accounts. Omit to disable freeze.
Decimal precision. Common values:
9 (SOL-like), 6 (USDC-like), 0 (NFTs).Optional. Metaplex on-chain metadata. When provided, appends a
CreateMetadataAccountV3 instruction.Response
Ordered:
System::CreateAccount, initialize_mint, and optionally CreateMetadataAccountV3.Rent exemption lamports for the mint account.
Always
82 for SPL Token mints.