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
- A funded payer account. See Quickstart.
- A generated mint keypair (the mint’s public key). See Quickstart.
- A Protochain connection. See Connecting to Protochain.
Create the mint
Call CreateToken2022Mint or CreateSPLTokenMint depending on your token program choice. Both return a list ofinstructions — 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.Next steps
- Transfer tokens: Transfer SOL guide
- Full Token Program reference: Token Program Service
- Monitor your mint transactions: Monitor Transactions guide