History class from @holdstation/worldchain-sdk enables fetching transaction histories (such as sends, receives, swaps) associated with a wallet on WorldChain.
Installation
Setup
Overall Flow
- Call
managerHistory.watch(address, callback). - When new activity is detected, trigger refetch.
- Call
walletHistory.find(offset, limit)to retrieve latest transactions.
π Full Example on GitHub
- You can view a full working example here: View history.tsx example
Watch Real-time Transaction Updates
π Parameters
βΉοΈ Notes:
watch(address, callback)returns a{ start, stop }object.- You must call
start()to begin monitoring. - Always call
stop()to properly clean up when the component unmounts.