@onekeyfe/hd-transport 1.2.0-alpha.1 → 1.2.0-alpha.10

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.
Files changed (44) hide show
  1. package/README.md +1 -1
  2. package/__tests__/messages.test.js +76 -0
  3. package/__tests__/protocol-v2-link-manager.test.js +326 -0
  4. package/__tests__/protocol-v2-usb-transport-base.test.js +296 -0
  5. package/__tests__/protocol-v2.test.js +249 -81
  6. package/dist/constants.d.ts +4 -2
  7. package/dist/constants.d.ts.map +1 -1
  8. package/dist/index.d.ts +501 -234
  9. package/dist/index.d.ts.map +1 -1
  10. package/dist/index.js +420 -72
  11. package/dist/protocols/index.d.ts +2 -0
  12. package/dist/protocols/index.d.ts.map +1 -1
  13. package/dist/protocols/v2/constants.d.ts +1 -0
  14. package/dist/protocols/v2/constants.d.ts.map +1 -1
  15. package/dist/protocols/v2/decode.d.ts +1 -0
  16. package/dist/protocols/v2/decode.d.ts.map +1 -1
  17. package/dist/protocols/v2/link-manager.d.ts +35 -0
  18. package/dist/protocols/v2/link-manager.d.ts.map +1 -0
  19. package/dist/protocols/v2/sequence-cursor.d.ts +5 -0
  20. package/dist/protocols/v2/sequence-cursor.d.ts.map +1 -0
  21. package/dist/protocols/v2/session.d.ts +16 -4
  22. package/dist/protocols/v2/session.d.ts.map +1 -1
  23. package/dist/protocols/v2/usb-transport-base.d.ts +31 -0
  24. package/dist/protocols/v2/usb-transport-base.d.ts.map +1 -0
  25. package/dist/serialization/protobuf/messages.d.ts.map +1 -1
  26. package/dist/types/messages.d.ts +291 -155
  27. package/dist/types/messages.d.ts.map +1 -1
  28. package/dist/types/transport.d.ts +1 -1
  29. package/dist/types/transport.d.ts.map +1 -1
  30. package/messages-protocol-v2.json +599 -1033
  31. package/package.json +2 -2
  32. package/scripts/protobuf-build.sh +60 -142
  33. package/src/constants.ts +8 -2
  34. package/src/index.ts +8 -0
  35. package/src/protocols/index.ts +4 -1
  36. package/src/protocols/v2/constants.ts +1 -0
  37. package/src/protocols/v2/decode.ts +36 -17
  38. package/src/protocols/v2/link-manager.ts +160 -0
  39. package/src/protocols/v2/sequence-cursor.ts +10 -0
  40. package/src/protocols/v2/session.ts +80 -45
  41. package/src/protocols/v2/usb-transport-base.ts +194 -0
  42. package/src/serialization/protobuf/messages.ts +6 -1
  43. package/src/types/messages.ts +359 -185
  44. package/src/types/transport.ts +1 -1
@@ -882,11 +882,15 @@ export declare enum FailureType {
882
882
  Failure_PinMismatch = 12,
883
883
  Failure_WipeCodeMismatch = 13,
884
884
  Failure_InvalidSession = 14,
885
- Failure_FirmwareError = 99
885
+ Failure_FirmwareError = 99,
886
+ Failure_InvalidMessage = 1,
887
+ Failure_UndefinedError = 2,
888
+ Failure_UsageError = 3
886
889
  }
887
890
  export type Failure = {
888
891
  code?: FailureType;
889
892
  message?: string;
893
+ subcode?: number;
890
894
  };
891
895
  export declare enum Enum_ButtonRequestType {
892
896
  ButtonRequest_Other = 1,
@@ -1869,6 +1873,28 @@ export type OnekeyFeatures = {
1869
1873
  onekey_se02_boot_build_id?: string;
1870
1874
  onekey_se03_boot_build_id?: string;
1871
1875
  onekey_se04_boot_build_id?: string;
1876
+ onekey_romloader_version?: string;
1877
+ onekey_bootloader_version?: string;
1878
+ onekey_romloader_hash?: string;
1879
+ onekey_bootloader_hash?: string;
1880
+ onekey_romloader_build_id?: string;
1881
+ onekey_bootloader_build_id?: string;
1882
+ onekey_coprocessor_bt_name?: string;
1883
+ onekey_coprocessor_version?: string;
1884
+ onekey_coprocessor_build_id?: string;
1885
+ onekey_coprocessor_hash?: string;
1886
+ onekey_se01_bootloader_version?: string;
1887
+ onekey_se02_bootloader_version?: string;
1888
+ onekey_se03_bootloader_version?: string;
1889
+ onekey_se04_bootloader_version?: string;
1890
+ onekey_se01_bootloader_hash?: string;
1891
+ onekey_se02_bootloader_hash?: string;
1892
+ onekey_se03_bootloader_hash?: string;
1893
+ onekey_se04_bootloader_hash?: string;
1894
+ onekey_se01_bootloader_build_id?: string;
1895
+ onekey_se02_bootloader_build_id?: string;
1896
+ onekey_se03_bootloader_build_id?: string;
1897
+ onekey_se04_bootloader_build_id?: string;
1872
1898
  };
1873
1899
  export type LockDevice = {};
1874
1900
  export type EndSession = {};
@@ -3325,12 +3351,12 @@ export type TxAckPaymentRequest = {
3325
3351
  amount?: UintType;
3326
3352
  signature: string;
3327
3353
  };
3328
- export type DebugLinkInput = {
3329
- x?: number;
3330
- y?: number;
3331
- duration_ms?: number;
3332
- x_end?: number;
3333
- y_end?: number;
3354
+ export type EthereumSignTypedDataQR = {
3355
+ address_n: number[];
3356
+ json_data?: string;
3357
+ chain_id?: number;
3358
+ metamask_v4_compat?: boolean;
3359
+ request_id?: string;
3334
3360
  };
3335
3361
  export type InternalMyAddressRequest = {
3336
3362
  coin_type: number;
@@ -3338,6 +3364,11 @@ export type InternalMyAddressRequest = {
3338
3364
  account_index: number;
3339
3365
  derive_type: number;
3340
3366
  };
3367
+ export type StartSession = {
3368
+ session_id?: string;
3369
+ _skip_passphrase?: boolean;
3370
+ derive_cardano?: boolean;
3371
+ };
3341
3372
  export type SetBusy = {
3342
3373
  expiry_ms?: number;
3343
3374
  };
@@ -3403,28 +3434,144 @@ export type ViewTip = {
3403
3434
  type: ViewTipType;
3404
3435
  text: string;
3405
3436
  };
3437
+ export type ViewRawData = {
3438
+ initial_data: string;
3439
+ placeholder: number;
3440
+ };
3441
+ export declare enum ViewSignLayout {
3442
+ LayoutDefault = 0,
3443
+ LayoutSafeTxCreate = 1
3444
+ }
3406
3445
  export type ViewSignPage = {
3407
3446
  title: string;
3408
3447
  amount?: UintType;
3409
3448
  general: ViewDetail[];
3410
3449
  tip?: ViewTip;
3450
+ raw_data?: ViewRawData;
3451
+ slide_to_confirm?: boolean;
3452
+ layout?: ViewSignLayout;
3411
3453
  };
3412
3454
  export type ViewVerifyPage = {
3413
3455
  title: string;
3414
3456
  address: string;
3415
3457
  path: string;
3416
3458
  };
3417
- export type GetProtoVersion = {};
3418
- export type ProtoVersion = {
3419
- proto_version: number;
3459
+ export type ProtocolInfoRequest = {};
3460
+ export type ProtocolInfo = {
3461
+ version: number;
3462
+ supported_messages: number[];
3463
+ protobuf_definition?: string;
3420
3464
  };
3421
- export declare enum DevRebootType {
3465
+ export declare enum DeviceRebootType {
3422
3466
  Normal = 0,
3423
- Boardloader = 1,
3467
+ Romloader = 1,
3424
3468
  Bootloader = 2
3425
3469
  }
3426
- export type DevReboot = {
3427
- reboot_type: DevRebootType;
3470
+ export type DeviceReboot = {
3471
+ reboot_type: DeviceRebootType;
3472
+ };
3473
+ export type DeviceSettings = {
3474
+ label?: string;
3475
+ bt_enable?: boolean;
3476
+ language?: string;
3477
+ };
3478
+ export type DeviceSettingsGet = {};
3479
+ export type DeviceSettingsSet = {
3480
+ settings: DeviceSettings;
3481
+ };
3482
+ export type DeviceCertificate = {
3483
+ cert_and_pubkey: string;
3484
+ private_key?: string;
3485
+ };
3486
+ export type DeviceCertificateWrite = {
3487
+ cert: DeviceCertificate;
3488
+ };
3489
+ export type DeviceCertificateRead = {};
3490
+ export type DeviceCertificateSignature = {
3491
+ data: string;
3492
+ };
3493
+ export type DeviceCertificateSign = {
3494
+ data: string;
3495
+ };
3496
+ export declare enum DeviceFirmwareTargetType {
3497
+ FW_MGMT_TARGET_INVALID = 0,
3498
+ FW_MGMT_TARGET_CRATE = 1,
3499
+ FW_MGMT_TARGET_ROMLOADER = 2,
3500
+ FW_MGMT_TARGET_BOOTLOADER = 3,
3501
+ FW_MGMT_TARGET_APPLICATION_P1 = 4,
3502
+ FW_MGMT_TARGET_APPLICATION_P2 = 5,
3503
+ FW_MGMT_TARGET_COPROCESSOR = 6,
3504
+ FW_MGMT_TARGET_SE01 = 7,
3505
+ FW_MGMT_TARGET_SE02 = 8,
3506
+ FW_MGMT_TARGET_SE03 = 9,
3507
+ FW_MGMT_TARGET_SE04 = 10
3508
+ }
3509
+ export declare enum DeviceFirmwareUpdateTaskStatus {
3510
+ FW_MGMT_UPDATER_TASK_STATUS_PENDING = 0,
3511
+ FW_MGMT_UPDATER_TASK_STATUS_IN_PROGRESS = 1,
3512
+ FW_MGMT_UPDATER_TASK_STATUS_FINISHED = 2,
3513
+ FW_MGMT_UPDATER_TASK_STATUS_FAILED_FILE_NOT_FOUND = 3,
3514
+ FW_MGMT_UPDATER_TASK_STATUS_FAILED_FILE_READ = 4,
3515
+ FW_MGMT_UPDATER_TASK_STATUS_FAILED_FILE_WRITE = 5,
3516
+ FW_MGMT_UPDATER_TASK_STATUS_FAILED_VERIFY = 6,
3517
+ FW_MGMT_UPDATER_TASK_STATUS_FAILED_INSTALL = 7,
3518
+ FW_MGMT_UPDATER_TASK_STATUS_FAILED_ABORT = 8,
3519
+ FW_MGMT_UPDATER_TASK_STATUS_FAILED_BUSY = 9,
3520
+ FW_MGMT_UPDATER_TASK_STATUS_FAILED_ENTRY_OUT_OF_BOUNDS = 10
3521
+ }
3522
+ export type DeviceFirmwareTarget = {
3523
+ target_id: DeviceFirmwareTargetType;
3524
+ path: string;
3525
+ };
3526
+ export type DeviceFirmwareUpdateRequest = {
3527
+ targets: DeviceFirmwareTarget[];
3528
+ };
3529
+ export type DeviceFirmwareUpdateRecord = {
3530
+ target_id: DeviceFirmwareTargetType;
3531
+ status?: DeviceFirmwareUpdateTaskStatus;
3532
+ payload_version?: number;
3533
+ path?: string;
3534
+ };
3535
+ export type DeviceFirmwareUpdateRecordFields = {
3536
+ status?: boolean;
3537
+ payload_version?: boolean;
3538
+ path?: boolean;
3539
+ };
3540
+ export type DeviceFirmwareUpdateStatusGet = {
3541
+ fields?: DeviceFirmwareUpdateRecordFields;
3542
+ };
3543
+ export type DeviceFirmwareUpdateStatus = {
3544
+ records: DeviceFirmwareUpdateRecord[];
3545
+ };
3546
+ export declare enum DeviceFactoryAck {
3547
+ FACTORY_ACK_SUCCESS = 0,
3548
+ FACTORY_ACK_FAIL = 1
3549
+ }
3550
+ export type DeviceFactoryInfoManufactureTime = {
3551
+ year: number;
3552
+ month: number;
3553
+ day: number;
3554
+ hour: number;
3555
+ minute: number;
3556
+ second: number;
3557
+ };
3558
+ export type DeviceFactoryInfo = {
3559
+ version?: number;
3560
+ serial_number?: string;
3561
+ burn_in_completed?: boolean;
3562
+ factory_test_completed?: boolean;
3563
+ manufacture_time?: DeviceFactoryInfoManufactureTime;
3564
+ };
3565
+ export type DeviceFactoryInfoSet = {
3566
+ info: DeviceFactoryInfo;
3567
+ };
3568
+ export type DeviceFactoryInfoGet = {};
3569
+ export type DeviceFactoryPermanentLock = {
3570
+ check_a: string;
3571
+ check_b: string;
3572
+ };
3573
+ export type DeviceFactoryTest = {
3574
+ burn_in_test: boolean;
3428
3575
  };
3429
3576
  export declare enum DeviceType {
3430
3577
  CLASSIC1 = 0,
@@ -3432,130 +3579,124 @@ export declare enum DeviceType {
3432
3579
  MINI = 2,
3433
3580
  TOUCH = 3,
3434
3581
  PRO = 5,
3435
- CLASSIC1S_PURE = 6
3582
+ CLASSIC1S_PURE = 6,
3583
+ PRO2 = 7,
3584
+ NEO = 8
3436
3585
  }
3437
- export declare enum DevSeType {
3586
+ export declare enum DeviceSeType {
3438
3587
  THD89 = 0,
3439
3588
  SE608A = 1
3440
3589
  }
3441
- export declare enum DevSEState {
3590
+ export declare enum DeviceSEState {
3442
3591
  BOOT = 0,
3443
3592
  APP_FACTORY = 51,
3444
3593
  APP = 85
3445
3594
  }
3446
- export type DevFirmwareImageInfo = {
3595
+ export type DeviceFirmwareImageInfo = {
3447
3596
  version?: string;
3448
3597
  build_id?: string;
3449
3598
  hash?: string;
3450
3599
  };
3451
- export type DevHardwareInfo = {
3452
- device_type?: DeviceType;
3600
+ export type DeviceHardwareInfo = {
3601
+ Device_type?: DeviceType;
3453
3602
  serial_no?: string;
3454
- device_id?: string;
3455
3603
  hardware_version?: string;
3456
3604
  hardware_version_raw_adc?: number;
3457
3605
  };
3458
- export type DevMainMcuInfo = {
3459
- board?: DevFirmwareImageInfo;
3460
- boot?: DevFirmwareImageInfo;
3461
- app?: DevFirmwareImageInfo;
3462
- };
3463
- export type DevBluetoothInfo = {
3464
- boot?: DevFirmwareImageInfo;
3465
- app?: DevFirmwareImageInfo;
3466
- adv_name?: string;
3467
- mac?: string;
3468
- };
3469
- export type DevSEInfo = {
3470
- boot?: DevFirmwareImageInfo;
3471
- app?: DevFirmwareImageInfo;
3472
- type?: DevSeType;
3473
- state?: DevSEState;
3474
- };
3475
- export type DevInfoTargets = {
3606
+ export type DeviceMainMcuInfo = {
3607
+ romloader?: DeviceFirmwareImageInfo;
3608
+ bootloader?: DeviceFirmwareImageInfo;
3609
+ application?: DeviceFirmwareImageInfo;
3610
+ application_data?: DeviceFirmwareImageInfo;
3611
+ };
3612
+ export type DeviceCoprocessorInfo = {
3613
+ bootloader?: DeviceFirmwareImageInfo;
3614
+ application?: DeviceFirmwareImageInfo;
3615
+ bt_adv_name?: string;
3616
+ bt_mac?: string;
3617
+ };
3618
+ export type DeviceSEInfo = {
3619
+ bootloader?: DeviceFirmwareImageInfo;
3620
+ application?: DeviceFirmwareImageInfo;
3621
+ type?: DeviceSeType;
3622
+ state?: DeviceSEState;
3623
+ };
3624
+ export type DeviceInfoTargets = {
3476
3625
  hw?: boolean;
3477
3626
  fw?: boolean;
3478
- bt?: boolean;
3627
+ coprocessor?: boolean;
3479
3628
  se1?: boolean;
3480
3629
  se2?: boolean;
3481
3630
  se3?: boolean;
3482
3631
  se4?: boolean;
3483
3632
  status?: boolean;
3484
3633
  };
3485
- export type DevInfoTypes = {
3634
+ export type DeviceInfoTypes = {
3486
3635
  version?: boolean;
3487
3636
  build_id?: boolean;
3488
3637
  hash?: boolean;
3489
3638
  specific?: boolean;
3490
3639
  };
3491
- export type DevStatus = {
3492
- language?: string;
3493
- bt_enable?: boolean;
3494
- init_states?: boolean;
3495
- backup_required?: boolean;
3496
- passphrase_protection?: boolean;
3497
- label?: string;
3498
- };
3499
- export type DevGetDeviceInfo = {
3500
- targets?: DevInfoTargets;
3501
- types?: DevInfoTypes;
3640
+ export type DeviceInfoGet = {
3641
+ targets?: DeviceInfoTargets;
3642
+ types?: DeviceInfoTypes;
3502
3643
  };
3503
3644
  export type ProtocolV2DeviceInfo = {
3504
3645
  protocol_version: number;
3505
- hw?: DevHardwareInfo;
3506
- fw?: DevMainMcuInfo;
3507
- bt?: DevBluetoothInfo;
3508
- se1?: DevSEInfo;
3509
- se2?: DevSEInfo;
3510
- se3?: DevSEInfo;
3511
- se4?: DevSEInfo;
3512
- status?: DevStatus;
3513
- };
3514
- export declare enum DevFirmwareTargetType {
3515
- TARGET_MAIN_APP = 0,
3516
- TARGET_MAIN_BOOT = 1,
3517
- TARGET_BT = 2,
3518
- TARGET_SE1 = 3,
3519
- TARGET_SE2 = 4,
3520
- TARGET_SE3 = 5,
3521
- TARGET_SE4 = 6,
3522
- TARGET_RESOURCE = 10
3523
- }
3524
- export type DevFirmwareTarget = {
3525
- target_id: DevFirmwareTargetType;
3526
- path: string;
3527
- };
3528
- export type DevFirmwareUpdate = {
3529
- targets: DevFirmwareTarget[];
3530
- };
3531
- export type DevFirmwareInstallProgress = {
3532
- target_id: DevFirmwareTargetType;
3533
- progress: number;
3534
- stage?: string;
3535
- };
3536
- export type DevFirmwareUpdateStatusEntry = {
3537
- target_id: DevFirmwareTargetType;
3538
- status: number;
3646
+ hw?: DeviceHardwareInfo;
3647
+ fw?: DeviceMainMcuInfo;
3648
+ coprocessor?: DeviceCoprocessorInfo;
3649
+ se1?: DeviceSEInfo;
3650
+ se2?: DeviceSEInfo;
3651
+ se3?: DeviceSEInfo;
3652
+ se4?: DeviceSEInfo;
3653
+ status?: DeviceStatus;
3654
+ };
3655
+ export type DeviceSessionGet = {
3656
+ session_id?: string;
3539
3657
  };
3540
- export type DevGetFirmwareUpdateStatus = {};
3541
- export type DevFirmwareUpdateStatus = {
3542
- targets: DevFirmwareUpdateStatusEntry[];
3658
+ export type DeviceSession = {
3659
+ session_id?: string;
3660
+ btc_test_address?: string;
3543
3661
  };
3544
- export type FactoryDeviceInfoSettings = {
3545
- serial_no?: string;
3546
- cpu_info?: string;
3547
- pre_firmware?: string;
3662
+ export type DeviceSessionAskPin = {};
3663
+ export type DeviceSessionPinResult = {
3664
+ unlocked?: boolean;
3665
+ unlocked_attach_pin?: boolean;
3666
+ passphrase_protection?: boolean;
3548
3667
  };
3549
- export type FactoryGetDeviceInfo = {};
3550
- export type FactoryDeviceInfo = {
3551
- serial_no?: string;
3552
- spi_flash_info?: string;
3553
- se_info?: string;
3554
- nft_voucher?: string;
3555
- cpu_info?: string;
3556
- pre_firmware?: string;
3668
+ export type DeviceStatus = {
3669
+ device_id?: string;
3670
+ unlocked?: boolean;
3671
+ init_states?: boolean;
3672
+ backup_required?: boolean;
3673
+ passphrase_enabled?: boolean;
3674
+ attach_to_pin_enabled?: boolean;
3675
+ unlocked_by_attach_to_pin?: boolean;
3676
+ };
3677
+ export type DeviceStatusGet = {};
3678
+ export declare enum DevOnboardingStage {
3679
+ DEV_ONBOARDING_STAGE_UNKNOWN = 0,
3680
+ DEV_ONBOARDING_STAGE_SAFETY_CHECK = 1,
3681
+ DEV_ONBOARDING_STAGE_PERSONALIZATION = 2,
3682
+ DEV_ONBOARDING_STAGE_SELECT_SETUP_METHOD = 3,
3683
+ DEV_ONBOARDING_STAGE_NEW_DEVICE = 4,
3684
+ DEV_ONBOARDING_STAGE_SELECT_RESTORE_METHOD = 5,
3685
+ DEV_ONBOARDING_STAGE_RESTORE_MNEMONIC = 6,
3686
+ DEV_ONBOARDING_STAGE_RESTORE_SEEDCARD = 7,
3687
+ DEV_ONBOARDING_STAGE_WALLET_READY = 8,
3688
+ DEV_ONBOARDING_STAGE_SEEDCARD_BACKUP_PROMPT = 9,
3689
+ DEV_ONBOARDING_STAGE_SELECT_SEEDCARD_BACKUP_METHOD = 10,
3690
+ DEV_ONBOARDING_STAGE_SEEDCARD_BACKUP = 11,
3691
+ DEV_ONBOARDING_STAGE_DONE = 12
3692
+ }
3693
+ export type DevGetOnboardingStatus = {};
3694
+ export type DevOnboardingStatus = {
3695
+ stage: DevOnboardingStage;
3696
+ status_code?: number;
3697
+ detail_code?: number;
3557
3698
  };
3558
- export type FilesystemFixPermission = {};
3699
+ export type FilesystemPermissionFix = {};
3559
3700
  export type FilesystemPathInfo = {
3560
3701
  exist: boolean;
3561
3702
  size: number;
@@ -3611,32 +3752,11 @@ export type FilesystemDirMake = {
3611
3752
  export type FilesystemDirRemove = {
3612
3753
  path: string;
3613
3754
  };
3614
- export type FilesystemFormat = {};
3615
- export declare enum OnboardingStep {
3616
- ONBOARDING_STEP_UNKNOWN = 0,
3617
- ONBOARDING_STEP_DEVICE_VERIFICATION = 1,
3618
- ONBOARDING_STEP_PERSONALIZATION = 2,
3619
- ONBOARDING_STEP_SETUP = 3,
3620
- ONBOARDING_STEP_FIRMWARE = 4
3621
- }
3622
- export type GetOnboardingStatus = {};
3623
- export type NewDevice = {
3624
- seedcard_backup?: boolean;
3625
- };
3626
- export type Restore = {
3627
- mnemonic?: boolean;
3628
- seedcard?: boolean;
3629
- };
3630
- export type Setup = {
3631
- new_device?: NewDevice;
3632
- restore?: Restore;
3633
- };
3634
- export type OnboardingStatus = {
3635
- step: OnboardingStep;
3636
- setup?: Setup;
3637
- detail_code?: number;
3638
- detail_str?: string;
3755
+ export type FilesystemFormat = {
3756
+ data: boolean;
3757
+ user: boolean;
3639
3758
  };
3759
+ export type PortfolioUpdate = {};
3640
3760
  export type MessageType = {
3641
3761
  AlephiumGetAddress: AlephiumGetAddress;
3642
3762
  AlephiumAddress: AlephiumAddress;
@@ -4200,8 +4320,9 @@ export type MessageType = {
4200
4320
  CoinPurchaseMemo: CoinPurchaseMemo;
4201
4321
  PaymentRequestMemo: PaymentRequestMemo;
4202
4322
  TxAckPaymentRequest: TxAckPaymentRequest;
4203
- DebugLinkInput: DebugLinkInput;
4323
+ EthereumSignTypedDataQR: EthereumSignTypedDataQR;
4204
4324
  InternalMyAddressRequest: InternalMyAddressRequest;
4325
+ StartSession: StartSession;
4205
4326
  SetBusy: SetBusy;
4206
4327
  GetFirmwareHash: GetFirmwareHash;
4207
4328
  FirmwareHash: FirmwareHash;
@@ -4216,30 +4337,49 @@ export type MessageType = {
4216
4337
  ViewAmount: ViewAmount;
4217
4338
  ViewDetail: ViewDetail;
4218
4339
  ViewTip: ViewTip;
4340
+ ViewRawData: ViewRawData;
4219
4341
  ViewSignPage: ViewSignPage;
4220
4342
  ViewVerifyPage: ViewVerifyPage;
4221
- GetProtoVersion: GetProtoVersion;
4222
- ProtoVersion: ProtoVersion;
4223
- DevReboot: DevReboot;
4224
- DevFirmwareImageInfo: DevFirmwareImageInfo;
4225
- DevHardwareInfo: DevHardwareInfo;
4226
- DevMainMcuInfo: DevMainMcuInfo;
4227
- DevBluetoothInfo: DevBluetoothInfo;
4228
- DevSEInfo: DevSEInfo;
4229
- DevInfoTargets: DevInfoTargets;
4230
- DevInfoTypes: DevInfoTypes;
4231
- DevStatus: DevStatus;
4232
- DevGetDeviceInfo: DevGetDeviceInfo;
4233
- DevFirmwareTarget: DevFirmwareTarget;
4234
- DevFirmwareUpdate: DevFirmwareUpdate;
4235
- DevFirmwareInstallProgress: DevFirmwareInstallProgress;
4236
- DevFirmwareUpdateStatusEntry: DevFirmwareUpdateStatusEntry;
4237
- DevGetFirmwareUpdateStatus: DevGetFirmwareUpdateStatus;
4238
- DevFirmwareUpdateStatus: DevFirmwareUpdateStatus;
4239
- FactoryDeviceInfoSettings: FactoryDeviceInfoSettings;
4240
- FactoryGetDeviceInfo: FactoryGetDeviceInfo;
4241
- FactoryDeviceInfo: FactoryDeviceInfo;
4242
- FilesystemFixPermission: FilesystemFixPermission;
4343
+ ProtocolInfoRequest: ProtocolInfoRequest;
4344
+ ProtocolInfo: ProtocolInfo;
4345
+ DeviceReboot: DeviceReboot;
4346
+ DeviceSettings: DeviceSettings;
4347
+ DeviceSettingsGet: DeviceSettingsGet;
4348
+ DeviceSettingsSet: DeviceSettingsSet;
4349
+ DeviceCertificate: DeviceCertificate;
4350
+ DeviceCertificateWrite: DeviceCertificateWrite;
4351
+ DeviceCertificateRead: DeviceCertificateRead;
4352
+ DeviceCertificateSignature: DeviceCertificateSignature;
4353
+ DeviceCertificateSign: DeviceCertificateSign;
4354
+ DeviceFirmwareTarget: DeviceFirmwareTarget;
4355
+ DeviceFirmwareUpdateRequest: DeviceFirmwareUpdateRequest;
4356
+ DeviceFirmwareUpdateRecord: DeviceFirmwareUpdateRecord;
4357
+ DeviceFirmwareUpdateRecordFields: DeviceFirmwareUpdateRecordFields;
4358
+ DeviceFirmwareUpdateStatusGet: DeviceFirmwareUpdateStatusGet;
4359
+ DeviceFirmwareUpdateStatus: DeviceFirmwareUpdateStatus;
4360
+ DeviceFactoryInfoManufactureTime: DeviceFactoryInfoManufactureTime;
4361
+ DeviceFactoryInfo: DeviceFactoryInfo;
4362
+ DeviceFactoryInfoSet: DeviceFactoryInfoSet;
4363
+ DeviceFactoryInfoGet: DeviceFactoryInfoGet;
4364
+ DeviceFactoryPermanentLock: DeviceFactoryPermanentLock;
4365
+ DeviceFactoryTest: DeviceFactoryTest;
4366
+ DeviceFirmwareImageInfo: DeviceFirmwareImageInfo;
4367
+ DeviceHardwareInfo: DeviceHardwareInfo;
4368
+ DeviceMainMcuInfo: DeviceMainMcuInfo;
4369
+ DeviceCoprocessorInfo: DeviceCoprocessorInfo;
4370
+ DeviceSEInfo: DeviceSEInfo;
4371
+ DeviceInfoTargets: DeviceInfoTargets;
4372
+ DeviceInfoTypes: DeviceInfoTypes;
4373
+ DeviceInfoGet: DeviceInfoGet;
4374
+ DeviceSessionGet: DeviceSessionGet;
4375
+ DeviceSession: DeviceSession;
4376
+ DeviceSessionAskPin: DeviceSessionAskPin;
4377
+ DeviceSessionPinResult: DeviceSessionPinResult;
4378
+ DeviceStatus: DeviceStatus;
4379
+ DeviceStatusGet: DeviceStatusGet;
4380
+ DevGetOnboardingStatus: DevGetOnboardingStatus;
4381
+ DevOnboardingStatus: DevOnboardingStatus;
4382
+ FilesystemPermissionFix: FilesystemPermissionFix;
4243
4383
  FilesystemPathInfo: FilesystemPathInfo;
4244
4384
  FilesystemPathInfoQuery: FilesystemPathInfoQuery;
4245
4385
  FilesystemFile: FilesystemFile;
@@ -4251,11 +4391,7 @@ export type MessageType = {
4251
4391
  FilesystemDirMake: FilesystemDirMake;
4252
4392
  FilesystemDirRemove: FilesystemDirRemove;
4253
4393
  FilesystemFormat: FilesystemFormat;
4254
- GetOnboardingStatus: GetOnboardingStatus;
4255
- NewDevice: NewDevice;
4256
- Restore: Restore;
4257
- Setup: Setup;
4258
- OnboardingStatus: OnboardingStatus;
4394
+ PortfolioUpdate: PortfolioUpdate;
4259
4395
  };
4260
4396
  export type MessageKey = keyof MessageType;
4261
4397
  export type MessageResponse<T extends MessageKey> = {