Skip to main content

ERC1155 - View All & View Owned

You can utilize these features of the SDK if your contract implements the ERC1155Enumerable interface.

Get All NFTs

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

By default, it loads the first 100 NFTs; an optional QueryAllParams object can be provided to specify a count and start value.

const nfts = await contract.erc1155.getAll();

This snippet is for v3 of the SDK. Learn how to upgrade.

View in React SDK Documentation

Get Owned NFTs

Get all of the NFTs owned by a specific wallet address at this current point in time.

Automatically fetches the metadata for each NFT.

// Address of the wallet to get the NFTs of
const address = "{{wallet_address}}";
const nfts = await contract.erc1155.getOwned(address);

This snippet is for v3 of the SDK. Learn how to upgrade.

View in React SDK Documentation