Skip to main content

Timeline for Solana RPC API to view NFTs

Current License: CC BY-SA 4.0

5 events
when toggle format what by license comment
Oct 9, 2022 at 8:11 comment added paradigm111 Could you give a code example of if you only have a Wallet's Public Address (Public Key) and then retrieve a list of NFTs on it using only the RPC API?
Oct 9, 2022 at 6:05 comment added paradigm111 I do not understand. Lets say I know only the Wallet Address. Which API would I then use to get a list of tokens? If I try to use getProgramAccounts it asks for "Pubkey of program, as base-58 encoded string" as a parameter which I do not have. I don't understand which RPC API I use to get this.
Oct 8, 2022 at 19:38 comment added 0xShuk The pubkey of the program will the public key of Token Program: solscan.io/account/TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA. You can add the public key of the account in the filter to only return the tokens owned by the wallet as mentioned in the article. Then you can pick the NFTs from the tokens by first filtering the tokens with the supply = 1 and afterwards retrieving the metadata account by calculating PDA. Alternatively, you can save the whole lot of trouble by simply using Metaplex API.
Oct 8, 2022 at 19:29 comment added paradigm111 How can I get the Pubkey of program required by getProgramAccounts? For instance if I only know the public key of the account and not which type of tokens such as when programming a Wallet App that will explore the wallet to discover everything that it contains. The Quick Node example uses a Github library from what I can tell right? How can you do it with only RPC API? Could you give a code example of if you only knew a Wallet address (public key) how you could then get a list of tokens using only RPC API?
Oct 8, 2022 at 19:16 history answered 0xShuk CC BY-SA 4.0