• Retrieves all NFTs owned by a specific wallet address on the Solana blockchain.

    Parameters

    • endpoint: string

      The Solana network endpoint to connect to.

    • userWalletAddress: string

      The wallet address of the user whose NFTs are to be fetched.

    Returns Promise<DigitalAsset[]>

    • A promise that resolves with an array of NFTs.

    Throws

    • Throws an error if unable to fetch NFTs for the given address.

    Example

    const run = async () => {
    const solanaEndpoint = 'https://api.mainnet-beta.solana.com';
    const walletAddress = 'YourWalletAddressHere';

    try {
    const nfts = await getNftsByWalletAddress(solanaEndpoint, walletAddress);
    console.log('NFTs:', nfts);
    } catch (error) {
    console.error('Error:', error);
    }
    }

    run();

Generated using TypeDoc