Developer Guide
Get your balance
Learn how to check your balances on Spark
To check your Spark wallet balance, use the getBalance()
method:
The getBalance()
method returns a Promise resolving to an object containing:
balance
: Abigint
representing the total amount in satoshistokenBalances
: A Map of token balances, where each entry contains:balance
: Abigint
representing the token amount
Understanding Your Balance
Your balance represents the sum of all available UTXOs in your wallet. This includes:
- Deposits from Bitcoin
- Received Lightning payments
- Received Spark transfers
- Received token transfers
Claiming Deposits
If you deposited from Bitcoin L1, you’ll first need to take an additional step of claiming the deposit before hte balance will be reflected in your wallet. Claim deposit
Next Steps
Once you know your balance, you can:
Need Help?
- Check our FAQ
- Review the API Reference
- Check our Code Samples
- Follow our Testing Guide