1

I tried getTokenAccountsByOwner but that requires a mint or programId which I don't have. What if I want to figure out which tokens an account has such as NFTs using only the Pubkey of account owner?

1 Answer 1

2

you just need to use the programID of the token program -

{ 'jsonrpc': '2.0', 'id': 1, 'method': 'getTokenAccountsByOwner', 'params': [ , { 'programId': 'TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA' }, { 'encoding': 'jsonParsed' } ] }

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.