logo
🥜
Peanut Documentation
🏦
How to Withdraw?
📥
How to Deposit?
🔗
How to receive money via Peanut?
💵
How to pay someone with Peanut?
💰
Fees
🆘
Support
🔑
Passkeys
🔓
Security Audit
👾
Bug bounties
🧑‍💻
Dev Quickstart
➡️
API keys
⛓️
Supported Chains and Tokens
🗂️
Embedding an IFrame
💻
Using the SDK
➡️
Create Claim Links
➡️
Create Request Links
➡️
Claim
➡️
Utils
🔗
Get Link Details
🔗
Cross-chain
🔗
Raffle (Legacy)
🔗
Get Default Provider
🔗
Get Supported Peanut Chains
🔗
Toggle Verbosity
🔗
EthersV5 <> Peanut Transaction Types
🔗
Estimate Fee Options
🔗
Get Random String
🔗
Get all deposits for an Address
🔗
Get Token Balance
➡️
White-Labelling
➡️
Troubleshooting
➡️
SDK FAQ
🏪
Request API
Press Kit
👨‍⚖️
T&Cs and Contact
🎲
Other
Peanut Documentation
/
Using the SDK
/
Utils

Get Token Balance

Need to check if the user has enough funds to execute a transaction? Have a look here how you can!

This function will return the wallet balance of a certain token.
plain text
const balance = await getTokenBalance({ chainId: '137', tokenAddress: '0x0000000000000000000000000000000000000000', walletAddress: '0x...', tokenDecimals: 18, //optional tokenType: 0, //optional, use interfaces.EPeanutLinkType })
Get all deposits for an Address
White-Labelling

Powered by Notaku
Helpful?
Share
Content
Get Token Balance
Need to check if the user has enough funds to execute a transaction? Have a look here how you can!