Home > @3rdweb/sdk > PackModule > balanceOf
Get Pack Balance
Signature:
balanceOf(address: string, tokenId: string): Promise<BigNumber>;
Parameter | Type | Description |
---|---|---|
address | string | |
tokenId | string |
Returns:
Promise<BigNumber>
Get a wallets pack balance (number of a specific packs in this module owned by the wallet).
// Address of the wallet to check pack balance
const address = """;
// The token ID of the pack you want to check the wallets balance of
const tokenId = "0"
const balance = await module.balanceOf(address, tokenId);
console.log(balance);