Skip to content
    verifyNftOwnership@AlchemyDocs
    index.js
    Packager files
    package-lock.json
    package.json
    Config files
    .replit
    replit.nix
    // Imports the Alchemy SDK
    const { Alchemy, Network } = require("alchemy-sdk");

    // Configures the Alchemy SDK
    const config = {
    apiKey: "alchemy-replit", // Replace with your API key
    network: Network.ETH_MAINNET, // Replace with your network
    };

    // Creates an Alchemy object instance with the config to use for making requests
    const alchemy = new Alchemy(config);

    const main = async () => {
    // define the contract address and owner
    const address = "0xe5cB067E90D5Cd1F8052B83562Ae670bA4A211a8";
    const owner = "0xBC4CA0EdA7647A8aB7C2061c2E118A18a936f13D";

    //Call the method to display the rarity of each attribute of the NFT
    const response = await alchemy.nft.verifyNftOwnership(owner, address)

    //Logging the response to the console
    console.log(response)
    }

    main();