Token Operations
Check Holding Asset
Learn how to check your wallet
The toolkit provides method:
- getWalletHolding: Check balances your own wallet
Usage
Parameters
No
Example Prompts
Natural Language Prompts
Example Implementation
Implementation Details
- Returns balances in UI units (e.g., 0.1 SUI)
- Returns 0 for non-existent token
Error Handling
- Invalid privateKey
- Empty wallet
Best Practices
- Error Handling
- Handle non-existent tokens gracefully
- Validate addresses before querying
- Consider caching for frequent checks
- Performance
- Batch balance checks when possible
- Cache results for short periods
- UI Display
- Format numbers appropriately
- Show proper decimal places
- Include token symbols