Skip to Content
DocumentationTokensGet Token Mint Information

Get Token Mint Information

The getMint function retrieves information about a token mint, including its decimals, authority, and supply.

Usage

const mint = await connection.getMint(mintAddress, commitment);

Parameters

  • mintAddress: Address - Address of the token mint to get information for
  • commitment: Commitment (optional) - Desired confirmation level (default: “confirmed”)

Returns

Returns a Promise<Mint | null> containing the mint information:

  • decimals: Number of decimal places for the token
  • mintAuthority: Public key of the account allowed to mint new tokens
  • supply: Current total supply of the token
  • Other metadata if the token uses Token Extensions

Example

// Get information about the USDC mint const usdcMint = await connection.getMint("EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v"); console.log(`Decimals: ${usdcMint.data.decimals}`); console.log(`Mint authority: ${usdcMint.data.mintAuthority}`); console.log(`Supply: ${usdcMint.data.supply}`);
Last updated on