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 { data: nfts, isLoading, error } = useNFTs(contract, { start: 0, count: 100 });

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.

const { data: ownedNFTs, isLoading, error } = useOwnedNFTs(contract, "{{wallet_address}}");

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

View in React SDK Documentation