Skip to content

DXP-599: Sign CLI transactions with Ledger hardware wallets - #438

Draft
jmlago wants to merge 4 commits into
v0.41-devfrom
legatus/dxp-599
Draft

jmlago wants to merge 4 commits into
v0.41-devfrom
legatus/dxp-599

Conversation

@jmlago

@jmlago jmlago commented Nov 18, 2026 •

Copy link
Copy Markdown
Member

What changed

Users can import a Ledger account with genlayer account import --name ledger --ledger, verify its address on-device, and sign CLI transactions without exporting its private key. Stored accounts contain only type, address and derivation path. Transfers, contract operations, staking and vesting use the hardware signer; read-only operations work without a connected device.

Every signing request checks the connected address and verifies the recovered transaction/message signer. Errors never fall back to a cached private key. Hardware accounts cannot export private keys or unlock into the keychain. USB dependencies are optional and loaded lazily.

Ticket: https://linear.app/genlayer-labs/issue/DXP-599/sign-cli-transactions-with-hardware-wallet

Requested changes addressed

  1. Exact versions: pin DMK 1.12.0, Ethereum signer 1.18.3, Node HID transport 1.0.1, explicitly declared context module 2.9.0, signer-utils 1.3.0, device-contacts-kit 0.5.0, and RxJS 7.8.2. No package version changed relative to the reviewed lockfile. Transitive dependencies still follow their publishers' manifests.
  2. No hosted context requests: inject a local-only context implementation. No default loaders, field lookups, transaction checks or signing reports are instantiated. Removing only default loaders would leave other hosted calls active. docs/ledger-validation.md audits the pinned source, exact endpoints, payloads and SDK call sites. Real SDK context/reporting tasks are tested with network calls forbidden, including when device transaction checks are enabled.
  3. Operator-proof errors: both staking and vesting detect Ledger metadata before keystore/keychain access and explain that --operator <address> must refer to a separate local software keystore. Corrected validator-join's misleading owner fallback hint. Tests cover implicit/explicit Ledger operators, the wizard's shared proof path and vesting registration.
  4. Message verification: encode strings as UTF-8 bytes, preserve raw bytes, and verify with recoverMessageAddress. Tests cover Unicode, empty/raw messages, wrong keys and wrong message bytes.
  5. Device discovery/errors: retry the pinned SDK's tagged no-device error until the 15-second discovery deadline. Map locked/app/refusal/blind-signing conditions to readable guidance while retaining underlying native-load causes. Ambiguous status codes explain possible causes rather than claiming a definite diagnosis. Explicitly destroy the transport: DMK close() alone leaves USB hotplug listeners active.
  6. Documentation/qualification: moved the Ledger section into Account Management, documented disabled hosted services and required contract blind signing, and added a physical-device release checklist. Connect one Ledger; discovery selects the first accessible device.

Physical-device validation remains outstanding. No Ledger was available here. The PR is deliberately draft and must not ship until a maintainer completes the checklist. No transactions were broadcast during implementation. The current PR target is v0.41-dev; no merge or release was performed.

Validation

  • npm test -- --run --pool=threads --maxWorkers=1: 81 files, 910 tests passed. Existing keytar tests use this Nix host's installed libsecret runtime closure via LD_LIBRARY_PATH.
  • npm run build and git diff --check pass.
  • Four Ledger test files: 70 tests, including real pinned SDK context/reporting tasks and APDU chunking/response parsing. Protocol tests cover both parities, legacy/EIP-2930/EIP-1559, GenLayer chain IDs 4221/61127/61997/61999, and 32 KiB deployment calldata. Simulated device responses are not physical-device qualification.
  • A standalone real-DMK/native-HID probe with no connected device exhausted the discovery deadline, printed a readable error and exited cleanly after transport destruction. It also preserved the underlying missing-libusb cause when that runtime library was unavailable. Results are recorded in docs/ledger-validation.md.
  • npx tsc --noEmit reports the same one pre-existing diagnostic at tests/actions/stakingWizard.test.ts:83 as an untouched archive of the pre-review branch using the same dependencies. No new diagnostics; not changed here.

Assumptions

  • Ledger over USB is the first supported hardware wallet. Other vendors, Bluetooth and a browser signing site are outside this change.
  • Use the maintained DMK's Node CJS exports because its ESM distribution contains imports Node cannot resolve directly. Dependencies remain optional so software accounts do not require USB drivers.
  • Use the first accessible device, require on-device address verification on import, and check the address on every signature. Default path is 44'/60'/0'/0/0; custom paths use the Ethereum five-component form without m/.
  • Preserve existing account-directory, active-account, overwrite, list/use/remove and account-override conventions. Import invalidates any cached key with that name. Ledger private-key export and caching are rejected.
  • Cover current signing client factories, including vesting, while preserving upstream browser-wallet flows and software-key caching. The direct-viem helper removed upstream stays removed.
  • Support legacy/EIP-2930/EIP-1559 and personal-message signing; explicitly reject other transaction types and EIP-712 signing.
  • Operator registration/rotation proof generation still requires a separate software operator account; the Ledger signs the owner transaction.
  • Discovery retries every 500ms for up to 15 seconds; each device action has a two-minute timeout. Read-only account access never connects to the device.
  • Hosted Ledger metadata/checks/telemetry are disabled, not opt-in. Contract writes/deployments need blind signing; the README explains the display limitations. Device check opt-in prompts do not enable remote checks in this CLI.
  • The placeholder <100ms criterion cannot apply to human approval or network confirmation; no such latency guarantee is claimed.
  • Real hardware/firmware/display/permission validation remains a release gate. The automated tests and no-device native probe do not satisfy it.

Hardware qualification re-review

The remaining blocking review item is unresolved: no physical Ledger is available in this session (local USB inventory reports zero devices with Ledger vendor ID 2c97). No hardware checklist item has been marked complete, no receipts have been invented, and the PR remains draft. Added an explicit results-record template in docs/ledger-validation.md for the maintainer to record device/firmware/app, host/Node, chain IDs, receipt hashes, display observations and network evidence. This documentation commit does not qualify the signing path for release.

The README-placement observation is stale: the Ledger section is already under Account Management at README.md:404, before License at line 773, as of reviewed commit 3f7b7d6. First-accessible-device selection remains documented.

Validation rerun: npm test -- --run --maxWorkers=2 passed all 81 files / 909 tests, using the host libsecret runtime for keytar. The initial unrestricted run ended early with Vitest ERR_IPC_CHANNEL_CLOSED; limiting workers completed successfully. No application code changed in this follow-up.

Remaining small review fixes (76a014e)

  • Corrected the README transfer example to positional arguments: genlayer account send 0x... 1gen --account ledger. Verified parsing on the built CLI with --help; no transaction was sent.
  • Removed the maintainer release gate and sub-100ms statement from the user-facing README. The gate remains in docs/ledger-validation.md, including the maintainer's CLI 0.40.0 release hold.
  • Added exact optional dependencies for signer-utils 1.3.0 and device-contacts-kit 0.5.0, retaining the reviewed versions. npm ls confirms one deduplicated copy of each.
  • Status 6985 explicitly says either the request was rejected on-device or blind signing is disabled, with a regression assertion covering both meanings.

Build and git diff --check pass. The full suite passed with 81 files / 910 tests using a single worker thread. The default fork-based run with maxWorkers=2 aborted with ERR_IPC_CHANNEL_CLOSED in tinypool ProcessWorker.send; no test assertion failure was reported for that aborted run.

Physical-device qualification is still unresolved; no checklist boxes or results have been fabricated. The PR stays draft until the maintainer records hardware results, clears their review, and confirms the release hold can be lifted.

@github-actions
github-actions Bot changed the base branch from main to v0.40-dev November 18, 2026 18:43
@github-actions

Copy link
Copy Markdown

This PR targeted main, which is only the default/static branch.

I retargeted it to v0.40-dev, the active development branch. Pushes to v0.40-dev automatically fast-forward main.

@coderabbitai

coderabbitai Bot commented Nov 18, 2026 •

Copy link
Copy Markdown

Explain Change →

Important

Draft PR not reviewed

Draft PRs are not automatically reviewed by default.

  • Trigger a manual review

To automatically review draft PRs, update your CodeRabbit configuration:

reviews:
  auto_review:
    drafts: true
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

@jmlago

jmlago commented Nov 18, 2026

Copy link
Copy Markdown
Member Author

Legatus audit: Approved (commit 87b4f1e)

Re-review of PR #438 (DXP-599) at 87b4f1e36af262bb30de61b30893f0f77d280fb1

I'd merge this as it is. The PR's base is now v0.40-dev, not main; the repo's retarget workflow moved it. The new head is one commit on top of v0.40-dev (6952333, Release v0.40.0-rc.6), so I reviewed that commit against v0.40-dev.

What changed since the last review

  • Ledger code: src/lib/accounts/ledger.ts and src/lib/accounts/ledgerDevice.ts are byte-for-byte the same as at 5c40fe6, so my earlier checks of them still hold.
  • Staking and vesting: adapted to the new base. getStakingClient and getVestingClient use the Ledger account when the account file is a Ledger one. Otherwise they decrypt the keystore as before and keep _stakingPrivateKey/_vestingPrivateKey (StakingAction.ts:158-163, VestingAction.ts:52-57).
  • Removed test: getViemClients no longer exists on v0.40-dev, so its Ledger test was dropped. No other src code builds an account from a raw private key, except the operator-proof path covered by the README note below.
  • README: adds a note that validator registration and operator rotation need the operator's proof of possession signed with a software key. The operator must be a separate local keystore account, while the Ledger signs the owner transaction.
  • Lockfile: adds 36 packages (the Ledger kits and their dependency tree). Existing entries change only their peer flag, with no version bumps.

Verification

  • Unit tests: npx vitest run gives 79 of 80 files and 858 of 858 tests passing.
    • The failing suite is tests/libs/keychainManager.test.ts: keytar can't load libsecret-1.so.0 on this machine.
    • The three Ledger test files pass, 32 tests in all.
  • Install on a machine without USB libraries: on this host the native usb/node-hid build failed, so npm skipped @ledgerhq/device-transport-kit-node-hid. The rest still installed, all non-Ledger tests passed, and genlayer account import --ledger gave a clean "Ledger USB support is unavailable" error. That is the fallback the README promises. The only tsc error in src/ is that missing module, and CI doesn't run tsc.
  • CI on 87b4f1e:
    • Build and Test passed on ubuntu, macOS and Windows.
    • The browser-wallet e2e lanes passed.
    • Testnet Smoke Tests was skipped and E2E Tests was still queued.

Findings (none blocking)

  1. Misleading error when the Ledger is the operator: a Ledger owner running staking validator-join without --operator (or with the Ledger as operator) reaches getPrivateKeyForAccount (StakingAction.ts:228) and fails with "Invalid keystore format.". The README documents the limitation, but the error should say that a Ledger can't sign the operator proof and suggest --operator <software account>. Nothing is broadcast. No test covers this path.
  2. Real cause hidden on USB failure (ledgerDevice.ts:38): the original load error is swallowed. On this host the real cause was a missing native USB library, and the message doesn't say so.
  3. Messages not checked after signing (ledger.ts:90-100): unlike transactions, signed messages aren't recovered and compared with the address. The device address is checked first, so the risk is low.
  4. First device wins (ledgerDevice.ts:51): discovery takes whichever Ledger appears first. Import has the user confirm the address on screen, and signing checks the address.
  5. README placement: the Ledger section sits after "License" at the end of the README.
  6. No real-hardware run: all verification used mocks plus reading the Ledger SDK source. A quick manual test on a real Ledger after merge is advisable.

The unrelated failure of the "Testnet Smoke Tests" job (staking contract 0x4A44…21A5 returning no data, with the job failure hidden by a successful run) was reported in my previous review. I'm not filing it again.

@jmlago

jmlago commented Nov 18, 2026

Copy link
Copy Markdown
Member Author

/run-e2e all

@ci-core-e2e-runner

Copy link
Copy Markdown
Contributor

E2E status was updated. Follow the current E2E and merge checks on this PR. Detailed diagnostics are available internally.

@jmlago
jmlago requested a review from danieljrc888 November 18, 2026 19:31
@danieljrc888
danieljrc888 marked this pull request as draft November 18, 2026 20:51
@danieljrc888

Copy link
Copy Markdown

Moved to draft on purpose, not because of a problem found in the code. v0.40-dev is the line for CLI 0.40.0, the stable release that ships with Studio v0.123, and its gate (#347) is waiting on E2E. This PR adds a new signing path and new optional native dependencies, so it should not land right before that stable release. Please keep it in draft and do not merge it until 0.40.0 is out; it can go into the next version after that.

@jmlago
jmlago marked this pull request as ready for review November 18, 2026 21:59
@danieljrc888
danieljrc888 changed the base branch from v0.40-dev to v0.41-dev November 18, 2026 23:36

@danieljrc888 danieljrc888 left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed at 87b4f1e. The signing core is careful (address check before every signature, signer recovery after, native modules optional and lazily loaded, keystore path untouched) and nothing here can broadcast a wrong transaction. It still must not ship until it has been exercised on a physical device, and these need fixing first:

1. Signing dependencies float (package.json:85-87)

@ledgerhq/device-management-kit, @ledgerhq/device-signer-kit-ethereum and @ledgerhq/device-transport-kit-node-hid use caret ranges, and @ledgerhq/context-module comes in as an undeclared peer. The lockfile is not published, so every npm i -g genlayer resolves whatever is current at install time, not what was reviewed. For code that signs with user funds, pin exact versions (including the context module) and let Renovate bump them on purpose.

2. Default Ledger context module, undisclosed (src/lib/accounts/ledgerDevice.ts:54)

new SignerEthBuilder({dmk, sessionId}).build() uses the default context module, which contacts Ledger's hosted services during signing (network and contract metadata lookups, and transaction checks when the user accepts them on the device). GenLayer chains are not known to those services, so this adds a network dependency and sends chain id and target address to a third party for no benefit, while the README implies only the device is involved. Build the signer with a context module that has the remote loaders removed, or make it opt-in and document it. Please confirm the exact calls against the DMK version you pin.

3. Misleading error for operator proofs with a Ledger owner (src/commands/staking/StakingAction.ts:229, src/commands/vesting/VestingAction.ts:99, hint in validatorJoin.ts)

With a Ledger owner and no --operator, validator join, the wizard join and vesting validator-create fail with "Invalid keystore format.", and the hint says to omit --operator to use the owner account, which cannot work for Ledger. Detect the Ledger account type and say that a Ledger account cannot sign the operator proof and a local keystore account must be passed with --operator.

4. signMessage is weaker than signTransaction (src/lib/accounts/ledger.ts:88-97)

It does not verify the recovered address, and it passes JS strings straight to the device kit, so a non-ASCII message can sign different bytes than viem's UTF-8 meaning. Always pass bytes and verify with recoverMessageAddress.

5. No-device case (ledgerDevice.ts:51)

With no device attached, discovery errors immediately with a device-kit error object that is not an Error and has no message, so the 15 second wait never happens and the CLI prints a raw object. Poll until the timeout and map the device-kit errors (no device, locked, app not open, blind signing disabled, user rejected) to readable messages.

Not covered by any test: every test mocks the transport or the whole device kit. Real device state machine, HID permissions, v/parity for the GenLayer chain ids, large deploy calldata, and what the device displays (all contract writes need blind signing) are unverified. Also the README Ledger section sits after the License section.

@jmlago
jmlago marked this pull request as draft November 19, 2026 00:36
@jmlago

jmlago commented Nov 19, 2026

Copy link
Copy Markdown
Member Author

Legatus audit: Changes requested (commit 3f7b7d6)

Re-review of PR #438 (DXP-599) at 3f7b7d63ac3af52081fbbccdc4c9009c7ccb256f

I can't approve this one: the code is fine, but the PR is a draft and its own release gate says not to ship it until someone tests it on a real Ledger, which nobody has done yet.

The base is now v0.41-dev, which points at the same commit as v0.40-dev (6952333). So the PR is 87b4f1e, which I approved last round, plus one new commit, 3f7b7d6.

Blocking: the PR says not to merge it

  • The new docs/ledger-validation.md:3-6 says: "Physical-device validation is pending. Keep this PR in draft and do not ship this signing path until a maintainer completes and records the checklist below."
  • Every item on the checklist (lines 66-102) is unchecked. It covers:
    • installing on each target OS;
    • locked, rejected and disconnected devices;
    • confirming the address on the device screen;
    • real transfers, contract writes and large deploys with blind signing;
    • checking the signer and receipt on GenLayer chains;
    • message signing;
    • staking and vesting with a separate software operator;
    • checking the network traffic.
  • gh pr view reports isDraft: true.
  • The author also states that no hardware was available. Like mine, all verification so far uses mocks or the SDK's real protocol code fed simulated responses; nothing has signed on a real device.
  • Merging now would ship a signing path the author has explicitly marked as not yet qualified. Only a person with a physical Ledger can clear this, so code changes alone can't resolve it.

What the new commit does (it checks out)

  1. Clearer error when the Ledger is the operator (StakingAction.ts:228, VestingAction.ts:98): it now says a Ledger can't sign the operator proof and to pass a software operator with --operator, and validatorJoin.ts:72 has matching wording. This fixes the earlier finding, and tests now cover the staking, wizard and vesting paths.
  2. Readable error messages (ledgerErrors.ts): Ledger's error tags and status codes are translated into plain messages, and the underlying cause is kept. Native-library load failures now show the real cause, which fixes the earlier finding. The error names it relies on exist in the pinned SDK types.
  3. Signed messages are now checked: the signature is recovered and compared with the account address, and string messages are explicitly UTF-8 encoded (ledger.ts:92-106). Tests cover Unicode, empty, raw-hex and byte messages, a wrong key and tampered bytes.
  4. Discovery waits for a device (ledgerDevice.ts:70-86): I confirmed in the SDK source (NodeHidTransport.startDiscovering) that with no device attached it throws NoAccessibleDeviceError immediately. So the previous code failed at once instead of waiting 15 seconds. The new loop retries every 500 ms, and only on that error, within an overall 15-second limit.
  5. USB listener cleanup: the hand-built NodeHidTransport is identical to the SDK's nodeHidTransportFactory; it only keeps a handle so destroy() can be called. That works around the SDK's close step not releasing USB listeners, which would otherwise keep the process alive.
  6. Offline context module (ledgerContext.ts): it replaces Ledger's default context module, which otherwise contacts Ledger's servers (metadata lookups, transaction checks and signing telemetry). It's a sound privacy choice. The trade-off is that contract calls always need blind signing, and that is documented.
  7. Exact version pins: the Ledger packages are pinned to exact versions, and @ledgerhq/[email protected] is now listed directly; only one copy is installed.

Verification

  • Tests: npx vitest run gives 80 of 81 files and 895 of 895 tests passing. The failing suite is keychainManager, because keytar can't load on this host, as in earlier rounds.
  • Type check: tsc --noEmit is clean for src/ (installed with --ignore-scripts, so the Ledger type declarations are present).
  • CI on 3f7b7d6:
    • Build and Test passed on ubuntu and macOS.
    • The browser-wallet e2e lanes passed.
    • Windows was still running and E2E Tests was queued.
    • Testnet Smoke Tests failed. That is the existing staking-contract issue I reported in the first round, so I'm not filing it again.

Non-blocking

  • Discovery still picks the first Ledger it finds (documented in the checklist).
  • The README section still sits after "License".

What must change before merge

A maintainer has to run the physical-device checklist in docs/ledger-validation.md and record the results in the PR: device model, firmware and Ethereum app version, OS and Node version, and the chain IDs with receipt hashes. Then they mark the checklist done and take the PR out of draft. If any hardware result shows a defect, it needs fixing and another review.

@danieljrc888

Copy link
Copy Markdown

Re-reviewed at 8d46aac. The five requested changes are resolved: exact pins including the context module, the signer is built with an offline context module (checked against the installed signer kit source and with a network intercept: no outbound calls), the operator proof error, signMessage over bytes with address recovery, and no-device polling with mapped errors. Lazy loading still works when the Ledger packages are absent.

Remaining small items, please fix in this PR:

  1. README.md:418: genlayer account send --account ledger --to 0x... --amount 1gen fails, because account send takes positional <to> <amount>. Use genlayer account send 0x... 1gen --account ledger.
  2. README.md:406 and README.md:457: the maintainer gate ("Physical-device validation is pending; do not ship...") and the sentence about a sub-100ms response guarantee do not belong in the user-facing README. Move the gate to docs/ledger-validation.md and drop the other sentence.
  3. Pin @ledgerhq/signer-utils and @ledgerhq/device-contacts-kit exactly as well (or ship a shrinkwrap): they are in the signing path and still float for global installs.
  4. Status 6985 is mapped to a single message that mixes user rejection with blind signing disabled; make the text say both are possible.

My blocking review stays until the physical-device checklist in docs/ledger-validation.md is filled in by a person with a device. Keep this PR in draft until then.

@jmlago

jmlago commented Nov 19, 2026

Copy link
Copy Markdown
Member Author

Legatus audit: Changes requested (commit 8d46aac)

Re-review of PR #438 (DXP-599) at 8d46aac14f272537f33ada2d96fa3cc2c50779c4

Still not mergeable: no one has tested this on a real Ledger yet, and four small fixes the maintainer asked for are still missing. The new commit only adds a blank results template to docs/ledger-validation.md.

The base is v0.41-dev (still at 6952333), and the PR is three commits on top of it. The only new commit since my last review is 8d46aac, which adds 42 lines to docs/ledger-validation.md and changes no code or tests.

Blocking

  1. No hardware testing yet.
    • The new section in docs/ledger-validation.md is a results template whose status reads "not run — awaiting a maintainer with a physical Ledger". Every row says "Not run" or "Pending".
    • All 11 checklist items (lines 72-94) are still unchecked.
    • The PR is still a draft (isDraft: true).
    • Maintainer danieljrc888 has an open "changes requested" review that stays until someone with a device fills in the checklist.
    • They also want the PR held until CLI 0.40.0 has shipped.
  2. The four small fixes the maintainer asked for are still missing (comment on 2026-11-19 at 00:55):
    • Broken README example (README.md:418): genlayer account send --account ledger --to 0x... --amount 1gen fails. I ran it with the built CLI and got error: unknown option '--to', because the command is send <to> <amount> (src/commands/account/index.ts:101). It should read genlayer account send 0x... 1gen --account ledger.
    • Maintainer notes in the user-facing README: the "Physical-device validation is pending; do not ship…" note (README.md:406) and the "sub-100ms response guarantee" sentence (README.md:457) are still there. The first should move to docs/ledger-validation.md and the second should be deleted.
    • Two signing-path packages still unpinned: @ledgerhq/signer-utils and @ledgerhq/device-contacts-kit are still not pinned to exact versions in package.json, and no shrinkwrap file is shipped either. Global installs can therefore pull versions nobody reviewed.
    • Ambiguous error for status 6985 (src/lib/accounts/ledgerErrors.ts:27-30): the text says "refused the request or its signing conditions were not met". The maintainer wants it to say explicitly that it could be either a rejection on the device or blind signing being turned off.

Verification

  • Tests: npx vitest run gives 80 of 81 files and 895 of 895 tests passing. The failing suite is keychainManager, because keytar can't load on this host, as in earlier rounds.
  • CI: when I checked, Build and Test had passed on ubuntu and macOS. Windows, the browser-wallet e2e lanes and Testnet Smoke Tests were still running, and E2E Tests was queued.
  • Code: identical to 3f7b7d6, so my earlier assessment of the signing code (address check before each signature, signer recovery afterwards, offline context module, discovery polling, error mapping) still holds.

What must change

  • Make the four README, pinning and error-text fixes above.
  • A person with a physical Ledger runs the checklist and records the results.
  • After that, the maintainer clears their blocking review and takes the PR out of draft, once 0.40.0 has shipped.

@danieljrc888

Copy link
Copy Markdown

Checked 76a014e: the README examples, the two extra exact pins and the 6985 message are addressed. Nothing else pending in code; the physical-device validation is the only remaining gate.

@jmlago

jmlago commented Nov 19, 2026

Copy link
Copy Markdown
Member Author

Legatus audit: Changes requested (commit 76a014e)

Re-review of PR #438 (DXP-599) at 76a014eef2b797e3cfc877b80815512c0d21ff32

Not mergeable yet. All the requested code and doc fixes are in, but nobody has tested the PR on a real Ledger, and that is the one thing still blocking it. The maintainer agrees: danieljrc888 commented on this commit that "the physical-device validation is the only remaining gate."

The base is v0.41-dev, still at 6952333, and the PR is four commits on top of it. The only new commit is 76a014e, which changes 6 files (18 lines added, 9 removed).

The four requested fixes are done

  1. send example fixed: README.md:415 now reads genlayer account send 0x... 1gen --account ledger. With the built CLI it gets past argument parsing (the old form failed with unknown option '--to') and stops only because the account doesn't exist in my empty test home.
  2. Maintainer notes out of the README: the "do not ship" note is gone from the README, and the "sub-100ms" sentence is deleted. The gate now lives only in docs/ledger-validation.md:3-8, which also records the extra condition that CLI 0.40.0 must ship first.
  3. Remaining packages pinned: @ledgerhq/signer-utils is pinned to 1.3.0 and @ledgerhq/device-contacts-kit to 0.5.0 in package.json and the lockfile. Both fit within the signer kit's ^1.3.0/^0.5.0 ranges, so each resolves to one copy.
  4. 6985 message: it now names both possible causes, rejected on the device or blind signing disabled (ledgerErrors.ts:30). A new test covers it (tests/libs/ledgerDevice.test.ts:153).

Verification

  • Tests: npx vitest run gives 80 of 81 files and 896 of 896 tests passing. The failing suite is keychainManager, because keytar can't load on this host, as in every earlier round.
  • Type check: tsc --noEmit reports no errors in src/.
  • CI on 76a014e:
    • Build and Test passed on ubuntu and macOS.
    • The browser-wallet e2e lanes passed.
    • Windows was still running and E2E Tests was queued.
    • Testnet Smoke Tests failed. That is the existing staking-contract issue I reported in the first round, unrelated to this PR, so I'm not filing it again.
  • Signing code: unchanged since 3f7b7d6, so my earlier assessment still holds.

Still blocking

  • No hardware results yet: docs/ledger-validation.md says "not run — awaiting a maintainer with a physical Ledger", and all 11 checklist items are unchecked.
  • Draft and open review: the PR is still a draft, and danieljrc888's "changes requested" review is still open.
  • Release timing: the docs require CLI 0.40.0 to ship before this leaves draft.

What must change

  • A person with a physical Ledger runs the checklist in docs/ledger-validation.md and records the results in the PR.
  • The maintainer then clears their review and takes the PR out of draft, after 0.40.0 has shipped.

No further code changes are needed unless the hardware run turns up a problem.

@jmlago

jmlago commented Nov 19, 2026

Copy link
Copy Markdown
Member Author

Legatus audit: Changes requested (commit 76a014e)

Re-review of PR #438 (DXP-599) at 76a014eef2b797e3cfc877b80815512c0d21ff32

My verdict hasn't changed: still not mergeable, because nobody has tested it on a real Ledger yet. This is the same commit I reviewed in the previous round, so there is no new diff.

What I re-checked

  • Commit and base: the PR head is 76a014e, and the base v0.41-dev is still at 6952333.
  • Tests: on a fresh checkout, npx vitest run gives 80 of 81 files and 896 of 896 tests passing. The failing suite is keychainManager, because keytar can't load on this machine, as in every earlier round.
  • CI: it has now finished, apart from E2E Tests, which is still queued.
    • Build and Test passed on ubuntu, macOS and Windows.
    • The browser-wallet e2e lanes passed.
    • Testnet Smoke Tests failed. That is the existing staking-contract issue I reported in the first round, unrelated to this PR, so I'm not filing it again.
  • No new activity: there are no new commits, reviews or human comments since the last round.

Still blocking

  • No hardware results: docs/ledger-validation.md:105 still says "not run — awaiting a maintainer with a physical Ledger", and all 11 checklist items are unchecked.
  • Draft and open review: the PR is still a draft, and danieljrc888's "changes requested" review is still open.
  • Release timing: the maintainer wants this held until CLI 0.40.0 has shipped.

What must change

  • A person with a physical Ledger runs the checklist in docs/ledger-validation.md and records the results in the PR.
  • The maintainer then clears their review and takes the PR out of draft, after 0.40.0 has shipped.

No code changes are needed unless the hardware run turns up a problem.

@jmlago

jmlago commented Nov 19, 2026

Copy link
Copy Markdown
Member Author

Legatus audit: Changes requested (commit 76a014e)

Re-review of PR #438 (DXP-599) at 76a014eef2b797e3cfc877b80815512c0d21ff32

Still not mergeable, because nobody has tested it on a real Ledger. This is the same commit I reviewed in the last two rounds, so there is no new diff to look at.

What I re-checked

  • Commit and base: the head is still 76a014e, and the base v0.41-dev is still at 6952333.
  • Tests: on a fresh checkout, npx vitest run gives 80 of 81 files and 896 of 896 tests passing. The failing suite is keychainManager, because keytar can't load on this machine, as in every earlier round.
  • CI: unchanged since last round.
    • Build and Test passed on ubuntu, macOS and Windows.
    • The browser-wallet e2e lanes passed.
    • E2E Tests is still queued.
    • Testnet Smoke Tests failed. That is the existing staking-contract issue I reported in the first round, unrelated to this PR.
  • No new activity: there are no new commits, reviews or human comments since the last audit.

Still blocking

  • No hardware results: docs/ledger-validation.md still says "not run — awaiting a maintainer with a physical Ledger", and all 11 checklist items are unchecked.
  • Draft and open review: the PR is still a draft, and danieljrc888's "changes requested" review is still open.
  • Release timing: the maintainer wants this held until CLI 0.40.0 has shipped.

What must change

  • A person with a physical Ledger runs the checklist in docs/ledger-validation.md and records the results in the PR.
  • The maintainer then clears their review and takes the PR out of draft, after 0.40.0 has shipped.

No code changes are needed unless the hardware run turns up a problem. Until one of these happens, further re-reviews of 76a014e will give the same verdict.

@jmlago

jmlago commented Nov 19, 2026

Copy link
Copy Markdown
Member Author

Legatus audit: Changes requested (commit 76a014e)

Re-review of PR #438 (DXP-599) at 76a014eef2b797e3cfc877b80815512c0d21ff32

Still not mergeable, because nobody has tested it on a real Ledger. This is the fourth round in a row at 76a014e with no new diff.

What I re-checked

  • Commit and base: the head is still 76a014e, and the base v0.41-dev is still at 6952333.
  • Tests: on a fresh checkout, npx vitest run gives 80 of 81 files and 896 of 896 tests passing. The failing suite is keychainManager, because keytar can't load on this machine, as in every round.
  • CI: unchanged.
    • Build and Test passed on ubuntu, macOS and Windows.
    • The browser-wallet e2e lanes passed.
    • E2E Tests is still queued.
    • Testnet Smoke Tests failed. That is the existing staking-contract issue I reported in the first round, unrelated to this PR.
  • No new activity: there are no new commits, reviews or human comments since the last audit.

Still blocking

  • No hardware results: docs/ledger-validation.md still says "not run — awaiting a maintainer with a physical Ledger", and all 11 checklist items are unchecked.
  • Draft and open review: the PR is still a draft, and danieljrc888's "changes requested" review is still open.
  • Release timing: the maintainer wants this held until CLI 0.40.0 has shipped.

What must change

  • A person with a physical Ledger runs the checklist in docs/ledger-validation.md and records the results in the PR.
  • The maintainer then clears their review and takes the PR out of draft, after 0.40.0 has shipped.

No code changes are needed unless the hardware run turns up a problem.

The re-review keeps being triggered with "the head changed" while the head stays at 76a014e. You may want to stop these re-triggers until there's a new commit or the hardware results are posted, because each one will reach this same verdict.

This branch has not been deployed

No deployments
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.

2 participants