0
  1. I would like to do the following on the front-end. I would like to have a list of "collections" we support and which user can select from. User connects to Phantom wallet and selects "collection A". Now I check all tokens in the user's wallet that belong to the "collection A" selected by the user.

I was reading this thread https://forums.solana.com/t/possible-to-query-all-nft-addresses-in-a-specific-collection/3097/7 which basically says there is no easy way to query spl-tokens that belong to a specific collection because on solana there are no such things as collections.

How do you handle then releasing 1000 different (nft) tokens that are supposed to be under the same theme? They are collections in the end right? Also there was apparently a tool for it but the docs have been removed: what happened with https://docs.metaplex.com/mint-lists

Reading https://docs.metaplex.com/programs/token-metadata/ I learned that Metaplex attaches metadata to PDA of Mint Account. Could we maybe us that to identify a collection, if tokens have been release by Metaplex products

  1. Also then, how to grab metadata of each token? Metaplex covers this, correct?

How could I accomplish 1 and 2.

Thanks for your suggestions!

Digital Dom
  • 412
  • 5
  • 12

2 Answers2

0

The content of the solana forums link is outdated. Metaplex Token metadata Standard supports collections for months now.

You can for example use the metaplex js sdk to get all nfts the connected wallet owns and then filter by collection key in their metadata.

The metaplex js sdk should provide all solana related things you need

Mark Sackerberg
  • 744
  • 2
  • 7
  • Perfect! Thank you Mark for quick reply. I will try implementing it tomorrow! After that will rate the answer. :) – Digital Dom Jul 21 '22 at 18:19
0

You can use a short code snippet.

CodeSandbox

You can get all nfts in a user wallet and after that filter them as you want.

Spyder
  • 66
  • 4