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
you just need to use the programID of the token program -
{ 'jsonrpc': '2.0', 'id': 1, 'method': 'getTokenAccountsByOwner', 'params': [ , { 'programId': 'TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA' }, { 'encoding': 'jsonParsed' } ] }