Skip to main content
The Mint method reads the mint account on-chain to determine the token program, mint authority, and decimal precision automatically — you only supply the mint address, destination wallet owner, and amount as a human-readable decimal string.
This method returns a SolanaInstruction. Add it to a transaction and use the Transaction Service to compile, sign, and submit. See Instructions & Transactions.
Pass the destination owner’s system account address in destination_owner_pub_key — not the Associated Token Account (ATA) address. The ATA is derived automatically from the owner and mint addresses.

Request

mint_pub_key
Base58-encoded public key (string)
required
The token mint to mint from.
destination_owner_pub_key
Base58-encoded public key (string)
required
The system account (wallet) that owns the destination token account. The ATA is derived from this address and the mint automatically. Do not pass the ATA address here.
amount
string (decimal)
required
Human-readable token amount. Express in whole-token units using the mint’s decimal precision.Examples:
  • "1.5" — 1.5 tokens on a 6-decimal mint
  • "1000" — 1000 whole tokens
  • "0.000001" — 1 base unit on a 6-decimal mint

Response

instruction
SolanaInstruction (object)
required
The MintToChecked instruction. Add this to your transaction.

Code Examples

resp, err := client.Mint(ctx, &token_v1.MintRequest{
    MintPubKey:              "YourMintAddress...",
    DestinationOwnerPubKey:  "RecipientWalletAddress...", // owner address, not ATA
    Amount:                  "10.0",
})
if err != nil {
    log.Fatal(err)
}
// Add instruction to your transaction
tx.AddInstruction(resp.Instruction)