-
Notifications
You must be signed in to change notification settings - Fork 137
Description
Is your feature request related to a problem? Please describe.
Currently, I am unable to directly query the balance of specific addresses in my wallet. To obtain address balance information, I have to manually iterate through transfer records at each block height, then parse the input and output addresses of each transfer to calculate the balance. This process is very cumbersome and inefficient, especially when I need to monitor address balances in real-time or develop wallet-related features.
Describe the solution you'd like
I would like to propose one of the following two interface solutions:
-
Address Balance Query Interface: Provide an interface that can directly query the balance of a specified address, for example:
GetAddressBalance(address), returning the current asset balance of that address. -
Height-filtered Transfers Interface: If a direct balance query is not feasible, please provide a transfer query interface filtered by block height, for example:
ListTransfersByHeight(height), returning all transfer records related to my wallet at the specified block height. This would allow me to calculate address balances by analyzing these transfer records myself.
Describe alternatives you've considered
The alternative solutions I have considered are:
- Using the existing
ListTransfersinterface to get all transfer records, then filtering and analyzing them locally by block height and address. - Building my own indexing system to track and calculate address balances.
However, both solutions have efficiency issues and become difficult to maintain as transaction volume increases.
Additional context
This feature is crucial for the following scenarios:
- Developing user-friendly wallet interfaces that display address balances in real-time.
- Displaying address asset information when building a block explorer.
- Quickly querying transfer records at specific heights for transaction monitoring and auditing purposes.
As a Taproot Assets user, I believe this feature would significantly improve both the developer experience and end-user convenience.
Metadata
Metadata
Assignees
Labels
Type
Projects
Status