0xMiden / 0xMiden/rust-sdk

Improve `Address` handling in CLI

Open
#1,188 1 comment 1 reaction 0 assignees View on GitHub
cli
Dominant language
Rust
Stars
78
Forks
129
Avg merge
4d 14h
Merged PRs (30d)
52

Description

After the changes in https://github.com/0xMiden/miden-base/pull/1762 , account IDs weren't always able to be converted to bech32 addresses, specifically with faucets. Even for wallets, the conversion requires fetching the account interface so that the `Address` can be constructed. This is not ideal for the CLI as it required fetching the full account each time a bech32 address was meant to be shown.

We removed most of the bech32 instances in #1177 (it only remains in the `account --show` command). We should look to add them again after refactoring the client to allow for easier account address/interface fetching. At least the listing of account should show the address and maybe other commands as well.

> It's a bit unfortunate that we have to go to the store, and construct the full `Account` object for each of the accounts that we are tracking.
In the future, I think we could either just retrieve the account code and/or cache the account's addresses separately on the store. These should only really get updated if the account code gets updated, so they would be mostly static. Let's create an issue for this.
> The alternative for now is to now show the addresses when listing accounts, and instead only show them when the user focuses on a specific account (eg `miden-client account --show`)

_Originally posted by @igamigo in https://github.com/0xMiden/miden-client/pull/1177#discussion_r2298819502_

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.