@onekeyfe/hd-transport 1.2.0-alpha.3 → 1.2.0-alpha.30
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 +142 -0
- package/__tests__/protocol-v2-ble-frame-writer.test.js +119 -0
- package/__tests__/protocol-v2-link-manager.test.js +389 -0
- package/__tests__/protocol-v2-usb-transport-base.test.js +330 -0
- package/__tests__/protocol-v2.test.js +555 -119
- package/dist/constants.d.ts +6 -3
- package/dist/constants.d.ts.map +1 -1
- package/dist/index.d.ts +981 -278
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +759 -247
- package/dist/protocols/index.d.ts +14 -5
- package/dist/protocols/index.d.ts.map +1 -1
- package/dist/protocols/v2/ble-frame-writer.d.ts +15 -0
- package/dist/protocols/v2/ble-frame-writer.d.ts.map +1 -0
- 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 +13 -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/errors.d.ts +8 -0
- package/dist/protocols/v2/errors.d.ts.map +1 -0
- package/dist/protocols/v2/frame-assembler.d.ts.map +1 -1
- package/dist/protocols/v2/index.d.ts +2 -1
- package/dist/protocols/v2/index.d.ts.map +1 -1
- package/dist/protocols/v2/link-manager.d.ts +38 -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 +19 -5
- package/dist/protocols/v2/session.d.ts.map +1 -1
- package/dist/protocols/v2/usb-transport-base.d.ts +32 -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/types/messages.d.ts +523 -158
- package/dist/types/messages.d.ts.map +1 -1
- package/dist/types/transport.d.ts +13 -3
- package/dist/types/transport.d.ts.map +1 -1
- package/messages-protocol-v2.json +796 -620
- 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 +19 -1
- package/src/constants.ts +29 -15
- package/src/index.ts +11 -1
- package/src/protocols/index.ts +39 -40
- package/src/protocols/v2/ble-frame-writer.ts +77 -0
- package/src/protocols/v2/constants.ts +1 -0
- package/src/protocols/v2/crc8.ts +1 -1
- package/src/protocols/v2/decode.ts +71 -37
- package/src/protocols/v2/encode.ts +2 -28
- package/src/protocols/v2/errors.ts +25 -0
- package/src/protocols/v2/frame-assembler.ts +6 -4
- package/src/protocols/v2/index.ts +2 -1
- package/src/protocols/v2/link-manager.ts +186 -0
- package/src/protocols/v2/sequence-cursor.ts +10 -0
- package/src/protocols/v2/session.ts +157 -201
- package/src/protocols/v2/usb-transport-base.ts +213 -0
- package/src/serialization/protobuf/decode.ts +4 -1
- package/src/types/messages.ts +623 -181
- package/src/types/transport.ts +13 -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;
|
|
@@ -2257,7 +2359,7 @@ export enum Enum_SafetyCheckLevel {
|
|
|
2257
2359
|
PromptAlways = 1,
|
|
2258
2360
|
PromptTemporarily = 2,
|
|
2259
2361
|
}
|
|
2260
|
-
export type SafetyCheckLevel = keyof typeof Enum_SafetyCheckLevel;
|
|
2362
|
+
export type SafetyCheckLevel = keyof typeof Enum_SafetyCheckLevel | Enum_SafetyCheckLevel;
|
|
2261
2363
|
|
|
2262
2364
|
// Initialize
|
|
2263
2365
|
export type Initialize = {
|
|
@@ -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,13 +4587,13 @@ export type TxAckPaymentRequest = {
|
|
|
4452
4587
|
signature: string;
|
|
4453
4588
|
};
|
|
4454
4589
|
|
|
4455
|
-
//
|
|
4456
|
-
export type
|
|
4457
|
-
|
|
4458
|
-
|
|
4459
|
-
|
|
4460
|
-
|
|
4461
|
-
|
|
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;
|
|
4462
4597
|
};
|
|
4463
4598
|
|
|
4464
4599
|
// InternalMyAddressRequest
|
|
@@ -4469,6 +4604,13 @@ export type InternalMyAddressRequest = {
|
|
|
4469
4604
|
derive_type: number;
|
|
4470
4605
|
};
|
|
4471
4606
|
|
|
4607
|
+
// StartSession
|
|
4608
|
+
export type StartSession = {
|
|
4609
|
+
session_id?: string;
|
|
4610
|
+
_skip_passphrase?: boolean;
|
|
4611
|
+
derive_cardano?: boolean;
|
|
4612
|
+
};
|
|
4613
|
+
|
|
4472
4614
|
// SetBusy
|
|
4473
4615
|
export type SetBusy = {
|
|
4474
4616
|
expiry_ms?: number;
|
|
@@ -4537,6 +4679,24 @@ export enum MoneroNetworkType {
|
|
|
4537
4679
|
FAKECHAIN = 3,
|
|
4538
4680
|
}
|
|
4539
4681
|
|
|
4682
|
+
export enum UiAnimationType {
|
|
4683
|
+
Unknown = 0,
|
|
4684
|
+
Signing = 1,
|
|
4685
|
+
}
|
|
4686
|
+
|
|
4687
|
+
export enum UiAnimationCommand {
|
|
4688
|
+
CommandUnknown = 0,
|
|
4689
|
+
Start = 1,
|
|
4690
|
+
Stop = 2,
|
|
4691
|
+
Refresh = 3,
|
|
4692
|
+
}
|
|
4693
|
+
|
|
4694
|
+
// UiAnimationRequest
|
|
4695
|
+
export type UiAnimationRequest = {
|
|
4696
|
+
command: UiAnimationCommand;
|
|
4697
|
+
type?: UiAnimationType;
|
|
4698
|
+
};
|
|
4699
|
+
|
|
4540
4700
|
// ViewAmount
|
|
4541
4701
|
export type ViewAmount = {
|
|
4542
4702
|
is_unlimited: boolean;
|
|
@@ -4565,12 +4725,30 @@ export type ViewTip = {
|
|
|
4565
4725
|
text: string;
|
|
4566
4726
|
};
|
|
4567
4727
|
|
|
4728
|
+
// ViewRawData
|
|
4729
|
+
export type ViewRawData = {
|
|
4730
|
+
initial_data: string;
|
|
4731
|
+
placeholder: number;
|
|
4732
|
+
};
|
|
4733
|
+
|
|
4734
|
+
export enum ViewSignLayout {
|
|
4735
|
+
LayoutDefault = 0,
|
|
4736
|
+
LayoutSafeTxCreate = 1,
|
|
4737
|
+
LayoutFinalConfirm = 2,
|
|
4738
|
+
Layout7702 = 3,
|
|
4739
|
+
LayoutFlat = 4,
|
|
4740
|
+
LayoutEthApprove = 5,
|
|
4741
|
+
}
|
|
4742
|
+
|
|
4568
4743
|
// ViewSignPage
|
|
4569
4744
|
export type ViewSignPage = {
|
|
4570
4745
|
title: string;
|
|
4571
4746
|
amount?: UintType;
|
|
4572
4747
|
general: ViewDetail[];
|
|
4573
4748
|
tip?: ViewTip;
|
|
4749
|
+
raw_data?: ViewRawData;
|
|
4750
|
+
slide_to_confirm?: boolean;
|
|
4751
|
+
layout?: ViewSignLayout;
|
|
4574
4752
|
};
|
|
4575
4753
|
|
|
4576
4754
|
// ViewVerifyPage
|
|
@@ -4578,25 +4756,217 @@ export type ViewVerifyPage = {
|
|
|
4578
4756
|
title: string;
|
|
4579
4757
|
address: string;
|
|
4580
4758
|
path: string;
|
|
4759
|
+
network?: string;
|
|
4760
|
+
derive_type?: string;
|
|
4761
|
+
value_key?: number;
|
|
4581
4762
|
};
|
|
4582
4763
|
|
|
4583
|
-
//
|
|
4584
|
-
export type
|
|
4585
|
-
|
|
4586
|
-
// ProtoVersion
|
|
4587
|
-
export type ProtoVersion = {
|
|
4588
|
-
proto_version: number;
|
|
4764
|
+
// ProtocolInfoRequest
|
|
4765
|
+
export type ProtocolInfoRequest = {
|
|
4766
|
+
eventless_wallet_session?: boolean;
|
|
4589
4767
|
};
|
|
4590
4768
|
|
|
4591
|
-
|
|
4769
|
+
// ProtocolInfo
|
|
4770
|
+
export type ProtocolInfo = {
|
|
4771
|
+
version: number;
|
|
4772
|
+
supported_messages: number[];
|
|
4773
|
+
protobuf_definition?: string;
|
|
4774
|
+
};
|
|
4775
|
+
|
|
4776
|
+
export enum DeviceErrorCode {
|
|
4777
|
+
DeviceError_None = 0,
|
|
4778
|
+
DeviceError_Busy = 1,
|
|
4779
|
+
DeviceError_NotInitialized = 2,
|
|
4780
|
+
DeviceError_ActionCancelled = 3,
|
|
4781
|
+
DeviceError_PinAlreadyUsed = 4,
|
|
4782
|
+
DeviceError_PersistFailed = 5,
|
|
4783
|
+
DeviceError_SeError = 6,
|
|
4784
|
+
DeviceError_InvalidLanguage = 7,
|
|
4785
|
+
DeviceError_WallpaperNotUsable = 8,
|
|
4786
|
+
DeviceError_DeviceLocked = 9,
|
|
4787
|
+
}
|
|
4788
|
+
|
|
4789
|
+
export enum DeviceRebootType {
|
|
4592
4790
|
Normal = 0,
|
|
4593
|
-
|
|
4791
|
+
Romloader = 1,
|
|
4594
4792
|
Bootloader = 2,
|
|
4595
4793
|
}
|
|
4596
4794
|
|
|
4597
|
-
//
|
|
4598
|
-
export type
|
|
4599
|
-
reboot_type:
|
|
4795
|
+
// DeviceReboot
|
|
4796
|
+
export type DeviceReboot = {
|
|
4797
|
+
reboot_type: DeviceRebootType;
|
|
4798
|
+
};
|
|
4799
|
+
|
|
4800
|
+
// DeviceSettings
|
|
4801
|
+
export type DeviceSettings = {
|
|
4802
|
+
bt_enable?: boolean;
|
|
4803
|
+
language?: string;
|
|
4804
|
+
wallpaper_path?: string;
|
|
4805
|
+
brightness?: number;
|
|
4806
|
+
animation_enable?: boolean;
|
|
4807
|
+
tap_to_wake?: boolean;
|
|
4808
|
+
haptic_feedback?: boolean;
|
|
4809
|
+
device_name_display_enabled?: boolean;
|
|
4810
|
+
airgap_mode?: boolean;
|
|
4811
|
+
usb_lock_enable?: boolean;
|
|
4812
|
+
random_keypad?: boolean;
|
|
4813
|
+
passphrase_enable?: boolean;
|
|
4814
|
+
fido_enabled?: boolean;
|
|
4815
|
+
autolock_delay_ms?: number;
|
|
4816
|
+
autoshutdown_delay_ms?: number;
|
|
4817
|
+
label?: string;
|
|
4818
|
+
};
|
|
4819
|
+
|
|
4820
|
+
// DeviceSettingsGet
|
|
4821
|
+
export type DeviceSettingsGet = {};
|
|
4822
|
+
|
|
4823
|
+
// DeviceSettingsSet
|
|
4824
|
+
export type DeviceSettingsSet = {
|
|
4825
|
+
settings: DeviceSettings;
|
|
4826
|
+
};
|
|
4827
|
+
|
|
4828
|
+
export enum DeviceSettingsPage {
|
|
4829
|
+
DeviceReset = 0,
|
|
4830
|
+
DevicePinChange = 1,
|
|
4831
|
+
DevicePassphrase = 2,
|
|
4832
|
+
DeviceAirgap = 3,
|
|
4833
|
+
}
|
|
4834
|
+
|
|
4835
|
+
// DeviceSettingsPageShow
|
|
4836
|
+
export type DeviceSettingsPageShow = {
|
|
4837
|
+
page: DeviceSettingsPage;
|
|
4838
|
+
field_name?: string;
|
|
4839
|
+
};
|
|
4840
|
+
|
|
4841
|
+
// DeviceCertificate
|
|
4842
|
+
export type DeviceCertificate = {
|
|
4843
|
+
cert_and_pubkey: string;
|
|
4844
|
+
private_key?: string;
|
|
4845
|
+
};
|
|
4846
|
+
|
|
4847
|
+
// DeviceCertificateWrite
|
|
4848
|
+
export type DeviceCertificateWrite = {
|
|
4849
|
+
cert: DeviceCertificate;
|
|
4850
|
+
};
|
|
4851
|
+
|
|
4852
|
+
// DeviceCertificateRead
|
|
4853
|
+
export type DeviceCertificateRead = {};
|
|
4854
|
+
|
|
4855
|
+
// DeviceCertificateSignature
|
|
4856
|
+
export type DeviceCertificateSignature = {
|
|
4857
|
+
data: string;
|
|
4858
|
+
};
|
|
4859
|
+
|
|
4860
|
+
// DeviceCertificateSign
|
|
4861
|
+
export type DeviceCertificateSign = {
|
|
4862
|
+
data: string;
|
|
4863
|
+
};
|
|
4864
|
+
|
|
4865
|
+
export enum DeviceFirmwareTargetType {
|
|
4866
|
+
FW_MGMT_TARGET_INVALID = 0,
|
|
4867
|
+
FW_MGMT_TARGET_CRATE = 1,
|
|
4868
|
+
FW_MGMT_TARGET_ROMLOADER = 2,
|
|
4869
|
+
FW_MGMT_TARGET_BOOTLOADER = 3,
|
|
4870
|
+
FW_MGMT_TARGET_APPLICATION_P1 = 4,
|
|
4871
|
+
FW_MGMT_TARGET_APPLICATION_P2 = 5,
|
|
4872
|
+
FW_MGMT_TARGET_COPROCESSOR = 6,
|
|
4873
|
+
FW_MGMT_TARGET_SE01 = 7,
|
|
4874
|
+
FW_MGMT_TARGET_SE02 = 8,
|
|
4875
|
+
FW_MGMT_TARGET_SE03 = 9,
|
|
4876
|
+
FW_MGMT_TARGET_SE04 = 10,
|
|
4877
|
+
}
|
|
4878
|
+
|
|
4879
|
+
export enum DeviceFirmwareUpdateTaskStatus {
|
|
4880
|
+
FW_MGMT_UPDATER_TASK_STATUS_PENDING = 0,
|
|
4881
|
+
FW_MGMT_UPDATER_TASK_STATUS_IN_PROGRESS = 1,
|
|
4882
|
+
FW_MGMT_UPDATER_TASK_STATUS_FINISHED = 2,
|
|
4883
|
+
FW_MGMT_UPDATER_TASK_STATUS_FAILED_FILE_NOT_FOUND = 3,
|
|
4884
|
+
FW_MGMT_UPDATER_TASK_STATUS_FAILED_FILE_READ = 4,
|
|
4885
|
+
FW_MGMT_UPDATER_TASK_STATUS_FAILED_FILE_WRITE = 5,
|
|
4886
|
+
FW_MGMT_UPDATER_TASK_STATUS_FAILED_VERIFY = 6,
|
|
4887
|
+
FW_MGMT_UPDATER_TASK_STATUS_FAILED_INSTALL = 7,
|
|
4888
|
+
FW_MGMT_UPDATER_TASK_STATUS_FAILED_ABORT = 8,
|
|
4889
|
+
FW_MGMT_UPDATER_TASK_STATUS_FAILED_BUSY = 9,
|
|
4890
|
+
FW_MGMT_UPDATER_TASK_STATUS_FAILED_ENTRY_OUT_OF_BOUNDS = 10,
|
|
4891
|
+
}
|
|
4892
|
+
|
|
4893
|
+
// DeviceFirmwareTarget
|
|
4894
|
+
export type DeviceFirmwareTarget = {
|
|
4895
|
+
target_id: DeviceFirmwareTargetType;
|
|
4896
|
+
path: string;
|
|
4897
|
+
};
|
|
4898
|
+
|
|
4899
|
+
// DeviceFirmwareUpdateRequest
|
|
4900
|
+
export type DeviceFirmwareUpdateRequest = {
|
|
4901
|
+
targets: DeviceFirmwareTarget[];
|
|
4902
|
+
};
|
|
4903
|
+
|
|
4904
|
+
// DeviceFirmwareUpdateRecord
|
|
4905
|
+
export type DeviceFirmwareUpdateRecord = {
|
|
4906
|
+
target_id: DeviceFirmwareTargetType;
|
|
4907
|
+
status?: DeviceFirmwareUpdateTaskStatus;
|
|
4908
|
+
payload_version?: number;
|
|
4909
|
+
path?: string;
|
|
4910
|
+
};
|
|
4911
|
+
|
|
4912
|
+
// DeviceFirmwareUpdateRecordFields
|
|
4913
|
+
export type DeviceFirmwareUpdateRecordFields = {
|
|
4914
|
+
status?: boolean;
|
|
4915
|
+
payload_version?: boolean;
|
|
4916
|
+
path?: boolean;
|
|
4917
|
+
};
|
|
4918
|
+
|
|
4919
|
+
// DeviceFirmwareUpdateStatusGet
|
|
4920
|
+
export type DeviceFirmwareUpdateStatusGet = {
|
|
4921
|
+
fields?: DeviceFirmwareUpdateRecordFields;
|
|
4922
|
+
};
|
|
4923
|
+
|
|
4924
|
+
// DeviceFirmwareUpdateStatus
|
|
4925
|
+
export type DeviceFirmwareUpdateStatus = {
|
|
4926
|
+
records: DeviceFirmwareUpdateRecord[];
|
|
4927
|
+
};
|
|
4928
|
+
|
|
4929
|
+
export enum DeviceFactoryAck {
|
|
4930
|
+
FACTORY_ACK_SUCCESS = 0,
|
|
4931
|
+
FACTORY_ACK_FAIL = 1,
|
|
4932
|
+
}
|
|
4933
|
+
|
|
4934
|
+
// DeviceFactoryInfoManufactureTime
|
|
4935
|
+
export type DeviceFactoryInfoManufactureTime = {
|
|
4936
|
+
year: number;
|
|
4937
|
+
month: number;
|
|
4938
|
+
day: number;
|
|
4939
|
+
hour: number;
|
|
4940
|
+
minute: number;
|
|
4941
|
+
second: number;
|
|
4942
|
+
};
|
|
4943
|
+
|
|
4944
|
+
// DeviceFactoryInfo
|
|
4945
|
+
export type DeviceFactoryInfo = {
|
|
4946
|
+
version?: number;
|
|
4947
|
+
serial_number?: string;
|
|
4948
|
+
burn_in_completed?: boolean;
|
|
4949
|
+
factory_test_completed?: boolean;
|
|
4950
|
+
manufacture_time?: DeviceFactoryInfoManufactureTime;
|
|
4951
|
+
};
|
|
4952
|
+
|
|
4953
|
+
// DeviceFactoryInfoSet
|
|
4954
|
+
export type DeviceFactoryInfoSet = {
|
|
4955
|
+
info: DeviceFactoryInfo;
|
|
4956
|
+
};
|
|
4957
|
+
|
|
4958
|
+
// DeviceFactoryInfoGet
|
|
4959
|
+
export type DeviceFactoryInfoGet = {};
|
|
4960
|
+
|
|
4961
|
+
// DeviceFactoryPermanentLock
|
|
4962
|
+
export type DeviceFactoryPermanentLock = {
|
|
4963
|
+
check_a: string;
|
|
4964
|
+
check_b: string;
|
|
4965
|
+
};
|
|
4966
|
+
|
|
4967
|
+
// DeviceFactoryTest
|
|
4968
|
+
export type DeviceFactoryTest = {
|
|
4969
|
+
burn_in_test: boolean;
|
|
4600
4970
|
};
|
|
4601
4971
|
|
|
4602
4972
|
export enum DeviceType {
|
|
@@ -4606,63 +4976,65 @@ export enum DeviceType {
|
|
|
4606
4976
|
TOUCH = 3,
|
|
4607
4977
|
PRO = 5,
|
|
4608
4978
|
CLASSIC1S_PURE = 6,
|
|
4979
|
+
PRO2 = 7,
|
|
4980
|
+
NEO = 8,
|
|
4609
4981
|
}
|
|
4610
4982
|
|
|
4611
|
-
export enum
|
|
4983
|
+
export enum DeviceSeType {
|
|
4612
4984
|
THD89 = 0,
|
|
4613
4985
|
SE608A = 1,
|
|
4614
4986
|
}
|
|
4615
4987
|
|
|
4616
|
-
export enum
|
|
4988
|
+
export enum DeviceSEState {
|
|
4617
4989
|
BOOT = 0,
|
|
4618
4990
|
APP_FACTORY = 51,
|
|
4619
4991
|
APP = 85,
|
|
4620
4992
|
}
|
|
4621
4993
|
|
|
4622
|
-
//
|
|
4623
|
-
export type
|
|
4994
|
+
// DeviceFirmwareImageInfo
|
|
4995
|
+
export type DeviceFirmwareImageInfo = {
|
|
4624
4996
|
version?: string;
|
|
4625
4997
|
build_id?: string;
|
|
4626
4998
|
hash?: string;
|
|
4627
4999
|
};
|
|
4628
5000
|
|
|
4629
|
-
//
|
|
4630
|
-
export type
|
|
4631
|
-
|
|
5001
|
+
// DeviceHardwareInfo
|
|
5002
|
+
export type DeviceHardwareInfo = {
|
|
5003
|
+
Device_type?: DeviceType;
|
|
4632
5004
|
serial_no?: string;
|
|
4633
|
-
device_id?: string;
|
|
4634
5005
|
hardware_version?: string;
|
|
4635
5006
|
hardware_version_raw_adc?: number;
|
|
4636
5007
|
};
|
|
4637
5008
|
|
|
4638
|
-
//
|
|
4639
|
-
export type
|
|
4640
|
-
|
|
4641
|
-
|
|
4642
|
-
|
|
5009
|
+
// DeviceMainMcuInfo
|
|
5010
|
+
export type DeviceMainMcuInfo = {
|
|
5011
|
+
romloader?: DeviceFirmwareImageInfo;
|
|
5012
|
+
bootloader?: DeviceFirmwareImageInfo;
|
|
5013
|
+
application?: DeviceFirmwareImageInfo;
|
|
5014
|
+
application_data?: DeviceFirmwareImageInfo;
|
|
4643
5015
|
};
|
|
4644
5016
|
|
|
4645
|
-
//
|
|
4646
|
-
export type
|
|
4647
|
-
|
|
4648
|
-
|
|
4649
|
-
|
|
4650
|
-
|
|
5017
|
+
// DeviceCoprocessorInfo
|
|
5018
|
+
export type DeviceCoprocessorInfo = {
|
|
5019
|
+
bootloader?: DeviceFirmwareImageInfo;
|
|
5020
|
+
application?: DeviceFirmwareImageInfo;
|
|
5021
|
+
bt_adv_name?: string;
|
|
5022
|
+
bt_mac?: string;
|
|
4651
5023
|
};
|
|
4652
5024
|
|
|
4653
|
-
//
|
|
4654
|
-
export type
|
|
4655
|
-
|
|
4656
|
-
|
|
4657
|
-
type?:
|
|
4658
|
-
state?:
|
|
5025
|
+
// DeviceSEInfo
|
|
5026
|
+
export type DeviceSEInfo = {
|
|
5027
|
+
bootloader?: DeviceFirmwareImageInfo;
|
|
5028
|
+
application?: DeviceFirmwareImageInfo;
|
|
5029
|
+
type?: DeviceSeType;
|
|
5030
|
+
state?: DeviceSEState;
|
|
4659
5031
|
};
|
|
4660
5032
|
|
|
4661
|
-
//
|
|
4662
|
-
export type
|
|
5033
|
+
// DeviceInfoTargets
|
|
5034
|
+
export type DeviceInfoTargets = {
|
|
4663
5035
|
hw?: boolean;
|
|
4664
5036
|
fw?: boolean;
|
|
4665
|
-
|
|
5037
|
+
coprocessor?: boolean;
|
|
4666
5038
|
se1?: boolean;
|
|
4667
5039
|
se2?: boolean;
|
|
4668
5040
|
se3?: boolean;
|
|
@@ -4670,108 +5042,146 @@ export type DevInfoTargets = {
|
|
|
4670
5042
|
status?: boolean;
|
|
4671
5043
|
};
|
|
4672
5044
|
|
|
4673
|
-
//
|
|
4674
|
-
export type
|
|
5045
|
+
// DeviceInfoTypes
|
|
5046
|
+
export type DeviceInfoTypes = {
|
|
4675
5047
|
version?: boolean;
|
|
4676
5048
|
build_id?: boolean;
|
|
4677
5049
|
hash?: boolean;
|
|
4678
5050
|
specific?: boolean;
|
|
4679
5051
|
};
|
|
4680
5052
|
|
|
4681
|
-
//
|
|
4682
|
-
export type
|
|
4683
|
-
|
|
4684
|
-
|
|
4685
|
-
init_states?: boolean;
|
|
4686
|
-
backup_required?: boolean;
|
|
4687
|
-
passphrase_protection?: boolean;
|
|
4688
|
-
label?: string;
|
|
4689
|
-
};
|
|
4690
|
-
|
|
4691
|
-
// DevGetDeviceInfo
|
|
4692
|
-
export type DevGetDeviceInfo = {
|
|
4693
|
-
targets?: DevInfoTargets;
|
|
4694
|
-
types?: DevInfoTypes;
|
|
5053
|
+
// DeviceInfoGet
|
|
5054
|
+
export type DeviceInfoGet = {
|
|
5055
|
+
targets?: DeviceInfoTargets;
|
|
5056
|
+
types?: DeviceInfoTypes;
|
|
4695
5057
|
};
|
|
4696
5058
|
|
|
4697
5059
|
// ProtocolV2DeviceInfo
|
|
4698
5060
|
export type ProtocolV2DeviceInfo = {
|
|
4699
5061
|
protocol_version: number;
|
|
4700
|
-
hw?:
|
|
4701
|
-
fw?:
|
|
4702
|
-
|
|
4703
|
-
se1?:
|
|
4704
|
-
se2?:
|
|
4705
|
-
se3?:
|
|
4706
|
-
se4?:
|
|
4707
|
-
status?:
|
|
4708
|
-
};
|
|
4709
|
-
|
|
4710
|
-
export enum
|
|
4711
|
-
|
|
4712
|
-
|
|
4713
|
-
|
|
4714
|
-
|
|
4715
|
-
|
|
4716
|
-
|
|
4717
|
-
TARGET_SE4 = 6,
|
|
4718
|
-
TARGET_RESOURCE = 10,
|
|
5062
|
+
hw?: DeviceHardwareInfo;
|
|
5063
|
+
fw?: DeviceMainMcuInfo;
|
|
5064
|
+
coprocessor?: DeviceCoprocessorInfo;
|
|
5065
|
+
se1?: DeviceSEInfo;
|
|
5066
|
+
se2?: DeviceSEInfo;
|
|
5067
|
+
se3?: DeviceSEInfo;
|
|
5068
|
+
se4?: DeviceSEInfo;
|
|
5069
|
+
status?: DeviceStatus;
|
|
5070
|
+
};
|
|
5071
|
+
|
|
5072
|
+
export enum DeviceSessionErrorCode {
|
|
5073
|
+
DeviceSessionError_None = 0,
|
|
5074
|
+
DeviceSessionError_UserCancelled = 1,
|
|
5075
|
+
DeviceSessionError_InvalidSession = 2,
|
|
5076
|
+
DeviceSessionError_AttachPinUnavailable = 3,
|
|
5077
|
+
DeviceSessionError_PassphraseDisabled = 4,
|
|
5078
|
+
DeviceSessionError_Busy = 5,
|
|
4719
5079
|
}
|
|
4720
5080
|
|
|
4721
|
-
//
|
|
4722
|
-
export type
|
|
4723
|
-
|
|
4724
|
-
path: string;
|
|
5081
|
+
// DeviceSessionGet
|
|
5082
|
+
export type DeviceSessionGet = {
|
|
5083
|
+
session_id?: string;
|
|
4725
5084
|
};
|
|
4726
5085
|
|
|
4727
|
-
//
|
|
4728
|
-
export type
|
|
4729
|
-
|
|
5086
|
+
// DeviceSession
|
|
5087
|
+
export type DeviceSession = {
|
|
5088
|
+
session_id?: string;
|
|
5089
|
+
btc_test_address?: string;
|
|
4730
5090
|
};
|
|
4731
5091
|
|
|
4732
|
-
|
|
4733
|
-
|
|
4734
|
-
|
|
4735
|
-
|
|
4736
|
-
|
|
5092
|
+
export enum DeviceSessionPinType {
|
|
5093
|
+
Any = 1,
|
|
5094
|
+
Main = 2,
|
|
5095
|
+
AttachToPin = 3,
|
|
5096
|
+
}
|
|
5097
|
+
|
|
5098
|
+
// DeviceSessionAskPin
|
|
5099
|
+
export type DeviceSessionAskPin = {
|
|
5100
|
+
type?: DeviceSessionPinType;
|
|
4737
5101
|
};
|
|
4738
5102
|
|
|
4739
|
-
//
|
|
4740
|
-
export type
|
|
4741
|
-
|
|
4742
|
-
status: number;
|
|
5103
|
+
// DeviceSessionAskPassphrase
|
|
5104
|
+
export type DeviceSessionAskPassphrase = {
|
|
5105
|
+
passphrase?: string;
|
|
4743
5106
|
};
|
|
4744
5107
|
|
|
4745
|
-
|
|
4746
|
-
|
|
5108
|
+
export enum DeviceSessionAskPin_FailureSubCodes {
|
|
5109
|
+
UserCancel = 1,
|
|
5110
|
+
}
|
|
4747
5111
|
|
|
4748
|
-
//
|
|
4749
|
-
export type
|
|
4750
|
-
|
|
5112
|
+
// DeviceStatus
|
|
5113
|
+
export type DeviceStatus = {
|
|
5114
|
+
device_id?: string;
|
|
5115
|
+
unlocked?: boolean;
|
|
5116
|
+
init_states?: boolean;
|
|
5117
|
+
backup_required?: boolean;
|
|
5118
|
+
passphrase_enabled?: boolean;
|
|
5119
|
+
attach_to_pin_enabled?: boolean;
|
|
5120
|
+
unlocked_by_attach_to_pin?: boolean;
|
|
4751
5121
|
};
|
|
4752
5122
|
|
|
4753
|
-
//
|
|
4754
|
-
export type
|
|
4755
|
-
|
|
4756
|
-
|
|
4757
|
-
|
|
5123
|
+
// DeviceStatusGet
|
|
5124
|
+
export type DeviceStatusGet = {};
|
|
5125
|
+
|
|
5126
|
+
export enum DevOnboardingStep {
|
|
5127
|
+
DEV_ONBOARDING_STEP_UNKNOWN = 0,
|
|
5128
|
+
DEV_ONBOARDING_STEP_CHECKING = 1,
|
|
5129
|
+
DEV_ONBOARDING_STEP_PERSONALIZATION = 2,
|
|
5130
|
+
DEV_ONBOARDING_STEP_PIN = 3,
|
|
5131
|
+
DEV_ONBOARDING_STEP_SETUP = 4,
|
|
5132
|
+
DEV_ONBOARDING_STEP_DONE = 5,
|
|
5133
|
+
}
|
|
5134
|
+
|
|
5135
|
+
export enum DevOnboardingPhase {
|
|
5136
|
+
DEV_ONBOARDING_PHASE_UNKNOWN = 0,
|
|
5137
|
+
DEV_ONBOARDING_PHASE_SAFETY_CHECK = 1,
|
|
5138
|
+
DEV_ONBOARDING_PHASE_PIN_SETUP = 2,
|
|
5139
|
+
DEV_ONBOARDING_PHASE_FINGERPRINT_SETUP = 3,
|
|
5140
|
+
DEV_ONBOARDING_PHASE_SETUP_CHOICE = 4,
|
|
5141
|
+
DEV_ONBOARDING_PHASE_WALLET_CREATE_START = 5,
|
|
5142
|
+
DEV_ONBOARDING_PHASE_RECOVERY_PHRASE_VIEW = 6,
|
|
5143
|
+
DEV_ONBOARDING_PHASE_RECOVERY_PHRASE_CONFIRM = 7,
|
|
5144
|
+
DEV_ONBOARDING_PHASE_RESTORE_METHOD_CHOICE = 8,
|
|
5145
|
+
DEV_ONBOARDING_PHASE_RECOVERY_PHRASE_RESTORE = 9,
|
|
5146
|
+
DEV_ONBOARDING_PHASE_SEEDCARD_RESTORE = 10,
|
|
5147
|
+
DEV_ONBOARDING_PHASE_WALLET_READY = 11,
|
|
5148
|
+
DEV_ONBOARDING_PHASE_SEEDCARD_BACKUP_PROMPT = 12,
|
|
5149
|
+
DEV_ONBOARDING_PHASE_SEEDCARD_BACKUP = 13,
|
|
5150
|
+
}
|
|
5151
|
+
|
|
5152
|
+
export enum DevOnboardingSetupKind {
|
|
5153
|
+
DEV_ONBOARDING_SETUP_KIND_UNKNOWN = 0,
|
|
5154
|
+
DEV_ONBOARDING_SETUP_KIND_CHOICE = 1,
|
|
5155
|
+
DEV_ONBOARDING_SETUP_KIND_CREATE = 2,
|
|
5156
|
+
DEV_ONBOARDING_SETUP_KIND_RESTORE = 3,
|
|
5157
|
+
}
|
|
5158
|
+
|
|
5159
|
+
export enum DevOnboardingSetupMethod {
|
|
5160
|
+
DEV_ONBOARDING_SETUP_METHOD_UNKNOWN = 0,
|
|
5161
|
+
DEV_ONBOARDING_SETUP_METHOD_RECOVERY_PHRASE = 1,
|
|
5162
|
+
DEV_ONBOARDING_SETUP_METHOD_SEEDCARD = 2,
|
|
5163
|
+
}
|
|
5164
|
+
|
|
5165
|
+
// DevOnboardingSetupStatus
|
|
5166
|
+
export type DevOnboardingSetupStatus = {
|
|
5167
|
+
kind?: DevOnboardingSetupKind;
|
|
5168
|
+
method?: DevOnboardingSetupMethod;
|
|
4758
5169
|
};
|
|
4759
5170
|
|
|
4760
|
-
//
|
|
4761
|
-
export type
|
|
5171
|
+
// DevGetOnboardingStatus
|
|
5172
|
+
export type DevGetOnboardingStatus = {};
|
|
4762
5173
|
|
|
4763
|
-
//
|
|
4764
|
-
export type
|
|
4765
|
-
|
|
4766
|
-
|
|
4767
|
-
|
|
4768
|
-
|
|
4769
|
-
|
|
4770
|
-
pre_firmware?: string;
|
|
5174
|
+
// DevOnboardingStatus
|
|
5175
|
+
export type DevOnboardingStatus = {
|
|
5176
|
+
step?: DevOnboardingStep;
|
|
5177
|
+
phase?: DevOnboardingPhase;
|
|
5178
|
+
setup?: DevOnboardingSetupStatus;
|
|
5179
|
+
pin_set?: boolean;
|
|
5180
|
+
wallet_initialized?: boolean;
|
|
4771
5181
|
};
|
|
4772
5182
|
|
|
4773
|
-
//
|
|
4774
|
-
export type
|
|
5183
|
+
// FilesystemPermissionFix
|
|
5184
|
+
export type FilesystemPermissionFix = {};
|
|
4775
5185
|
|
|
4776
5186
|
// FilesystemPathInfo
|
|
4777
5187
|
export type FilesystemPathInfo = {
|
|
@@ -4849,40 +5259,44 @@ export type FilesystemDirRemove = {
|
|
|
4849
5259
|
};
|
|
4850
5260
|
|
|
4851
5261
|
// FilesystemFormat
|
|
4852
|
-
export type FilesystemFormat = {
|
|
4853
|
-
|
|
4854
|
-
|
|
4855
|
-
ONBOARDING_STEP_UNKNOWN = 0,
|
|
4856
|
-
ONBOARDING_STEP_DEVICE_VERIFICATION = 1,
|
|
4857
|
-
ONBOARDING_STEP_PERSONALIZATION = 2,
|
|
4858
|
-
ONBOARDING_STEP_SETUP = 3,
|
|
4859
|
-
ONBOARDING_STEP_FIRMWARE = 4,
|
|
4860
|
-
}
|
|
4861
|
-
|
|
4862
|
-
// GetOnboardingStatus
|
|
4863
|
-
export type GetOnboardingStatus = {};
|
|
4864
|
-
|
|
4865
|
-
export type NewDevice = {
|
|
4866
|
-
seedcard_backup?: boolean;
|
|
5262
|
+
export type FilesystemFormat = {
|
|
5263
|
+
data: boolean;
|
|
5264
|
+
user: boolean;
|
|
4867
5265
|
};
|
|
4868
5266
|
|
|
4869
|
-
|
|
4870
|
-
|
|
4871
|
-
seedcard?: boolean;
|
|
4872
|
-
};
|
|
5267
|
+
// PortfolioUpdate
|
|
5268
|
+
export type PortfolioUpdate = {};
|
|
4873
5269
|
|
|
4874
|
-
export
|
|
4875
|
-
|
|
4876
|
-
|
|
4877
|
-
|
|
5270
|
+
export enum ProtocolV2FailureType {
|
|
5271
|
+
Failure_InvalidMessage = 1,
|
|
5272
|
+
Failure_UndefinedError = 2,
|
|
5273
|
+
Failure_UsageError = 3,
|
|
5274
|
+
Failure_DataError = 4,
|
|
5275
|
+
Failure_ProcessError = 5,
|
|
5276
|
+
}
|
|
4878
5277
|
|
|
4879
|
-
|
|
4880
|
-
|
|
4881
|
-
|
|
4882
|
-
|
|
4883
|
-
|
|
4884
|
-
|
|
4885
|
-
|
|
5278
|
+
export enum Enum_ProtocolV2Capability {
|
|
5279
|
+
Capability_Bitcoin = 1,
|
|
5280
|
+
Capability_Bitcoin_like = 2,
|
|
5281
|
+
Capability_Binance = 3,
|
|
5282
|
+
Capability_Cardano = 4,
|
|
5283
|
+
Capability_Crypto = 5,
|
|
5284
|
+
Capability_EOS = 6,
|
|
5285
|
+
Capability_Ethereum = 7,
|
|
5286
|
+
Capability_Lisk = 8,
|
|
5287
|
+
Capability_Monero = 9,
|
|
5288
|
+
Capability_NEM = 10,
|
|
5289
|
+
Capability_Ripple = 11,
|
|
5290
|
+
Capability_Stellar = 12,
|
|
5291
|
+
Capability_Tezos = 13,
|
|
5292
|
+
Capability_U2F = 14,
|
|
5293
|
+
Capability_Shamir = 15,
|
|
5294
|
+
Capability_ShamirGroups = 16,
|
|
5295
|
+
Capability_PassphraseEntry = 17,
|
|
5296
|
+
Capability_AttachToPin = 18,
|
|
5297
|
+
Capability_EthereumTypedData = 1000,
|
|
5298
|
+
}
|
|
5299
|
+
export type ProtocolV2Capability = keyof typeof Enum_ProtocolV2Capability;
|
|
4886
5300
|
|
|
4887
5301
|
// custom connect definitions
|
|
4888
5302
|
export type MessageType = {
|
|
@@ -5159,6 +5573,15 @@ export type MessageType = {
|
|
|
5159
5573
|
KaspaSignTx: KaspaSignTx;
|
|
5160
5574
|
KaspaTxInputRequest: KaspaTxInputRequest;
|
|
5161
5575
|
KaspaTxInputAck: KaspaTxInputAck;
|
|
5576
|
+
KaspaOutpoint: KaspaOutpoint;
|
|
5577
|
+
KaspaTxRequestSignature: KaspaTxRequestSignature;
|
|
5578
|
+
KaspaTxRequest: KaspaTxRequest;
|
|
5579
|
+
KaspaTxAckInput: KaspaTxAckInput;
|
|
5580
|
+
KaspaTxAckOutput: KaspaTxAckOutput;
|
|
5581
|
+
KaspaTxAckPayloadChunk: KaspaTxAckPayloadChunk;
|
|
5582
|
+
KaspaTxAckPrevMeta: KaspaTxAckPrevMeta;
|
|
5583
|
+
KaspaTxAckPrevInput: KaspaTxAckPrevInput;
|
|
5584
|
+
KaspaTxAckPrevOutput: KaspaTxAckPrevOutput;
|
|
5162
5585
|
KaspaSignedTx: KaspaSignedTx;
|
|
5163
5586
|
LnurlAuth: LnurlAuth;
|
|
5164
5587
|
LnurlAuthResp: LnurlAuthResp;
|
|
@@ -5448,8 +5871,9 @@ export type MessageType = {
|
|
|
5448
5871
|
CoinPurchaseMemo: CoinPurchaseMemo;
|
|
5449
5872
|
PaymentRequestMemo: PaymentRequestMemo;
|
|
5450
5873
|
TxAckPaymentRequest: TxAckPaymentRequest;
|
|
5451
|
-
|
|
5874
|
+
EthereumSignTypedDataQR: EthereumSignTypedDataQR;
|
|
5452
5875
|
InternalMyAddressRequest: InternalMyAddressRequest;
|
|
5876
|
+
StartSession: StartSession;
|
|
5453
5877
|
SetBusy: SetBusy;
|
|
5454
5878
|
GetFirmwareHash: GetFirmwareHash;
|
|
5455
5879
|
FirmwareHash: FirmwareHash;
|
|
@@ -5461,33 +5885,55 @@ export type MessageType = {
|
|
|
5461
5885
|
Wallpaper: Wallpaper;
|
|
5462
5886
|
UnlockPath: UnlockPath;
|
|
5463
5887
|
UnlockedPathRequest: UnlockedPathRequest;
|
|
5888
|
+
UiAnimationRequest: UiAnimationRequest;
|
|
5464
5889
|
ViewAmount: ViewAmount;
|
|
5465
5890
|
ViewDetail: ViewDetail;
|
|
5466
5891
|
ViewTip: ViewTip;
|
|
5892
|
+
ViewRawData: ViewRawData;
|
|
5467
5893
|
ViewSignPage: ViewSignPage;
|
|
5468
5894
|
ViewVerifyPage: ViewVerifyPage;
|
|
5469
|
-
|
|
5470
|
-
|
|
5471
|
-
|
|
5472
|
-
|
|
5473
|
-
|
|
5474
|
-
|
|
5475
|
-
|
|
5476
|
-
|
|
5477
|
-
|
|
5478
|
-
|
|
5479
|
-
|
|
5480
|
-
|
|
5481
|
-
|
|
5482
|
-
|
|
5483
|
-
|
|
5484
|
-
|
|
5485
|
-
|
|
5486
|
-
|
|
5487
|
-
|
|
5488
|
-
|
|
5489
|
-
|
|
5490
|
-
|
|
5895
|
+
ProtocolInfoRequest: ProtocolInfoRequest;
|
|
5896
|
+
ProtocolInfo: ProtocolInfo;
|
|
5897
|
+
DeviceReboot: DeviceReboot;
|
|
5898
|
+
DeviceSettings: DeviceSettings;
|
|
5899
|
+
DeviceSettingsGet: DeviceSettingsGet;
|
|
5900
|
+
DeviceSettingsSet: DeviceSettingsSet;
|
|
5901
|
+
DeviceSettingsPageShow: DeviceSettingsPageShow;
|
|
5902
|
+
DeviceCertificate: DeviceCertificate;
|
|
5903
|
+
DeviceCertificateWrite: DeviceCertificateWrite;
|
|
5904
|
+
DeviceCertificateRead: DeviceCertificateRead;
|
|
5905
|
+
DeviceCertificateSignature: DeviceCertificateSignature;
|
|
5906
|
+
DeviceCertificateSign: DeviceCertificateSign;
|
|
5907
|
+
DeviceFirmwareTarget: DeviceFirmwareTarget;
|
|
5908
|
+
DeviceFirmwareUpdateRequest: DeviceFirmwareUpdateRequest;
|
|
5909
|
+
DeviceFirmwareUpdateRecord: DeviceFirmwareUpdateRecord;
|
|
5910
|
+
DeviceFirmwareUpdateRecordFields: DeviceFirmwareUpdateRecordFields;
|
|
5911
|
+
DeviceFirmwareUpdateStatusGet: DeviceFirmwareUpdateStatusGet;
|
|
5912
|
+
DeviceFirmwareUpdateStatus: DeviceFirmwareUpdateStatus;
|
|
5913
|
+
DeviceFactoryInfoManufactureTime: DeviceFactoryInfoManufactureTime;
|
|
5914
|
+
DeviceFactoryInfo: DeviceFactoryInfo;
|
|
5915
|
+
DeviceFactoryInfoSet: DeviceFactoryInfoSet;
|
|
5916
|
+
DeviceFactoryInfoGet: DeviceFactoryInfoGet;
|
|
5917
|
+
DeviceFactoryPermanentLock: DeviceFactoryPermanentLock;
|
|
5918
|
+
DeviceFactoryTest: DeviceFactoryTest;
|
|
5919
|
+
DeviceFirmwareImageInfo: DeviceFirmwareImageInfo;
|
|
5920
|
+
DeviceHardwareInfo: DeviceHardwareInfo;
|
|
5921
|
+
DeviceMainMcuInfo: DeviceMainMcuInfo;
|
|
5922
|
+
DeviceCoprocessorInfo: DeviceCoprocessorInfo;
|
|
5923
|
+
DeviceSEInfo: DeviceSEInfo;
|
|
5924
|
+
DeviceInfoTargets: DeviceInfoTargets;
|
|
5925
|
+
DeviceInfoTypes: DeviceInfoTypes;
|
|
5926
|
+
DeviceInfoGet: DeviceInfoGet;
|
|
5927
|
+
DeviceSessionGet: DeviceSessionGet;
|
|
5928
|
+
DeviceSession: DeviceSession;
|
|
5929
|
+
DeviceSessionAskPin: DeviceSessionAskPin;
|
|
5930
|
+
DeviceSessionAskPassphrase: DeviceSessionAskPassphrase;
|
|
5931
|
+
DeviceStatus: DeviceStatus;
|
|
5932
|
+
DeviceStatusGet: DeviceStatusGet;
|
|
5933
|
+
DevOnboardingSetupStatus: DevOnboardingSetupStatus;
|
|
5934
|
+
DevGetOnboardingStatus: DevGetOnboardingStatus;
|
|
5935
|
+
DevOnboardingStatus: DevOnboardingStatus;
|
|
5936
|
+
FilesystemPermissionFix: FilesystemPermissionFix;
|
|
5491
5937
|
FilesystemPathInfo: FilesystemPathInfo;
|
|
5492
5938
|
FilesystemPathInfoQuery: FilesystemPathInfoQuery;
|
|
5493
5939
|
FilesystemFile: FilesystemFile;
|
|
@@ -5499,11 +5945,7 @@ export type MessageType = {
|
|
|
5499
5945
|
FilesystemDirMake: FilesystemDirMake;
|
|
5500
5946
|
FilesystemDirRemove: FilesystemDirRemove;
|
|
5501
5947
|
FilesystemFormat: FilesystemFormat;
|
|
5502
|
-
|
|
5503
|
-
NewDevice: NewDevice;
|
|
5504
|
-
Restore: Restore;
|
|
5505
|
-
Setup: Setup;
|
|
5506
|
-
OnboardingStatus: OnboardingStatus;
|
|
5948
|
+
PortfolioUpdate: PortfolioUpdate;
|
|
5507
5949
|
};
|
|
5508
5950
|
|
|
5509
5951
|
export type MessageKey = keyof MessageType;
|