
Check Wallet Balance
Get your current Bitcoin balance and token holdings in your Spark wallet.getBalance()
Gets the current balance of the wallet, including Bitcoin balance and token balances.
View Transfer History
Track all incoming and outgoing transfers for your wallet with pagination support.getTransfers(limit?, offset?)
Gets all transfers for the wallet with optional pagination.
getTransfers() includes Spark transfers, Lightning sends/receives, and cooperative exits. For token transaction details (e.g., sender address), use queryTokenTransactionsWithFilters().Real-time Event Monitoring
Monitor wallet activity in real-time using EventEmitter methods for instant updates.on(event, listener)
Adds a listener for the specified event to monitor wallet activity.
once(event, listener)
Adds a one-time listener for the specified event.
off(event, listener)
Removes the specified listener from the specified event.
Available Events
Spark wallets emit various events for different types of activity:Available Events
| Event | Description |
|---|---|
transfer:claimed | Emitted when an incoming transfer is claimed |
deposit:confirmed | Emitted when a pending L1 deposit becomes spendable |
stream:connected | Emitted when the event stream connects |
stream:disconnected | Emitted when the stream disconnects |
stream:reconnecting | Emitted when attempting to reconnect |
Use Sparkscan Explorer
Monitor your wallet activity using the Sparkscan block explorer for a visual interface.Sparkscan provides a web interface to view your wallet’s transaction history, balance, and activity without needing to implement the API calls yourself.
