Closed haris-aqeel closed 1 year ago
Thanks for registering this feature request!
Second this feature request
Also using nextjs and using a combination of metaplex functions and getTokenLargestAccounts inside of the getServerSideProps to get all of the data needed.
Having the owner of the NFT be returned with the other NFT data in functions such as findbymint would be helpful.
https://solanacookbook.com/references/nfts.html#how-to-get-the-owner-of-an-nft
Hi there, we're moving feature requests to Canny.io so people can upvote and comment on their favourite feature requests. I'll add the "feature request" label to this issue so the label automation triggers the automated message. Thanks for your understanding. 🌸
Hi @haris-aqeel,
Thank you for raising this!
We'd like to make sure our GitHub issue tracker remains the best place to manage issues that affect the development of the Metaplex JS SDK itself. It looks like your issue is suggesting an improvement rather than raising a bug.
Unless there exists evidence that this is a bug with the JS SDK itself, please use our Feature Request boards to create new posts or upvote existing ones. You may use the following links to access the JS SDK Feature Request board:
https://metaplex.canny.io/developers?category=js-sdk-tools
If you could please share the link to the relevant Feature Request here afterwards, that would be very helpful for anyone following this thread.
This automated message is a result of having added the "feature request" label.
I am able to get NFT details from the NFT mint address using metaplex.
The above part is my code and in response I am getting a long NFT object, which contains
type Nft = Readonly<{ model: 'nft'; address: PublicKey; metadataAddress: Pda; updateAuthorityAddress: PublicKey; json: Option<Json>; jsonLoaded: boolean; name: string; symbol: string; uri: string; isMutable: boolean; primarySaleHappened: boolean; sellerFeeBasisPoints: number; editionNonce: Option<number>; creators: Creator[]; tokenStandard: Option<TokenStandard>; collection: Option<{ address: PublicKey; verified: boolean; }>; collectionDetails: Option<{ version: 'V1'; size: BigNumber; }>; uses: Option<{ useMethod: UseMethod; remaining: BigNumber; total: BigNumber; }>; mint: { model: 'mint'; address: PublicKey; mintAuthorityAddress: Option<PublicKey>; freezeAuthorityAddress: Option<PublicKey>; decimals: number; supply: SplTokenAmount; isWrappedSol: boolean; currency: SplTokenCurrency; }; edition: | { model: 'nftEdition'; isOriginal: true; address: PublicKey; supply: BigNumber; maxSupply: Option<BigNumber>; } | { model: 'nftEdition'; isOriginal: false; address: PublicKey; parent: PublicKey; number: BigNumber; }; }>
The above sample is of NFT response, I am receiving. Everything is fine, but now I want to get all nfts by owner of this particular nft. I understand that metaplex provides us a function like this
Here, if I can get the owner address in response, so I can be able to pass in owners address but unable to do so because the nft response does not contains the nft owners info(i.e, address).
USECASE:
I am using next.js so on a dynamic route such as abc.com/nft-detail/. I am able to show nft details from the mint address by using metaplex function. However, along with showing the detail of a selected nft, I also want to show another section on the same page, which shows list of other nfts from the same owner. The issue is that I am using the next SSR and I don't have an access to wallet address and neither I need to be dependent on my wallet to be connected inorder to display other nfts from same owner, therefore, I have a need of a function through metaplex inorder to get owner from the mint address.