Fetch and decode a token mint.
Automatically detects Token vs Token-2022 and applies the appropriate decoder.
HTTP transport.
Mint public key.
RPC options.
Decoded mint, or null if not found.
null
const mint = await fetchMint(transport, mintPubkey);if (mint) console.log(`Supply: ${mint.decoded.supply}, Decimals: ${mint.decoded.decimals}`); Copy
const mint = await fetchMint(transport, mintPubkey);if (mint) console.log(`Supply: ${mint.decoded.supply}, Decimals: ${mint.decoded.decimals}`);
1.1.0
Fetch and decode a token mint.
Automatically detects Token vs Token-2022 and applies the appropriate decoder.