@onekeyfe/hd-transport 1.2.0-alpha.8 → 1.2.0-alpha.80

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 (70) hide show
  1. package/__tests__/messages.test.js +220 -0
  2. package/__tests__/protocol-v2-ble-frame-writer.test.js +119 -0
  3. package/__tests__/protocol-v2-link-manager.test.js +437 -0
  4. package/__tests__/protocol-v2-usb-transport-base.test.js +330 -0
  5. package/__tests__/protocol-v2.test.js +535 -53
  6. package/__tests__/transport-log.test.js +79 -0
  7. package/dist/constants.d.ts +5 -1
  8. package/dist/constants.d.ts.map +1 -1
  9. package/dist/index.d.ts +822 -199
  10. package/dist/index.d.ts.map +1 -1
  11. package/dist/index.js +853 -229
  12. package/dist/protocols/index.d.ts +14 -5
  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/constants.d.ts +1 -0
  17. package/dist/protocols/v2/constants.d.ts.map +1 -1
  18. package/dist/protocols/v2/decode.d.ts +13 -2
  19. package/dist/protocols/v2/decode.d.ts.map +1 -1
  20. package/dist/protocols/v2/encode.d.ts +2 -3
  21. package/dist/protocols/v2/encode.d.ts.map +1 -1
  22. package/dist/protocols/v2/errors.d.ts +8 -0
  23. package/dist/protocols/v2/errors.d.ts.map +1 -0
  24. package/dist/protocols/v2/frame-assembler.d.ts.map +1 -1
  25. package/dist/protocols/v2/index.d.ts +2 -1
  26. package/dist/protocols/v2/index.d.ts.map +1 -1
  27. package/dist/protocols/v2/link-manager.d.ts +39 -0
  28. package/dist/protocols/v2/link-manager.d.ts.map +1 -0
  29. package/dist/protocols/v2/sequence-cursor.d.ts +5 -0
  30. package/dist/protocols/v2/sequence-cursor.d.ts.map +1 -0
  31. package/dist/protocols/v2/session.d.ts +24 -6
  32. package/dist/protocols/v2/session.d.ts.map +1 -1
  33. package/dist/protocols/v2/usb-transport-base.d.ts +32 -0
  34. package/dist/protocols/v2/usb-transport-base.d.ts.map +1 -0
  35. package/dist/serialization/protobuf/decode.d.ts.map +1 -1
  36. package/dist/serialization/protobuf/encode.d.ts.map +1 -1
  37. package/dist/types/messages.d.ts +386 -110
  38. package/dist/types/messages.d.ts.map +1 -1
  39. package/dist/types/transport.d.ts +21 -4
  40. package/dist/types/transport.d.ts.map +1 -1
  41. package/dist/utils/transportLog.d.ts +9 -0
  42. package/dist/utils/transportLog.d.ts.map +1 -0
  43. package/messages-protocol-v2.json +1138 -441
  44. package/package.json +3 -3
  45. package/scripts/protobuf-build.sh +86 -208
  46. package/scripts/protobuf-patches/index.js +1 -0
  47. package/scripts/protobuf-types.js +19 -1
  48. package/src/constants.ts +34 -14
  49. package/src/index.ts +13 -1
  50. package/src/protocols/index.ts +39 -40
  51. package/src/protocols/v2/ble-frame-writer.ts +77 -0
  52. package/src/protocols/v2/constants.ts +1 -0
  53. package/src/protocols/v2/crc8.ts +1 -1
  54. package/src/protocols/v2/decode.ts +71 -37
  55. package/src/protocols/v2/encode.ts +2 -28
  56. package/src/protocols/v2/errors.ts +25 -0
  57. package/src/protocols/v2/frame-assembler.ts +6 -4
  58. package/src/protocols/v2/index.ts +2 -1
  59. package/src/protocols/v2/link-manager.ts +209 -0
  60. package/src/protocols/v2/sequence-cursor.ts +10 -0
  61. package/src/protocols/v2/session.ts +187 -200
  62. package/src/protocols/v2/usb-transport-base.ts +213 -0
  63. package/src/serialization/protobuf/decode.ts +4 -1
  64. package/src/serialization/protobuf/encode.ts +5 -1
  65. package/src/types/messages.ts +471 -142
  66. package/src/types/transport.ts +29 -4
  67. package/src/utils/transportLog.ts +102 -0
  68. package/dist/protocols/v2/debug.d.ts +0 -13
  69. package/dist/protocols/v2/debug.d.ts.map +0 -1
  70. package/src/protocols/v2/debug.ts +0 -26
@@ -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;
@@ -1827,6 +1904,19 @@ export type Features = {
1827
1904
  onekey_se04_state?: string | null;
1828
1905
  attach_to_pin_user?: boolean;
1829
1906
  unlocked_attach_pin?: boolean;
1907
+ coprocessor_bt_name?: string;
1908
+ coprocessor_version?: string;
1909
+ coprocessor_bt_enable?: boolean;
1910
+ romloader_version?: string;
1911
+ onekey_romloader_version?: string;
1912
+ onekey_romloader_hash?: string;
1913
+ onekey_bootloader_version?: string;
1914
+ onekey_bootloader_hash?: string;
1915
+ onekey_bootloader_build_id?: string;
1916
+ onekey_coprocessor_bt_name?: string;
1917
+ onekey_coprocessor_version?: string;
1918
+ onekey_coprocessor_build_id?: string;
1919
+ onekey_coprocessor_hash?: string;
1830
1920
  };
1831
1921
  export type OnekeyFeatures = {
1832
1922
  onekey_device_type?: OneKeyDeviceType;
@@ -2178,8 +2268,6 @@ export type UnLockDeviceResponse = {
2178
2268
  };
2179
2269
  export type GetPassphraseState = {
2180
2270
  passphrase_state?: string;
2181
- _only_main_pin?: boolean;
2182
- allow_create_attach_pin?: boolean;
2183
2271
  };
2184
2272
  export type PassphraseState = {
2185
2273
  passphrase_state?: string;
@@ -3351,16 +3439,12 @@ export type TxAckPaymentRequest = {
3351
3439
  amount?: UintType;
3352
3440
  signature: string;
3353
3441
  };
3354
- export type InternalMyAddressRequest = {
3355
- coin_type: number;
3356
- chain_id: number;
3357
- account_index: number;
3358
- derive_type: number;
3359
- };
3360
- export type StartSession = {
3361
- session_id?: string;
3362
- _skip_passphrase?: boolean;
3363
- derive_cardano?: boolean;
3442
+ export type EthereumSignTypedDataQR = {
3443
+ address_n: number[];
3444
+ json_data?: string;
3445
+ chain_id?: number;
3446
+ metamask_v4_compat?: boolean;
3447
+ request_id?: string;
3364
3448
  };
3365
3449
  export type SetBusy = {
3366
3450
  expiry_ms?: number;
@@ -3378,21 +3462,6 @@ export type Nonce = {
3378
3462
  export type WriteSEPrivateKey = {
3379
3463
  private_key: string;
3380
3464
  };
3381
- export declare enum WallpaperTarget {
3382
- Home = 0,
3383
- Lock = 1
3384
- }
3385
- export type SetWallpaper = {
3386
- target: WallpaperTarget;
3387
- path: string;
3388
- };
3389
- export type GetWallpaper = {
3390
- target: WallpaperTarget;
3391
- };
3392
- export type Wallpaper = {
3393
- target: WallpaperTarget;
3394
- path: string;
3395
- };
3396
3465
  export type UnlockPath = {
3397
3466
  address_n: number[];
3398
3467
  mac?: string;
@@ -3406,44 +3475,40 @@ export declare enum MoneroNetworkType {
3406
3475
  STAGENET = 2,
3407
3476
  FAKECHAIN = 3
3408
3477
  }
3409
- export type ViewAmount = {
3410
- is_unlimited: boolean;
3411
- num: string;
3412
- };
3413
- export type ViewDetail = {
3414
- key: number;
3415
- value: string;
3416
- is_overview: boolean;
3417
- has_icon: boolean;
3418
- };
3419
- export declare enum ViewTipType {
3420
- Default = 0,
3421
- Highlight = 1,
3422
- Recommend = 2,
3423
- Warning = 3,
3424
- Danger = 4
3478
+ export declare enum UiAnimationType {
3479
+ Unknown = 0,
3480
+ Signing = 1
3425
3481
  }
3426
- export type ViewTip = {
3427
- type: ViewTipType;
3428
- text: string;
3429
- };
3430
- export type ViewSignPage = {
3431
- title: string;
3432
- amount?: UintType;
3433
- general: ViewDetail[];
3434
- tip?: ViewTip;
3482
+ export declare enum UiAnimationCommand {
3483
+ CommandUnknown = 0,
3484
+ Start = 1,
3485
+ Stop = 2,
3486
+ Refresh = 3
3487
+ }
3488
+ export type UiAnimationRequest = {
3489
+ command: UiAnimationCommand;
3490
+ type?: UiAnimationType;
3435
3491
  };
3436
- export type ViewVerifyPage = {
3437
- title: string;
3438
- address: string;
3439
- path: string;
3492
+ export type ProtocolInfoRequest = {
3493
+ eventless_wallet_session?: boolean;
3440
3494
  };
3441
- export type ProtocolInfoRequest = {};
3442
3495
  export type ProtocolInfo = {
3443
3496
  version: number;
3497
+ build_fingerprint: string;
3444
3498
  supported_messages: number[];
3445
- protobuf_definition?: string;
3446
3499
  };
3500
+ export declare enum DeviceErrorCode {
3501
+ DeviceError_None = 0,
3502
+ DeviceError_Busy = 1,
3503
+ DeviceError_NotInitialized = 2,
3504
+ DeviceError_ActionCancelled = 3,
3505
+ DeviceError_PinAlreadyUsed = 4,
3506
+ DeviceError_PersistFailed = 5,
3507
+ DeviceError_SeError = 6,
3508
+ DeviceError_InvalidLanguage = 7,
3509
+ DeviceError_WallpaperNotUsable = 8,
3510
+ DeviceError_DeviceLocked = 9
3511
+ }
3447
3512
  export declare enum DeviceRebootType {
3448
3513
  Normal = 0,
3449
3514
  Romloader = 1,
@@ -3453,14 +3518,37 @@ export type DeviceReboot = {
3453
3518
  reboot_type: DeviceRebootType;
3454
3519
  };
3455
3520
  export type DeviceSettings = {
3456
- label?: string;
3457
3521
  bt_enable?: boolean;
3458
3522
  language?: string;
3523
+ wallpaper_path?: string;
3524
+ brightness?: number;
3525
+ animation_enable?: boolean;
3526
+ tap_to_wake?: boolean;
3527
+ haptic_feedback?: boolean;
3528
+ device_name_display_enabled?: boolean;
3529
+ airgap_mode?: boolean;
3530
+ usb_lock_enable?: boolean;
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;
3459
3537
  };
3460
3538
  export type DeviceSettingsGet = {};
3461
3539
  export type DeviceSettingsSet = {
3462
3540
  settings: DeviceSettings;
3463
3541
  };
3542
+ export declare enum DeviceSettingsPage {
3543
+ DeviceReset = 0,
3544
+ DevicePinChange = 1,
3545
+ DevicePassphrase = 2,
3546
+ DeviceAirgap = 3
3547
+ }
3548
+ export type DeviceSettingsPageShow = {
3549
+ page: DeviceSettingsPage;
3550
+ field_name?: string;
3551
+ };
3464
3552
  export type DeviceCertificate = {
3465
3553
  cert_and_pubkey: string;
3466
3554
  private_key?: string;
@@ -3475,6 +3563,39 @@ export type DeviceCertificateSignature = {
3475
3563
  export type DeviceCertificateSign = {
3476
3564
  data: string;
3477
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
+ };
3478
3599
  export declare enum DeviceFirmwareTargetType {
3479
3600
  FW_MGMT_TARGET_INVALID = 0,
3480
3601
  FW_MGMT_TARGET_CRATE = 1,
@@ -3525,36 +3646,6 @@ export type DeviceFirmwareUpdateStatusGet = {
3525
3646
  export type DeviceFirmwareUpdateStatus = {
3526
3647
  records: DeviceFirmwareUpdateRecord[];
3527
3648
  };
3528
- export declare enum DeviceFactoryAck {
3529
- FACTORY_ACK_SUCCESS = 0,
3530
- FACTORY_ACK_FAIL = 1
3531
- }
3532
- export type DeviceFactoryInfoManufactureTime = {
3533
- year: number;
3534
- month: number;
3535
- day: number;
3536
- hour: number;
3537
- minute: number;
3538
- second: number;
3539
- };
3540
- export type DeviceFactoryInfo = {
3541
- version?: number;
3542
- serial_number?: string;
3543
- burn_in_completed?: boolean;
3544
- factory_test_completed?: boolean;
3545
- manufacture_time?: DeviceFactoryInfoManufactureTime;
3546
- };
3547
- export type DeviceFactoryInfoSet = {
3548
- info: DeviceFactoryInfo;
3549
- };
3550
- export type DeviceFactoryInfoGet = {};
3551
- export type DeviceFactoryPermanentLock = {
3552
- check_a: string;
3553
- check_b: string;
3554
- };
3555
- export type DeviceFactoryTest = {
3556
- burn_in_test: boolean;
3557
- };
3558
3649
  export declare enum DeviceType {
3559
3650
  CLASSIC1 = 0,
3560
3651
  CLASSIC1S = 1,
@@ -3611,7 +3702,6 @@ export type DeviceInfoTargets = {
3611
3702
  se2?: boolean;
3612
3703
  se3?: boolean;
3613
3704
  se4?: boolean;
3614
- status?: boolean;
3615
3705
  };
3616
3706
  export type DeviceInfoTypes = {
3617
3707
  version?: boolean;
@@ -3632,15 +3722,43 @@ export type ProtocolV2DeviceInfo = {
3632
3722
  se2?: DeviceSEInfo;
3633
3723
  se3?: DeviceSEInfo;
3634
3724
  se4?: DeviceSEInfo;
3635
- status?: DeviceStatus;
3636
3725
  };
3726
+ export declare enum DeviceSessionErrorCode {
3727
+ DeviceSessionError_None = 0,
3728
+ DeviceSessionError_UserCancelled = 1,
3729
+ DeviceSessionError_InvalidSession = 2,
3730
+ DeviceSessionError_AttachPinUnavailable = 3,
3731
+ DeviceSessionError_PassphraseDisabled = 4,
3732
+ DeviceSessionError_Busy = 5
3733
+ }
3734
+ export declare enum DeviceSessionSeedDomain {
3735
+ SeedDomain_Standard = 1,
3736
+ SeedDomain_Cardano = 2
3737
+ }
3637
3738
  export type DeviceSessionGet = {
3638
3739
  session_id?: string;
3740
+ btc_test_address?: string;
3741
+ seed_domains: DeviceSessionSeedDomain[];
3639
3742
  };
3640
3743
  export type DeviceSession = {
3641
3744
  session_id?: string;
3642
3745
  btc_test_address?: string;
3643
3746
  };
3747
+ export declare enum DeviceSessionPinType {
3748
+ Any = 1,
3749
+ Main = 2,
3750
+ AttachToPin = 3
3751
+ }
3752
+ export type DeviceSessionAskPin = {
3753
+ type?: DeviceSessionPinType;
3754
+ };
3755
+ export type DeviceSessionAskPassphrase = {
3756
+ passphrase?: string;
3757
+ on_device: boolean;
3758
+ };
3759
+ export declare enum DeviceSessionAskPin_FailureSubCodes {
3760
+ UserCancel = 1
3761
+ }
3644
3762
  export type DeviceStatus = {
3645
3763
  device_id?: string;
3646
3764
  unlocked?: boolean;
@@ -3650,6 +3768,7 @@ export type DeviceStatus = {
3650
3768
  attach_to_pin_enabled?: boolean;
3651
3769
  unlocked_by_attach_to_pin?: boolean;
3652
3770
  };
3771
+ export type DeviceStatusGet = {};
3653
3772
  export type FilesystemPermissionFix = {};
3654
3773
  export type FilesystemPathInfo = {
3655
3774
  exist: boolean;
@@ -3706,7 +3825,146 @@ export type FilesystemDirMake = {
3706
3825
  export type FilesystemDirRemove = {
3707
3826
  path: string;
3708
3827
  };
3709
- export type FilesystemFormat = {};
3828
+ export type FilesystemFormat = {
3829
+ data: boolean;
3830
+ user: boolean;
3831
+ };
3832
+ export type InternalMyAddressRequest = {
3833
+ coin_type: number;
3834
+ chain_id: number;
3835
+ account_index: number;
3836
+ derive_type: number;
3837
+ };
3838
+ export type NftUpdate = {
3839
+ file_name_no_ext: string;
3840
+ };
3841
+ export declare enum OnboardingStep {
3842
+ ONBOARDING_STEP_UNKNOWN = 0,
3843
+ ONBOARDING_STEP_CHECKING = 1,
3844
+ ONBOARDING_STEP_PERSONALIZATION = 2,
3845
+ ONBOARDING_STEP_PIN = 3,
3846
+ ONBOARDING_STEP_SETUP = 4,
3847
+ ONBOARDING_STEP_DONE = 5
3848
+ }
3849
+ export declare enum OnboardingPhase {
3850
+ ONBOARDING_PHASE_UNKNOWN = 0,
3851
+ ONBOARDING_PHASE_SAFETY_CHECK = 1,
3852
+ ONBOARDING_PHASE_PIN_SETUP = 2,
3853
+ ONBOARDING_PHASE_FINGERPRINT_SETUP = 3,
3854
+ ONBOARDING_PHASE_SETUP_CHOICE = 4,
3855
+ ONBOARDING_PHASE_WALLET_CREATE_START = 5,
3856
+ ONBOARDING_PHASE_RECOVERY_PHRASE_VIEW = 6,
3857
+ ONBOARDING_PHASE_RECOVERY_PHRASE_CONFIRM = 7,
3858
+ ONBOARDING_PHASE_RESTORE_METHOD_CHOICE = 8,
3859
+ ONBOARDING_PHASE_RECOVERY_PHRASE_RESTORE = 9,
3860
+ ONBOARDING_PHASE_SEEDCARD_RESTORE = 10,
3861
+ ONBOARDING_PHASE_WALLET_READY = 11,
3862
+ ONBOARDING_PHASE_SEEDCARD_BACKUP_PROMPT = 12,
3863
+ ONBOARDING_PHASE_SEEDCARD_BACKUP = 13
3864
+ }
3865
+ export declare enum OnboardingSetupKind {
3866
+ ONBOARDING_SETUP_KIND_UNKNOWN = 0,
3867
+ ONBOARDING_SETUP_KIND_CHOICE = 1,
3868
+ ONBOARDING_SETUP_KIND_CREATE = 2,
3869
+ ONBOARDING_SETUP_KIND_RESTORE = 3
3870
+ }
3871
+ export declare enum OnboardingSetupMethod {
3872
+ ONBOARDING_SETUP_METHOD_UNKNOWN = 0,
3873
+ ONBOARDING_SETUP_METHOD_RECOVERY_PHRASE = 1,
3874
+ ONBOARDING_SETUP_METHOD_SEEDCARD = 2
3875
+ }
3876
+ export type OnboardingSetupStatus = {
3877
+ kind?: OnboardingSetupKind;
3878
+ method?: OnboardingSetupMethod;
3879
+ };
3880
+ export type OnboardingStatusGet = {};
3881
+ export type OnboardingStatus = {
3882
+ step?: OnboardingStep;
3883
+ phase?: OnboardingPhase;
3884
+ setup?: OnboardingSetupStatus;
3885
+ pin_set?: boolean;
3886
+ wallet_initialized?: boolean;
3887
+ };
3888
+ export type PortfolioUpdate = {};
3889
+ export type ViewAmount = {
3890
+ is_unlimited: boolean;
3891
+ num: string;
3892
+ };
3893
+ export type ViewDetail = {
3894
+ key: number;
3895
+ value: string;
3896
+ is_overview: boolean;
3897
+ has_icon: boolean;
3898
+ };
3899
+ export declare enum ViewTipType {
3900
+ Default = 0,
3901
+ Highlight = 1,
3902
+ Recommend = 2,
3903
+ Warning = 3,
3904
+ Danger = 4
3905
+ }
3906
+ export type ViewTip = {
3907
+ type: ViewTipType;
3908
+ text: string;
3909
+ };
3910
+ export type ViewRawData = {
3911
+ initial_data: string;
3912
+ placeholder: number;
3913
+ };
3914
+ export declare enum ViewSignLayout {
3915
+ LayoutDefault = 0,
3916
+ LayoutSafeTxCreate = 1,
3917
+ LayoutFinalConfirm = 2,
3918
+ Layout7702 = 3,
3919
+ LayoutFlat = 4,
3920
+ LayoutEthApprove = 5
3921
+ }
3922
+ export type ViewSignPage = {
3923
+ title: string;
3924
+ amount?: UintType;
3925
+ general: ViewDetail[];
3926
+ tip?: ViewTip;
3927
+ raw_data?: ViewRawData;
3928
+ slide_to_confirm?: boolean;
3929
+ layout?: ViewSignLayout;
3930
+ };
3931
+ export type ViewVerifyPage = {
3932
+ title: string;
3933
+ address: string;
3934
+ path: string;
3935
+ network?: string;
3936
+ derive_type?: string;
3937
+ value_key?: number;
3938
+ };
3939
+ export declare enum ProtocolV2FailureType {
3940
+ Failure_InvalidMessage = 1,
3941
+ Failure_UndefinedError = 2,
3942
+ Failure_UsageError = 3,
3943
+ Failure_DataError = 4,
3944
+ Failure_ProcessError = 5
3945
+ }
3946
+ export declare enum Enum_ProtocolV2Capability {
3947
+ Capability_Bitcoin = 1,
3948
+ Capability_Bitcoin_like = 2,
3949
+ Capability_Binance = 3,
3950
+ Capability_Cardano = 4,
3951
+ Capability_Crypto = 5,
3952
+ Capability_EOS = 6,
3953
+ Capability_Ethereum = 7,
3954
+ Capability_Lisk = 8,
3955
+ Capability_Monero = 9,
3956
+ Capability_NEM = 10,
3957
+ Capability_Ripple = 11,
3958
+ Capability_Stellar = 12,
3959
+ Capability_Tezos = 13,
3960
+ Capability_U2F = 14,
3961
+ Capability_Shamir = 15,
3962
+ Capability_ShamirGroups = 16,
3963
+ Capability_PassphraseEntry = 17,
3964
+ Capability_AttachToPin = 18,
3965
+ Capability_EthereumTypedData = 1000
3966
+ }
3967
+ export type ProtocolV2Capability = keyof typeof Enum_ProtocolV2Capability;
3710
3968
  export type MessageType = {
3711
3969
  AlephiumGetAddress: AlephiumGetAddress;
3712
3970
  AlephiumAddress: AlephiumAddress;
@@ -3981,6 +4239,15 @@ export type MessageType = {
3981
4239
  KaspaSignTx: KaspaSignTx;
3982
4240
  KaspaTxInputRequest: KaspaTxInputRequest;
3983
4241
  KaspaTxInputAck: KaspaTxInputAck;
4242
+ KaspaOutpoint: KaspaOutpoint;
4243
+ KaspaTxRequestSignature: KaspaTxRequestSignature;
4244
+ KaspaTxRequest: KaspaTxRequest;
4245
+ KaspaTxAckInput: KaspaTxAckInput;
4246
+ KaspaTxAckOutput: KaspaTxAckOutput;
4247
+ KaspaTxAckPayloadChunk: KaspaTxAckPayloadChunk;
4248
+ KaspaTxAckPrevMeta: KaspaTxAckPrevMeta;
4249
+ KaspaTxAckPrevInput: KaspaTxAckPrevInput;
4250
+ KaspaTxAckPrevOutput: KaspaTxAckPrevOutput;
3984
4251
  KaspaSignedTx: KaspaSignedTx;
3985
4252
  LnurlAuth: LnurlAuth;
3986
4253
  LnurlAuthResp: LnurlAuthResp;
@@ -4270,47 +4537,41 @@ export type MessageType = {
4270
4537
  CoinPurchaseMemo: CoinPurchaseMemo;
4271
4538
  PaymentRequestMemo: PaymentRequestMemo;
4272
4539
  TxAckPaymentRequest: TxAckPaymentRequest;
4273
- InternalMyAddressRequest: InternalMyAddressRequest;
4274
- StartSession: StartSession;
4540
+ EthereumSignTypedDataQR: EthereumSignTypedDataQR;
4275
4541
  SetBusy: SetBusy;
4276
4542
  GetFirmwareHash: GetFirmwareHash;
4277
4543
  FirmwareHash: FirmwareHash;
4278
4544
  GetNonce: GetNonce;
4279
4545
  Nonce: Nonce;
4280
4546
  WriteSEPrivateKey: WriteSEPrivateKey;
4281
- SetWallpaper: SetWallpaper;
4282
- GetWallpaper: GetWallpaper;
4283
- Wallpaper: Wallpaper;
4284
4547
  UnlockPath: UnlockPath;
4285
4548
  UnlockedPathRequest: UnlockedPathRequest;
4286
- ViewAmount: ViewAmount;
4287
- ViewDetail: ViewDetail;
4288
- ViewTip: ViewTip;
4289
- ViewSignPage: ViewSignPage;
4290
- ViewVerifyPage: ViewVerifyPage;
4549
+ UiAnimationRequest: UiAnimationRequest;
4291
4550
  ProtocolInfoRequest: ProtocolInfoRequest;
4292
4551
  ProtocolInfo: ProtocolInfo;
4293
4552
  DeviceReboot: DeviceReboot;
4294
4553
  DeviceSettings: DeviceSettings;
4295
4554
  DeviceSettingsGet: DeviceSettingsGet;
4296
4555
  DeviceSettingsSet: DeviceSettingsSet;
4556
+ DeviceSettingsPageShow: DeviceSettingsPageShow;
4297
4557
  DeviceCertificate: DeviceCertificate;
4298
4558
  DeviceCertificateWrite: DeviceCertificateWrite;
4299
4559
  DeviceCertificateRead: DeviceCertificateRead;
4300
4560
  DeviceCertificateSignature: DeviceCertificateSignature;
4301
4561
  DeviceCertificateSign: DeviceCertificateSign;
4302
- DeviceFirmwareTarget: DeviceFirmwareTarget;
4303
- DeviceFirmwareUpdateRequest: DeviceFirmwareUpdateRequest;
4304
- DeviceFirmwareUpdateRecord: DeviceFirmwareUpdateRecord;
4305
- DeviceFirmwareUpdateRecordFields: DeviceFirmwareUpdateRecordFields;
4306
- DeviceFirmwareUpdateStatusGet: DeviceFirmwareUpdateStatusGet;
4307
- DeviceFirmwareUpdateStatus: DeviceFirmwareUpdateStatus;
4562
+ DeviceMiscUsbMscControl: DeviceMiscUsbMscControl;
4308
4563
  DeviceFactoryInfoManufactureTime: DeviceFactoryInfoManufactureTime;
4309
4564
  DeviceFactoryInfo: DeviceFactoryInfo;
4310
4565
  DeviceFactoryInfoSet: DeviceFactoryInfoSet;
4311
4566
  DeviceFactoryInfoGet: DeviceFactoryInfoGet;
4312
4567
  DeviceFactoryPermanentLock: DeviceFactoryPermanentLock;
4313
4568
  DeviceFactoryTest: DeviceFactoryTest;
4569
+ DeviceFirmwareTarget: DeviceFirmwareTarget;
4570
+ DeviceFirmwareUpdateRequest: DeviceFirmwareUpdateRequest;
4571
+ DeviceFirmwareUpdateRecord: DeviceFirmwareUpdateRecord;
4572
+ DeviceFirmwareUpdateRecordFields: DeviceFirmwareUpdateRecordFields;
4573
+ DeviceFirmwareUpdateStatusGet: DeviceFirmwareUpdateStatusGet;
4574
+ DeviceFirmwareUpdateStatus: DeviceFirmwareUpdateStatus;
4314
4575
  DeviceFirmwareImageInfo: DeviceFirmwareImageInfo;
4315
4576
  DeviceHardwareInfo: DeviceHardwareInfo;
4316
4577
  DeviceMainMcuInfo: DeviceMainMcuInfo;
@@ -4321,7 +4582,10 @@ export type MessageType = {
4321
4582
  DeviceInfoGet: DeviceInfoGet;
4322
4583
  DeviceSessionGet: DeviceSessionGet;
4323
4584
  DeviceSession: DeviceSession;
4585
+ DeviceSessionAskPin: DeviceSessionAskPin;
4586
+ DeviceSessionAskPassphrase: DeviceSessionAskPassphrase;
4324
4587
  DeviceStatus: DeviceStatus;
4588
+ DeviceStatusGet: DeviceStatusGet;
4325
4589
  FilesystemPermissionFix: FilesystemPermissionFix;
4326
4590
  FilesystemPathInfo: FilesystemPathInfo;
4327
4591
  FilesystemPathInfoQuery: FilesystemPathInfoQuery;
@@ -4334,6 +4598,18 @@ export type MessageType = {
4334
4598
  FilesystemDirMake: FilesystemDirMake;
4335
4599
  FilesystemDirRemove: FilesystemDirRemove;
4336
4600
  FilesystemFormat: FilesystemFormat;
4601
+ InternalMyAddressRequest: InternalMyAddressRequest;
4602
+ NftUpdate: NftUpdate;
4603
+ OnboardingSetupStatus: OnboardingSetupStatus;
4604
+ OnboardingStatusGet: OnboardingStatusGet;
4605
+ OnboardingStatus: OnboardingStatus;
4606
+ PortfolioUpdate: PortfolioUpdate;
4607
+ ViewAmount: ViewAmount;
4608
+ ViewDetail: ViewDetail;
4609
+ ViewTip: ViewTip;
4610
+ ViewRawData: ViewRawData;
4611
+ ViewSignPage: ViewSignPage;
4612
+ ViewVerifyPage: ViewVerifyPage;
4337
4613
  };
4338
4614
  export type MessageKey = keyof MessageType;
4339
4615
  export type MessageResponse<T extends MessageKey> = {