Summary
It is currently not possible to fund a Ledger hardware wallet address using the CLI. Running stellar keys fund requires an identity that resolves to a local keypair; there is no --ledger flag, so Ledger users must derive their address out-of-band and fund it via other means.
Motivation
Hardware wallets are a primary key-management option in the CLI (stellar keys add --ledger), and funding a freshly-derived address on testnet/futurenet is a routine first step in any development workflow. Without this capability, Ledger users face an inconsistent experience — every other key type can be funded directly.
Proposed solution
Add a --ledger flag to stellar keys fund that:
- Connects to the attached Ledger device and derives the public key for account index
0 (i.e. m/44'/148'/0') by default.
- Calls Friendbot (or the configured funder) with that address, identical to how funding already works for named identities.
- Respects
--hd-path <N> when provided, where N is the integer account index used to derive the address at m/44'/148'/N'.
Desired usage:
Fund the default Ledger account (index 0):
stellar keys fund --ledger
Fund a specific account index:
stellar keys fund --ledger --hd-path 1
Acceptance criteria
stellar keys fund --ledger connects to a Ledger device, derives the public key at index 0, and funds the corresponding account via Friendbot.
stellar keys fund --ledger --hd-path N funds the account derived at the given integer index.
- A clear error is shown when no Ledger device is connected or the Stellar app is not open on the device.
- A clear error is shown when Friendbot is unavailable (consistent with the existing behaviour for
--fund on keys generate).
- The funded address is printed to stdout so the user can confirm which account was topped up.
Summary
It is currently not possible to fund a Ledger hardware wallet address using the CLI. Running
stellar keys fundrequires an identity that resolves to a local keypair; there is no--ledgerflag, so Ledger users must derive their address out-of-band and fund it via other means.Motivation
Hardware wallets are a primary key-management option in the CLI (
stellar keys add --ledger), and funding a freshly-derived address on testnet/futurenet is a routine first step in any development workflow. Without this capability, Ledger users face an inconsistent experience — every other key type can be funded directly.Proposed solution
Add a
--ledgerflag tostellar keys fundthat:0(i.e.m/44'/148'/0') by default.--hd-path <N>when provided, whereNis the integer account index used to derive the address atm/44'/148'/N'.Desired usage:
Acceptance criteria
stellar keys fund --ledgerconnects to a Ledger device, derives the public key at index0, and funds the corresponding account via Friendbot.stellar keys fund --ledger --hd-path Nfunds the account derived at the given integer index.--fundonkeys generate).