0xPolygonMiden / miden-client

Client library that facilitates interaction with the Miden rollup
MIT License
25 stars 22 forks source link

Consider always having a default account #351

Closed igamigo closed 1 month ago

igamigo commented 1 month ago

What should be done?

We currently have the option of either defining a specific Account ID for transactions, or defaulting to a previously-set default account ID. Bobbin also suggested always having a default account (as long as the store tracks one account). We can discuss the possibility here.

How should it be done?

It could be done in a couple of ways:

When is this task done?

When we have a way of always getting an account (as long as there is one account, at least)

Additional context

No response

bobbinth commented 1 month ago

I would go with something more like the second option. Basically, when the first account is created (or imported) set it as default. If the user creates another account, they would be able to set it as default manually (e.g., via miden account --default <account_id> command).

The only potential complication here is handling account deletions (i.e., which account becomes default when an account is deleted). But we don't support deletions yet - and so we can probably solve this when implementing account deletions.

Dominik1999 commented 1 month ago

Is this done already?

igamigo commented 1 month ago

No, this is not yet done

igamigo commented 1 month ago

Closed as done by #372