Conversation
There was a problem hiding this comment.
Pull request overview
Adds a new stellar network root-account subcommand to derive the network root account keypair (secret by default, optional public key) directly from a network passphrase / configured network, removing the need for stellar-core convert-id pipelines.
Changes:
- Introduces
network root-accountcommand that derives the root account seed fromsha256(network_passphrase)and prints eitherS…(default) orG…(--public-key). - Wires the new subcommand into the
networkcommand module and updates generated help docs. - Adds integration tests covering default behavior, flag behavior, and passphrase override precedence.
Reviewed changes
Copilot reviewed 4 out of 5 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| cmd/soroban-cli/src/commands/network/root_account.rs | Implements the new network root-account command and output selection logic. |
| cmd/soroban-cli/src/commands/network/mod.rs | Registers the new RootAccount subcommand and plumbs errors/run dispatch. |
| cmd/crates/soroban-test/tests/it/config.rs | Adds integration tests for the new command (default, flags, override, exclusivity). |
| FULL_HELP_DOCS.md | Updates CLI help docs to include network root-account (and reflects current bindings subcommands). |
| Cargo.lock | Updates lockfile to reflect dependency graph changes. |
Could these be separate sub-commands using names that parallel the |
Yep. Originally changed it to reduce code duplication, but didn't consider that this matches the |
|
In general too the style / flavor of the stellar-cli's command are:
That's a bit fuzzy here where we could think of a single subcommand to get the account and different views of that, but generally is implemented in the stellar-cli as on the other end of the spectrum away from DRY. We maybe should capture this in the contributing.md. |
What
Add a command to compute the root-account key in the CLI
Examples:
--networkargs--network-passphraseargs. Prioritizes this over any configured or supplied--network. Like JS Keypair, does not fail if input is not a current passphrase.Why
Closes: #2389
Known limitations
None