Skip to content

docs: align developer portal with Hardware SDK 1.2.0 - #920

Merged
wabicai merged 26 commits into
onekeyfrom
docs/developer-portal-1.2.0
Sep 7, 2026
Merged

docs: align developer portal with Hardware SDK 1.2.0#920
wabicai merged 26 commits into
onekeyfrom
docs/developer-portal-1.2.0

Conversation

@wabicai

@wabicai wabicai commented Sep 6, 2026

Copy link
Copy Markdown
Member

Summary

Draft for reviewing how Hardware SDK 1.2.0 developer docs should work, plus the portal content so that story is actually tellable.

The public portal still described a 1.1-era SDK: changelog stopped at v1.1.21, iframe connectSrc pointed at 1.1.19, Pro 2 / Neo were missing, and Protocol V2 / wallet sessions / firmwareUpdateV4 only existed in internal docs/.

This PR:

  • Adds the 1.2.0 information architecture at packages/connect-examples/developer-portal/docs/1.2.0-information-architecture.md
  • Adds a first-run Getting Started path
  • Documents Devices, Protocol V1/V2, Wallet Sessions, and Chain Support (EN + ZH)
  • Adds public API pages for openWalletSession, getDeviceState, and firmwareUpdateV4
  • Puts Pro 2 / Neo on the device matrix, including protocol family and Air-Gap truth (Neo has no camera)
  • Splits Core API Guide and adds firmware-update / reconnect how-tos
  • Syncs changelog from GitHub releases; omit iframe connectSrc so getSDKVersion() fills https://jssdk.onekey.so/<installed>/
  • Aligns leftover 1.1 session / iframe examples (searchDevices { success, payload }, persist deviceId + passphraseState, no firmware session_id)
  • Refreshes the landing: 1.2.x kicker, SDK-accurate 19 / 8 / 4 proof strip, device lineup, chain chips, FAQ, Getting Started CTA. Not App marketing “100+ chains / 30,000 coins”
  • Updates published package READMEs to Getting Started; hd-web-sdk omits connectSrc
  • Marks public CommonParams.keepSession @deprecated (use useEmptyPassphrase or openWalletSession + passphraseState)
  • Orients the root README: 1.2.x protocol fact, integrator package chooser, portal vs docs/ vs package README

Intent and context

1.2.0 is the first stable Hardware SDK that speaks Protocol V2 (Pro 2, Neo) while keeping Protocol V1 (Classic / Mini / Touch / Pro). The JavaScript API did not become a second SDK. The portal needs to teach that fact, then send people down transport / PIN / signing / chain-support paths.

Internal docs/ remains the mechanism source. The portal only publishes the public contract.

Root cause

Public docs were not updated when the 1.2.0 Protocol V2 line shipped. New integrator-visible APIs and devices never got portal pages, and stale 1.1 versions stayed in examples.

Design decisions

  • Diataxis: Getting Started is a tutorial; Devices / Protocol / Wallet Sessions / Chain Support are explanations; new methods are reference.
  • Same public API for V1 and V2. Device pages explain constraints, not a second SDK.
  • Chain matrix source of truth is Core getSupportedProtocols() plus docs/device/capabilities.md caveats. Integrators do not call getSupportedProtocols(); they use this page plus live connectProtocol.
  • Counted families: 19 V1+V2, 8 V1-only (Stellar, Alephium, Benfen, Nexa, Dynex, Nervos, SCDO, Neo chain). Lightning lnurlAuth and evmSignMessageEIP712 are extra V1-only methods.
  • Do not copy Core/Transport internals (session_id store, probe order, host binding) into the portal.
  • Keep Agent Wallet as a sibling product. Hardware wallet session is a different page.
  • Landing stats are Hardware SDK public-method accurate, not App catalog numbers.
  • EN and ZH ship together.
  • Package README + keepSession deprecation ship in this PR so npm and the portal say the same thing. No runtime change.

Compatibility and risk

Documentation and a public TypeScript @deprecated on keepSession. Existing keepSession: true calls still work. Transport release(..., keepSession) is unchanged.

Hardware coverage

Not applicable. No device protocol or firmware change.

Test plan

  • yarn agent:check --profile commit (agent context, whitespace, changed-file lint) for portal commits
  • Preview yarn dev:docs and click Landing → Getting Started → Devices / Protocol / Wallet Sessions / Chain Support in EN and ZH
  • Confirm iframe host is filled from the installed hd-web-sdk version (omit connectSrc)
  • Full yarn agent:check --profile pr skipped: no package runtime change

Out of this track

  • Agent Wallet content
  • Internal protocol / Core mechanism docs
  • Per-method firmware min tables (they go stale)

Preview locally from the worktree: yarn dev:docs.

Add a first-run Getting Started path, Protocol V2 / Pro2 / Neo concepts,
and the public 1.2.0 APIs that were missing from the portal. Refresh the
changelog, device matrix, and iframe version so the 1.2.0 line is tellable.
Move common params and HD paths to a dedicated reference. Keep the Core
API Guide as the lifecycle/events path. Add firmware-update and reconnect
how-tos, a transport chooser, and 1.2.0 identifier wording.
Sync changelog from GitHub releases, stop hardcoding iframe connectSrc,
add Pro 2 / Neo device icons, document TON signing_message and Solana
off-chain signing, and switch Getting Started to getDeviceState.
Stop teaching preloadSessionCache/session_id persistence and keepSession
in signer and passphrase pages. Omit hardcoded iframe hosts in migration
guides and use getDeviceState in lifecycle samples.
@wabicai
wabicai marked this pull request as ready for review September 7, 2026 11:14
originalix
originalix previously approved these changes Sep 7, 2026
@sidmorizon

Copy link
Copy Markdown
Contributor

@codex review

@sidmorizon

Copy link
Copy Markdown
Contributor

@codex security review

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Sep 7, 2026

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review Completed 2026-09-07T11:53:53.240733Z feb7952 Manual request
🔒 Security Review Completed 2026-09-07T11:41:32.675325Z feb7952 Manual request
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@sidmorizon

Copy link
Copy Markdown
Contributor

Comment thread packages/core/src/types/params.ts Outdated
@chatgpt-codex-connector

Copy link
Copy Markdown

Security review completed. No security issues were found in this pull request.

Reviewed commit: feb7952426

View security finding report

Only the user who started this review can view the report in Codex.

ℹ️ About Codex security reviews in GitHub

This is an experimental Codex feature. Security reviews are triggered when:

  • You comment "@codex security review"
  • A regular code review gets triggered (for example, "@codex review" or when a PR is opened), and you’re opted in so security review runs alongside code review

Once complete, Codex will leave suggestions, or a comment if no findings are found.

Comment thread packages/core/src/api/OpenWalletSession.ts

@chatgpt-codex-connector chatgpt-codex-connector Bot 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.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: feb7952426

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread packages/connect-examples/developer-portal/data/hardware-sdk-releases.json Outdated
Comment thread packages/connect-examples/react-native-demo/package.json
Comment thread packages/connect-examples/developer-portal/content/en/hardware-sdk/index.mdx Outdated
Comment thread packages/connect-examples/react-native-demo/ble/src/BleDemoScreen.tsx Outdated
keepSession is a transport hold, not a wallet-session replacement.
Drop resume-hidden from the 1.2.0 changelog, mark getFeatures as V1-only,
and align the RN/Android demos with the public 1.2.x contract.
@socket-security

Copy link
Copy Markdown

Review the following changes in direct dependencies. Learn more about Socket for GitHub.

Diff Package Supply Chain
Security
Vulnerability Quality Maintenance License
Updatednpm/​@​onekeyfe/​hd-ble-sdk@​1.1.16 ⏵ 1.2.193 +141008196100
Updatednpm/​@​onekeyfe/​hd-core@​1.1.15 ⏵ 1.2.196 +1110086 +196100

View full report

@wabicai
wabicai enabled auto-merge (squash) September 7, 2026 12:41
@wabicai
wabicai merged commit def9904 into onekey Sep 7, 2026
11 checks passed
@wabicai
wabicai deleted the docs/developer-portal-1.2.0 branch September 7, 2026 14:37
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.

3 participants