@onekeyfe/hd-transport 1.2.0-alpha.34 → 1.2.0-alpha.35

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.
@@ -3446,17 +3446,6 @@ export type EthereumSignTypedDataQR = {
3446
3446
  metamask_v4_compat?: boolean;
3447
3447
  request_id?: string;
3448
3448
  };
3449
- export type InternalMyAddressRequest = {
3450
- coin_type: number;
3451
- chain_id: number;
3452
- account_index: number;
3453
- derive_type: number;
3454
- };
3455
- export type StartSession = {
3456
- session_id?: string;
3457
- _skip_passphrase?: boolean;
3458
- derive_cardano?: boolean;
3459
- };
3460
3449
  export type SetBusy = {
3461
3450
  expiry_ms?: number;
3462
3451
  };
@@ -3473,21 +3462,6 @@ export type Nonce = {
3473
3462
  export type WriteSEPrivateKey = {
3474
3463
  private_key: string;
3475
3464
  };
3476
- export declare enum WallpaperTarget {
3477
- Home = 0,
3478
- Lock = 1
3479
- }
3480
- export type SetWallpaper = {
3481
- target: WallpaperTarget;
3482
- path: string;
3483
- };
3484
- export type GetWallpaper = {
3485
- target: WallpaperTarget;
3486
- };
3487
- export type Wallpaper = {
3488
- target: WallpaperTarget;
3489
- path: string;
3490
- };
3491
3465
  export type UnlockPath = {
3492
3466
  address_n: number[];
3493
3467
  mac?: string;
@@ -3515,63 +3489,13 @@ export type UiAnimationRequest = {
3515
3489
  command: UiAnimationCommand;
3516
3490
  type?: UiAnimationType;
3517
3491
  };
3518
- export type ViewAmount = {
3519
- is_unlimited: boolean;
3520
- num: string;
3521
- };
3522
- export type ViewDetail = {
3523
- key: number;
3524
- value: string;
3525
- is_overview: boolean;
3526
- has_icon: boolean;
3527
- };
3528
- export declare enum ViewTipType {
3529
- Default = 0,
3530
- Highlight = 1,
3531
- Recommend = 2,
3532
- Warning = 3,
3533
- Danger = 4
3534
- }
3535
- export type ViewTip = {
3536
- type: ViewTipType;
3537
- text: string;
3538
- };
3539
- export type ViewRawData = {
3540
- initial_data: string;
3541
- placeholder: number;
3542
- };
3543
- export declare enum ViewSignLayout {
3544
- LayoutDefault = 0,
3545
- LayoutSafeTxCreate = 1,
3546
- LayoutFinalConfirm = 2,
3547
- Layout7702 = 3,
3548
- LayoutFlat = 4,
3549
- LayoutEthApprove = 5
3550
- }
3551
- export type ViewSignPage = {
3552
- title: string;
3553
- amount?: UintType;
3554
- general: ViewDetail[];
3555
- tip?: ViewTip;
3556
- raw_data?: ViewRawData;
3557
- slide_to_confirm?: boolean;
3558
- layout?: ViewSignLayout;
3559
- };
3560
- export type ViewVerifyPage = {
3561
- title: string;
3562
- address: string;
3563
- path: string;
3564
- network?: string;
3565
- derive_type?: string;
3566
- value_key?: number;
3567
- };
3568
3492
  export type ProtocolInfoRequest = {
3569
3493
  eventless_wallet_session?: boolean;
3570
3494
  };
3571
3495
  export type ProtocolInfo = {
3572
3496
  version: number;
3497
+ build_fingerprint: string;
3573
3498
  supported_messages: number[];
3574
- protobuf_definition?: string;
3575
3499
  };
3576
3500
  export declare enum DeviceErrorCode {
3577
3501
  DeviceError_None = 0,
@@ -3639,6 +3563,39 @@ export type DeviceCertificateSignature = {
3639
3563
  export type DeviceCertificateSign = {
3640
3564
  data: string;
3641
3565
  };
3566
+ export type DeviceMiscUsbMscControl = {
3567
+ enable: boolean;
3568
+ };
3569
+ export declare enum DeviceFactoryAck {
3570
+ FACTORY_ACK_SUCCESS = 0,
3571
+ FACTORY_ACK_FAIL = 1
3572
+ }
3573
+ export type DeviceFactoryInfoManufactureTime = {
3574
+ year: number;
3575
+ month: number;
3576
+ day: number;
3577
+ hour: number;
3578
+ minute: number;
3579
+ second: number;
3580
+ };
3581
+ export type DeviceFactoryInfo = {
3582
+ version?: number;
3583
+ serial_number?: string;
3584
+ burn_in_completed?: boolean;
3585
+ factory_test_completed?: boolean;
3586
+ manufacture_time?: DeviceFactoryInfoManufactureTime;
3587
+ };
3588
+ export type DeviceFactoryInfoSet = {
3589
+ info: DeviceFactoryInfo;
3590
+ };
3591
+ export type DeviceFactoryInfoGet = {};
3592
+ export type DeviceFactoryPermanentLock = {
3593
+ check_a: string;
3594
+ check_b: string;
3595
+ };
3596
+ export type DeviceFactoryTest = {
3597
+ burn_in_test: boolean;
3598
+ };
3642
3599
  export declare enum DeviceFirmwareTargetType {
3643
3600
  FW_MGMT_TARGET_INVALID = 0,
3644
3601
  FW_MGMT_TARGET_CRATE = 1,
@@ -3689,36 +3646,6 @@ export type DeviceFirmwareUpdateStatusGet = {
3689
3646
  export type DeviceFirmwareUpdateStatus = {
3690
3647
  records: DeviceFirmwareUpdateRecord[];
3691
3648
  };
3692
- export declare enum DeviceFactoryAck {
3693
- FACTORY_ACK_SUCCESS = 0,
3694
- FACTORY_ACK_FAIL = 1
3695
- }
3696
- export type DeviceFactoryInfoManufactureTime = {
3697
- year: number;
3698
- month: number;
3699
- day: number;
3700
- hour: number;
3701
- minute: number;
3702
- second: number;
3703
- };
3704
- export type DeviceFactoryInfo = {
3705
- version?: number;
3706
- serial_number?: string;
3707
- burn_in_completed?: boolean;
3708
- factory_test_completed?: boolean;
3709
- manufacture_time?: DeviceFactoryInfoManufactureTime;
3710
- };
3711
- export type DeviceFactoryInfoSet = {
3712
- info: DeviceFactoryInfo;
3713
- };
3714
- export type DeviceFactoryInfoGet = {};
3715
- export type DeviceFactoryPermanentLock = {
3716
- check_a: string;
3717
- check_b: string;
3718
- };
3719
- export type DeviceFactoryTest = {
3720
- burn_in_test: boolean;
3721
- };
3722
3649
  export declare enum DeviceType {
3723
3650
  CLASSIC1 = 0,
3724
3651
  CLASSIC1S = 1,
@@ -3775,7 +3702,6 @@ export type DeviceInfoTargets = {
3775
3702
  se2?: boolean;
3776
3703
  se3?: boolean;
3777
3704
  se4?: boolean;
3778
- status?: boolean;
3779
3705
  };
3780
3706
  export type DeviceInfoTypes = {
3781
3707
  version?: boolean;
@@ -3796,7 +3722,6 @@ export type ProtocolV2DeviceInfo = {
3796
3722
  se2?: DeviceSEInfo;
3797
3723
  se3?: DeviceSEInfo;
3798
3724
  se4?: DeviceSEInfo;
3799
- status?: DeviceStatus;
3800
3725
  };
3801
3726
  export declare enum DeviceSessionErrorCode {
3802
3727
  DeviceSessionError_None = 0,
@@ -3823,7 +3748,7 @@ export type DeviceSessionAskPin = {
3823
3748
  };
3824
3749
  export type DeviceSessionAskPassphrase = {
3825
3750
  passphrase?: string;
3826
- on_device?: boolean;
3751
+ on_device: boolean;
3827
3752
  };
3828
3753
  export declare enum DeviceSessionAskPin_FailureSubCodes {
3829
3754
  UserCancel = 1
@@ -3838,53 +3763,6 @@ export type DeviceStatus = {
3838
3763
  unlocked_by_attach_to_pin?: boolean;
3839
3764
  };
3840
3765
  export type DeviceStatusGet = {};
3841
- export declare enum DevOnboardingStep {
3842
- DEV_ONBOARDING_STEP_UNKNOWN = 0,
3843
- DEV_ONBOARDING_STEP_CHECKING = 1,
3844
- DEV_ONBOARDING_STEP_PERSONALIZATION = 2,
3845
- DEV_ONBOARDING_STEP_PIN = 3,
3846
- DEV_ONBOARDING_STEP_SETUP = 4,
3847
- DEV_ONBOARDING_STEP_DONE = 5
3848
- }
3849
- export declare enum DevOnboardingPhase {
3850
- DEV_ONBOARDING_PHASE_UNKNOWN = 0,
3851
- DEV_ONBOARDING_PHASE_SAFETY_CHECK = 1,
3852
- DEV_ONBOARDING_PHASE_PIN_SETUP = 2,
3853
- DEV_ONBOARDING_PHASE_FINGERPRINT_SETUP = 3,
3854
- DEV_ONBOARDING_PHASE_SETUP_CHOICE = 4,
3855
- DEV_ONBOARDING_PHASE_WALLET_CREATE_START = 5,
3856
- DEV_ONBOARDING_PHASE_RECOVERY_PHRASE_VIEW = 6,
3857
- DEV_ONBOARDING_PHASE_RECOVERY_PHRASE_CONFIRM = 7,
3858
- DEV_ONBOARDING_PHASE_RESTORE_METHOD_CHOICE = 8,
3859
- DEV_ONBOARDING_PHASE_RECOVERY_PHRASE_RESTORE = 9,
3860
- DEV_ONBOARDING_PHASE_SEEDCARD_RESTORE = 10,
3861
- DEV_ONBOARDING_PHASE_WALLET_READY = 11,
3862
- DEV_ONBOARDING_PHASE_SEEDCARD_BACKUP_PROMPT = 12,
3863
- DEV_ONBOARDING_PHASE_SEEDCARD_BACKUP = 13
3864
- }
3865
- export declare enum DevOnboardingSetupKind {
3866
- DEV_ONBOARDING_SETUP_KIND_UNKNOWN = 0,
3867
- DEV_ONBOARDING_SETUP_KIND_CHOICE = 1,
3868
- DEV_ONBOARDING_SETUP_KIND_CREATE = 2,
3869
- DEV_ONBOARDING_SETUP_KIND_RESTORE = 3
3870
- }
3871
- export declare enum DevOnboardingSetupMethod {
3872
- DEV_ONBOARDING_SETUP_METHOD_UNKNOWN = 0,
3873
- DEV_ONBOARDING_SETUP_METHOD_RECOVERY_PHRASE = 1,
3874
- DEV_ONBOARDING_SETUP_METHOD_SEEDCARD = 2
3875
- }
3876
- export type DevOnboardingSetupStatus = {
3877
- kind?: DevOnboardingSetupKind;
3878
- method?: DevOnboardingSetupMethod;
3879
- };
3880
- export type DevGetOnboardingStatus = {};
3881
- export type DevOnboardingStatus = {
3882
- step?: DevOnboardingStep;
3883
- phase?: DevOnboardingPhase;
3884
- setup?: DevOnboardingSetupStatus;
3885
- pin_set?: boolean;
3886
- wallet_initialized?: boolean;
3887
- };
3888
3766
  export type FilesystemPermissionFix = {};
3889
3767
  export type FilesystemPathInfo = {
3890
3768
  exist: boolean;
@@ -3945,7 +3823,110 @@ export type FilesystemFormat = {
3945
3823
  data: boolean;
3946
3824
  user: boolean;
3947
3825
  };
3826
+ export type InternalMyAddressRequest = {
3827
+ coin_type: number;
3828
+ chain_id: number;
3829
+ account_index: number;
3830
+ derive_type: number;
3831
+ };
3832
+ export declare enum OnboardingStep {
3833
+ ONBOARDING_STEP_UNKNOWN = 0,
3834
+ ONBOARDING_STEP_CHECKING = 1,
3835
+ ONBOARDING_STEP_PERSONALIZATION = 2,
3836
+ ONBOARDING_STEP_PIN = 3,
3837
+ ONBOARDING_STEP_SETUP = 4,
3838
+ ONBOARDING_STEP_DONE = 5
3839
+ }
3840
+ export declare enum OnboardingPhase {
3841
+ ONBOARDING_PHASE_UNKNOWN = 0,
3842
+ ONBOARDING_PHASE_SAFETY_CHECK = 1,
3843
+ ONBOARDING_PHASE_PIN_SETUP = 2,
3844
+ ONBOARDING_PHASE_FINGERPRINT_SETUP = 3,
3845
+ ONBOARDING_PHASE_SETUP_CHOICE = 4,
3846
+ ONBOARDING_PHASE_WALLET_CREATE_START = 5,
3847
+ ONBOARDING_PHASE_RECOVERY_PHRASE_VIEW = 6,
3848
+ ONBOARDING_PHASE_RECOVERY_PHRASE_CONFIRM = 7,
3849
+ ONBOARDING_PHASE_RESTORE_METHOD_CHOICE = 8,
3850
+ ONBOARDING_PHASE_RECOVERY_PHRASE_RESTORE = 9,
3851
+ ONBOARDING_PHASE_SEEDCARD_RESTORE = 10,
3852
+ ONBOARDING_PHASE_WALLET_READY = 11,
3853
+ ONBOARDING_PHASE_SEEDCARD_BACKUP_PROMPT = 12,
3854
+ ONBOARDING_PHASE_SEEDCARD_BACKUP = 13
3855
+ }
3856
+ export declare enum OnboardingSetupKind {
3857
+ ONBOARDING_SETUP_KIND_UNKNOWN = 0,
3858
+ ONBOARDING_SETUP_KIND_CHOICE = 1,
3859
+ ONBOARDING_SETUP_KIND_CREATE = 2,
3860
+ ONBOARDING_SETUP_KIND_RESTORE = 3
3861
+ }
3862
+ export declare enum OnboardingSetupMethod {
3863
+ ONBOARDING_SETUP_METHOD_UNKNOWN = 0,
3864
+ ONBOARDING_SETUP_METHOD_RECOVERY_PHRASE = 1,
3865
+ ONBOARDING_SETUP_METHOD_SEEDCARD = 2
3866
+ }
3867
+ export type OnboardingSetupStatus = {
3868
+ kind?: OnboardingSetupKind;
3869
+ method?: OnboardingSetupMethod;
3870
+ };
3871
+ export type OnboardingStatusGet = {};
3872
+ export type OnboardingStatus = {
3873
+ step?: OnboardingStep;
3874
+ phase?: OnboardingPhase;
3875
+ setup?: OnboardingSetupStatus;
3876
+ pin_set?: boolean;
3877
+ wallet_initialized?: boolean;
3878
+ };
3948
3879
  export type PortfolioUpdate = {};
3880
+ export type ViewAmount = {
3881
+ is_unlimited: boolean;
3882
+ num: string;
3883
+ };
3884
+ export type ViewDetail = {
3885
+ key: number;
3886
+ value: string;
3887
+ is_overview: boolean;
3888
+ has_icon: boolean;
3889
+ };
3890
+ export declare enum ViewTipType {
3891
+ Default = 0,
3892
+ Highlight = 1,
3893
+ Recommend = 2,
3894
+ Warning = 3,
3895
+ Danger = 4
3896
+ }
3897
+ export type ViewTip = {
3898
+ type: ViewTipType;
3899
+ text: string;
3900
+ };
3901
+ export type ViewRawData = {
3902
+ initial_data: string;
3903
+ placeholder: number;
3904
+ };
3905
+ export declare enum ViewSignLayout {
3906
+ LayoutDefault = 0,
3907
+ LayoutSafeTxCreate = 1,
3908
+ LayoutFinalConfirm = 2,
3909
+ Layout7702 = 3,
3910
+ LayoutFlat = 4,
3911
+ LayoutEthApprove = 5
3912
+ }
3913
+ export type ViewSignPage = {
3914
+ title: string;
3915
+ amount?: UintType;
3916
+ general: ViewDetail[];
3917
+ tip?: ViewTip;
3918
+ raw_data?: ViewRawData;
3919
+ slide_to_confirm?: boolean;
3920
+ layout?: ViewSignLayout;
3921
+ };
3922
+ export type ViewVerifyPage = {
3923
+ title: string;
3924
+ address: string;
3925
+ path: string;
3926
+ network?: string;
3927
+ derive_type?: string;
3928
+ value_key?: number;
3929
+ };
3949
3930
  export declare enum ProtocolV2FailureType {
3950
3931
  Failure_InvalidMessage = 1,
3951
3932
  Failure_UndefinedError = 2,
@@ -4548,26 +4529,15 @@ export type MessageType = {
4548
4529
  PaymentRequestMemo: PaymentRequestMemo;
4549
4530
  TxAckPaymentRequest: TxAckPaymentRequest;
4550
4531
  EthereumSignTypedDataQR: EthereumSignTypedDataQR;
4551
- InternalMyAddressRequest: InternalMyAddressRequest;
4552
- StartSession: StartSession;
4553
4532
  SetBusy: SetBusy;
4554
4533
  GetFirmwareHash: GetFirmwareHash;
4555
4534
  FirmwareHash: FirmwareHash;
4556
4535
  GetNonce: GetNonce;
4557
4536
  Nonce: Nonce;
4558
4537
  WriteSEPrivateKey: WriteSEPrivateKey;
4559
- SetWallpaper: SetWallpaper;
4560
- GetWallpaper: GetWallpaper;
4561
- Wallpaper: Wallpaper;
4562
4538
  UnlockPath: UnlockPath;
4563
4539
  UnlockedPathRequest: UnlockedPathRequest;
4564
4540
  UiAnimationRequest: UiAnimationRequest;
4565
- ViewAmount: ViewAmount;
4566
- ViewDetail: ViewDetail;
4567
- ViewTip: ViewTip;
4568
- ViewRawData: ViewRawData;
4569
- ViewSignPage: ViewSignPage;
4570
- ViewVerifyPage: ViewVerifyPage;
4571
4541
  ProtocolInfoRequest: ProtocolInfoRequest;
4572
4542
  ProtocolInfo: ProtocolInfo;
4573
4543
  DeviceReboot: DeviceReboot;
@@ -4580,18 +4550,19 @@ export type MessageType = {
4580
4550
  DeviceCertificateRead: DeviceCertificateRead;
4581
4551
  DeviceCertificateSignature: DeviceCertificateSignature;
4582
4552
  DeviceCertificateSign: DeviceCertificateSign;
4583
- DeviceFirmwareTarget: DeviceFirmwareTarget;
4584
- DeviceFirmwareUpdateRequest: DeviceFirmwareUpdateRequest;
4585
- DeviceFirmwareUpdateRecord: DeviceFirmwareUpdateRecord;
4586
- DeviceFirmwareUpdateRecordFields: DeviceFirmwareUpdateRecordFields;
4587
- DeviceFirmwareUpdateStatusGet: DeviceFirmwareUpdateStatusGet;
4588
- DeviceFirmwareUpdateStatus: DeviceFirmwareUpdateStatus;
4553
+ DeviceMiscUsbMscControl: DeviceMiscUsbMscControl;
4589
4554
  DeviceFactoryInfoManufactureTime: DeviceFactoryInfoManufactureTime;
4590
4555
  DeviceFactoryInfo: DeviceFactoryInfo;
4591
4556
  DeviceFactoryInfoSet: DeviceFactoryInfoSet;
4592
4557
  DeviceFactoryInfoGet: DeviceFactoryInfoGet;
4593
4558
  DeviceFactoryPermanentLock: DeviceFactoryPermanentLock;
4594
4559
  DeviceFactoryTest: DeviceFactoryTest;
4560
+ DeviceFirmwareTarget: DeviceFirmwareTarget;
4561
+ DeviceFirmwareUpdateRequest: DeviceFirmwareUpdateRequest;
4562
+ DeviceFirmwareUpdateRecord: DeviceFirmwareUpdateRecord;
4563
+ DeviceFirmwareUpdateRecordFields: DeviceFirmwareUpdateRecordFields;
4564
+ DeviceFirmwareUpdateStatusGet: DeviceFirmwareUpdateStatusGet;
4565
+ DeviceFirmwareUpdateStatus: DeviceFirmwareUpdateStatus;
4595
4566
  DeviceFirmwareImageInfo: DeviceFirmwareImageInfo;
4596
4567
  DeviceHardwareInfo: DeviceHardwareInfo;
4597
4568
  DeviceMainMcuInfo: DeviceMainMcuInfo;
@@ -4606,9 +4577,6 @@ export type MessageType = {
4606
4577
  DeviceSessionAskPassphrase: DeviceSessionAskPassphrase;
4607
4578
  DeviceStatus: DeviceStatus;
4608
4579
  DeviceStatusGet: DeviceStatusGet;
4609
- DevOnboardingSetupStatus: DevOnboardingSetupStatus;
4610
- DevGetOnboardingStatus: DevGetOnboardingStatus;
4611
- DevOnboardingStatus: DevOnboardingStatus;
4612
4580
  FilesystemPermissionFix: FilesystemPermissionFix;
4613
4581
  FilesystemPathInfo: FilesystemPathInfo;
4614
4582
  FilesystemPathInfoQuery: FilesystemPathInfoQuery;
@@ -4621,7 +4589,17 @@ export type MessageType = {
4621
4589
  FilesystemDirMake: FilesystemDirMake;
4622
4590
  FilesystemDirRemove: FilesystemDirRemove;
4623
4591
  FilesystemFormat: FilesystemFormat;
4592
+ InternalMyAddressRequest: InternalMyAddressRequest;
4593
+ OnboardingSetupStatus: OnboardingSetupStatus;
4594
+ OnboardingStatusGet: OnboardingStatusGet;
4595
+ OnboardingStatus: OnboardingStatus;
4624
4596
  PortfolioUpdate: PortfolioUpdate;
4597
+ ViewAmount: ViewAmount;
4598
+ ViewDetail: ViewDetail;
4599
+ ViewTip: ViewTip;
4600
+ ViewRawData: ViewRawData;
4601
+ ViewSignPage: ViewSignPage;
4602
+ ViewVerifyPage: ViewVerifyPage;
4625
4603
  };
4626
4604
  export type MessageKey = keyof MessageType;
4627
4605
  export type MessageResponse<T extends MessageKey> = {