Skip to main content
Creating a token on Solana requires three steps: create a mint account, create a holding account for the recipient, and mint tokens to it. This guide covers both SPL Token and Token-2022 paths using the Protochain Token Program Service.

Choose your token program

Both token programs use the same Protochain API shape — you choose the program once, at mint creation, and it cannot be changed. See Token Programs for the full trade-off comparison. If you need extensions or native on-chain metadata, use Token-2022. If you need maximum wallet compatibility, use SPL Token.

Prerequisites

Create the mint

Call CreateToken2022Mint or CreateSPLTokenMint depending on your token program choice. Both return a list of instructions — include all of them in the transaction in order (the service handles ordering).

Token-2022 mint

SPL Token mint

Create a holding account

Before minting, the recipient needs a token holding account (Associated Token Account) for this mint. Call CreateToken2022HoldingAccount or CreateSPLTokenHoldingAccount — use the same token program as the mint.
Pass owner_pub_key as the recipient’s system wallet address, not a pre-computed ATA address. Protochain derives the ATA automatically.

Token-2022 holding account

SPL Token holding account

Compile and submit the mint transaction

Collect all instructions from the mint creation and holding account responses, assemble them into a single transaction, compile with CompileTransaction, sign with both the fee payer key and the mint keypair, then submit.
The mint account keypair must be included as a signer in SignTransaction — it is not just a public key reference. Both the payer and the mint keypair are required signers.

Mint tokens

With the mint account created, call Mint to issue tokens. Mint is token-program agnostic — Protochain reads the mint on-chain to determine the token program automatically.
Pass destination_owner_pub_key as the recipient’s system wallet address, not the ATA address. The ATA is derived automatically.
Add the returned instruction to a transaction, then compile, sign (mint authority only this time), and submit using the same compile → sign → submit pattern from the previous section.

Next steps