typescript-sdk

Home > @3rdweb/sdk > BundleDropModule > balanceOf

BundleDropModule.balanceOf() method

Get NFT Balance

Signature:

balanceOf(address: string, tokenId: BigNumberish): Promise<BigNumber>;

Parameters

Parameter Type Description
address string  
tokenId BigNumberish  

Returns:

Promise<BigNumber>

Remarks

Get a wallets NFT balance (number of a specific NFT in this module owned by the wallet).

Example

// Address of the wallet to check NFT balance
const address = "";
// The token ID of the NFT you want to check the wallets balance of
const tokenId = "0"

const balance = await module.balanceOf(address, tokenId);
console.log(balance);