Skip to content

docs: document HWK Ledger adapter architecture#825

Draft
cursor[bot] wants to merge 1 commit into
onekeyfrom
cursor/engineering-documentation-updates-fd48
Draft

docs: document HWK Ledger adapter architecture#825
cursor[bot] wants to merge 1 commit into
onekeyfrom
cursor/engineering-documentation-updates-fd48

Conversation

@cursor

@cursor cursor Bot commented Jun 15, 2026

Copy link
Copy Markdown

Summary

  • update docs/architecture.md to align top-level package names with the current monorepo
  • add a source-backed HWK Ledger architecture section covering package roles, integration flow, event contracts, allNetworkGetAddress() behavior, and device-management runbooks
  • document common host-side pitfalls around permissions, reconnects, auto-install, BTC high-index confirmation, and adapter-level serialization

Codepaths covered

  • packages/hwk-adapter-core/src/index.ts
  • packages/hwk-adapter-core/src/types/wallet.ts
  • packages/hwk-adapter-core/src/types/connector.ts
  • packages/hwk-adapter-core/src/events/ui-request.ts
  • packages/hwk-adapter-core/src/utils/DeviceJobQueue.ts
  • packages/hwk-ledger-adapter/src/index.ts
  • packages/hwk-ledger-adapter/src/adapter/LedgerAdapter.ts
  • packages/hwk-ledger-adapter/src/adapter/methods/allNetworkGetAddress.ts
  • packages/hwk-ledger-adapter/src/device-apps/DeviceApps.ts
  • packages/hwk-ledger-connector-webhid/src/index.ts
  • packages/hwk-ledger-connector-ble/src/index.ts

Knowledge gaps addressed

  • where the HWK Ledger stack fits relative to the existing @onekeyfe/hd-core architecture
  • which UI requests require host responses vs which ui-event messages are notification-only
  • how connectId, deviceId, chain fingerprints, and allNetworkGetAddress() interact during reconnect and batch flows
  • when to use Ledger-specific app-management methods and what operational constraints they carry
Open in Web View Automation 

Co-authored-by: Leon <lixiao.dev@gmail.com>
@revan-zhang

revan-zhang commented Jun 15, 2026

Copy link
Copy Markdown
Contributor

Snyk checks have passed. No issues have been found so far.

Status Scan Engine Critical High Medium Low Total (0)
Open Source Security 0 0 0 0 0 issues
Licenses 0 0 0 0 0 issues

💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse.

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