• Retrieves the attributes of an NFT by its mint address.

    Parameters

    • nftAddress: string

      The mint address of the NFT.

    • endpoint: string

      The Solana network endpoint to connect to.

    Returns Promise<NftMetadata>

    • A promise that resolves with the NFT metadata.

    Throws

    • Throws an error if unable to fetch the NFT metadata.

    Example

    const run = async () => {
    try {
    const nftData = await getNftAttributes(
    'EggwWJZsCjSY7f36zHHevBmuSyTDHzGxVC2PGX5ePsTh',
    'https://api.mainnet-beta.solana.com'
    );
    console.log(nftData);
    } catch (error) {
    console.error('Error:', error);
    }
    }

    run();

Generated using TypeDoc