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
Base58-encoded public key (string)
required
Pays for account creation. Must be a signer.
Base58-encoded public key (string)
required
The mint account to create. Must be a signer (new keypair).
Base58-encoded public key (string)
required
The authority that can mint new tokens.
Base58-encoded public key (string)
Optional. Authority that can freeze token accounts. Omit to disable freeze.
uint32
required
Decimal precision. Common values:
9 (SOL-like), 6 (USDC-like), 0 (NFTs).Token2022Extension[] (repeated)
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
SolanaInstruction[] (repeated)
required
Ordered instructions. Submit in this exact order:
System::CreateAccount → extension pre-init → initialize_mint → extension post-init.uint64
Lamports deposited for rent exemption. Covers base mint size plus variable extension data.
uint64
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
Base58-encoded public key (string)
required
Pays for account creation. Must be a signer.
Base58-encoded public key (string)
required
The mint account to create. Must be a signer (new keypair).
Base58-encoded public key (string)
required
The authority that can mint new tokens.
Base58-encoded public key (string)
Optional. Authority that can freeze token accounts. Omit to disable freeze.
uint32
required
Decimal precision. Common values:
9 (SOL-like), 6 (USDC-like), 0 (NFTs).MetaplexTokenMetadata (object)
Optional. Metaplex on-chain metadata. When provided, appends a
CreateMetadataAccountV3 instruction.Response
SolanaInstruction[] (repeated)
required
Ordered:
System::CreateAccount, initialize_mint, and optionally CreateMetadataAccountV3.uint64
Rent exemption lamports for the mint account.
uint64
Always
82 for SPL Token mints.