@onekeyfe/hd-transport 1.2.0-alpha.2 → 1.2.0-alpha.20
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/__tests__/messages.test.js +122 -0
- package/__tests__/protocol-v2-link-manager.test.js +351 -0
- package/__tests__/protocol-v2-usb-transport-base.test.js +296 -0
- package/__tests__/protocol-v2.test.js +384 -108
- package/dist/constants.d.ts +5 -3
- package/dist/constants.d.ts.map +1 -1
- package/dist/index.d.ts +920 -369
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +587 -251
- package/dist/protocols/index.d.ts +11 -5
- package/dist/protocols/index.d.ts.map +1 -1
- package/dist/protocols/v2/constants.d.ts +1 -0
- package/dist/protocols/v2/constants.d.ts.map +1 -1
- package/dist/protocols/v2/decode.d.ts +3 -2
- package/dist/protocols/v2/decode.d.ts.map +1 -1
- package/dist/protocols/v2/encode.d.ts +2 -3
- package/dist/protocols/v2/encode.d.ts.map +1 -1
- package/dist/protocols/v2/index.d.ts +0 -1
- package/dist/protocols/v2/index.d.ts.map +1 -1
- package/dist/protocols/v2/link-manager.d.ts +36 -0
- package/dist/protocols/v2/link-manager.d.ts.map +1 -0
- package/dist/protocols/v2/sequence-cursor.d.ts +5 -0
- package/dist/protocols/v2/sequence-cursor.d.ts.map +1 -0
- package/dist/protocols/v2/session.d.ts +18 -3
- package/dist/protocols/v2/session.d.ts.map +1 -1
- package/dist/protocols/v2/usb-transport-base.d.ts +31 -0
- package/dist/protocols/v2/usb-transport-base.d.ts.map +1 -0
- package/dist/serialization/protobuf/decode.d.ts.map +1 -1
- package/dist/serialization/protobuf/messages.d.ts.map +1 -1
- package/dist/types/messages.d.ts +534 -225
- package/dist/types/messages.d.ts.map +1 -1
- package/dist/types/transport.d.ts +5 -3
- package/dist/types/transport.d.ts.map +1 -1
- package/messages-protocol-v2.json +825 -709
- package/package.json +3 -3
- package/scripts/protobuf-build.sh +96 -310
- package/scripts/protobuf-patches/index.js +1 -0
- package/scripts/protobuf-types.js +12 -0
- package/src/constants.ts +21 -15
- package/src/index.ts +8 -0
- package/src/protocols/index.ts +25 -39
- package/src/protocols/v2/constants.ts +1 -0
- package/src/protocols/v2/crc8.ts +1 -1
- package/src/protocols/v2/decode.ts +38 -34
- package/src/protocols/v2/encode.ts +2 -28
- package/src/protocols/v2/index.ts +0 -1
- package/src/protocols/v2/link-manager.ts +162 -0
- package/src/protocols/v2/sequence-cursor.ts +10 -0
- package/src/protocols/v2/session.ts +132 -178
- package/src/protocols/v2/usb-transport-base.ts +194 -0
- package/src/serialization/protobuf/decode.ts +4 -1
- package/src/serialization/protobuf/messages.ts +6 -1
- package/src/types/messages.ts +636 -265
- package/src/types/transport.ts +3 -3
- package/dist/protocols/v2/debug.d.ts +0 -13
- package/dist/protocols/v2/debug.d.ts.map +0 -1
- package/src/protocols/v2/debug.ts +0 -26
package/src/types/messages.ts
CHANGED
|
@@ -1193,12 +1193,16 @@ export enum FailureType {
|
|
|
1193
1193
|
Failure_WipeCodeMismatch = 13,
|
|
1194
1194
|
Failure_InvalidSession = 14,
|
|
1195
1195
|
Failure_FirmwareError = 99,
|
|
1196
|
+
Failure_InvalidMessage = 1,
|
|
1197
|
+
Failure_UndefinedError = 2,
|
|
1198
|
+
Failure_UsageError = 3,
|
|
1196
1199
|
}
|
|
1197
1200
|
|
|
1198
1201
|
// Failure
|
|
1199
1202
|
export type Failure = {
|
|
1200
1203
|
code?: FailureType;
|
|
1201
1204
|
message?: string;
|
|
1205
|
+
subcode?: number;
|
|
1202
1206
|
};
|
|
1203
1207
|
|
|
1204
1208
|
export enum Enum_ButtonRequestType {
|
|
@@ -2205,11 +2209,17 @@ export type KaspaAddress = {
|
|
|
2205
2209
|
// KaspaSignTx
|
|
2206
2210
|
export type KaspaSignTx = {
|
|
2207
2211
|
address_n: number[];
|
|
2208
|
-
raw_message
|
|
2212
|
+
raw_message?: string;
|
|
2209
2213
|
scheme?: string;
|
|
2210
2214
|
prefix?: string;
|
|
2211
2215
|
input_count?: number;
|
|
2212
2216
|
use_tweak?: boolean;
|
|
2217
|
+
output_count?: number;
|
|
2218
|
+
version?: number;
|
|
2219
|
+
lock_time?: number;
|
|
2220
|
+
subnetwork_id?: string;
|
|
2221
|
+
gas?: number;
|
|
2222
|
+
payload_length?: number;
|
|
2213
2223
|
};
|
|
2214
2224
|
|
|
2215
2225
|
// KaspaTxInputRequest
|
|
@@ -2224,6 +2234,98 @@ export type KaspaTxInputAck = {
|
|
|
2224
2234
|
raw_message: string;
|
|
2225
2235
|
};
|
|
2226
2236
|
|
|
2237
|
+
// KaspaOutpoint
|
|
2238
|
+
export type KaspaOutpoint = {
|
|
2239
|
+
tx_id: string;
|
|
2240
|
+
index: number;
|
|
2241
|
+
};
|
|
2242
|
+
|
|
2243
|
+
export enum Enum_KaspaInputScriptType {
|
|
2244
|
+
KASPA_SPEND_P2PK_SCHNORR = 0,
|
|
2245
|
+
KASPA_SPEND_P2PK_ECDSA = 1,
|
|
2246
|
+
}
|
|
2247
|
+
export type KaspaInputScriptType = keyof typeof Enum_KaspaInputScriptType;
|
|
2248
|
+
|
|
2249
|
+
export enum Enum_KaspaOutputScriptType {
|
|
2250
|
+
KASPA_PAYTOADDRESS = 0,
|
|
2251
|
+
KASPA_PAYTOCHANGE = 1,
|
|
2252
|
+
}
|
|
2253
|
+
export type KaspaOutputScriptType = keyof typeof Enum_KaspaOutputScriptType;
|
|
2254
|
+
|
|
2255
|
+
export enum Enum_KaspaRequestType {
|
|
2256
|
+
KASPA_TX_INPUT = 0,
|
|
2257
|
+
KASPA_TX_OUTPUT = 1,
|
|
2258
|
+
KASPA_TX_PAYLOAD = 2,
|
|
2259
|
+
KASPA_TX_FINISHED = 3,
|
|
2260
|
+
KASPA_TX_PREV_META = 4,
|
|
2261
|
+
}
|
|
2262
|
+
export type KaspaRequestType = keyof typeof Enum_KaspaRequestType;
|
|
2263
|
+
|
|
2264
|
+
// KaspaTxRequestSignature
|
|
2265
|
+
export type KaspaTxRequestSignature = {
|
|
2266
|
+
signature_index: number;
|
|
2267
|
+
signature: string;
|
|
2268
|
+
};
|
|
2269
|
+
|
|
2270
|
+
// KaspaTxRequest
|
|
2271
|
+
export type KaspaTxRequest = {
|
|
2272
|
+
request_type: KaspaRequestType;
|
|
2273
|
+
request_index?: number;
|
|
2274
|
+
signature?: KaspaTxRequestSignature;
|
|
2275
|
+
request_payload_length?: number;
|
|
2276
|
+
prev_tx_id?: string;
|
|
2277
|
+
};
|
|
2278
|
+
|
|
2279
|
+
// KaspaTxAckInput
|
|
2280
|
+
export type KaspaTxAckInput = {
|
|
2281
|
+
address_n: number[];
|
|
2282
|
+
previous_outpoint: KaspaOutpoint;
|
|
2283
|
+
amount: UintType;
|
|
2284
|
+
sequence: number;
|
|
2285
|
+
sig_op_count: number;
|
|
2286
|
+
script_type?: KaspaInputScriptType;
|
|
2287
|
+
use_tweak?: boolean;
|
|
2288
|
+
};
|
|
2289
|
+
|
|
2290
|
+
// KaspaTxAckOutput
|
|
2291
|
+
export type KaspaTxAckOutput = {
|
|
2292
|
+
script_type?: KaspaOutputScriptType;
|
|
2293
|
+
amount: UintType;
|
|
2294
|
+
address_n: number[];
|
|
2295
|
+
address?: string;
|
|
2296
|
+
scheme?: string;
|
|
2297
|
+
use_tweak?: boolean;
|
|
2298
|
+
};
|
|
2299
|
+
|
|
2300
|
+
// KaspaTxAckPayloadChunk
|
|
2301
|
+
export type KaspaTxAckPayloadChunk = {
|
|
2302
|
+
payload_chunk: string;
|
|
2303
|
+
};
|
|
2304
|
+
|
|
2305
|
+
// KaspaTxAckPrevMeta
|
|
2306
|
+
export type KaspaTxAckPrevMeta = {
|
|
2307
|
+
version: number;
|
|
2308
|
+
input_count: number;
|
|
2309
|
+
output_count: number;
|
|
2310
|
+
lock_time: number;
|
|
2311
|
+
subnetwork_id: string;
|
|
2312
|
+
gas: number;
|
|
2313
|
+
payload_length: number;
|
|
2314
|
+
};
|
|
2315
|
+
|
|
2316
|
+
// KaspaTxAckPrevInput
|
|
2317
|
+
export type KaspaTxAckPrevInput = {
|
|
2318
|
+
previous_outpoint: KaspaOutpoint;
|
|
2319
|
+
sequence: number;
|
|
2320
|
+
};
|
|
2321
|
+
|
|
2322
|
+
// KaspaTxAckPrevOutput
|
|
2323
|
+
export type KaspaTxAckPrevOutput = {
|
|
2324
|
+
amount: UintType;
|
|
2325
|
+
script_version: number;
|
|
2326
|
+
script_public_key: string;
|
|
2327
|
+
};
|
|
2328
|
+
|
|
2227
2329
|
// KaspaSignedTx
|
|
2228
2330
|
export type KaspaSignedTx = {
|
|
2229
2331
|
signature: string;
|
|
@@ -2408,6 +2510,19 @@ export type Features = {
|
|
|
2408
2510
|
onekey_se04_state?: string | null;
|
|
2409
2511
|
attach_to_pin_user?: boolean;
|
|
2410
2512
|
unlocked_attach_pin?: boolean;
|
|
2513
|
+
coprocessor_bt_name?: string;
|
|
2514
|
+
coprocessor_version?: string;
|
|
2515
|
+
coprocessor_bt_enable?: boolean;
|
|
2516
|
+
romloader_version?: string;
|
|
2517
|
+
onekey_romloader_version?: string;
|
|
2518
|
+
onekey_romloader_hash?: string;
|
|
2519
|
+
onekey_bootloader_version?: string;
|
|
2520
|
+
onekey_bootloader_hash?: string;
|
|
2521
|
+
onekey_bootloader_build_id?: string;
|
|
2522
|
+
onekey_coprocessor_bt_name?: string;
|
|
2523
|
+
onekey_coprocessor_version?: string;
|
|
2524
|
+
onekey_coprocessor_build_id?: string;
|
|
2525
|
+
onekey_coprocessor_hash?: string;
|
|
2411
2526
|
};
|
|
2412
2527
|
|
|
2413
2528
|
// OnekeyFeatures
|
|
@@ -2456,6 +2571,28 @@ export type OnekeyFeatures = {
|
|
|
2456
2571
|
onekey_se02_boot_build_id?: string;
|
|
2457
2572
|
onekey_se03_boot_build_id?: string;
|
|
2458
2573
|
onekey_se04_boot_build_id?: string;
|
|
2574
|
+
onekey_romloader_version?: string;
|
|
2575
|
+
onekey_bootloader_version?: string;
|
|
2576
|
+
onekey_romloader_hash?: string;
|
|
2577
|
+
onekey_bootloader_hash?: string;
|
|
2578
|
+
onekey_romloader_build_id?: string;
|
|
2579
|
+
onekey_bootloader_build_id?: string;
|
|
2580
|
+
onekey_coprocessor_bt_name?: string;
|
|
2581
|
+
onekey_coprocessor_version?: string;
|
|
2582
|
+
onekey_coprocessor_build_id?: string;
|
|
2583
|
+
onekey_coprocessor_hash?: string;
|
|
2584
|
+
onekey_se01_bootloader_version?: string;
|
|
2585
|
+
onekey_se02_bootloader_version?: string;
|
|
2586
|
+
onekey_se03_bootloader_version?: string;
|
|
2587
|
+
onekey_se04_bootloader_version?: string;
|
|
2588
|
+
onekey_se01_bootloader_hash?: string;
|
|
2589
|
+
onekey_se02_bootloader_hash?: string;
|
|
2590
|
+
onekey_se03_bootloader_hash?: string;
|
|
2591
|
+
onekey_se04_bootloader_hash?: string;
|
|
2592
|
+
onekey_se01_bootloader_build_id?: string;
|
|
2593
|
+
onekey_se02_bootloader_build_id?: string;
|
|
2594
|
+
onekey_se03_bootloader_build_id?: string;
|
|
2595
|
+
onekey_se04_bootloader_build_id?: string;
|
|
2459
2596
|
};
|
|
2460
2597
|
|
|
2461
2598
|
// LockDevice
|
|
@@ -2885,8 +3022,6 @@ export type UnLockDeviceResponse = {
|
|
|
2885
3022
|
// GetPassphraseState
|
|
2886
3023
|
export type GetPassphraseState = {
|
|
2887
3024
|
passphrase_state?: string;
|
|
2888
|
-
_only_main_pin?: boolean;
|
|
2889
|
-
allow_create_attach_pin?: boolean;
|
|
2890
3025
|
};
|
|
2891
3026
|
|
|
2892
3027
|
// PassphraseState
|
|
@@ -4452,6 +4587,30 @@ export type TxAckPaymentRequest = {
|
|
|
4452
4587
|
signature: string;
|
|
4453
4588
|
};
|
|
4454
4589
|
|
|
4590
|
+
// EthereumSignTypedDataQR
|
|
4591
|
+
export type EthereumSignTypedDataQR = {
|
|
4592
|
+
address_n: number[];
|
|
4593
|
+
json_data?: string;
|
|
4594
|
+
chain_id?: number;
|
|
4595
|
+
metamask_v4_compat?: boolean;
|
|
4596
|
+
request_id?: string;
|
|
4597
|
+
};
|
|
4598
|
+
|
|
4599
|
+
// InternalMyAddressRequest
|
|
4600
|
+
export type InternalMyAddressRequest = {
|
|
4601
|
+
coin_type: number;
|
|
4602
|
+
chain_id: number;
|
|
4603
|
+
account_index: number;
|
|
4604
|
+
derive_type: number;
|
|
4605
|
+
};
|
|
4606
|
+
|
|
4607
|
+
// StartSession
|
|
4608
|
+
export type StartSession = {
|
|
4609
|
+
session_id?: string;
|
|
4610
|
+
_skip_passphrase?: boolean;
|
|
4611
|
+
derive_cardano?: boolean;
|
|
4612
|
+
};
|
|
4613
|
+
|
|
4455
4614
|
// SetBusy
|
|
4456
4615
|
export type SetBusy = {
|
|
4457
4616
|
expiry_ms?: number;
|
|
@@ -4480,6 +4639,28 @@ export type WriteSEPrivateKey = {
|
|
|
4480
4639
|
private_key: string;
|
|
4481
4640
|
};
|
|
4482
4641
|
|
|
4642
|
+
export enum WallpaperTarget {
|
|
4643
|
+
Home = 0,
|
|
4644
|
+
Lock = 1,
|
|
4645
|
+
}
|
|
4646
|
+
|
|
4647
|
+
// SetWallpaper
|
|
4648
|
+
export type SetWallpaper = {
|
|
4649
|
+
target: WallpaperTarget;
|
|
4650
|
+
path: string;
|
|
4651
|
+
};
|
|
4652
|
+
|
|
4653
|
+
// GetWallpaper
|
|
4654
|
+
export type GetWallpaper = {
|
|
4655
|
+
target: WallpaperTarget;
|
|
4656
|
+
};
|
|
4657
|
+
|
|
4658
|
+
// Wallpaper
|
|
4659
|
+
export type Wallpaper = {
|
|
4660
|
+
target: WallpaperTarget;
|
|
4661
|
+
path: string;
|
|
4662
|
+
};
|
|
4663
|
+
|
|
4483
4664
|
// UnlockPath
|
|
4484
4665
|
export type UnlockPath = {
|
|
4485
4666
|
address_n: number[];
|
|
@@ -4498,61 +4679,91 @@ export enum MoneroNetworkType {
|
|
|
4498
4679
|
FAKECHAIN = 3,
|
|
4499
4680
|
}
|
|
4500
4681
|
|
|
4501
|
-
//
|
|
4502
|
-
export type
|
|
4682
|
+
// ViewAmount
|
|
4683
|
+
export type ViewAmount = {
|
|
4684
|
+
is_unlimited: boolean;
|
|
4503
4685
|
num: string;
|
|
4504
|
-
decimals: number;
|
|
4505
|
-
symbol: string;
|
|
4506
4686
|
};
|
|
4507
4687
|
|
|
4508
|
-
//
|
|
4509
|
-
export type
|
|
4688
|
+
// ViewDetail
|
|
4689
|
+
export type ViewDetail = {
|
|
4510
4690
|
key: number;
|
|
4511
|
-
|
|
4512
|
-
|
|
4513
|
-
|
|
4691
|
+
value: string;
|
|
4692
|
+
is_overview: boolean;
|
|
4693
|
+
has_icon: boolean;
|
|
4514
4694
|
};
|
|
4515
4695
|
|
|
4516
|
-
|
|
4517
|
-
|
|
4518
|
-
|
|
4519
|
-
|
|
4696
|
+
export enum ViewTipType {
|
|
4697
|
+
Default = 0,
|
|
4698
|
+
Highlight = 1,
|
|
4699
|
+
Recommend = 2,
|
|
4700
|
+
Warning = 3,
|
|
4701
|
+
Danger = 4,
|
|
4702
|
+
}
|
|
4703
|
+
|
|
4704
|
+
// ViewTip
|
|
4705
|
+
export type ViewTip = {
|
|
4706
|
+
type: ViewTipType;
|
|
4707
|
+
text: string;
|
|
4520
4708
|
};
|
|
4521
4709
|
|
|
4522
|
-
//
|
|
4523
|
-
export type
|
|
4524
|
-
|
|
4525
|
-
|
|
4526
|
-
is_overview: boolean;
|
|
4710
|
+
// ViewRawData
|
|
4711
|
+
export type ViewRawData = {
|
|
4712
|
+
initial_data: string;
|
|
4713
|
+
placeholder: number;
|
|
4527
4714
|
};
|
|
4528
4715
|
|
|
4529
|
-
export enum
|
|
4530
|
-
|
|
4531
|
-
|
|
4716
|
+
export enum ViewSignLayout {
|
|
4717
|
+
LayoutDefault = 0,
|
|
4718
|
+
LayoutSafeTxCreate = 1,
|
|
4719
|
+
LayoutFinalConfirm = 2,
|
|
4720
|
+
Layout7702 = 3,
|
|
4721
|
+
LayoutFlat = 4,
|
|
4722
|
+
LayoutEthApprove = 5,
|
|
4532
4723
|
}
|
|
4533
4724
|
|
|
4534
|
-
//
|
|
4535
|
-
export type
|
|
4725
|
+
// ViewSignPage
|
|
4726
|
+
export type ViewSignPage = {
|
|
4536
4727
|
title: string;
|
|
4537
|
-
display_type: TxDetailsDisplayType;
|
|
4538
4728
|
amount?: UintType;
|
|
4539
|
-
|
|
4540
|
-
|
|
4541
|
-
|
|
4729
|
+
general: ViewDetail[];
|
|
4730
|
+
tip?: ViewTip;
|
|
4731
|
+
raw_data?: ViewRawData;
|
|
4732
|
+
slide_to_confirm?: boolean;
|
|
4733
|
+
layout?: ViewSignLayout;
|
|
4542
4734
|
};
|
|
4543
4735
|
|
|
4544
|
-
//
|
|
4545
|
-
export type
|
|
4546
|
-
|
|
4547
|
-
|
|
4548
|
-
|
|
4549
|
-
|
|
4736
|
+
// ViewVerifyPage
|
|
4737
|
+
export type ViewVerifyPage = {
|
|
4738
|
+
title: string;
|
|
4739
|
+
address: string;
|
|
4740
|
+
path: string;
|
|
4741
|
+
network?: string;
|
|
4742
|
+
derive_type?: string;
|
|
4743
|
+
value_key?: number;
|
|
4550
4744
|
};
|
|
4551
4745
|
|
|
4552
|
-
|
|
4553
|
-
|
|
4554
|
-
|
|
4555
|
-
|
|
4746
|
+
// ProtocolInfoRequest
|
|
4747
|
+
export type ProtocolInfoRequest = {};
|
|
4748
|
+
|
|
4749
|
+
// ProtocolInfo
|
|
4750
|
+
export type ProtocolInfo = {
|
|
4751
|
+
version: number;
|
|
4752
|
+
supported_messages: number[];
|
|
4753
|
+
protobuf_definition?: string;
|
|
4754
|
+
};
|
|
4755
|
+
|
|
4756
|
+
export enum DeviceErrorCode {
|
|
4757
|
+
DeviceError_None = 0,
|
|
4758
|
+
DeviceError_Busy = 1,
|
|
4759
|
+
DeviceError_NotInitialized = 2,
|
|
4760
|
+
DeviceError_ActionCancelled = 3,
|
|
4761
|
+
DeviceError_PinAlreadyUsed = 4,
|
|
4762
|
+
DeviceError_PersistFailed = 5,
|
|
4763
|
+
DeviceError_SeError = 6,
|
|
4764
|
+
DeviceError_InvalidLanguage = 7,
|
|
4765
|
+
DeviceError_WallpaperNotUsable = 8,
|
|
4766
|
+
DeviceError_DeviceLocked = 9,
|
|
4556
4767
|
}
|
|
4557
4768
|
|
|
4558
4769
|
export enum DeviceRebootType {
|
|
@@ -4561,16 +4772,183 @@ export enum DeviceRebootType {
|
|
|
4561
4772
|
Bootloader = 2,
|
|
4562
4773
|
}
|
|
4563
4774
|
|
|
4564
|
-
// DevReboot
|
|
4565
|
-
export type DevReboot = {
|
|
4566
|
-
reboot_type: DevRebootType;
|
|
4567
|
-
};
|
|
4568
|
-
|
|
4569
4775
|
// DeviceReboot
|
|
4570
4776
|
export type DeviceReboot = {
|
|
4571
4777
|
reboot_type: DeviceRebootType;
|
|
4572
4778
|
};
|
|
4573
4779
|
|
|
4780
|
+
// DeviceSettings
|
|
4781
|
+
export type DeviceSettings = {
|
|
4782
|
+
bt_enable?: boolean;
|
|
4783
|
+
language?: string;
|
|
4784
|
+
wallpaper_path?: string;
|
|
4785
|
+
brightness?: number;
|
|
4786
|
+
animation_enable?: boolean;
|
|
4787
|
+
tap_to_wake?: boolean;
|
|
4788
|
+
haptic_feedback?: boolean;
|
|
4789
|
+
device_name_display_enabled?: boolean;
|
|
4790
|
+
airgap_mode?: boolean;
|
|
4791
|
+
usb_lock_enable?: boolean;
|
|
4792
|
+
random_keypad?: boolean;
|
|
4793
|
+
passphrase_enable?: boolean;
|
|
4794
|
+
fido_enabled?: boolean;
|
|
4795
|
+
autolock_delay_ms?: number;
|
|
4796
|
+
autoshutdown_delay_ms?: number;
|
|
4797
|
+
label?: string;
|
|
4798
|
+
};
|
|
4799
|
+
|
|
4800
|
+
// DeviceSettingsGet
|
|
4801
|
+
export type DeviceSettingsGet = {};
|
|
4802
|
+
|
|
4803
|
+
// DeviceSettingsSet
|
|
4804
|
+
export type DeviceSettingsSet = {
|
|
4805
|
+
settings: DeviceSettings;
|
|
4806
|
+
};
|
|
4807
|
+
|
|
4808
|
+
export enum DeviceSettingsPage {
|
|
4809
|
+
DeviceReset = 0,
|
|
4810
|
+
DevicePinChange = 1,
|
|
4811
|
+
DevicePassphrase = 2,
|
|
4812
|
+
DeviceAirgap = 3,
|
|
4813
|
+
}
|
|
4814
|
+
|
|
4815
|
+
// DeviceSettingsPageShow
|
|
4816
|
+
export type DeviceSettingsPageShow = {
|
|
4817
|
+
page: DeviceSettingsPage;
|
|
4818
|
+
field_name?: string;
|
|
4819
|
+
};
|
|
4820
|
+
|
|
4821
|
+
// DeviceCertificate
|
|
4822
|
+
export type DeviceCertificate = {
|
|
4823
|
+
cert_and_pubkey: string;
|
|
4824
|
+
private_key?: string;
|
|
4825
|
+
};
|
|
4826
|
+
|
|
4827
|
+
// DeviceCertificateWrite
|
|
4828
|
+
export type DeviceCertificateWrite = {
|
|
4829
|
+
cert: DeviceCertificate;
|
|
4830
|
+
};
|
|
4831
|
+
|
|
4832
|
+
// DeviceCertificateRead
|
|
4833
|
+
export type DeviceCertificateRead = {};
|
|
4834
|
+
|
|
4835
|
+
// DeviceCertificateSignature
|
|
4836
|
+
export type DeviceCertificateSignature = {
|
|
4837
|
+
data: string;
|
|
4838
|
+
};
|
|
4839
|
+
|
|
4840
|
+
// DeviceCertificateSign
|
|
4841
|
+
export type DeviceCertificateSign = {
|
|
4842
|
+
data: string;
|
|
4843
|
+
};
|
|
4844
|
+
|
|
4845
|
+
export enum DeviceFirmwareTargetType {
|
|
4846
|
+
FW_MGMT_TARGET_INVALID = 0,
|
|
4847
|
+
FW_MGMT_TARGET_CRATE = 1,
|
|
4848
|
+
FW_MGMT_TARGET_ROMLOADER = 2,
|
|
4849
|
+
FW_MGMT_TARGET_BOOTLOADER = 3,
|
|
4850
|
+
FW_MGMT_TARGET_APPLICATION_P1 = 4,
|
|
4851
|
+
FW_MGMT_TARGET_APPLICATION_P2 = 5,
|
|
4852
|
+
FW_MGMT_TARGET_COPROCESSOR = 6,
|
|
4853
|
+
FW_MGMT_TARGET_SE01 = 7,
|
|
4854
|
+
FW_MGMT_TARGET_SE02 = 8,
|
|
4855
|
+
FW_MGMT_TARGET_SE03 = 9,
|
|
4856
|
+
FW_MGMT_TARGET_SE04 = 10,
|
|
4857
|
+
}
|
|
4858
|
+
|
|
4859
|
+
export enum DeviceFirmwareUpdateTaskStatus {
|
|
4860
|
+
FW_MGMT_UPDATER_TASK_STATUS_PENDING = 0,
|
|
4861
|
+
FW_MGMT_UPDATER_TASK_STATUS_IN_PROGRESS = 1,
|
|
4862
|
+
FW_MGMT_UPDATER_TASK_STATUS_FINISHED = 2,
|
|
4863
|
+
FW_MGMT_UPDATER_TASK_STATUS_FAILED_FILE_NOT_FOUND = 3,
|
|
4864
|
+
FW_MGMT_UPDATER_TASK_STATUS_FAILED_FILE_READ = 4,
|
|
4865
|
+
FW_MGMT_UPDATER_TASK_STATUS_FAILED_FILE_WRITE = 5,
|
|
4866
|
+
FW_MGMT_UPDATER_TASK_STATUS_FAILED_VERIFY = 6,
|
|
4867
|
+
FW_MGMT_UPDATER_TASK_STATUS_FAILED_INSTALL = 7,
|
|
4868
|
+
FW_MGMT_UPDATER_TASK_STATUS_FAILED_ABORT = 8,
|
|
4869
|
+
FW_MGMT_UPDATER_TASK_STATUS_FAILED_BUSY = 9,
|
|
4870
|
+
FW_MGMT_UPDATER_TASK_STATUS_FAILED_ENTRY_OUT_OF_BOUNDS = 10,
|
|
4871
|
+
}
|
|
4872
|
+
|
|
4873
|
+
// DeviceFirmwareTarget
|
|
4874
|
+
export type DeviceFirmwareTarget = {
|
|
4875
|
+
target_id: DeviceFirmwareTargetType;
|
|
4876
|
+
path: string;
|
|
4877
|
+
};
|
|
4878
|
+
|
|
4879
|
+
// DeviceFirmwareUpdateRequest
|
|
4880
|
+
export type DeviceFirmwareUpdateRequest = {
|
|
4881
|
+
targets: DeviceFirmwareTarget[];
|
|
4882
|
+
};
|
|
4883
|
+
|
|
4884
|
+
// DeviceFirmwareUpdateRecord
|
|
4885
|
+
export type DeviceFirmwareUpdateRecord = {
|
|
4886
|
+
target_id: DeviceFirmwareTargetType;
|
|
4887
|
+
status?: DeviceFirmwareUpdateTaskStatus;
|
|
4888
|
+
payload_version?: number;
|
|
4889
|
+
path?: string;
|
|
4890
|
+
};
|
|
4891
|
+
|
|
4892
|
+
// DeviceFirmwareUpdateRecordFields
|
|
4893
|
+
export type DeviceFirmwareUpdateRecordFields = {
|
|
4894
|
+
status?: boolean;
|
|
4895
|
+
payload_version?: boolean;
|
|
4896
|
+
path?: boolean;
|
|
4897
|
+
};
|
|
4898
|
+
|
|
4899
|
+
// DeviceFirmwareUpdateStatusGet
|
|
4900
|
+
export type DeviceFirmwareUpdateStatusGet = {
|
|
4901
|
+
fields?: DeviceFirmwareUpdateRecordFields;
|
|
4902
|
+
};
|
|
4903
|
+
|
|
4904
|
+
// DeviceFirmwareUpdateStatus
|
|
4905
|
+
export type DeviceFirmwareUpdateStatus = {
|
|
4906
|
+
records: DeviceFirmwareUpdateRecord[];
|
|
4907
|
+
};
|
|
4908
|
+
|
|
4909
|
+
export enum DeviceFactoryAck {
|
|
4910
|
+
FACTORY_ACK_SUCCESS = 0,
|
|
4911
|
+
FACTORY_ACK_FAIL = 1,
|
|
4912
|
+
}
|
|
4913
|
+
|
|
4914
|
+
// DeviceFactoryInfoManufactureTime
|
|
4915
|
+
export type DeviceFactoryInfoManufactureTime = {
|
|
4916
|
+
year: number;
|
|
4917
|
+
month: number;
|
|
4918
|
+
day: number;
|
|
4919
|
+
hour: number;
|
|
4920
|
+
minute: number;
|
|
4921
|
+
second: number;
|
|
4922
|
+
};
|
|
4923
|
+
|
|
4924
|
+
// DeviceFactoryInfo
|
|
4925
|
+
export type DeviceFactoryInfo = {
|
|
4926
|
+
version?: number;
|
|
4927
|
+
serial_number?: string;
|
|
4928
|
+
burn_in_completed?: boolean;
|
|
4929
|
+
factory_test_completed?: boolean;
|
|
4930
|
+
manufacture_time?: DeviceFactoryInfoManufactureTime;
|
|
4931
|
+
};
|
|
4932
|
+
|
|
4933
|
+
// DeviceFactoryInfoSet
|
|
4934
|
+
export type DeviceFactoryInfoSet = {
|
|
4935
|
+
info: DeviceFactoryInfo;
|
|
4936
|
+
};
|
|
4937
|
+
|
|
4938
|
+
// DeviceFactoryInfoGet
|
|
4939
|
+
export type DeviceFactoryInfoGet = {};
|
|
4940
|
+
|
|
4941
|
+
// DeviceFactoryPermanentLock
|
|
4942
|
+
export type DeviceFactoryPermanentLock = {
|
|
4943
|
+
check_a: string;
|
|
4944
|
+
check_b: string;
|
|
4945
|
+
};
|
|
4946
|
+
|
|
4947
|
+
// DeviceFactoryTest
|
|
4948
|
+
export type DeviceFactoryTest = {
|
|
4949
|
+
burn_in_test: boolean;
|
|
4950
|
+
};
|
|
4951
|
+
|
|
4574
4952
|
export enum DeviceType {
|
|
4575
4953
|
CLASSIC1 = 0,
|
|
4576
4954
|
CLASSIC1S = 1,
|
|
@@ -4578,62 +4956,65 @@ export enum DeviceType {
|
|
|
4578
4956
|
TOUCH = 3,
|
|
4579
4957
|
PRO = 5,
|
|
4580
4958
|
CLASSIC1S_PURE = 6,
|
|
4959
|
+
PRO2 = 7,
|
|
4960
|
+
NEO = 8,
|
|
4581
4961
|
}
|
|
4582
4962
|
|
|
4583
|
-
export enum
|
|
4963
|
+
export enum DeviceSeType {
|
|
4584
4964
|
THD89 = 0,
|
|
4585
4965
|
SE608A = 1,
|
|
4586
4966
|
}
|
|
4587
4967
|
|
|
4588
|
-
export enum
|
|
4968
|
+
export enum DeviceSEState {
|
|
4589
4969
|
BOOT = 0,
|
|
4590
4970
|
APP_FACTORY = 51,
|
|
4591
4971
|
APP = 85,
|
|
4592
4972
|
}
|
|
4593
4973
|
|
|
4594
|
-
//
|
|
4595
|
-
export type
|
|
4974
|
+
// DeviceFirmwareImageInfo
|
|
4975
|
+
export type DeviceFirmwareImageInfo = {
|
|
4596
4976
|
version?: string;
|
|
4597
4977
|
build_id?: string;
|
|
4598
4978
|
hash?: string;
|
|
4599
4979
|
};
|
|
4600
4980
|
|
|
4601
|
-
//
|
|
4602
|
-
export type
|
|
4603
|
-
|
|
4981
|
+
// DeviceHardwareInfo
|
|
4982
|
+
export type DeviceHardwareInfo = {
|
|
4983
|
+
Device_type?: DeviceType;
|
|
4604
4984
|
serial_no?: string;
|
|
4605
4985
|
hardware_version?: string;
|
|
4606
4986
|
hardware_version_raw_adc?: number;
|
|
4607
4987
|
};
|
|
4608
4988
|
|
|
4609
|
-
//
|
|
4610
|
-
export type
|
|
4611
|
-
|
|
4612
|
-
|
|
4613
|
-
|
|
4989
|
+
// DeviceMainMcuInfo
|
|
4990
|
+
export type DeviceMainMcuInfo = {
|
|
4991
|
+
romloader?: DeviceFirmwareImageInfo;
|
|
4992
|
+
bootloader?: DeviceFirmwareImageInfo;
|
|
4993
|
+
application?: DeviceFirmwareImageInfo;
|
|
4994
|
+
application_data?: DeviceFirmwareImageInfo;
|
|
4614
4995
|
};
|
|
4615
4996
|
|
|
4616
|
-
//
|
|
4617
|
-
export type
|
|
4618
|
-
|
|
4619
|
-
|
|
4620
|
-
|
|
4621
|
-
|
|
4997
|
+
// DeviceCoprocessorInfo
|
|
4998
|
+
export type DeviceCoprocessorInfo = {
|
|
4999
|
+
bootloader?: DeviceFirmwareImageInfo;
|
|
5000
|
+
application?: DeviceFirmwareImageInfo;
|
|
5001
|
+
bt_adv_name?: string;
|
|
5002
|
+
bt_mac?: string;
|
|
4622
5003
|
};
|
|
4623
5004
|
|
|
4624
|
-
//
|
|
4625
|
-
export type
|
|
4626
|
-
|
|
4627
|
-
|
|
4628
|
-
type?:
|
|
4629
|
-
state?:
|
|
5005
|
+
// DeviceSEInfo
|
|
5006
|
+
export type DeviceSEInfo = {
|
|
5007
|
+
bootloader?: DeviceFirmwareImageInfo;
|
|
5008
|
+
application?: DeviceFirmwareImageInfo;
|
|
5009
|
+
type?: DeviceSeType;
|
|
5010
|
+
state?: DeviceSEState;
|
|
4630
5011
|
};
|
|
4631
5012
|
|
|
4632
|
-
//
|
|
4633
|
-
export type
|
|
5013
|
+
// DeviceInfoTargets
|
|
5014
|
+
export type DeviceInfoTargets = {
|
|
4634
5015
|
hw?: boolean;
|
|
4635
5016
|
fw?: boolean;
|
|
4636
|
-
|
|
5017
|
+
coprocessor?: boolean;
|
|
4637
5018
|
se1?: boolean;
|
|
4638
5019
|
se2?: boolean;
|
|
4639
5020
|
se3?: boolean;
|
|
@@ -4641,161 +5022,124 @@ export type DevInfoTargets = {
|
|
|
4641
5022
|
status?: boolean;
|
|
4642
5023
|
};
|
|
4643
5024
|
|
|
4644
|
-
//
|
|
4645
|
-
export type
|
|
5025
|
+
// DeviceInfoTypes
|
|
5026
|
+
export type DeviceInfoTypes = {
|
|
4646
5027
|
version?: boolean;
|
|
4647
5028
|
build_id?: boolean;
|
|
4648
5029
|
hash?: boolean;
|
|
4649
5030
|
specific?: boolean;
|
|
4650
5031
|
};
|
|
4651
5032
|
|
|
4652
|
-
//
|
|
4653
|
-
export type
|
|
4654
|
-
|
|
4655
|
-
|
|
4656
|
-
init_states?: boolean;
|
|
4657
|
-
backup_required?: boolean;
|
|
4658
|
-
passphrase_protection?: boolean;
|
|
4659
|
-
label?: string;
|
|
4660
|
-
};
|
|
4661
|
-
|
|
4662
|
-
// DevGetDeviceInfo
|
|
4663
|
-
export type DevGetDeviceInfo = {
|
|
4664
|
-
targets?: DevInfoTargets;
|
|
4665
|
-
types?: DevInfoTypes;
|
|
5033
|
+
// DeviceInfoGet
|
|
5034
|
+
export type DeviceInfoGet = {
|
|
5035
|
+
targets?: DeviceInfoTargets;
|
|
5036
|
+
types?: DeviceInfoTypes;
|
|
4666
5037
|
};
|
|
4667
5038
|
|
|
4668
|
-
// DeviceGetDeviceInfo
|
|
4669
|
-
export type DeviceGetDeviceInfo = DevGetDeviceInfo;
|
|
4670
|
-
|
|
4671
5039
|
// ProtocolV2DeviceInfo
|
|
4672
5040
|
export type ProtocolV2DeviceInfo = {
|
|
4673
5041
|
protocol_version: number;
|
|
4674
|
-
hw?:
|
|
4675
|
-
fw?:
|
|
4676
|
-
|
|
4677
|
-
se1?:
|
|
4678
|
-
se2?:
|
|
4679
|
-
se3?:
|
|
4680
|
-
se4?:
|
|
4681
|
-
status?:
|
|
4682
|
-
};
|
|
4683
|
-
|
|
4684
|
-
|
|
4685
|
-
|
|
4686
|
-
|
|
4687
|
-
TARGET_BOOTLOADER = 2,
|
|
4688
|
-
TARGET_APPLICATION_P1 = 3,
|
|
4689
|
-
TARGET_APPLICATION_P2 = 4,
|
|
4690
|
-
TARGET_COPROCESSOR = 5,
|
|
4691
|
-
TARGET_SE01 = 6,
|
|
4692
|
-
TARGET_SE02 = 7,
|
|
4693
|
-
TARGET_SE03 = 8,
|
|
4694
|
-
TARGET_SE04 = 9,
|
|
4695
|
-
TARGET_RESOURCE = 10,
|
|
4696
|
-
}
|
|
4697
|
-
|
|
4698
|
-
export enum DeviceFirmwareTargetType {
|
|
4699
|
-
TARGET_INVALID = 0,
|
|
4700
|
-
TARGET_ROMLOADER = 1,
|
|
4701
|
-
TARGET_BOOTLOADER = 2,
|
|
4702
|
-
TARGET_APPLICATION_P1 = 3,
|
|
4703
|
-
TARGET_APPLICATION_P2 = 4,
|
|
4704
|
-
TARGET_COPROCESSOR = 5,
|
|
4705
|
-
TARGET_SE01 = 6,
|
|
4706
|
-
TARGET_SE02 = 7,
|
|
4707
|
-
TARGET_SE03 = 8,
|
|
4708
|
-
TARGET_SE04 = 9,
|
|
4709
|
-
TARGET_RESOURCE = 10,
|
|
4710
|
-
}
|
|
4711
|
-
|
|
4712
|
-
// DevFirmwareTarget
|
|
4713
|
-
export type DevFirmwareTarget = {
|
|
4714
|
-
target_id: DevFirmwareTargetType;
|
|
4715
|
-
path: string;
|
|
4716
|
-
};
|
|
4717
|
-
|
|
4718
|
-
// DeviceFirmwareTarget
|
|
4719
|
-
export type DeviceFirmwareTarget = {
|
|
4720
|
-
target_id: DeviceFirmwareTargetType;
|
|
4721
|
-
path: string;
|
|
4722
|
-
};
|
|
4723
|
-
|
|
4724
|
-
// DevFirmwareUpdate
|
|
4725
|
-
export type DevFirmwareUpdate = {
|
|
4726
|
-
targets: DevFirmwareTarget[];
|
|
5042
|
+
hw?: DeviceHardwareInfo;
|
|
5043
|
+
fw?: DeviceMainMcuInfo;
|
|
5044
|
+
coprocessor?: DeviceCoprocessorInfo;
|
|
5045
|
+
se1?: DeviceSEInfo;
|
|
5046
|
+
se2?: DeviceSEInfo;
|
|
5047
|
+
se3?: DeviceSEInfo;
|
|
5048
|
+
se4?: DeviceSEInfo;
|
|
5049
|
+
status?: DeviceStatus;
|
|
5050
|
+
};
|
|
5051
|
+
|
|
5052
|
+
// DeviceSessionGet
|
|
5053
|
+
export type DeviceSessionGet = {
|
|
5054
|
+
session_id?: string;
|
|
4727
5055
|
};
|
|
4728
5056
|
|
|
4729
|
-
//
|
|
4730
|
-
export type
|
|
4731
|
-
|
|
4732
|
-
|
|
5057
|
+
// DeviceSession
|
|
5058
|
+
export type DeviceSession = {
|
|
5059
|
+
session_id?: string;
|
|
5060
|
+
btc_test_address?: string;
|
|
4733
5061
|
};
|
|
4734
5062
|
|
|
4735
|
-
//
|
|
4736
|
-
export type
|
|
4737
|
-
target_id: DevFirmwareTargetType;
|
|
4738
|
-
progress: number;
|
|
4739
|
-
stage?: string;
|
|
4740
|
-
};
|
|
5063
|
+
// DeviceSessionAskPin
|
|
5064
|
+
export type DeviceSessionAskPin = {};
|
|
4741
5065
|
|
|
4742
|
-
|
|
4743
|
-
|
|
4744
|
-
|
|
4745
|
-
progress: number;
|
|
4746
|
-
stage?: string;
|
|
4747
|
-
};
|
|
5066
|
+
export enum DeviceSessionAskPin_FailureSubCodes {
|
|
5067
|
+
UserCancel = 1,
|
|
5068
|
+
}
|
|
4748
5069
|
|
|
4749
|
-
//
|
|
4750
|
-
export type
|
|
4751
|
-
|
|
4752
|
-
|
|
5070
|
+
// DeviceStatus
|
|
5071
|
+
export type DeviceStatus = {
|
|
5072
|
+
device_id?: string;
|
|
5073
|
+
unlocked?: boolean;
|
|
5074
|
+
init_states?: boolean;
|
|
5075
|
+
backup_required?: boolean;
|
|
5076
|
+
passphrase_enabled?: boolean;
|
|
5077
|
+
attach_to_pin_enabled?: boolean;
|
|
5078
|
+
unlocked_by_attach_to_pin?: boolean;
|
|
4753
5079
|
};
|
|
4754
5080
|
|
|
4755
|
-
//
|
|
4756
|
-
export type
|
|
4757
|
-
target_id: DeviceFirmwareTargetType;
|
|
4758
|
-
status: number;
|
|
4759
|
-
};
|
|
5081
|
+
// DeviceStatusGet
|
|
5082
|
+
export type DeviceStatusGet = {};
|
|
4760
5083
|
|
|
4761
|
-
|
|
4762
|
-
|
|
5084
|
+
export enum DevOnboardingStep {
|
|
5085
|
+
DEV_ONBOARDING_STEP_UNKNOWN = 0,
|
|
5086
|
+
DEV_ONBOARDING_STEP_CHECKING = 1,
|
|
5087
|
+
DEV_ONBOARDING_STEP_PERSONALIZATION = 2,
|
|
5088
|
+
DEV_ONBOARDING_STEP_PIN = 3,
|
|
5089
|
+
DEV_ONBOARDING_STEP_SETUP = 4,
|
|
5090
|
+
DEV_ONBOARDING_STEP_DONE = 5,
|
|
5091
|
+
}
|
|
4763
5092
|
|
|
4764
|
-
|
|
4765
|
-
|
|
5093
|
+
export enum DevOnboardingPhase {
|
|
5094
|
+
DEV_ONBOARDING_PHASE_UNKNOWN = 0,
|
|
5095
|
+
DEV_ONBOARDING_PHASE_SAFETY_CHECK = 1,
|
|
5096
|
+
DEV_ONBOARDING_PHASE_PIN_SETUP = 2,
|
|
5097
|
+
DEV_ONBOARDING_PHASE_FINGERPRINT_SETUP = 3,
|
|
5098
|
+
DEV_ONBOARDING_PHASE_SETUP_CHOICE = 4,
|
|
5099
|
+
DEV_ONBOARDING_PHASE_WALLET_CREATE_START = 5,
|
|
5100
|
+
DEV_ONBOARDING_PHASE_RECOVERY_PHRASE_VIEW = 6,
|
|
5101
|
+
DEV_ONBOARDING_PHASE_RECOVERY_PHRASE_CONFIRM = 7,
|
|
5102
|
+
DEV_ONBOARDING_PHASE_RESTORE_METHOD_CHOICE = 8,
|
|
5103
|
+
DEV_ONBOARDING_PHASE_RECOVERY_PHRASE_RESTORE = 9,
|
|
5104
|
+
DEV_ONBOARDING_PHASE_SEEDCARD_RESTORE = 10,
|
|
5105
|
+
DEV_ONBOARDING_PHASE_WALLET_READY = 11,
|
|
5106
|
+
DEV_ONBOARDING_PHASE_SEEDCARD_BACKUP_PROMPT = 12,
|
|
5107
|
+
DEV_ONBOARDING_PHASE_SEEDCARD_BACKUP = 13,
|
|
5108
|
+
}
|
|
4766
5109
|
|
|
4767
|
-
|
|
4768
|
-
|
|
4769
|
-
|
|
4770
|
-
|
|
5110
|
+
export enum DevOnboardingSetupKind {
|
|
5111
|
+
DEV_ONBOARDING_SETUP_KIND_UNKNOWN = 0,
|
|
5112
|
+
DEV_ONBOARDING_SETUP_KIND_CHOICE = 1,
|
|
5113
|
+
DEV_ONBOARDING_SETUP_KIND_CREATE = 2,
|
|
5114
|
+
DEV_ONBOARDING_SETUP_KIND_RESTORE = 3,
|
|
5115
|
+
}
|
|
4771
5116
|
|
|
4772
|
-
|
|
4773
|
-
|
|
4774
|
-
|
|
4775
|
-
|
|
5117
|
+
export enum DevOnboardingSetupMethod {
|
|
5118
|
+
DEV_ONBOARDING_SETUP_METHOD_UNKNOWN = 0,
|
|
5119
|
+
DEV_ONBOARDING_SETUP_METHOD_RECOVERY_PHRASE = 1,
|
|
5120
|
+
DEV_ONBOARDING_SETUP_METHOD_SEEDCARD = 2,
|
|
5121
|
+
}
|
|
4776
5122
|
|
|
4777
|
-
//
|
|
4778
|
-
export type
|
|
4779
|
-
|
|
4780
|
-
|
|
4781
|
-
pre_firmware?: string;
|
|
5123
|
+
// DevOnboardingSetupStatus
|
|
5124
|
+
export type DevOnboardingSetupStatus = {
|
|
5125
|
+
kind?: DevOnboardingSetupKind;
|
|
5126
|
+
method?: DevOnboardingSetupMethod;
|
|
4782
5127
|
};
|
|
4783
5128
|
|
|
4784
|
-
//
|
|
4785
|
-
export type
|
|
5129
|
+
// DevGetOnboardingStatus
|
|
5130
|
+
export type DevGetOnboardingStatus = {};
|
|
4786
5131
|
|
|
4787
|
-
//
|
|
4788
|
-
export type
|
|
4789
|
-
|
|
4790
|
-
|
|
4791
|
-
|
|
4792
|
-
|
|
4793
|
-
|
|
4794
|
-
pre_firmware?: string;
|
|
5132
|
+
// DevOnboardingStatus
|
|
5133
|
+
export type DevOnboardingStatus = {
|
|
5134
|
+
step?: DevOnboardingStep;
|
|
5135
|
+
phase?: DevOnboardingPhase;
|
|
5136
|
+
setup?: DevOnboardingSetupStatus;
|
|
5137
|
+
pin_set?: boolean;
|
|
5138
|
+
wallet_initialized?: boolean;
|
|
4795
5139
|
};
|
|
4796
5140
|
|
|
4797
|
-
//
|
|
4798
|
-
export type
|
|
5141
|
+
// FilesystemPermissionFix
|
|
5142
|
+
export type FilesystemPermissionFix = {};
|
|
4799
5143
|
|
|
4800
5144
|
// FilesystemPathInfo
|
|
4801
5145
|
export type FilesystemPathInfo = {
|
|
@@ -4873,40 +5217,44 @@ export type FilesystemDirRemove = {
|
|
|
4873
5217
|
};
|
|
4874
5218
|
|
|
4875
5219
|
// FilesystemFormat
|
|
4876
|
-
export type FilesystemFormat = {
|
|
4877
|
-
|
|
4878
|
-
|
|
4879
|
-
ONBOARDING_STEP_UNKNOWN = 0,
|
|
4880
|
-
ONBOARDING_STEP_DEVICE_VERIFICATION = 1,
|
|
4881
|
-
ONBOARDING_STEP_PERSONALIZATION = 2,
|
|
4882
|
-
ONBOARDING_STEP_SETUP = 3,
|
|
4883
|
-
ONBOARDING_STEP_FIRMWARE = 4,
|
|
4884
|
-
}
|
|
4885
|
-
|
|
4886
|
-
// GetOnboardingStatus
|
|
4887
|
-
export type GetOnboardingStatus = {};
|
|
4888
|
-
|
|
4889
|
-
export type NewDevice = {
|
|
4890
|
-
seedcard_backup?: boolean;
|
|
5220
|
+
export type FilesystemFormat = {
|
|
5221
|
+
data: boolean;
|
|
5222
|
+
user: boolean;
|
|
4891
5223
|
};
|
|
4892
5224
|
|
|
4893
|
-
|
|
4894
|
-
|
|
4895
|
-
seedcard?: boolean;
|
|
4896
|
-
};
|
|
5225
|
+
// PortfolioUpdate
|
|
5226
|
+
export type PortfolioUpdate = {};
|
|
4897
5227
|
|
|
4898
|
-
export
|
|
4899
|
-
|
|
4900
|
-
|
|
4901
|
-
|
|
5228
|
+
export enum ProtocolV2FailureType {
|
|
5229
|
+
Failure_InvalidMessage = 1,
|
|
5230
|
+
Failure_UndefinedError = 2,
|
|
5231
|
+
Failure_UsageError = 3,
|
|
5232
|
+
Failure_DataError = 4,
|
|
5233
|
+
Failure_ProcessError = 5,
|
|
5234
|
+
}
|
|
4902
5235
|
|
|
4903
|
-
|
|
4904
|
-
|
|
4905
|
-
|
|
4906
|
-
|
|
4907
|
-
|
|
4908
|
-
|
|
4909
|
-
|
|
5236
|
+
export enum Enum_ProtocolV2Capability {
|
|
5237
|
+
Capability_Bitcoin = 1,
|
|
5238
|
+
Capability_Bitcoin_like = 2,
|
|
5239
|
+
Capability_Binance = 3,
|
|
5240
|
+
Capability_Cardano = 4,
|
|
5241
|
+
Capability_Crypto = 5,
|
|
5242
|
+
Capability_EOS = 6,
|
|
5243
|
+
Capability_Ethereum = 7,
|
|
5244
|
+
Capability_Lisk = 8,
|
|
5245
|
+
Capability_Monero = 9,
|
|
5246
|
+
Capability_NEM = 10,
|
|
5247
|
+
Capability_Ripple = 11,
|
|
5248
|
+
Capability_Stellar = 12,
|
|
5249
|
+
Capability_Tezos = 13,
|
|
5250
|
+
Capability_U2F = 14,
|
|
5251
|
+
Capability_Shamir = 15,
|
|
5252
|
+
Capability_ShamirGroups = 16,
|
|
5253
|
+
Capability_PassphraseEntry = 17,
|
|
5254
|
+
Capability_AttachToPin = 18,
|
|
5255
|
+
Capability_EthereumTypedData = 1000,
|
|
5256
|
+
}
|
|
5257
|
+
export type ProtocolV2Capability = keyof typeof Enum_ProtocolV2Capability;
|
|
4910
5258
|
|
|
4911
5259
|
// custom connect definitions
|
|
4912
5260
|
export type MessageType = {
|
|
@@ -5183,6 +5531,15 @@ export type MessageType = {
|
|
|
5183
5531
|
KaspaSignTx: KaspaSignTx;
|
|
5184
5532
|
KaspaTxInputRequest: KaspaTxInputRequest;
|
|
5185
5533
|
KaspaTxInputAck: KaspaTxInputAck;
|
|
5534
|
+
KaspaOutpoint: KaspaOutpoint;
|
|
5535
|
+
KaspaTxRequestSignature: KaspaTxRequestSignature;
|
|
5536
|
+
KaspaTxRequest: KaspaTxRequest;
|
|
5537
|
+
KaspaTxAckInput: KaspaTxAckInput;
|
|
5538
|
+
KaspaTxAckOutput: KaspaTxAckOutput;
|
|
5539
|
+
KaspaTxAckPayloadChunk: KaspaTxAckPayloadChunk;
|
|
5540
|
+
KaspaTxAckPrevMeta: KaspaTxAckPrevMeta;
|
|
5541
|
+
KaspaTxAckPrevInput: KaspaTxAckPrevInput;
|
|
5542
|
+
KaspaTxAckPrevOutput: KaspaTxAckPrevOutput;
|
|
5186
5543
|
KaspaSignedTx: KaspaSignedTx;
|
|
5187
5544
|
LnurlAuth: LnurlAuth;
|
|
5188
5545
|
LnurlAuthResp: LnurlAuthResp;
|
|
@@ -5472,49 +5829,67 @@ export type MessageType = {
|
|
|
5472
5829
|
CoinPurchaseMemo: CoinPurchaseMemo;
|
|
5473
5830
|
PaymentRequestMemo: PaymentRequestMemo;
|
|
5474
5831
|
TxAckPaymentRequest: TxAckPaymentRequest;
|
|
5832
|
+
EthereumSignTypedDataQR: EthereumSignTypedDataQR;
|
|
5833
|
+
InternalMyAddressRequest: InternalMyAddressRequest;
|
|
5834
|
+
StartSession: StartSession;
|
|
5475
5835
|
SetBusy: SetBusy;
|
|
5476
5836
|
GetFirmwareHash: GetFirmwareHash;
|
|
5477
5837
|
FirmwareHash: FirmwareHash;
|
|
5478
5838
|
GetNonce: GetNonce;
|
|
5479
5839
|
Nonce: Nonce;
|
|
5480
5840
|
WriteSEPrivateKey: WriteSEPrivateKey;
|
|
5841
|
+
SetWallpaper: SetWallpaper;
|
|
5842
|
+
GetWallpaper: GetWallpaper;
|
|
5843
|
+
Wallpaper: Wallpaper;
|
|
5481
5844
|
UnlockPath: UnlockPath;
|
|
5482
5845
|
UnlockedPathRequest: UnlockedPathRequest;
|
|
5483
|
-
|
|
5484
|
-
|
|
5485
|
-
|
|
5486
|
-
|
|
5487
|
-
|
|
5488
|
-
|
|
5489
|
-
|
|
5490
|
-
|
|
5846
|
+
ViewAmount: ViewAmount;
|
|
5847
|
+
ViewDetail: ViewDetail;
|
|
5848
|
+
ViewTip: ViewTip;
|
|
5849
|
+
ViewRawData: ViewRawData;
|
|
5850
|
+
ViewSignPage: ViewSignPage;
|
|
5851
|
+
ViewVerifyPage: ViewVerifyPage;
|
|
5852
|
+
ProtocolInfoRequest: ProtocolInfoRequest;
|
|
5853
|
+
ProtocolInfo: ProtocolInfo;
|
|
5491
5854
|
DeviceReboot: DeviceReboot;
|
|
5492
|
-
|
|
5493
|
-
|
|
5494
|
-
|
|
5495
|
-
|
|
5496
|
-
|
|
5497
|
-
|
|
5498
|
-
|
|
5499
|
-
|
|
5500
|
-
|
|
5501
|
-
DeviceGetDeviceInfo: DeviceGetDeviceInfo;
|
|
5502
|
-
DevFirmwareTarget: DevFirmwareTarget;
|
|
5855
|
+
DeviceSettings: DeviceSettings;
|
|
5856
|
+
DeviceSettingsGet: DeviceSettingsGet;
|
|
5857
|
+
DeviceSettingsSet: DeviceSettingsSet;
|
|
5858
|
+
DeviceSettingsPageShow: DeviceSettingsPageShow;
|
|
5859
|
+
DeviceCertificate: DeviceCertificate;
|
|
5860
|
+
DeviceCertificateWrite: DeviceCertificateWrite;
|
|
5861
|
+
DeviceCertificateRead: DeviceCertificateRead;
|
|
5862
|
+
DeviceCertificateSignature: DeviceCertificateSignature;
|
|
5863
|
+
DeviceCertificateSign: DeviceCertificateSign;
|
|
5503
5864
|
DeviceFirmwareTarget: DeviceFirmwareTarget;
|
|
5504
|
-
|
|
5505
|
-
|
|
5506
|
-
|
|
5507
|
-
|
|
5508
|
-
DevFirmwareUpdateStatusEntry: DevFirmwareUpdateStatusEntry;
|
|
5509
|
-
DeviceFirmwareUpdateStatusEntry: DeviceFirmwareUpdateStatusEntry;
|
|
5510
|
-
DevGetFirmwareUpdateStatus: DevGetFirmwareUpdateStatus;
|
|
5511
|
-
DeviceGetFirmwareUpdateStatus: DeviceGetFirmwareUpdateStatus;
|
|
5512
|
-
DevFirmwareUpdateStatus: DevFirmwareUpdateStatus;
|
|
5865
|
+
DeviceFirmwareUpdateRequest: DeviceFirmwareUpdateRequest;
|
|
5866
|
+
DeviceFirmwareUpdateRecord: DeviceFirmwareUpdateRecord;
|
|
5867
|
+
DeviceFirmwareUpdateRecordFields: DeviceFirmwareUpdateRecordFields;
|
|
5868
|
+
DeviceFirmwareUpdateStatusGet: DeviceFirmwareUpdateStatusGet;
|
|
5513
5869
|
DeviceFirmwareUpdateStatus: DeviceFirmwareUpdateStatus;
|
|
5514
|
-
|
|
5515
|
-
|
|
5516
|
-
|
|
5517
|
-
|
|
5870
|
+
DeviceFactoryInfoManufactureTime: DeviceFactoryInfoManufactureTime;
|
|
5871
|
+
DeviceFactoryInfo: DeviceFactoryInfo;
|
|
5872
|
+
DeviceFactoryInfoSet: DeviceFactoryInfoSet;
|
|
5873
|
+
DeviceFactoryInfoGet: DeviceFactoryInfoGet;
|
|
5874
|
+
DeviceFactoryPermanentLock: DeviceFactoryPermanentLock;
|
|
5875
|
+
DeviceFactoryTest: DeviceFactoryTest;
|
|
5876
|
+
DeviceFirmwareImageInfo: DeviceFirmwareImageInfo;
|
|
5877
|
+
DeviceHardwareInfo: DeviceHardwareInfo;
|
|
5878
|
+
DeviceMainMcuInfo: DeviceMainMcuInfo;
|
|
5879
|
+
DeviceCoprocessorInfo: DeviceCoprocessorInfo;
|
|
5880
|
+
DeviceSEInfo: DeviceSEInfo;
|
|
5881
|
+
DeviceInfoTargets: DeviceInfoTargets;
|
|
5882
|
+
DeviceInfoTypes: DeviceInfoTypes;
|
|
5883
|
+
DeviceInfoGet: DeviceInfoGet;
|
|
5884
|
+
DeviceSessionGet: DeviceSessionGet;
|
|
5885
|
+
DeviceSession: DeviceSession;
|
|
5886
|
+
DeviceSessionAskPin: DeviceSessionAskPin;
|
|
5887
|
+
DeviceStatus: DeviceStatus;
|
|
5888
|
+
DeviceStatusGet: DeviceStatusGet;
|
|
5889
|
+
DevOnboardingSetupStatus: DevOnboardingSetupStatus;
|
|
5890
|
+
DevGetOnboardingStatus: DevGetOnboardingStatus;
|
|
5891
|
+
DevOnboardingStatus: DevOnboardingStatus;
|
|
5892
|
+
FilesystemPermissionFix: FilesystemPermissionFix;
|
|
5518
5893
|
FilesystemPathInfo: FilesystemPathInfo;
|
|
5519
5894
|
FilesystemPathInfoQuery: FilesystemPathInfoQuery;
|
|
5520
5895
|
FilesystemFile: FilesystemFile;
|
|
@@ -5526,11 +5901,7 @@ export type MessageType = {
|
|
|
5526
5901
|
FilesystemDirMake: FilesystemDirMake;
|
|
5527
5902
|
FilesystemDirRemove: FilesystemDirRemove;
|
|
5528
5903
|
FilesystemFormat: FilesystemFormat;
|
|
5529
|
-
|
|
5530
|
-
NewDevice: NewDevice;
|
|
5531
|
-
Restore: Restore;
|
|
5532
|
-
Setup: Setup;
|
|
5533
|
-
OnboardingStatus: OnboardingStatus;
|
|
5904
|
+
PortfolioUpdate: PortfolioUpdate;
|
|
5534
5905
|
};
|
|
5535
5906
|
|
|
5536
5907
|
export type MessageKey = keyof MessageType;
|