Conversation
fnando
commented
May 5, 2026
Contributor
There was a problem hiding this comment.
Pull request overview
This PR adds Ledger-backed address lookup to stellar keys address, refactors the shared key-address argument parsing, and updates related help text. In the Stellar CLI, it extends key-management flows so users can derive a hardware-wallet address directly from the CLI.
Changes:
- Split
keys public-keyinto sharedArgsplus aCmdthat adds--ledgerforkeys address. - Updated
keys fundto reuse the shared args without exposing the new flag. - Refreshed help/docs and removed an unused soroban-test helper.
Review findings:
keys fundstill accepts positionalledger/ledger:N, so Ledger support is not actually scoped tokeys address.- The new
keys addresshelp text/docs still imply omittingNAMEfalls back to a default identity, but the command now errors unlessNAMEor--ledgeris provided. - The new Ledger runtime path only has parser/unit coverage; it is missing soroban-test emulator/integration coverage.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 5 comments.
| File | Description |
|---|---|
FULL_HELP_DOCS.md |
Documents the new keys public-key/address Ledger option and revised usage text. |
cmd/soroban-cli/src/commands/keys/public_key.rs |
Adds --ledger, splits shared args, and introduces parser tests for keys address. |
cmd/soroban-cli/src/commands/keys/fund.rs |
Switches keys fund to the shared public-key args and adds a parser test rejecting --ledger. |
cmd/crates/soroban-test/src/lib.rs |
Removes an unused TestEnv::test_address helper. |
leighmcculloch
approved these changes
May 5, 2026
68f58a8 to
3939779
Compare
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
Add a
--ledgerflag tostellar keys addressthat connects to an attachedLedger hardware wallet and prints the Stellar address derived at
m/44'/148'/N'.Ndefaults to0and can be set with--hd-path N.The flag is scoped to
keys addressonly.public_key::Cmdwas split intoArgs(still flattened bykeys fund) andCmd(used bykeys addressandadds
--ledger), sokeys funddoes not inherit the new flag.--ledgerismutually exclusive with the positional identity name; if neither is provided,
clap rejects the command. Errors from a missing/locked device or a closed
Stellar app surface through the existing
signer::ledgererror chain.Verified end-to-end against a real Ledger device.
Closes #2556.
Why
Knowing the address derived from a Ledger device is a fundamental operation —
needed before funding, before sharing an address with a counterparty, and
before scripting any workflow that involves a hardware wallet. Without
--ledger, users have to open Ledger Live or a web wallet just to look uptheir own address, which breaks the CLI-first development experience.
Known limitations
--ledgeris intentionally only onkeys address.keys fund --ledger(and other commands) will be added in separate changes.
keys add --ledgeryet, so eachinvocation re-derives from the device and
--hd-pathlives only on thecurrent call.