Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fetch the list of NFTs owned by an account #172

Open
cdric opened this issue Dec 14, 2021 · 4 comments
Open

Fetch the list of NFTs owned by an account #172

cdric opened this issue Dec 14, 2021 · 4 comments
Labels
enhancement New feature or request

Comments

@cdric
Copy link

cdric commented Dec 14, 2021

I was able to use this library to pull a token using the contract address + the tokenId.
What I want to know now is to only fetch the TokenIds that belong for a given user (by connecting his Metamask wallet) and fetching that information from it.

I tried to look for example but could not find any.
Is this something possible using this library?

Thank you!

@bpierre
Copy link
Owner

bpierre commented Dec 20, 2021

Hi, unfortunately this is not an easy thing to do by directly querying an Ethereum node.

But I think it’s something we could add as an optional method in the API, only supported by some fetchers (e.g. OpenSea and a future The Graph API), so I am going to leave this issue opened.

@bpierre bpierre added the enhancement New feature or request label Dec 20, 2021
@cdric
Copy link
Author

cdric commented Dec 21, 2021

Hi Pierre. I was able to take the Opensea approach and use this instead of your library. I'll keep watching this issue as I might revert back to it if you offer such functionality. You basically need to query the asset end point of OS by passing a Eth address to return all the NFT that belong that that collection.

@agrohs
Copy link

agrohs commented Jan 15, 2022

@cdric - why don't you build it and contribute a PR for it?

@cdric
Copy link
Author

cdric commented Jan 16, 2022

The solution I'm using is now very different that the architecture of your component so I would have to rewrite pretty much everything. That being said, if you want, I'm happy to share my reactJs code for you to look at the interaction I'm having between metamask and opensea if this can be helpful?

@bpierre bpierre changed the title Fetch the list of NFT from a Metamask wallet Fetch the list of NFTs owned by an account Apr 28, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants