Skip to content

docs: clarify preinitialize, ledger adapter, and BLE transport flows#828

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

docs: clarify preinitialize, ledger adapter, and BLE transport flows#828
cursor[bot] wants to merge 1 commit into
onekeyfrom
cursor/engineering-documentation-updates-8716

Conversation

@cursor

@cursor cursor Bot commented Jun 22, 2026

Copy link
Copy Markdown

Summary

  • update docs/architecture.md with source-backed notes for the OneKey core stack and the Ledger adapter stack
  • document the preInitialize() / usePreInitialize workflow, guard conditions, Cardano-specific constraints, and recommended call pattern
  • add a React Native BLE firmware upload section to docs/transport.md covering throttling, retry, reconnect, and troubleshooting behavior

Codepaths covered

  • packages/core/src/core/index.ts
  • packages/core/src/device/Device.ts
  • packages/core/src/api/device/PreInitialize.ts
  • packages/core/src/api/cardano/CardanoSignTransaction.ts
  • packages/core/src/api/cardano/CardanoSignMessage.ts
  • packages/core/src/types/params.ts
  • packages/hwk-adapter-core/src/types/connector.ts
  • packages/hwk-adapter-core/src/types/wallet.ts
  • packages/hwk-ledger-adapter/src/adapter/LedgerAdapter.ts
  • packages/hwk-ledger-adapter/src/adapter/methods/allNetworkGetAddress.ts
  • packages/hwk-ledger-adapter/src/connector/LedgerConnectorBase.ts
  • packages/hwk-ledger-connector-webhid/src/index.ts
  • packages/hwk-ledger-connector-ble/src/index.ts
  • packages/hd-transport-react-native/src/index.ts

Knowledge gaps addressed

  • when pre-initialize can safely skip Initialize, and when it must fail closed
  • why Cardano signing is excluded from the pre-initialize fast path
  • how Ledger app auto-install, all-network address lookups, and install progress events behave in practice
  • why BLE firmware uploads use a different write and recovery strategy than normal transport calls
Open in Web View Automation 

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

revan-zhang commented Jun 22, 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