Issue
I am using web3 sdk of Solana to query balances or make transactions. Now I would like to know if it's possible to achieve one of the following actions:
- Get a list of the assets from a provided wallet address.
- Get a wallet address from a provided nft address. This one will be better if both are possible.
Solution
Absolutely, to answer your questions:
getTokenAccountsByOwner
, where the owner is the wallet address: https://solana-labs.github.io/solana-web3.js/classes/Connection.html#getTokenAccountsByOwnergetTokenLargestAccounts
will give the holders for the nft: https://solana-labs.github.io/solana-web3.js/classes/Connection.html#getTokenLargestAccounts
Answered By - Jon C
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.