@onekeyfe/hd-transport 1.2.0-alpha.0 → 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 +252 -84
  6. package/dist/constants.d.ts +4 -2
  7. package/dist/constants.d.ts.map +1 -1
  8. package/dist/index.d.ts +564 -326
  9. package/dist/index.d.ts.map +1 -1
  10. package/dist/index.js +434 -102
  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 +337 -221
  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 +992 -1420
  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 +86 -51
  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 +419 -272
  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,6 +3351,24 @@ export type TxAckPaymentRequest = {
3325
3351
  amount?: UintType;
3326
3352
  signature: string;
3327
3353
  };
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;
3360
+ };
3361
+ export type InternalMyAddressRequest = {
3362
+ coin_type: number;
3363
+ chain_id: number;
3364
+ account_index: number;
3365
+ derive_type: number;
3366
+ };
3367
+ export type StartSession = {
3368
+ session_id?: string;
3369
+ _skip_passphrase?: boolean;
3370
+ derive_cardano?: boolean;
3371
+ };
3328
3372
  export type SetBusy = {
3329
3373
  expiry_ms?: number;
3330
3374
  };
@@ -3341,6 +3385,21 @@ export type Nonce = {
3341
3385
  export type WriteSEPrivateKey = {
3342
3386
  private_key: string;
3343
3387
  };
3388
+ export declare enum WallpaperTarget {
3389
+ Home = 0,
3390
+ Lock = 1
3391
+ }
3392
+ export type SetWallpaper = {
3393
+ target: WallpaperTarget;
3394
+ path: string;
3395
+ };
3396
+ export type GetWallpaper = {
3397
+ target: WallpaperTarget;
3398
+ };
3399
+ export type Wallpaper = {
3400
+ target: WallpaperTarget;
3401
+ path: string;
3402
+ };
3344
3403
  export type UnlockPath = {
3345
3404
  address_n: number[];
3346
3405
  mac?: string;
@@ -3354,225 +3413,290 @@ export declare enum MoneroNetworkType {
3354
3413
  STAGENET = 2,
3355
3414
  FAKECHAIN = 3
3356
3415
  }
3357
- export type TxDetailsAmount = {
3416
+ export type ViewAmount = {
3417
+ is_unlimited: boolean;
3358
3418
  num: string;
3359
- decimals: number;
3360
- symbol: string;
3361
3419
  };
3362
- export type TxDetailsAddress = {
3363
- key: number;
3364
- address: string;
3365
- owner?: string;
3366
- icon?: string;
3367
- };
3368
- export type TxDetailsNetwork = {
3369
- coin_type: number;
3370
- chain_id?: number;
3371
- };
3372
- export type TxDetailsGeneral = {
3420
+ export type ViewDetail = {
3373
3421
  key: number;
3374
3422
  value: string;
3375
3423
  is_overview: boolean;
3424
+ has_icon: boolean;
3425
+ };
3426
+ export declare enum ViewTipType {
3427
+ Default = 0,
3428
+ Highlight = 1,
3429
+ Recommend = 2,
3430
+ Warning = 3,
3431
+ Danger = 4
3432
+ }
3433
+ export type ViewTip = {
3434
+ type: ViewTipType;
3435
+ text: string;
3436
+ };
3437
+ export type ViewRawData = {
3438
+ initial_data: string;
3439
+ placeholder: number;
3376
3440
  };
3377
- export declare enum TxDetailsDisplayType {
3378
- DISPLAY_TYPE_INFO = 0,
3379
- DISPLAY_TYPE_SIGN = 1
3441
+ export declare enum ViewSignLayout {
3442
+ LayoutDefault = 0,
3443
+ LayoutSafeTxCreate = 1
3380
3444
  }
3381
- export type TxDetailsPage = {
3445
+ export type ViewSignPage = {
3382
3446
  title: string;
3383
- display_type: TxDetailsDisplayType;
3384
3447
  amount?: UintType;
3385
- network?: TxDetailsNetwork;
3386
- address: TxDetailsAddress[];
3387
- general: TxDetailsGeneral[];
3448
+ general: ViewDetail[];
3449
+ tip?: ViewTip;
3450
+ raw_data?: ViewRawData;
3451
+ slide_to_confirm?: boolean;
3452
+ layout?: ViewSignLayout;
3453
+ };
3454
+ export type ViewVerifyPage = {
3455
+ title: string;
3456
+ address: string;
3457
+ path: string;
3388
3458
  };
3389
- export type GetProtoVersion = {};
3390
- export type ProtoVersion = {
3391
- proto_version: number;
3459
+ export type ProtocolInfoRequest = {};
3460
+ export type ProtocolInfo = {
3461
+ version: number;
3462
+ supported_messages: number[];
3463
+ protobuf_definition?: string;
3392
3464
  };
3393
- export declare enum DevRebootType {
3394
- Normal = 0,
3395
- Boardloader = 1,
3396
- Bootloader = 2
3397
- }
3398
3465
  export declare enum DeviceRebootType {
3399
3466
  Normal = 0,
3400
3467
  Romloader = 1,
3401
3468
  Bootloader = 2
3402
3469
  }
3403
- export type DevReboot = {
3404
- reboot_type: DevRebootType;
3405
- };
3406
3470
  export type DeviceReboot = {
3407
3471
  reboot_type: DeviceRebootType;
3408
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;
3575
+ };
3409
3576
  export declare enum DeviceType {
3410
3577
  CLASSIC1 = 0,
3411
3578
  CLASSIC1S = 1,
3412
3579
  MINI = 2,
3413
3580
  TOUCH = 3,
3414
3581
  PRO = 5,
3415
- CLASSIC1S_PURE = 6
3582
+ CLASSIC1S_PURE = 6,
3583
+ PRO2 = 7,
3584
+ NEO = 8
3416
3585
  }
3417
- export declare enum DevSeType {
3586
+ export declare enum DeviceSeType {
3418
3587
  THD89 = 0,
3419
3588
  SE608A = 1
3420
3589
  }
3421
- export declare enum DevSEState {
3590
+ export declare enum DeviceSEState {
3422
3591
  BOOT = 0,
3423
3592
  APP_FACTORY = 51,
3424
3593
  APP = 85
3425
3594
  }
3426
- export type DevFirmwareImageInfo = {
3595
+ export type DeviceFirmwareImageInfo = {
3427
3596
  version?: string;
3428
3597
  build_id?: string;
3429
3598
  hash?: string;
3430
3599
  };
3431
- export type DevHardwareInfo = {
3432
- device_type?: DeviceType;
3600
+ export type DeviceHardwareInfo = {
3601
+ Device_type?: DeviceType;
3433
3602
  serial_no?: string;
3434
3603
  hardware_version?: string;
3435
3604
  hardware_version_raw_adc?: number;
3436
3605
  };
3437
- export type DevMainMcuInfo = {
3438
- board?: DevFirmwareImageInfo;
3439
- boot?: DevFirmwareImageInfo;
3440
- app?: DevFirmwareImageInfo;
3441
- };
3442
- export type DevBluetoothInfo = {
3443
- boot?: DevFirmwareImageInfo;
3444
- app?: DevFirmwareImageInfo;
3445
- adv_name?: string;
3446
- mac?: string;
3447
- };
3448
- export type DevSEInfo = {
3449
- boot?: DevFirmwareImageInfo;
3450
- app?: DevFirmwareImageInfo;
3451
- type?: DevSeType;
3452
- state?: DevSEState;
3453
- };
3454
- 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 = {
3455
3625
  hw?: boolean;
3456
3626
  fw?: boolean;
3457
- bt?: boolean;
3627
+ coprocessor?: boolean;
3458
3628
  se1?: boolean;
3459
3629
  se2?: boolean;
3460
3630
  se3?: boolean;
3461
3631
  se4?: boolean;
3462
3632
  status?: boolean;
3463
3633
  };
3464
- export type DevInfoTypes = {
3634
+ export type DeviceInfoTypes = {
3465
3635
  version?: boolean;
3466
3636
  build_id?: boolean;
3467
3637
  hash?: boolean;
3468
3638
  specific?: boolean;
3469
3639
  };
3470
- export type DevStatus = {
3471
- language?: string;
3472
- bt_enable?: boolean;
3473
- init_states?: boolean;
3474
- backup_required?: boolean;
3475
- passphrase_protection?: boolean;
3476
- label?: string;
3640
+ export type DeviceInfoGet = {
3641
+ targets?: DeviceInfoTargets;
3642
+ types?: DeviceInfoTypes;
3477
3643
  };
3478
- export type DevGetDeviceInfo = {
3479
- targets?: DevInfoTargets;
3480
- types?: DevInfoTypes;
3481
- };
3482
- export type DeviceGetDeviceInfo = DevGetDeviceInfo;
3483
3644
  export type ProtocolV2DeviceInfo = {
3484
3645
  protocol_version: number;
3485
- hw?: DevHardwareInfo;
3486
- fw?: DevMainMcuInfo;
3487
- bt?: DevBluetoothInfo;
3488
- se1?: DevSEInfo;
3489
- se2?: DevSEInfo;
3490
- se3?: DevSEInfo;
3491
- se4?: DevSEInfo;
3492
- status?: DevStatus;
3493
- };
3494
- export declare enum DevFirmwareTargetType {
3495
- TARGET_INVALID = 0,
3496
- TARGET_ROMLOADER = 1,
3497
- TARGET_BOOTLOADER = 2,
3498
- TARGET_APPLICATION_P1 = 3,
3499
- TARGET_APPLICATION_P2 = 4,
3500
- TARGET_COPROCESSOR = 5,
3501
- TARGET_SE01 = 6,
3502
- TARGET_SE02 = 7,
3503
- TARGET_SE03 = 8,
3504
- TARGET_SE04 = 9,
3505
- TARGET_RESOURCE = 10
3506
- }
3507
- export declare enum DeviceFirmwareTargetType {
3508
- TARGET_INVALID = 0,
3509
- TARGET_ROMLOADER = 1,
3510
- TARGET_BOOTLOADER = 2,
3511
- TARGET_APPLICATION_P1 = 3,
3512
- TARGET_APPLICATION_P2 = 4,
3513
- TARGET_COPROCESSOR = 5,
3514
- TARGET_SE01 = 6,
3515
- TARGET_SE02 = 7,
3516
- TARGET_SE03 = 8,
3517
- TARGET_SE04 = 9,
3518
- TARGET_RESOURCE = 10
3519
- }
3520
- export type DevFirmwareTarget = {
3521
- target_id: DevFirmwareTargetType;
3522
- path: string;
3523
- };
3524
- export type DeviceFirmwareTarget = {
3525
- target_id: DeviceFirmwareTargetType;
3526
- path: string;
3527
- };
3528
- export type DevFirmwareUpdate = {
3529
- targets: DevFirmwareTarget[];
3530
- };
3531
- export type DeviceFirmwareUpdate = {
3532
- targets: DeviceFirmwareTarget[];
3533
- max_concurrent?: number;
3534
- };
3535
- export type DevFirmwareInstallProgress = {
3536
- target_id: DevFirmwareTargetType;
3537
- progress: number;
3538
- stage?: string;
3539
- };
3540
- export type DeviceFirmwareInstallProgress = {
3541
- target_id: DeviceFirmwareTargetType;
3542
- progress: number;
3543
- stage?: string;
3544
- };
3545
- export type DevFirmwareUpdateStatusEntry = {
3546
- target_id: DevFirmwareTargetType;
3547
- status: number;
3548
- };
3549
- export type DeviceFirmwareUpdateStatusEntry = {
3550
- target_id: DeviceFirmwareTargetType;
3551
- status: number;
3552
- };
3553
- export type DevGetFirmwareUpdateStatus = {};
3554
- export type DeviceGetFirmwareUpdateStatus = {};
3555
- export type DevFirmwareUpdateStatus = {
3556
- targets: DevFirmwareUpdateStatusEntry[];
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;
3557
3657
  };
3558
- export type DeviceFirmwareUpdateStatus = {
3559
- targets: DeviceFirmwareUpdateStatusEntry[];
3658
+ export type DeviceSession = {
3659
+ session_id?: string;
3660
+ btc_test_address?: string;
3560
3661
  };
3561
- export type FactoryDeviceInfoSettings = {
3562
- serial_no?: string;
3563
- cpu_info?: string;
3564
- pre_firmware?: string;
3662
+ export type DeviceSessionAskPin = {};
3663
+ export type DeviceSessionPinResult = {
3664
+ unlocked?: boolean;
3665
+ unlocked_attach_pin?: boolean;
3666
+ passphrase_protection?: boolean;
3565
3667
  };
3566
- export type FactoryGetDeviceInfo = {};
3567
- export type FactoryDeviceInfo = {
3568
- serial_no?: string;
3569
- spi_flash_info?: string;
3570
- se_info?: string;
3571
- nft_voucher?: string;
3572
- cpu_info?: string;
3573
- 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;
3574
3698
  };
3575
- export type FilesystemFixPermission = {};
3699
+ export type FilesystemPermissionFix = {};
3576
3700
  export type FilesystemPathInfo = {
3577
3701
  exist: boolean;
3578
3702
  size: number;
@@ -3628,32 +3752,11 @@ export type FilesystemDirMake = {
3628
3752
  export type FilesystemDirRemove = {
3629
3753
  path: string;
3630
3754
  };
3631
- export type FilesystemFormat = {};
3632
- export declare enum OnboardingStep {
3633
- ONBOARDING_STEP_UNKNOWN = 0,
3634
- ONBOARDING_STEP_DEVICE_VERIFICATION = 1,
3635
- ONBOARDING_STEP_PERSONALIZATION = 2,
3636
- ONBOARDING_STEP_SETUP = 3,
3637
- ONBOARDING_STEP_FIRMWARE = 4
3638
- }
3639
- export type GetOnboardingStatus = {};
3640
- export type NewDevice = {
3641
- seedcard_backup?: boolean;
3642
- };
3643
- export type Restore = {
3644
- mnemonic?: boolean;
3645
- seedcard?: boolean;
3646
- };
3647
- export type Setup = {
3648
- new_device?: NewDevice;
3649
- restore?: Restore;
3650
- };
3651
- export type OnboardingStatus = {
3652
- step: OnboardingStep;
3653
- setup?: Setup;
3654
- detail_code?: number;
3655
- detail_str?: string;
3755
+ export type FilesystemFormat = {
3756
+ data: boolean;
3757
+ user: boolean;
3656
3758
  };
3759
+ export type PortfolioUpdate = {};
3657
3760
  export type MessageType = {
3658
3761
  AlephiumGetAddress: AlephiumGetAddress;
3659
3762
  AlephiumAddress: AlephiumAddress;
@@ -4217,49 +4320,66 @@ export type MessageType = {
4217
4320
  CoinPurchaseMemo: CoinPurchaseMemo;
4218
4321
  PaymentRequestMemo: PaymentRequestMemo;
4219
4322
  TxAckPaymentRequest: TxAckPaymentRequest;
4323
+ EthereumSignTypedDataQR: EthereumSignTypedDataQR;
4324
+ InternalMyAddressRequest: InternalMyAddressRequest;
4325
+ StartSession: StartSession;
4220
4326
  SetBusy: SetBusy;
4221
4327
  GetFirmwareHash: GetFirmwareHash;
4222
4328
  FirmwareHash: FirmwareHash;
4223
4329
  GetNonce: GetNonce;
4224
4330
  Nonce: Nonce;
4225
4331
  WriteSEPrivateKey: WriteSEPrivateKey;
4332
+ SetWallpaper: SetWallpaper;
4333
+ GetWallpaper: GetWallpaper;
4334
+ Wallpaper: Wallpaper;
4226
4335
  UnlockPath: UnlockPath;
4227
4336
  UnlockedPathRequest: UnlockedPathRequest;
4228
- TxDetailsAmount: TxDetailsAmount;
4229
- TxDetailsAddress: TxDetailsAddress;
4230
- TxDetailsNetwork: TxDetailsNetwork;
4231
- TxDetailsGeneral: TxDetailsGeneral;
4232
- TxDetailsPage: TxDetailsPage;
4233
- GetProtoVersion: GetProtoVersion;
4234
- ProtoVersion: ProtoVersion;
4235
- DevReboot: DevReboot;
4337
+ ViewAmount: ViewAmount;
4338
+ ViewDetail: ViewDetail;
4339
+ ViewTip: ViewTip;
4340
+ ViewRawData: ViewRawData;
4341
+ ViewSignPage: ViewSignPage;
4342
+ ViewVerifyPage: ViewVerifyPage;
4343
+ ProtocolInfoRequest: ProtocolInfoRequest;
4344
+ ProtocolInfo: ProtocolInfo;
4236
4345
  DeviceReboot: DeviceReboot;
4237
- DevFirmwareImageInfo: DevFirmwareImageInfo;
4238
- DevHardwareInfo: DevHardwareInfo;
4239
- DevMainMcuInfo: DevMainMcuInfo;
4240
- DevBluetoothInfo: DevBluetoothInfo;
4241
- DevSEInfo: DevSEInfo;
4242
- DevInfoTargets: DevInfoTargets;
4243
- DevInfoTypes: DevInfoTypes;
4244
- DevStatus: DevStatus;
4245
- DevGetDeviceInfo: DevGetDeviceInfo;
4246
- DeviceGetDeviceInfo: DeviceGetDeviceInfo;
4247
- DevFirmwareTarget: DevFirmwareTarget;
4346
+ DeviceSettings: DeviceSettings;
4347
+ DeviceSettingsGet: DeviceSettingsGet;
4348
+ DeviceSettingsSet: DeviceSettingsSet;
4349
+ DeviceCertificate: DeviceCertificate;
4350
+ DeviceCertificateWrite: DeviceCertificateWrite;
4351
+ DeviceCertificateRead: DeviceCertificateRead;
4352
+ DeviceCertificateSignature: DeviceCertificateSignature;
4353
+ DeviceCertificateSign: DeviceCertificateSign;
4248
4354
  DeviceFirmwareTarget: DeviceFirmwareTarget;
4249
- DevFirmwareUpdate: DevFirmwareUpdate;
4250
- DeviceFirmwareUpdate: DeviceFirmwareUpdate;
4251
- DevFirmwareInstallProgress: DevFirmwareInstallProgress;
4252
- DeviceFirmwareInstallProgress: DeviceFirmwareInstallProgress;
4253
- DevFirmwareUpdateStatusEntry: DevFirmwareUpdateStatusEntry;
4254
- DeviceFirmwareUpdateStatusEntry: DeviceFirmwareUpdateStatusEntry;
4255
- DevGetFirmwareUpdateStatus: DevGetFirmwareUpdateStatus;
4256
- DeviceGetFirmwareUpdateStatus: DeviceGetFirmwareUpdateStatus;
4257
- DevFirmwareUpdateStatus: DevFirmwareUpdateStatus;
4355
+ DeviceFirmwareUpdateRequest: DeviceFirmwareUpdateRequest;
4356
+ DeviceFirmwareUpdateRecord: DeviceFirmwareUpdateRecord;
4357
+ DeviceFirmwareUpdateRecordFields: DeviceFirmwareUpdateRecordFields;
4358
+ DeviceFirmwareUpdateStatusGet: DeviceFirmwareUpdateStatusGet;
4258
4359
  DeviceFirmwareUpdateStatus: DeviceFirmwareUpdateStatus;
4259
- FactoryDeviceInfoSettings: FactoryDeviceInfoSettings;
4260
- FactoryGetDeviceInfo: FactoryGetDeviceInfo;
4261
- FactoryDeviceInfo: FactoryDeviceInfo;
4262
- FilesystemFixPermission: FilesystemFixPermission;
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;
4263
4383
  FilesystemPathInfo: FilesystemPathInfo;
4264
4384
  FilesystemPathInfoQuery: FilesystemPathInfoQuery;
4265
4385
  FilesystemFile: FilesystemFile;
@@ -4271,11 +4391,7 @@ export type MessageType = {
4271
4391
  FilesystemDirMake: FilesystemDirMake;
4272
4392
  FilesystemDirRemove: FilesystemDirRemove;
4273
4393
  FilesystemFormat: FilesystemFormat;
4274
- GetOnboardingStatus: GetOnboardingStatus;
4275
- NewDevice: NewDevice;
4276
- Restore: Restore;
4277
- Setup: Setup;
4278
- OnboardingStatus: OnboardingStatus;
4394
+ PortfolioUpdate: PortfolioUpdate;
4279
4395
  };
4280
4396
  export type MessageKey = keyof MessageType;
4281
4397
  export type MessageResponse<T extends MessageKey> = {