Skip to content

POC: support ledger derivation paths#2006

Draft
kyranjamie wants to merge 1 commit intodevfrom
feat/ledger-derivation-path-compatiblility
Draft

POC: support ledger derivation paths#2006
kyranjamie wants to merge 1 commit intodevfrom
feat/ledger-derivation-path-compatiblility

Conversation

@kyranjamie
Copy link
Copy Markdown
Contributor

@kyranjamie kyranjamie commented Jan 15, 2026

Following the conversation with King yesterday on Slack, @mica000's proposed callout to explain the situation to users , and the several other occasions of this limitation being noted as a pretty damning blocker, I've POCd the base functionality we need to toggle between classic Stacks derivation paths and the Ledger ones.

cc/ @fabric-8 @mica000 would like to jam on how we can integrate this. Inclined to suggest we have a toggle within the settings menu. Only visible when Ledger connected. For new users, we'll always pull both keys. For existing users, we'll have to prompt the user to add the keys with the modal connection flow. I think I would not try to advertise this feature too much. It's there if needed, and for users that explore settings, but think I would not highlight too much.

There are some annoying consequences to this allowing this toggle. For example, users already connected to dApps, that then change to Ledger addresses. Future RPC requests will use the Ledger path keys but expect Stacks path keys. I suggest we also clear existing sign-ins when toggling (so we should also communicate that). I think this should have it's own page within settings. It is not something users should do regularly, so intentional friction is a good idea.

2026-01-15-000611.mp4

@leather-bot
Copy link
Copy Markdown
Contributor

leather-bot commented Jan 15, 2026

Leather Web build 55a24ecWeb preview, Web test report

@leather-bot
Copy link
Copy Markdown
Contributor

leather-bot commented Jan 15, 2026

Leather Extension build 5fa897cExtension build, Extension test report, Storybook, Chromatic

@codecov
Copy link
Copy Markdown

codecov Bot commented Jan 15, 2026

Codecov Report

❌ Patch coverage is 12.08791% with 80 lines in your changes missing coverage. Please review.
✅ Project coverage is 12.05%. Comparing base (c61d4e5) to head (5fa897c).
⚠️ Report is 1 commits behind head on dev.

Files with missing lines Patch % Lines
...tore/accounts/blockchain/stacks/stacks-accounts.ts 0.00% 30 Missing ⚠️
...s/request-stacks-keys/request-stacks-keys.utils.ts 0.00% 21 Missing ⚠️
...c/app/features/ledger/utils/stacks-ledger-utils.ts 0.00% 7 Missing ⚠️
...nsion/src/app/store/settings/settings.selectors.ts 0.00% 7 Missing ⚠️
...tension/src/app/store/settings/settings.actions.ts 0.00% 4 Missing ⚠️
apps/extension/src/app/debug.ts 0.00% 3 Missing ⚠️
...extension/src/app/store/settings/settings.slice.ts 40.00% 3 Missing ⚠️
...ssage-signing/ledger-stacks-sign-msg-container.tsx 0.00% 2 Missing ⚠️
...cks-tx-signing/ledger-sign-stacks-tx-container.tsx 0.00% 1 Missing ⚠️
...ger/hooks/use-verify-matching-stacks-public-key.ts 0.00% 1 Missing ⚠️
... and 1 more
Additional details and impacted files
@@            Coverage Diff             @@
##              dev    #2006      +/-   ##
==========================================
- Coverage   12.05%   12.05%   -0.01%     
==========================================
  Files        2343     2343              
  Lines       94753    94819      +66     
  Branches     3843     3843              
==========================================
+ Hits        11423    11430       +7     
- Misses      82324    82383      +59     
  Partials     1006     1006              
Files with missing lines Coverage Δ
...ccounts/blockchain/stacks/stacks-account.models.ts 0.00% <ø> (ø)
packages/stacks/src/stacks.utils.ts 82.14% <100.00%> (+0.83%) ⬆️
...cks-tx-signing/ledger-sign-stacks-tx-container.tsx 0.00% <0.00%> (ø)
...ger/hooks/use-verify-matching-stacks-public-key.ts 0.00% <0.00%> (ø)
apps/extension/src/shared/storage/redux-persist.ts 36.91% <0.00%> (ø)
...ssage-signing/ledger-stacks-sign-msg-container.tsx 0.00% <0.00%> (ø)
apps/extension/src/app/debug.ts 0.00% <0.00%> (ø)
...extension/src/app/store/settings/settings.slice.ts 46.66% <40.00%> (-0.61%) ⬇️
...tension/src/app/store/settings/settings.actions.ts 0.00% <0.00%> (ø)
...c/app/features/ledger/utils/stacks-ledger-utils.ts 0.00% <0.00%> (ø)
... and 3 more
Components Coverage Δ
bitcoin 61.97% <ø> (ø)
query 24.49% <ø> (ø)
utils 87.08% <ø> (ø)
crypto 65.97% <ø> (ø)
stacks 49.22% <100.00%> (+0.33%) ⬆️
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@kyranjamie kyranjamie force-pushed the feat/ledger-derivation-path-compatiblility branch from 55a24ec to 5fa897c Compare January 15, 2026 16:23
@edgarkhanzadian
Copy link
Copy Markdown
Contributor

i'd suggest we only pull either ledger path keys or leather path keys, by asking users in the beginning of the setup. IMO that would simplify unexpected scenarios like connected dApps

@kyranjamie
Copy link
Copy Markdown
Contributor Author

i'd suggest we only pull either ledger path keys or leather path keys, by asking users in the beginning of the setup. IMO that would simplify unexpected scenarios like connected dApps

Mmm, yeah this would make it a one-time thing rather than something configurable

@mica000
Copy link
Copy Markdown
Contributor

mica000 commented Jan 19, 2026

@kyranjamie @edgarkhanzadian What do you think of this solution? This would only be visible for Ledger user's

https://www.figma.com/design/VQPOPkkrfVcf0BEd9kz3HZ/%F0%9F%A6%BE-Ledger--Onboarding---Transaction-signing-2024?node-id=3327-55978&t=MFg7mBWoRw3fpydg-4

The idea is to have two educational callouts: one for Ledger users and one for Stacks users. Each callout would link to Account derivation path in Settings, where users can choose between Stacks (the protocol default) and Ledger.

For confirmation, we could show a toaster after selection, though the selected state alone might be sufficient.

In the Setting's page, there could be an entry point as well, called "Account derivation path" to allow users to access the page, instead of only via the call out.

As for the article: we can redirect them to this one: https://app.leather.io/support/guide/why-your-ledger-account-might-not-show-up-in-leather

@mica000
Copy link
Copy Markdown
Contributor

mica000 commented Jan 19, 2026

Added to the designs:

  • Step at the onboarding to pick the Preferred address standard
  • On the Account switcher, removed the call out to something less intrusive entry point (Tooltip up hovering "Select account")
  • Added confirmation step upon switching account derivation path

Please take a look and let me know your thoughts 🙂

Designs here: https://www.figma.com/design/VQPOPkkrfVcf0BEd9kz3HZ/%F0%9F%A6%BE-Ledger--Onboarding---Transaction-signing-2024?node-id=3327-5992 (

@camerow
Copy link
Copy Markdown
Contributor

camerow commented Jan 21, 2026

After today's discussion we landed on supporting this from the onboarding create wallet flow as an initial choice. We'll add a section to the account screen as well informing users how to switch between the options by restoring their wallets.

@mica000
Copy link
Copy Markdown
Contributor

mica000 commented Jan 21, 2026

@kyranjamie kyranjamie changed the title feat(extension): support ledger derivation paths POC: support ledger derivation paths Jan 23, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants