Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR extends stellar keys add with a dedicated --ledger flag and updates config serialization to persist a Ledger-derived public key (and optional --hd-path) so read-only operations can work without a connected device.
Changes:
- Add
stellar keys add --ledger(async) to derive and persist a Ledger-backed identity (cachedpublic_key+ optionalhd_path). - Update
Secret::Ledgerpersistence format to includehardware, cachedpublic_key, and optionalhd_path, plus unit tests for TOML round-trips. - Adjust a few parsing/error-path tests and avoid attempting Ledger HID use in
contractsigner resolution.
Reviewed changes
Copilot reviewed 8 out of 8 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| FULL_HELP_DOCS.md | Documents the new --ledger option for stellar keys add. |
| cmd/soroban-cli/src/config/secret.rs | Redefines Secret::Ledger to persist cached public_key/hd_path and adds related tests; updates key derivation/signing behavior. |
| cmd/soroban-cli/src/config/key.rs | Updates a parsing test expectation now that "ledger" is no longer parsed as a secret literal. |
| cmd/soroban-cli/src/config/address.rs | Removes the special-case rejection of the identity name "ledger". |
| cmd/soroban-cli/src/commands/message/verify.rs | Updates a test expectation for "ledger" handling in public key resolution. |
| cmd/soroban-cli/src/commands/keys/mod.rs | Makes keys add invocation await the now-async implementation. |
| cmd/soroban-cli/src/commands/keys/add.rs | Implements --ledger flow (derivation + persistence), adds clap conflict tests, and converts affected tests to async. |
| cmd/soroban-cli/src/commands/contract/arg_parsing.rs | Skips resolving a Ledger signer in the co-signer path to avoid HID transport conflicts. |
leighmcculloch
approved these changes
May 7, 2026
Member
leighmcculloch
left a comment
There was a problem hiding this comment.
One concern, but defer to you on it.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Also persist public key and hd path to a config file, so we don't need to interact with the hardware on read-only operations.
Why
To match and have a uniform experience all around.
Known limitations
n/a