Skip to content

[Feature] address-show should also display return/change addresses and optionally show address balances #1860

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
erubboli opened this issue Dec 29, 2024 · 0 comments · May be fixed by #1900
Assignees
Labels
enhancement New feature or request

Comments

@erubboli
Copy link
Member

erubboli commented Dec 29, 2024

Currently, the address-show command only lists receiving addresses. It would be beneficial to enhance this command with the following features:


Primary Enhancement: Support for return/change addresses

The command should allow users to view change (return) addresses in addition to receiving ones.

Proposed options:

  • Add a flag like --include-change or --all to show both receiving and change addresses.
  • Clearly label address types in the output (e.g., receiving, change).

Secondary Enhancement: Show address balances

By default, the command should display the current balance associated with each address.

Optionally, developers may prefer to guard this behavior behind a flag such as --with-balances for performance or design reasons.

This would give users a more complete picture of their wallet's state directly from the CLI.


Example

Current output:

Wallet(Account BRIDGE_HOT)> address-show
+-------+----------------------------------------------+--------------------------------+
| Index | Address                                      | Is used in transaction history |
+=======+==============================================+================================+
| 0     | mtc1qxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx | Yes                            |
| 1     | mtc1qxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx | No                             |
| 2     | mtc1qxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx | No                             |
| 3     | mtc1qxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx | No                             |
| 4     | mtc1qxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx | No                             |
+-------+----------------------------------------------+--------------------------------+

Proposed extended output (with or without --with-balances, depending on design):

Wallet(Account BRIDGE_HOT)> address-show --all
+-------+----------------------------------------------+----------+-----------------------------+----------+
| Index | Address                                      | Type     | Is used in transaction hist | Balance  |
+=======+==============================================+==========+=============================+==========+
| 0     | mtc1qxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx | receiving| Yes                         | 1.234567 |
| 1     | mtc1qxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx | receiving| No                          | 0.000000 |
| 2     | mtc1qxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx | receiving| No                          | 0.000000 |
| 1000  | mtc1qxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx | change   | Yes                         | 0.456789 |
| 1001  | mtc1qxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx | change   | No                          | 0.000000 |
+-------+----------------------------------------------+----------+-----------------------------+----------+

Use cases

  • Better wallet transparency
  • Easier wallet reconciliation and audits
  • Debugging wallet behavior
  • Quick balance checks per address
@erubboli erubboli added the enhancement New feature or request label Dec 29, 2024
@erubboli erubboli changed the title [Feature] Add Option to Include Change Addresses in address-show Output [Feature] address-show should also display return/change addresses and optionally show address balances Apr 2, 2025
@OBorce OBorce linked a pull request Apr 3, 2025 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants