Class Erc1155Enumerable

List ERC1155 NFTs

Remarks

Easily list all the NFTs in a ERC1155 contract.

Example

const contract = await sdk.getContract("{{contract_address}}");
const nfts = await contract.edition.query.all();

Hierarchy

  • Erc1155Enumerable

Implements

  • DetectableFeature

Constructors

Properties

contractWrapper: ContractWrapper<IERC1155 & IERC1155Metadata & IERC1155Supply & IERC1155Enumerable>
erc1155: Erc1155<BaseERC1155 | BaseSignatureMintERC1155>
featureName: "ERC1155Enumerable" = FEATURE_EDITION_ENUMERABLE.name

Methods

  • Get All NFTs

    Parameters

    • 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 queried.

    Remarks

    Get all the data associated with every NFT in this contract.

    By default, returns the first 100 NFTs, use queryParams to fetch more.

    Example

    const nfts = await contract.edition.query.all();
    
  • Get all NFTs owned by a specific wallet

    Parameters

    • Optional walletAddress: string
    • Optional queryParams: {
          count?: number;
          start?: number;
      }
      • 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.edition.query.owned(address);
  • Get the supply of token for a given tokenId.

    Parameters

    • tokenId: BigNumberish

    Returns Promise<BigNumber>

    the total number of NFTs minted in this contract

    Remarks

    This is not the sum of supply of all NFTs in the contract.

  • Get the number of NFTs minted

    Returns Promise<BigNumber>

    the total number of NFTs minted in this contract

    Remarks

    This returns the total number of NFTs minted in this contract, not the total supply of a given token.

Generated using TypeDoc