The Solana network endpoint to connect to.
The wallet address of the user.
The address of the NFT collection.
const run = async () => {
const solanaEndpoint = 'https://api.mainnet-beta.solana.com';
const walletAddress = 'YourWalletAddressHere';
const collectionMintAddress = 'CollectionMintAddressHere';
try {
const nftAddresses = await getNftsByWalletAddressAndCollectionMint(
solanaEndpoint,
walletAddress,
collectionMintAddress
);
console.log('NFT Addresses in Collection:', nftAddresses);
} catch (error) {
console.error('Error:', error);
}
}
run();
Generated using TypeDoc
Retrieves the NFTs owned by a specific wallet address that belong to a specified collection.