Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 13 additions & 3 deletions docs/device/wallet-session-and-security.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,9 +60,19 @@
校验原始 `DeviceStatus`,然后直接用空参数 `DeviceSessionGet()` 读取当前隐藏钱包,不重新发起
Passphrase 选择、`DeviceSessionAskPassphrase` 或 `DeviceSessionAskPin`。复核状态不一致时失败关闭,
不回退到钱包重选。
- Core 把现有 `deriveCardano` 意图映射为 `DeviceSessionGet.seed_domains`:普通业务请求
`[Standard]`,Cardano 业务请求 `[Standard, Cardano]`。调用链没有提供派生意图时省略该字段,
保持固件“派生全部支持域”的兼容行为。
- Protocol V2 maps `deriveCardano` to `DeviceSessionAskPassphrase.seed_domains`: ordinary requests
use `[Standard]`, and explicit Cardano requests use `[Standard, Cardano]`. `DeviceSessionGet`
only reads or resumes a session; `DeviceSession.seed_domains` reports the generated domains.
This replaces the firmware contract used by SDK 1.2.1, which sent the field on `DeviceSessionGet`.
- When a reused session lacks Cardano, Core requests the missing derivation and verifies that the
returned wallet identity is unchanged. Standard and Attach PIN wallets use an empty host
passphrase; other hidden wallets request their passphrase again. With passphrase protection
disabled, firmware generates Cardano through `DeviceSessionGet`. Missing Cardano or a changed
identity fails closed. Attach PIN context is retained after the empty host request.
- Before skipping Main PIN selection, Core refreshes device status. An unlocked standard wallet
with passphrase protection disabled does not request Main PIN again. Locked devices, Attach PIN
contexts, and mismatched cached standard wallets still require the existing authentication flow.
Existing PIN, passphrase, and Attach PIN UI events and Protocol V1 behavior remain unchanged.
- `DeviceSessionAskPin` 的类型按业务意图选择:标准钱包和安全操作使用 `Main`;普通业务调用已携带目标
`passphraseState` 时,预解锁使用 `Any`,允许主 PIN 或 Attach PIN 进入,随后仍以返回的
`btc_test_address` 校验目标隐藏钱包;用户明确选择 Attach PIN 打开隐藏钱包时使用 `AttachToPin`。
Expand Down
4 changes: 2 additions & 2 deletions packages/connect-examples/electron-example/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "hardware-example",
"productName": "HardwareExample",
"executableName": "onekey-hardware-example",
"version": "1.2.1",
"version": "1.2.2",
"author": "OneKey",
"description": "OneKey Hardware SDK Electron BLE example",
"main": "dist/index.js",
Expand All @@ -21,7 +21,7 @@
"ts:check": "yarn tsc --noEmit"
},
"dependencies": {
"@onekeyfe/hd-transport-electron": "1.2.1",
"@onekeyfe/hd-transport-electron": "1.2.2",
"@stoprocent/noble": "2.3.16",
"debug": "4.3.4",
"electron-is-dev": "^3.0.1",
Expand Down
12 changes: 6 additions & 6 deletions packages/connect-examples/expo-example/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "expo-example",
"version": "1.2.1",
"version": "1.2.2",
"scripts": {
"start": "yarn expo start --dev-client",
"android": "yarn expo run:android",
Expand All @@ -19,11 +19,11 @@
"@noble/ed25519": "^2.1.0",
"@noble/hashes": "^1.3.3",
"@noble/secp256k1": "^1.7.1",
"@onekeyfe/hd-ble-sdk": "1.2.1",
"@onekeyfe/hd-common-connect-sdk": "1.2.1",
"@onekeyfe/hd-core": "1.2.1",
"@onekeyfe/hd-shared": "1.2.1",
"@onekeyfe/hd-transport": "1.2.1",
"@onekeyfe/hd-ble-sdk": "1.2.2",
"@onekeyfe/hd-common-connect-sdk": "1.2.2",
"@onekeyfe/hd-core": "1.2.2",
"@onekeyfe/hd-shared": "1.2.2",
"@onekeyfe/hd-transport": "1.2.2",
"@onekeyfe/react-native-ble-utils": "^0.1.3",
"@polkadot/util-crypto": "13.1.1",
"@react-native-async-storage/async-storage": "1.21.0",
Expand Down
10 changes: 5 additions & 5 deletions packages/connect-examples/expo-playground/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "onekey-hardware-playground",
"version": "1.2.1",
"version": "1.2.2",
"private": true,
"sideEffects": [
"app/utils/shim.js",
Expand All @@ -19,10 +19,10 @@
},
"dependencies": {
"@noble/hashes": "^1.8.0",
"@onekeyfe/hd-common-connect-sdk": "1.2.1",
"@onekeyfe/hd-core": "1.2.1",
"@onekeyfe/hd-shared": "1.2.1",
"@onekeyfe/hd-transport": "1.2.1",
"@onekeyfe/hd-common-connect-sdk": "1.2.2",
"@onekeyfe/hd-core": "1.2.2",
"@onekeyfe/hd-shared": "1.2.2",
"@onekeyfe/hd-transport": "1.2.2",
"@radix-ui/react-checkbox": "^1.3.2",
"@radix-ui/react-dialog": "^1.1.14",
"@radix-ui/react-dropdown-menu": "^2.1.15",
Expand Down
2 changes: 1 addition & 1 deletion packages/connect-examples/hwk-demo/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "hwk-demo",
"version": "1.2.1",
"version": "1.2.2",
"private": true,
"main": "index.js",
"scripts": {
Expand Down
Loading