Currently, Web3 JS doesn’t offer an efficient way to check if a wallet address owns any ERC-1155 token within a smart contract. However, using the OpenSea API, we can check a wallets balance for any Collection on OpenSea.
Request an OpenSea API Key.
Once you have your API Key, Copy and Paste it into the field provided under Web3 Access -> Smart Contracts (NFTs) in your WordPress Dashboard.
After getting your API Key and setting up your smart contracts you will also need your Collection Slug on OpenSea.
For this example, we will be using TCG World’s Dragon Cave Club:
https://opensea.io/collection/tcg-world-dragons
You will notice the URL has /collection/tcg-world-dragons. In this case, the Collection Slug is tcg-world-dragons.
The slug must be placed in the field provided when Adding or Editing your Web3Product.