0xMiden / 0xMiden/rust-sdk

Improve `Address` handling in CLI

オープン
#1,188 コメント 1 件 リアクション 1 件 担当者 0 名 GitHub で見る
cli
主要言語
Rust
スター
78
フォーク
129
平均マージ
4日 14時間
マージ済み PR(30日)
52

説明

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_

コントリビューションガイド

コントリビューションガイドを開く

評価

この issue はまだ評価されていません。

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。