@onekeyfe/hd-transport 1.2.0-alpha.13 → 1.2.0-alpha.131

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 (59) hide show
  1. package/__tests__/messages.test.js +144 -4
  2. package/__tests__/protocol-v2-ble-frame-writer.test.js +119 -0
  3. package/__tests__/protocol-v2-link-manager.test.js +176 -9
  4. package/__tests__/protocol-v2-usb-transport-base.test.js +36 -2
  5. package/__tests__/protocol-v2.test.js +540 -108
  6. package/__tests__/transport-log.test.js +79 -0
  7. package/dist/constants.d.ts +3 -1
  8. package/dist/constants.d.ts.map +1 -1
  9. package/dist/index.d.ts +645 -217
  10. package/dist/index.d.ts.map +1 -1
  11. package/dist/index.js +679 -153
  12. package/dist/protocols/index.d.ts +17 -1
  13. package/dist/protocols/index.d.ts.map +1 -1
  14. package/dist/protocols/v2/ble-frame-writer.d.ts +15 -0
  15. package/dist/protocols/v2/ble-frame-writer.d.ts.map +1 -0
  16. package/dist/protocols/v2/decode.d.ts +11 -0
  17. package/dist/protocols/v2/decode.d.ts.map +1 -1
  18. package/dist/protocols/v2/errors.d.ts +16 -0
  19. package/dist/protocols/v2/errors.d.ts.map +1 -0
  20. package/dist/protocols/v2/frame-assembler.d.ts.map +1 -1
  21. package/dist/protocols/v2/index.d.ts +2 -0
  22. package/dist/protocols/v2/index.d.ts.map +1 -1
  23. package/dist/protocols/v2/link-manager.d.ts +5 -0
  24. package/dist/protocols/v2/link-manager.d.ts.map +1 -1
  25. package/dist/protocols/v2/session.d.ts +14 -4
  26. package/dist/protocols/v2/session.d.ts.map +1 -1
  27. package/dist/protocols/v2/usb-transport-base.d.ts +2 -0
  28. package/dist/protocols/v2/usb-transport-base.d.ts.map +1 -1
  29. package/dist/serialization/protobuf/decode.d.ts.map +1 -1
  30. package/dist/serialization/protobuf/encode.d.ts.map +1 -1
  31. package/dist/types/messages.d.ts +301 -156
  32. package/dist/types/messages.d.ts.map +1 -1
  33. package/dist/types/transport.d.ts +21 -3
  34. package/dist/types/transport.d.ts.map +1 -1
  35. package/dist/utils/transportLog.d.ts +9 -0
  36. package/dist/utils/transportLog.d.ts.map +1 -0
  37. package/messages-protocol-v2.json +523 -449
  38. package/package.json +2 -2
  39. package/scripts/protobuf-build.sh +112 -32
  40. package/scripts/protobuf-patches/index.js +1 -0
  41. package/scripts/protobuf-types.js +10 -1
  42. package/src/constants.ts +30 -16
  43. package/src/index.ts +5 -1
  44. package/src/protocols/index.ts +114 -3
  45. package/src/protocols/v2/ble-frame-writer.ts +77 -0
  46. package/src/protocols/v2/crc8.ts +1 -1
  47. package/src/protocols/v2/decode.ts +49 -12
  48. package/src/protocols/v2/encode.ts +1 -1
  49. package/src/protocols/v2/errors.ts +54 -0
  50. package/src/protocols/v2/frame-assembler.ts +6 -4
  51. package/src/protocols/v2/index.ts +2 -0
  52. package/src/protocols/v2/link-manager.ts +65 -5
  53. package/src/protocols/v2/session.ts +224 -80
  54. package/src/protocols/v2/usb-transport-base.ts +42 -10
  55. package/src/serialization/protobuf/decode.ts +4 -1
  56. package/src/serialization/protobuf/encode.ts +5 -1
  57. package/src/types/messages.ts +375 -198
  58. package/src/types/transport.ts +30 -3
  59. package/src/utils/transportLog.ts +102 -0
@@ -1648,11 +1648,17 @@ export type KaspaAddress = {
1648
1648
  };
1649
1649
  export type KaspaSignTx = {
1650
1650
  address_n: number[];
1651
- raw_message: string;
1651
+ raw_message?: string;
1652
1652
  scheme?: string;
1653
1653
  prefix?: string;
1654
1654
  input_count?: number;
1655
1655
  use_tweak?: boolean;
1656
+ output_count?: number;
1657
+ version?: number;
1658
+ lock_time?: number;
1659
+ subnetwork_id?: string;
1660
+ gas?: number;
1661
+ payload_length?: number;
1656
1662
  };
1657
1663
  export type KaspaTxInputRequest = {
1658
1664
  request_index: number;
@@ -1662,6 +1668,77 @@ export type KaspaTxInputAck = {
1662
1668
  address_n: number[];
1663
1669
  raw_message: string;
1664
1670
  };
1671
+ export type KaspaOutpoint = {
1672
+ tx_id: string;
1673
+ index: number;
1674
+ };
1675
+ export declare enum Enum_KaspaInputScriptType {
1676
+ KASPA_SPEND_P2PK_SCHNORR = 0,
1677
+ KASPA_SPEND_P2PK_ECDSA = 1
1678
+ }
1679
+ export type KaspaInputScriptType = keyof typeof Enum_KaspaInputScriptType;
1680
+ export declare enum Enum_KaspaOutputScriptType {
1681
+ KASPA_PAYTOADDRESS = 0,
1682
+ KASPA_PAYTOCHANGE = 1
1683
+ }
1684
+ export type KaspaOutputScriptType = keyof typeof Enum_KaspaOutputScriptType;
1685
+ export declare enum Enum_KaspaRequestType {
1686
+ KASPA_TX_INPUT = 0,
1687
+ KASPA_TX_OUTPUT = 1,
1688
+ KASPA_TX_PAYLOAD = 2,
1689
+ KASPA_TX_FINISHED = 3,
1690
+ KASPA_TX_PREV_META = 4
1691
+ }
1692
+ export type KaspaRequestType = keyof typeof Enum_KaspaRequestType;
1693
+ export type KaspaTxRequestSignature = {
1694
+ signature_index: number;
1695
+ signature: string;
1696
+ };
1697
+ export type KaspaTxRequest = {
1698
+ request_type: KaspaRequestType;
1699
+ request_index?: number;
1700
+ signature?: KaspaTxRequestSignature;
1701
+ request_payload_length?: number;
1702
+ prev_tx_id?: string;
1703
+ };
1704
+ export type KaspaTxAckInput = {
1705
+ address_n: number[];
1706
+ previous_outpoint: KaspaOutpoint;
1707
+ amount: UintType;
1708
+ sequence: number;
1709
+ sig_op_count: number;
1710
+ script_type?: KaspaInputScriptType;
1711
+ use_tweak?: boolean;
1712
+ };
1713
+ export type KaspaTxAckOutput = {
1714
+ script_type?: KaspaOutputScriptType;
1715
+ amount: UintType;
1716
+ address_n: number[];
1717
+ address?: string;
1718
+ scheme?: string;
1719
+ use_tweak?: boolean;
1720
+ };
1721
+ export type KaspaTxAckPayloadChunk = {
1722
+ payload_chunk: string;
1723
+ };
1724
+ export type KaspaTxAckPrevMeta = {
1725
+ version: number;
1726
+ input_count: number;
1727
+ output_count: number;
1728
+ lock_time: number;
1729
+ subnetwork_id: string;
1730
+ gas: number;
1731
+ payload_length: number;
1732
+ };
1733
+ export type KaspaTxAckPrevInput = {
1734
+ previous_outpoint: KaspaOutpoint;
1735
+ sequence: number;
1736
+ };
1737
+ export type KaspaTxAckPrevOutput = {
1738
+ amount: UintType;
1739
+ script_version: number;
1740
+ script_public_key: string;
1741
+ };
1665
1742
  export type KaspaSignedTx = {
1666
1743
  signature: string;
1667
1744
  };
@@ -1688,7 +1765,7 @@ export declare enum Enum_SafetyCheckLevel {
1688
1765
  PromptAlways = 1,
1689
1766
  PromptTemporarily = 2
1690
1767
  }
1691
- export type SafetyCheckLevel = keyof typeof Enum_SafetyCheckLevel;
1768
+ export type SafetyCheckLevel = keyof typeof Enum_SafetyCheckLevel | Enum_SafetyCheckLevel;
1692
1769
  export type Initialize = {
1693
1770
  session_id?: string;
1694
1771
  _skip_passphrase?: boolean;
@@ -2191,8 +2268,6 @@ export type UnLockDeviceResponse = {
2191
2268
  };
2192
2269
  export type GetPassphraseState = {
2193
2270
  passphrase_state?: string;
2194
- _only_main_pin?: boolean;
2195
- allow_create_attach_pin?: boolean;
2196
2271
  };
2197
2272
  export type PassphraseState = {
2198
2273
  passphrase_state?: string;
@@ -3371,17 +3446,6 @@ export type EthereumSignTypedDataQR = {
3371
3446
  metamask_v4_compat?: boolean;
3372
3447
  request_id?: string;
3373
3448
  };
3374
- export type InternalMyAddressRequest = {
3375
- coin_type: number;
3376
- chain_id: number;
3377
- account_index: number;
3378
- derive_type: number;
3379
- };
3380
- export type StartSession = {
3381
- session_id?: string;
3382
- _skip_passphrase?: boolean;
3383
- derive_cardano?: boolean;
3384
- };
3385
3449
  export type SetBusy = {
3386
3450
  expiry_ms?: number;
3387
3451
  };
@@ -3398,21 +3462,6 @@ export type Nonce = {
3398
3462
  export type WriteSEPrivateKey = {
3399
3463
  private_key: string;
3400
3464
  };
3401
- export declare enum WallpaperTarget {
3402
- Home = 0,
3403
- Lock = 1
3404
- }
3405
- export type SetWallpaper = {
3406
- target: WallpaperTarget;
3407
- path: string;
3408
- };
3409
- export type GetWallpaper = {
3410
- target: WallpaperTarget;
3411
- };
3412
- export type Wallpaper = {
3413
- target: WallpaperTarget;
3414
- path: string;
3415
- };
3416
3465
  export type UnlockPath = {
3417
3466
  address_n: number[];
3418
3467
  mac?: string;
@@ -3426,57 +3475,27 @@ export declare enum MoneroNetworkType {
3426
3475
  STAGENET = 2,
3427
3476
  FAKECHAIN = 3
3428
3477
  }
3429
- export type ViewAmount = {
3430
- is_unlimited: boolean;
3431
- num: string;
3432
- };
3433
- export type ViewDetail = {
3434
- key: number;
3435
- value: string;
3436
- is_overview: boolean;
3437
- has_icon: boolean;
3438
- };
3439
- export declare enum ViewTipType {
3440
- Default = 0,
3441
- Highlight = 1,
3442
- Recommend = 2,
3443
- Warning = 3,
3444
- Danger = 4
3478
+ export declare enum UiAnimationType {
3479
+ Unknown = 0,
3480
+ Signing = 1
3445
3481
  }
3446
- export type ViewTip = {
3447
- type: ViewTipType;
3448
- text: string;
3449
- };
3450
- export type ViewRawData = {
3451
- initial_data: string;
3452
- placeholder: number;
3453
- };
3454
- export declare enum ViewSignLayout {
3455
- LayoutDefault = 0,
3456
- LayoutSafeTxCreate = 1,
3457
- LayoutFinalConfirm = 2,
3458
- Layout7702 = 3,
3459
- LayoutFlat = 4
3482
+ export declare enum UiAnimationCommand {
3483
+ CommandUnknown = 0,
3484
+ Start = 1,
3485
+ Stop = 2,
3486
+ Refresh = 3
3460
3487
  }
3461
- export type ViewSignPage = {
3462
- title: string;
3463
- amount?: UintType;
3464
- general: ViewDetail[];
3465
- tip?: ViewTip;
3466
- raw_data?: ViewRawData;
3467
- slide_to_confirm?: boolean;
3468
- layout?: ViewSignLayout;
3488
+ export type UiAnimationRequest = {
3489
+ command: UiAnimationCommand;
3490
+ type?: UiAnimationType;
3469
3491
  };
3470
- export type ViewVerifyPage = {
3471
- title: string;
3472
- address: string;
3473
- path: string;
3492
+ export type ProtocolInfoRequest = {
3493
+ eventless_wallet_session?: boolean;
3474
3494
  };
3475
- export type ProtocolInfoRequest = {};
3476
3495
  export type ProtocolInfo = {
3477
3496
  version: number;
3497
+ build_fingerprint: string;
3478
3498
  supported_messages: number[];
3479
- protobuf_definition?: string;
3480
3499
  };
3481
3500
  export declare enum DeviceErrorCode {
3482
3501
  DeviceError_None = 0,
@@ -3499,23 +3518,22 @@ export type DeviceReboot = {
3499
3518
  reboot_type: DeviceRebootType;
3500
3519
  };
3501
3520
  export type DeviceSettings = {
3502
- label?: string;
3503
3521
  bt_enable?: boolean;
3504
3522
  language?: string;
3505
3523
  wallpaper_path?: string;
3506
- passphrase_enable?: boolean;
3507
3524
  brightness?: number;
3508
- autolock_delay_ms?: number;
3509
- autoshutdown_delay_ms?: number;
3510
3525
  animation_enable?: boolean;
3511
3526
  tap_to_wake?: boolean;
3512
3527
  haptic_feedback?: boolean;
3513
3528
  device_name_display_enabled?: boolean;
3514
3529
  airgap_mode?: boolean;
3515
- fido_enabled?: boolean;
3516
- experimental_features?: boolean;
3517
3530
  usb_lock_enable?: boolean;
3518
3531
  random_keypad?: boolean;
3532
+ passphrase_enable?: boolean;
3533
+ fido_enabled?: boolean;
3534
+ autolock_delay_ms?: number;
3535
+ autoshutdown_delay_ms?: number;
3536
+ label?: string;
3519
3537
  };
3520
3538
  export type DeviceSettingsGet = {};
3521
3539
  export type DeviceSettingsSet = {
@@ -3545,6 +3563,39 @@ export type DeviceCertificateSignature = {
3545
3563
  export type DeviceCertificateSign = {
3546
3564
  data: string;
3547
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
+ factory_test_completed?: boolean;
3585
+ factory_burn_in_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
+ };
3548
3599
  export declare enum DeviceFirmwareTargetType {
3549
3600
  FW_MGMT_TARGET_INVALID = 0,
3550
3601
  FW_MGMT_TARGET_CRATE = 1,
@@ -3575,9 +3626,10 @@ export type DeviceFirmwareTarget = {
3575
3626
  target_id: DeviceFirmwareTargetType;
3576
3627
  path: string;
3577
3628
  };
3578
- export type DeviceFirmwareUpdateRequest = {
3629
+ export type DeviceFirmwareUpdateStage = {
3579
3630
  targets: DeviceFirmwareTarget[];
3580
3631
  };
3632
+ export type DeviceFirmwareUpdateRequest = {};
3581
3633
  export type DeviceFirmwareUpdateRecord = {
3582
3634
  target_id: DeviceFirmwareTargetType;
3583
3635
  status?: DeviceFirmwareUpdateTaskStatus;
@@ -3595,36 +3647,6 @@ export type DeviceFirmwareUpdateStatusGet = {
3595
3647
  export type DeviceFirmwareUpdateStatus = {
3596
3648
  records: DeviceFirmwareUpdateRecord[];
3597
3649
  };
3598
- export declare enum DeviceFactoryAck {
3599
- FACTORY_ACK_SUCCESS = 0,
3600
- FACTORY_ACK_FAIL = 1
3601
- }
3602
- export type DeviceFactoryInfoManufactureTime = {
3603
- year: number;
3604
- month: number;
3605
- day: number;
3606
- hour: number;
3607
- minute: number;
3608
- second: number;
3609
- };
3610
- export type DeviceFactoryInfo = {
3611
- version?: number;
3612
- serial_number?: string;
3613
- burn_in_completed?: boolean;
3614
- factory_test_completed?: boolean;
3615
- manufacture_time?: DeviceFactoryInfoManufactureTime;
3616
- };
3617
- export type DeviceFactoryInfoSet = {
3618
- info: DeviceFactoryInfo;
3619
- };
3620
- export type DeviceFactoryInfoGet = {};
3621
- export type DeviceFactoryPermanentLock = {
3622
- check_a: string;
3623
- check_b: string;
3624
- };
3625
- export type DeviceFactoryTest = {
3626
- burn_in_test: boolean;
3627
- };
3628
3650
  export declare enum DeviceType {
3629
3651
  CLASSIC1 = 0,
3630
3652
  CLASSIC1S = 1,
@@ -3675,13 +3697,12 @@ export type DeviceSEInfo = {
3675
3697
  };
3676
3698
  export type DeviceInfoTargets = {
3677
3699
  hw?: boolean;
3678
- fw?: boolean;
3700
+ main_mcu?: boolean;
3679
3701
  coprocessor?: boolean;
3680
3702
  se1?: boolean;
3681
3703
  se2?: boolean;
3682
3704
  se3?: boolean;
3683
3705
  se4?: boolean;
3684
- status?: boolean;
3685
3706
  };
3686
3707
  export type DeviceInfoTypes = {
3687
3708
  version?: boolean;
@@ -3696,22 +3717,46 @@ export type DeviceInfoGet = {
3696
3717
  export type ProtocolV2DeviceInfo = {
3697
3718
  protocol_version: number;
3698
3719
  hw?: DeviceHardwareInfo;
3699
- fw?: DeviceMainMcuInfo;
3720
+ main_mcu?: DeviceMainMcuInfo;
3700
3721
  coprocessor?: DeviceCoprocessorInfo;
3701
3722
  se1?: DeviceSEInfo;
3702
3723
  se2?: DeviceSEInfo;
3703
3724
  se3?: DeviceSEInfo;
3704
3725
  se4?: DeviceSEInfo;
3705
- status?: DeviceStatus;
3706
3726
  };
3727
+ export declare enum DeviceSessionErrorCode {
3728
+ DeviceSessionError_None = 0,
3729
+ DeviceSessionError_UserCancelled = 1,
3730
+ DeviceSessionError_InvalidSession = 2,
3731
+ DeviceSessionError_AttachPinUnavailable = 3,
3732
+ DeviceSessionError_PassphraseDisabled = 4,
3733
+ DeviceSessionError_Busy = 5
3734
+ }
3735
+ export declare enum DeviceSessionSeedDomain {
3736
+ SeedDomain_Standard = 1,
3737
+ SeedDomain_Cardano = 2
3738
+ }
3707
3739
  export type DeviceSessionGet = {
3708
3740
  session_id?: string;
3741
+ btc_test_address?: string;
3742
+ seed_domains: DeviceSessionSeedDomain[];
3709
3743
  };
3710
3744
  export type DeviceSession = {
3711
3745
  session_id?: string;
3712
3746
  btc_test_address?: string;
3713
3747
  };
3714
- export type DeviceSessionAskPin = {};
3748
+ export declare enum DeviceSessionPinType {
3749
+ Any = 1,
3750
+ Main = 2,
3751
+ AttachToPin = 3
3752
+ }
3753
+ export type DeviceSessionAskPin = {
3754
+ type?: DeviceSessionPinType;
3755
+ };
3756
+ export type DeviceSessionAskPassphrase = {
3757
+ passphrase?: string;
3758
+ on_device: boolean;
3759
+ };
3715
3760
  export declare enum DeviceSessionAskPin_FailureSubCodes {
3716
3761
  UserCancel = 1
3717
3762
  }
@@ -3725,27 +3770,6 @@ export type DeviceStatus = {
3725
3770
  unlocked_by_attach_to_pin?: boolean;
3726
3771
  };
3727
3772
  export type DeviceStatusGet = {};
3728
- export declare enum DevOnboardingStage {
3729
- DEV_ONBOARDING_STAGE_UNKNOWN = 0,
3730
- DEV_ONBOARDING_STAGE_SAFETY_CHECK = 1,
3731
- DEV_ONBOARDING_STAGE_PERSONALIZATION = 2,
3732
- DEV_ONBOARDING_STAGE_SELECT_SETUP_METHOD = 3,
3733
- DEV_ONBOARDING_STAGE_NEW_DEVICE = 4,
3734
- DEV_ONBOARDING_STAGE_SELECT_RESTORE_METHOD = 5,
3735
- DEV_ONBOARDING_STAGE_RESTORE_MNEMONIC = 6,
3736
- DEV_ONBOARDING_STAGE_RESTORE_SEEDCARD = 7,
3737
- DEV_ONBOARDING_STAGE_WALLET_READY = 8,
3738
- DEV_ONBOARDING_STAGE_SEEDCARD_BACKUP_PROMPT = 9,
3739
- DEV_ONBOARDING_STAGE_SELECT_SEEDCARD_BACKUP_METHOD = 10,
3740
- DEV_ONBOARDING_STAGE_SEEDCARD_BACKUP = 11,
3741
- DEV_ONBOARDING_STAGE_DONE = 12
3742
- }
3743
- export type DevGetOnboardingStatus = {};
3744
- export type DevOnboardingStatus = {
3745
- stage: DevOnboardingStage;
3746
- status_code?: number;
3747
- detail_code?: number;
3748
- };
3749
3773
  export type FilesystemPermissionFix = {};
3750
3774
  export type FilesystemPathInfo = {
3751
3775
  exist: boolean;
@@ -3806,7 +3830,117 @@ export type FilesystemFormat = {
3806
3830
  data: boolean;
3807
3831
  user: boolean;
3808
3832
  };
3833
+ export type InternalMyAddressRequest = {
3834
+ coin_type: number;
3835
+ chain_id: number;
3836
+ account_index: number;
3837
+ derive_type: number;
3838
+ };
3839
+ export type NftUpdate = {
3840
+ file_name_no_ext: string;
3841
+ };
3842
+ export declare enum OnboardingStep {
3843
+ ONBOARDING_STEP_UNKNOWN = 0,
3844
+ ONBOARDING_STEP_CHECKING = 1,
3845
+ ONBOARDING_STEP_PERSONALIZATION = 2,
3846
+ ONBOARDING_STEP_PIN = 3,
3847
+ ONBOARDING_STEP_SETUP = 4,
3848
+ ONBOARDING_STEP_DONE = 5
3849
+ }
3850
+ export declare enum OnboardingPhase {
3851
+ ONBOARDING_PHASE_UNKNOWN = 0,
3852
+ ONBOARDING_PHASE_SAFETY_CHECK = 1,
3853
+ ONBOARDING_PHASE_PIN_SETUP = 2,
3854
+ ONBOARDING_PHASE_FINGERPRINT_SETUP = 3,
3855
+ ONBOARDING_PHASE_SETUP_CHOICE = 4,
3856
+ ONBOARDING_PHASE_WALLET_CREATE_START = 5,
3857
+ ONBOARDING_PHASE_RECOVERY_PHRASE_VIEW = 6,
3858
+ ONBOARDING_PHASE_RECOVERY_PHRASE_CONFIRM = 7,
3859
+ ONBOARDING_PHASE_RESTORE_METHOD_CHOICE = 8,
3860
+ ONBOARDING_PHASE_RECOVERY_PHRASE_RESTORE = 9,
3861
+ ONBOARDING_PHASE_SEEDCARD_RESTORE = 10,
3862
+ ONBOARDING_PHASE_WALLET_READY = 11,
3863
+ ONBOARDING_PHASE_SEEDCARD_BACKUP_PROMPT = 12,
3864
+ ONBOARDING_PHASE_SEEDCARD_BACKUP = 13
3865
+ }
3866
+ export declare enum OnboardingSetupKind {
3867
+ ONBOARDING_SETUP_KIND_UNKNOWN = 0,
3868
+ ONBOARDING_SETUP_KIND_CHOICE = 1,
3869
+ ONBOARDING_SETUP_KIND_CREATE = 2,
3870
+ ONBOARDING_SETUP_KIND_RESTORE = 3
3871
+ }
3872
+ export declare enum OnboardingSetupMethod {
3873
+ ONBOARDING_SETUP_METHOD_UNKNOWN = 0,
3874
+ ONBOARDING_SETUP_METHOD_RECOVERY_PHRASE = 1,
3875
+ ONBOARDING_SETUP_METHOD_SEEDCARD = 2
3876
+ }
3877
+ export type OnboardingSetupStatus = {
3878
+ kind?: OnboardingSetupKind;
3879
+ method?: OnboardingSetupMethod;
3880
+ };
3881
+ export type OnboardingStatusGet = {};
3882
+ export type OnboardingStatus = {
3883
+ step?: OnboardingStep;
3884
+ phase?: OnboardingPhase;
3885
+ setup?: OnboardingSetupStatus;
3886
+ pin_set?: boolean;
3887
+ wallet_initialized?: boolean;
3888
+ };
3809
3889
  export type PortfolioUpdate = {};
3890
+ export type ViewAmount = {
3891
+ is_unlimited: boolean;
3892
+ num: string;
3893
+ };
3894
+ export type ViewDetail = {
3895
+ key: number;
3896
+ value: string;
3897
+ is_overview: boolean;
3898
+ has_icon: boolean;
3899
+ };
3900
+ export declare enum ViewTipType {
3901
+ Default = 0,
3902
+ Highlight = 1,
3903
+ Recommend = 2,
3904
+ Warning = 3,
3905
+ Danger = 4
3906
+ }
3907
+ export type ViewTip = {
3908
+ type: ViewTipType;
3909
+ text?: string;
3910
+ text_id?: number;
3911
+ };
3912
+ export type ViewRawData = {
3913
+ initial_data: string;
3914
+ placeholder: number;
3915
+ };
3916
+ export declare enum ViewSignLayout {
3917
+ LayoutDefault = 0,
3918
+ LayoutSafeTxCreate = 1,
3919
+ LayoutFinalConfirm = 2,
3920
+ Layout7702 = 3,
3921
+ LayoutFlat = 4,
3922
+ LayoutEthApprove = 5
3923
+ }
3924
+ export type ViewSignPage = {
3925
+ title?: string;
3926
+ amount?: UintType;
3927
+ general: ViewDetail[];
3928
+ tip?: ViewTip;
3929
+ raw_data?: ViewRawData;
3930
+ slide_to_confirm?: boolean;
3931
+ layout?: ViewSignLayout;
3932
+ title_id?: number;
3933
+ };
3934
+ export type ViewVerifyPage = {
3935
+ title?: string;
3936
+ address: string;
3937
+ path: string;
3938
+ network?: string;
3939
+ derive_type?: string;
3940
+ value_key?: number;
3941
+ title_id?: number;
3942
+ chain_id?: number;
3943
+ };
3810
3944
  export declare enum ProtocolV2FailureType {
3811
3945
  Failure_InvalidMessage = 1,
3812
3946
  Failure_UndefinedError = 2,
@@ -4110,6 +4244,15 @@ export type MessageType = {
4110
4244
  KaspaSignTx: KaspaSignTx;
4111
4245
  KaspaTxInputRequest: KaspaTxInputRequest;
4112
4246
  KaspaTxInputAck: KaspaTxInputAck;
4247
+ KaspaOutpoint: KaspaOutpoint;
4248
+ KaspaTxRequestSignature: KaspaTxRequestSignature;
4249
+ KaspaTxRequest: KaspaTxRequest;
4250
+ KaspaTxAckInput: KaspaTxAckInput;
4251
+ KaspaTxAckOutput: KaspaTxAckOutput;
4252
+ KaspaTxAckPayloadChunk: KaspaTxAckPayloadChunk;
4253
+ KaspaTxAckPrevMeta: KaspaTxAckPrevMeta;
4254
+ KaspaTxAckPrevInput: KaspaTxAckPrevInput;
4255
+ KaspaTxAckPrevOutput: KaspaTxAckPrevOutput;
4113
4256
  KaspaSignedTx: KaspaSignedTx;
4114
4257
  LnurlAuth: LnurlAuth;
4115
4258
  LnurlAuthResp: LnurlAuthResp;
@@ -4400,25 +4543,15 @@ export type MessageType = {
4400
4543
  PaymentRequestMemo: PaymentRequestMemo;
4401
4544
  TxAckPaymentRequest: TxAckPaymentRequest;
4402
4545
  EthereumSignTypedDataQR: EthereumSignTypedDataQR;
4403
- InternalMyAddressRequest: InternalMyAddressRequest;
4404
- StartSession: StartSession;
4405
4546
  SetBusy: SetBusy;
4406
4547
  GetFirmwareHash: GetFirmwareHash;
4407
4548
  FirmwareHash: FirmwareHash;
4408
4549
  GetNonce: GetNonce;
4409
4550
  Nonce: Nonce;
4410
4551
  WriteSEPrivateKey: WriteSEPrivateKey;
4411
- SetWallpaper: SetWallpaper;
4412
- GetWallpaper: GetWallpaper;
4413
- Wallpaper: Wallpaper;
4414
4552
  UnlockPath: UnlockPath;
4415
4553
  UnlockedPathRequest: UnlockedPathRequest;
4416
- ViewAmount: ViewAmount;
4417
- ViewDetail: ViewDetail;
4418
- ViewTip: ViewTip;
4419
- ViewRawData: ViewRawData;
4420
- ViewSignPage: ViewSignPage;
4421
- ViewVerifyPage: ViewVerifyPage;
4554
+ UiAnimationRequest: UiAnimationRequest;
4422
4555
  ProtocolInfoRequest: ProtocolInfoRequest;
4423
4556
  ProtocolInfo: ProtocolInfo;
4424
4557
  DeviceReboot: DeviceReboot;
@@ -4431,18 +4564,20 @@ export type MessageType = {
4431
4564
  DeviceCertificateRead: DeviceCertificateRead;
4432
4565
  DeviceCertificateSignature: DeviceCertificateSignature;
4433
4566
  DeviceCertificateSign: DeviceCertificateSign;
4434
- DeviceFirmwareTarget: DeviceFirmwareTarget;
4435
- DeviceFirmwareUpdateRequest: DeviceFirmwareUpdateRequest;
4436
- DeviceFirmwareUpdateRecord: DeviceFirmwareUpdateRecord;
4437
- DeviceFirmwareUpdateRecordFields: DeviceFirmwareUpdateRecordFields;
4438
- DeviceFirmwareUpdateStatusGet: DeviceFirmwareUpdateStatusGet;
4439
- DeviceFirmwareUpdateStatus: DeviceFirmwareUpdateStatus;
4567
+ DeviceMiscUsbMscControl: DeviceMiscUsbMscControl;
4440
4568
  DeviceFactoryInfoManufactureTime: DeviceFactoryInfoManufactureTime;
4441
4569
  DeviceFactoryInfo: DeviceFactoryInfo;
4442
4570
  DeviceFactoryInfoSet: DeviceFactoryInfoSet;
4443
4571
  DeviceFactoryInfoGet: DeviceFactoryInfoGet;
4444
4572
  DeviceFactoryPermanentLock: DeviceFactoryPermanentLock;
4445
4573
  DeviceFactoryTest: DeviceFactoryTest;
4574
+ DeviceFirmwareTarget: DeviceFirmwareTarget;
4575
+ DeviceFirmwareUpdateStage: DeviceFirmwareUpdateStage;
4576
+ DeviceFirmwareUpdateRequest: DeviceFirmwareUpdateRequest;
4577
+ DeviceFirmwareUpdateRecord: DeviceFirmwareUpdateRecord;
4578
+ DeviceFirmwareUpdateRecordFields: DeviceFirmwareUpdateRecordFields;
4579
+ DeviceFirmwareUpdateStatusGet: DeviceFirmwareUpdateStatusGet;
4580
+ DeviceFirmwareUpdateStatus: DeviceFirmwareUpdateStatus;
4446
4581
  DeviceFirmwareImageInfo: DeviceFirmwareImageInfo;
4447
4582
  DeviceHardwareInfo: DeviceHardwareInfo;
4448
4583
  DeviceMainMcuInfo: DeviceMainMcuInfo;
@@ -4454,10 +4589,9 @@ export type MessageType = {
4454
4589
  DeviceSessionGet: DeviceSessionGet;
4455
4590
  DeviceSession: DeviceSession;
4456
4591
  DeviceSessionAskPin: DeviceSessionAskPin;
4592
+ DeviceSessionAskPassphrase: DeviceSessionAskPassphrase;
4457
4593
  DeviceStatus: DeviceStatus;
4458
4594
  DeviceStatusGet: DeviceStatusGet;
4459
- DevGetOnboardingStatus: DevGetOnboardingStatus;
4460
- DevOnboardingStatus: DevOnboardingStatus;
4461
4595
  FilesystemPermissionFix: FilesystemPermissionFix;
4462
4596
  FilesystemPathInfo: FilesystemPathInfo;
4463
4597
  FilesystemPathInfoQuery: FilesystemPathInfoQuery;
@@ -4470,7 +4604,18 @@ export type MessageType = {
4470
4604
  FilesystemDirMake: FilesystemDirMake;
4471
4605
  FilesystemDirRemove: FilesystemDirRemove;
4472
4606
  FilesystemFormat: FilesystemFormat;
4607
+ InternalMyAddressRequest: InternalMyAddressRequest;
4608
+ NftUpdate: NftUpdate;
4609
+ OnboardingSetupStatus: OnboardingSetupStatus;
4610
+ OnboardingStatusGet: OnboardingStatusGet;
4611
+ OnboardingStatus: OnboardingStatus;
4473
4612
  PortfolioUpdate: PortfolioUpdate;
4613
+ ViewAmount: ViewAmount;
4614
+ ViewDetail: ViewDetail;
4615
+ ViewTip: ViewTip;
4616
+ ViewRawData: ViewRawData;
4617
+ ViewSignPage: ViewSignPage;
4618
+ ViewVerifyPage: ViewVerifyPage;
4474
4619
  };
4475
4620
  export type MessageKey = keyof MessageType;
4476
4621
  export type MessageResponse<T extends MessageKey> = {