soroban-cli
soroban-cli copied to clipboard
soroban-cli: default identity is confusing to use
What version are you using?
v20.0.0-rc.2.1
What did you do?
Use the default identity.
soroban config identity ls
What did you expect to see?
It to show up in all the places.
What did you see instead?
It's invisible.
I agree it's a little confusing, but the core idea is that you can use just --hd-path 1 with no source account and it will use the test seed to generate it. So there isn't really just one test account; so which one would you list?
How do you suggest improving the default identity? I added it for use in tests, but perhaps removing it and requiring a source account would remove this issue. You can generated it with config identity generate --default-seed default.
I agree it's a little confusing, but the core idea is that you can use just
--hd-path 1with no source account and it will use the test seed to generate it. So there isn't really just one test account; so which one would you list?
This problem is no different for non-default accounts.
For example, I can do this:
❯ soroban config identity generate me
❯ soroban config identity ls
me
❯ soroban config identity address me
GAMKLGZKEUY6S2DZC632SKDAYGB4QRM2GH56KHK626SYSGPG7RCNC7IS
❯ soroban config identity address me --hd-path 1
GABHSDEPRRGFWNO7ZQR5AVUWBDITRCN3IDVXOXPP3HTKHS7N5OTXCUTF
My generated me account has an infinite number of addresses, and the UI seems to provide a pretty good interface into that.
So I think it would look like this:
❯ soroban config identity ls
default
❯ soroban config identity address
GAMKLGZKEUY6S2DZC632SKDAYGB4QRM2GH56KHK626SYSGPG7RCNC7IS
❯ soroban config identity address --hd-path 1
GABHSDEPRRGFWNO7ZQR5AVUWBDITRCN3IDVXOXPP3HTKHS7N5OTXCUTF
How do you suggest improving the default identity?
I think if the ls command listed default for the default identity, and then allowed that term to be used to select it (and continued to allow the omission of the name as meaning "default"), that would be sufficient.
The same problem exists with the networks with the default networks not being displayed.
I think the scope of this should be showing default for soroban config identity ls, and allow the string default to be used when referencing the default identity in other commands.
For me, on the latest changes in main, soroban config network ls shows futurenet by default. Is this not sufficient?
Note that as part of the following issue the default identity will be removed:
- https://github.com/stellar/soroban-tools/issues/1079
Replaced with stellar keys (more intuitive naming) and specifically for this command stellar keys ls