3

I want to know if there is any way I can find out mint-address of spl-token if I using associated token-account of any one of the holders

Something like this:

const mintAddress = getMintAddress(tokenAccountAddress)

1 Answer 1

3
import {getAccount} from "@solana/spl-token"

const tokenAccount = await getAccount(connection, tokenAccountAddress)

console.log(tokenAccount.mint.toBase58())

https://solana-labs.github.io/solana-program-library/token/js/modules.html#getAccount

Here is a list of properties for a token account:

https://solana-labs.github.io/solana-program-library/token/js/interfaces/Account.html

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.