0xMiden / 0xMiden/rust-sdk

Improve `Address` handling in CLI

Ouverte
#1,188 1 commentaire 1 réaction 0 personnes assignées Voir sur GitHub
cli
Langage dominant
Rust
Étoiles
78
Forks
129
Merge moyen
4 j 14 h
PR mergées (30 j)
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_

Guide de contribution

Ouvrir le guide de contribution

Évaluation

Cette issue n'a pas encore été évaluée.

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.