Class Erc721Enumerable

List owned ERC721 NFTs

Remarks

Easily list all the NFTs from a ERC721 contract, owned by a certain wallet.

Example

const contract = await sdk.getContract("{{contract_address}}");
const walletAddress = "0x...";
const ownedNFTs = await contract.nft.query.owned.all(walletAddress);

Hierarchy

  • Erc721Enumerable

Implements

  • DetectableFeature

Constructors

Properties

contractWrapper: ContractWrapper<IERC721 & IERC721Metadata & IERC721Enumerable>
erc721: Erc721<BaseERC721>
featureName: "ERC721Enumerable" = FEATURE_NFT_ENUMERABLE.name

Methods

  • Get all NFTs owned by a specific wallet

    Parameters

    • Optional walletAddress: string

      the wallet address to query, defaults to the connected wallet

    • Optional queryParams: {
          count?: number;
          start?: number;
      }

      optional filtering to only fetch a subset of results.

      • Optional count?: number
      • Optional start?: number

    Returns Promise<NFT[]>

    The NFT metadata for all NFTs in the contract.

    Remarks

    Get all the data associated with the NFTs owned by a specific wallet.

    Example

    // Address of the wallet to get the NFTs of
    const address = "{{wallet_address}}";
    const nfts = await contract.nft.query.owned.all(address);
  • Get all token ids of NFTs owned by a specific wallet.

    Parameters

    • Optional walletAddress: string

      the wallet address to query, defaults to the connected wallet

    Returns Promise<BigNumber[]>

Generated using TypeDoc