@onekeyfe/hd-transport 1.2.0-alpha.12 → 1.2.0-alpha.121
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.
- package/__tests__/messages.test.js +165 -13
- package/__tests__/protocol-v2-ble-frame-writer.test.js +119 -0
- package/__tests__/protocol-v2-link-manager.test.js +120 -9
- package/__tests__/protocol-v2-usb-transport-base.test.js +36 -2
- package/__tests__/protocol-v2.test.js +566 -69
- package/__tests__/transport-log.test.js +79 -0
- package/dist/constants.d.ts +3 -1
- package/dist/constants.d.ts.map +1 -1
- package/dist/index.d.ts +696 -221
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +662 -130
- package/dist/protocols/index.d.ts +24 -1
- package/dist/protocols/index.d.ts.map +1 -1
- package/dist/protocols/v2/ble-frame-writer.d.ts +15 -0
- package/dist/protocols/v2/ble-frame-writer.d.ts.map +1 -0
- package/dist/protocols/v2/decode.d.ts +11 -0
- package/dist/protocols/v2/decode.d.ts.map +1 -1
- package/dist/protocols/v2/errors.d.ts +8 -0
- package/dist/protocols/v2/errors.d.ts.map +1 -0
- package/dist/protocols/v2/frame-assembler.d.ts.map +1 -1
- package/dist/protocols/v2/index.d.ts +2 -0
- package/dist/protocols/v2/index.d.ts.map +1 -1
- package/dist/protocols/v2/link-manager.d.ts +4 -0
- package/dist/protocols/v2/link-manager.d.ts.map +1 -1
- package/dist/protocols/v2/session.d.ts +11 -4
- package/dist/protocols/v2/session.d.ts.map +1 -1
- package/dist/protocols/v2/usb-transport-base.d.ts +1 -0
- package/dist/protocols/v2/usb-transport-base.d.ts.map +1 -1
- package/dist/serialization/protobuf/decode.d.ts.map +1 -1
- package/dist/serialization/protobuf/encode.d.ts.map +1 -1
- package/dist/types/messages.d.ts +345 -158
- package/dist/types/messages.d.ts.map +1 -1
- package/dist/types/transport.d.ts +21 -3
- package/dist/types/transport.d.ts.map +1 -1
- package/dist/utils/transportLog.d.ts +9 -0
- package/dist/utils/transportLog.d.ts.map +1 -0
- package/messages-protocol-v2.json +1057 -577
- package/package.json +3 -3
- package/scripts/protobuf-build.sh +85 -217
- package/scripts/protobuf-patches/index.js +1 -0
- package/scripts/protobuf-types.js +19 -1
- package/src/constants.ts +30 -16
- package/src/index.ts +5 -1
- package/src/protocols/index.ts +127 -4
- package/src/protocols/v2/ble-frame-writer.ts +77 -0
- package/src/protocols/v2/crc8.ts +1 -1
- package/src/protocols/v2/decode.ts +49 -12
- package/src/protocols/v2/encode.ts +1 -1
- package/src/protocols/v2/errors.ts +25 -0
- package/src/protocols/v2/frame-assembler.ts +6 -4
- package/src/protocols/v2/index.ts +2 -0
- package/src/protocols/v2/link-manager.ts +54 -5
- package/src/protocols/v2/session.ts +166 -59
- package/src/protocols/v2/usb-transport-base.ts +29 -10
- package/src/serialization/protobuf/decode.ts +4 -1
- package/src/serialization/protobuf/encode.ts +5 -1
- package/src/types/messages.ts +421 -201
- package/src/types/transport.ts +30 -3
- package/src/utils/transportLog.ts +102 -0
package/dist/types/messages.d.ts
CHANGED
|
@@ -1648,11 +1648,17 @@ export type KaspaAddress = {
|
|
|
1648
1648
|
};
|
|
1649
1649
|
export type KaspaSignTx = {
|
|
1650
1650
|
address_n: number[];
|
|
1651
|
-
raw_message
|
|
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;
|
|
@@ -3358,17 +3446,6 @@ export type EthereumSignTypedDataQR = {
|
|
|
3358
3446
|
metamask_v4_compat?: boolean;
|
|
3359
3447
|
request_id?: string;
|
|
3360
3448
|
};
|
|
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
|
-
};
|
|
3372
3449
|
export type SetBusy = {
|
|
3373
3450
|
expiry_ms?: number;
|
|
3374
3451
|
};
|
|
@@ -3385,21 +3462,6 @@ export type Nonce = {
|
|
|
3385
3462
|
export type WriteSEPrivateKey = {
|
|
3386
3463
|
private_key: string;
|
|
3387
3464
|
};
|
|
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
|
-
};
|
|
3403
3465
|
export type UnlockPath = {
|
|
3404
3466
|
address_n: number[];
|
|
3405
3467
|
mac?: string;
|
|
@@ -3413,54 +3475,27 @@ export declare enum MoneroNetworkType {
|
|
|
3413
3475
|
STAGENET = 2,
|
|
3414
3476
|
FAKECHAIN = 3
|
|
3415
3477
|
}
|
|
3416
|
-
export
|
|
3417
|
-
|
|
3418
|
-
|
|
3419
|
-
};
|
|
3420
|
-
export type ViewDetail = {
|
|
3421
|
-
key: number;
|
|
3422
|
-
value: string;
|
|
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
|
|
3478
|
+
export declare enum UiAnimationType {
|
|
3479
|
+
Unknown = 0,
|
|
3480
|
+
Signing = 1
|
|
3432
3481
|
}
|
|
3433
|
-
export
|
|
3434
|
-
|
|
3435
|
-
|
|
3436
|
-
|
|
3437
|
-
|
|
3438
|
-
initial_data: string;
|
|
3439
|
-
placeholder: number;
|
|
3440
|
-
};
|
|
3441
|
-
export declare enum ViewSignLayout {
|
|
3442
|
-
LayoutDefault = 0,
|
|
3443
|
-
LayoutSafeTxCreate = 1
|
|
3482
|
+
export declare enum UiAnimationCommand {
|
|
3483
|
+
CommandUnknown = 0,
|
|
3484
|
+
Start = 1,
|
|
3485
|
+
Stop = 2,
|
|
3486
|
+
Refresh = 3
|
|
3444
3487
|
}
|
|
3445
|
-
export type
|
|
3446
|
-
|
|
3447
|
-
|
|
3448
|
-
general: ViewDetail[];
|
|
3449
|
-
tip?: ViewTip;
|
|
3450
|
-
raw_data?: ViewRawData;
|
|
3451
|
-
slide_to_confirm?: boolean;
|
|
3452
|
-
layout?: ViewSignLayout;
|
|
3488
|
+
export type UiAnimationRequest = {
|
|
3489
|
+
command: UiAnimationCommand;
|
|
3490
|
+
type?: UiAnimationType;
|
|
3453
3491
|
};
|
|
3454
|
-
export type
|
|
3455
|
-
|
|
3456
|
-
address: string;
|
|
3457
|
-
path: string;
|
|
3492
|
+
export type ProtocolInfoRequest = {
|
|
3493
|
+
eventless_wallet_session?: boolean;
|
|
3458
3494
|
};
|
|
3459
|
-
export type ProtocolInfoRequest = {};
|
|
3460
3495
|
export type ProtocolInfo = {
|
|
3461
3496
|
version: number;
|
|
3497
|
+
build_fingerprint: string;
|
|
3462
3498
|
supported_messages: number[];
|
|
3463
|
-
protobuf_definition?: string;
|
|
3464
3499
|
};
|
|
3465
3500
|
export declare enum DeviceErrorCode {
|
|
3466
3501
|
DeviceError_None = 0,
|
|
@@ -3483,23 +3518,22 @@ export type DeviceReboot = {
|
|
|
3483
3518
|
reboot_type: DeviceRebootType;
|
|
3484
3519
|
};
|
|
3485
3520
|
export type DeviceSettings = {
|
|
3486
|
-
label?: string;
|
|
3487
3521
|
bt_enable?: boolean;
|
|
3488
3522
|
language?: string;
|
|
3489
3523
|
wallpaper_path?: string;
|
|
3490
|
-
passphrase_enable?: boolean;
|
|
3491
3524
|
brightness?: number;
|
|
3492
|
-
autolock_delay_ms?: number;
|
|
3493
|
-
autoshutdown_delay_ms?: number;
|
|
3494
3525
|
animation_enable?: boolean;
|
|
3495
3526
|
tap_to_wake?: boolean;
|
|
3496
3527
|
haptic_feedback?: boolean;
|
|
3497
3528
|
device_name_display_enabled?: boolean;
|
|
3498
3529
|
airgap_mode?: boolean;
|
|
3499
|
-
fido_enabled?: boolean;
|
|
3500
|
-
experimental_features?: boolean;
|
|
3501
3530
|
usb_lock_enable?: boolean;
|
|
3502
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;
|
|
3503
3537
|
};
|
|
3504
3538
|
export type DeviceSettingsGet = {};
|
|
3505
3539
|
export type DeviceSettingsSet = {
|
|
@@ -3529,6 +3563,39 @@ export type DeviceCertificateSignature = {
|
|
|
3529
3563
|
export type DeviceCertificateSign = {
|
|
3530
3564
|
data: string;
|
|
3531
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
|
+
};
|
|
3532
3599
|
export declare enum DeviceFirmwareTargetType {
|
|
3533
3600
|
FW_MGMT_TARGET_INVALID = 0,
|
|
3534
3601
|
FW_MGMT_TARGET_CRATE = 1,
|
|
@@ -3559,9 +3626,10 @@ export type DeviceFirmwareTarget = {
|
|
|
3559
3626
|
target_id: DeviceFirmwareTargetType;
|
|
3560
3627
|
path: string;
|
|
3561
3628
|
};
|
|
3562
|
-
export type
|
|
3629
|
+
export type DeviceFirmwareUpdateStage = {
|
|
3563
3630
|
targets: DeviceFirmwareTarget[];
|
|
3564
3631
|
};
|
|
3632
|
+
export type DeviceFirmwareUpdateRequest = {};
|
|
3565
3633
|
export type DeviceFirmwareUpdateRecord = {
|
|
3566
3634
|
target_id: DeviceFirmwareTargetType;
|
|
3567
3635
|
status?: DeviceFirmwareUpdateTaskStatus;
|
|
@@ -3579,36 +3647,6 @@ export type DeviceFirmwareUpdateStatusGet = {
|
|
|
3579
3647
|
export type DeviceFirmwareUpdateStatus = {
|
|
3580
3648
|
records: DeviceFirmwareUpdateRecord[];
|
|
3581
3649
|
};
|
|
3582
|
-
export declare enum DeviceFactoryAck {
|
|
3583
|
-
FACTORY_ACK_SUCCESS = 0,
|
|
3584
|
-
FACTORY_ACK_FAIL = 1
|
|
3585
|
-
}
|
|
3586
|
-
export type DeviceFactoryInfoManufactureTime = {
|
|
3587
|
-
year: number;
|
|
3588
|
-
month: number;
|
|
3589
|
-
day: number;
|
|
3590
|
-
hour: number;
|
|
3591
|
-
minute: number;
|
|
3592
|
-
second: number;
|
|
3593
|
-
};
|
|
3594
|
-
export type DeviceFactoryInfo = {
|
|
3595
|
-
version?: number;
|
|
3596
|
-
serial_number?: string;
|
|
3597
|
-
burn_in_completed?: boolean;
|
|
3598
|
-
factory_test_completed?: boolean;
|
|
3599
|
-
manufacture_time?: DeviceFactoryInfoManufactureTime;
|
|
3600
|
-
};
|
|
3601
|
-
export type DeviceFactoryInfoSet = {
|
|
3602
|
-
info: DeviceFactoryInfo;
|
|
3603
|
-
};
|
|
3604
|
-
export type DeviceFactoryInfoGet = {};
|
|
3605
|
-
export type DeviceFactoryPermanentLock = {
|
|
3606
|
-
check_a: string;
|
|
3607
|
-
check_b: string;
|
|
3608
|
-
};
|
|
3609
|
-
export type DeviceFactoryTest = {
|
|
3610
|
-
burn_in_test: boolean;
|
|
3611
|
-
};
|
|
3612
3650
|
export declare enum DeviceType {
|
|
3613
3651
|
CLASSIC1 = 0,
|
|
3614
3652
|
CLASSIC1S = 1,
|
|
@@ -3659,13 +3697,12 @@ export type DeviceSEInfo = {
|
|
|
3659
3697
|
};
|
|
3660
3698
|
export type DeviceInfoTargets = {
|
|
3661
3699
|
hw?: boolean;
|
|
3662
|
-
|
|
3700
|
+
main_mcu?: boolean;
|
|
3663
3701
|
coprocessor?: boolean;
|
|
3664
3702
|
se1?: boolean;
|
|
3665
3703
|
se2?: boolean;
|
|
3666
3704
|
se3?: boolean;
|
|
3667
3705
|
se4?: boolean;
|
|
3668
|
-
status?: boolean;
|
|
3669
3706
|
};
|
|
3670
3707
|
export type DeviceInfoTypes = {
|
|
3671
3708
|
version?: boolean;
|
|
@@ -3680,27 +3717,49 @@ export type DeviceInfoGet = {
|
|
|
3680
3717
|
export type ProtocolV2DeviceInfo = {
|
|
3681
3718
|
protocol_version: number;
|
|
3682
3719
|
hw?: DeviceHardwareInfo;
|
|
3683
|
-
|
|
3720
|
+
main_mcu?: DeviceMainMcuInfo;
|
|
3684
3721
|
coprocessor?: DeviceCoprocessorInfo;
|
|
3685
3722
|
se1?: DeviceSEInfo;
|
|
3686
3723
|
se2?: DeviceSEInfo;
|
|
3687
3724
|
se3?: DeviceSEInfo;
|
|
3688
3725
|
se4?: DeviceSEInfo;
|
|
3689
|
-
status?: DeviceStatus;
|
|
3690
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
|
+
}
|
|
3691
3739
|
export type DeviceSessionGet = {
|
|
3692
3740
|
session_id?: string;
|
|
3741
|
+
btc_test_address?: string;
|
|
3742
|
+
seed_domains: DeviceSessionSeedDomain[];
|
|
3693
3743
|
};
|
|
3694
3744
|
export type DeviceSession = {
|
|
3695
3745
|
session_id?: string;
|
|
3696
3746
|
btc_test_address?: string;
|
|
3697
3747
|
};
|
|
3698
|
-
export
|
|
3699
|
-
|
|
3700
|
-
|
|
3701
|
-
|
|
3702
|
-
|
|
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;
|
|
3703
3759
|
};
|
|
3760
|
+
export declare enum DeviceSessionAskPin_FailureSubCodes {
|
|
3761
|
+
UserCancel = 1
|
|
3762
|
+
}
|
|
3704
3763
|
export type DeviceStatus = {
|
|
3705
3764
|
device_id?: string;
|
|
3706
3765
|
unlocked?: boolean;
|
|
@@ -3711,27 +3770,6 @@ export type DeviceStatus = {
|
|
|
3711
3770
|
unlocked_by_attach_to_pin?: boolean;
|
|
3712
3771
|
};
|
|
3713
3772
|
export type DeviceStatusGet = {};
|
|
3714
|
-
export declare enum DevOnboardingStage {
|
|
3715
|
-
DEV_ONBOARDING_STAGE_UNKNOWN = 0,
|
|
3716
|
-
DEV_ONBOARDING_STAGE_SAFETY_CHECK = 1,
|
|
3717
|
-
DEV_ONBOARDING_STAGE_PERSONALIZATION = 2,
|
|
3718
|
-
DEV_ONBOARDING_STAGE_SELECT_SETUP_METHOD = 3,
|
|
3719
|
-
DEV_ONBOARDING_STAGE_NEW_DEVICE = 4,
|
|
3720
|
-
DEV_ONBOARDING_STAGE_SELECT_RESTORE_METHOD = 5,
|
|
3721
|
-
DEV_ONBOARDING_STAGE_RESTORE_MNEMONIC = 6,
|
|
3722
|
-
DEV_ONBOARDING_STAGE_RESTORE_SEEDCARD = 7,
|
|
3723
|
-
DEV_ONBOARDING_STAGE_WALLET_READY = 8,
|
|
3724
|
-
DEV_ONBOARDING_STAGE_SEEDCARD_BACKUP_PROMPT = 9,
|
|
3725
|
-
DEV_ONBOARDING_STAGE_SELECT_SEEDCARD_BACKUP_METHOD = 10,
|
|
3726
|
-
DEV_ONBOARDING_STAGE_SEEDCARD_BACKUP = 11,
|
|
3727
|
-
DEV_ONBOARDING_STAGE_DONE = 12
|
|
3728
|
-
}
|
|
3729
|
-
export type DevGetOnboardingStatus = {};
|
|
3730
|
-
export type DevOnboardingStatus = {
|
|
3731
|
-
stage: DevOnboardingStage;
|
|
3732
|
-
status_code?: number;
|
|
3733
|
-
detail_code?: number;
|
|
3734
|
-
};
|
|
3735
3773
|
export type FilesystemPermissionFix = {};
|
|
3736
3774
|
export type FilesystemPathInfo = {
|
|
3737
3775
|
exist: boolean;
|
|
@@ -3792,7 +3830,146 @@ export type FilesystemFormat = {
|
|
|
3792
3830
|
data: boolean;
|
|
3793
3831
|
user: boolean;
|
|
3794
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
|
+
};
|
|
3795
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
|
+
};
|
|
3944
|
+
export declare enum ProtocolV2FailureType {
|
|
3945
|
+
Failure_InvalidMessage = 1,
|
|
3946
|
+
Failure_UndefinedError = 2,
|
|
3947
|
+
Failure_UsageError = 3,
|
|
3948
|
+
Failure_DataError = 4,
|
|
3949
|
+
Failure_ProcessError = 5
|
|
3950
|
+
}
|
|
3951
|
+
export declare enum Enum_ProtocolV2Capability {
|
|
3952
|
+
Capability_Bitcoin = 1,
|
|
3953
|
+
Capability_Bitcoin_like = 2,
|
|
3954
|
+
Capability_Binance = 3,
|
|
3955
|
+
Capability_Cardano = 4,
|
|
3956
|
+
Capability_Crypto = 5,
|
|
3957
|
+
Capability_EOS = 6,
|
|
3958
|
+
Capability_Ethereum = 7,
|
|
3959
|
+
Capability_Lisk = 8,
|
|
3960
|
+
Capability_Monero = 9,
|
|
3961
|
+
Capability_NEM = 10,
|
|
3962
|
+
Capability_Ripple = 11,
|
|
3963
|
+
Capability_Stellar = 12,
|
|
3964
|
+
Capability_Tezos = 13,
|
|
3965
|
+
Capability_U2F = 14,
|
|
3966
|
+
Capability_Shamir = 15,
|
|
3967
|
+
Capability_ShamirGroups = 16,
|
|
3968
|
+
Capability_PassphraseEntry = 17,
|
|
3969
|
+
Capability_AttachToPin = 18,
|
|
3970
|
+
Capability_EthereumTypedData = 1000
|
|
3971
|
+
}
|
|
3972
|
+
export type ProtocolV2Capability = keyof typeof Enum_ProtocolV2Capability;
|
|
3796
3973
|
export type MessageType = {
|
|
3797
3974
|
AlephiumGetAddress: AlephiumGetAddress;
|
|
3798
3975
|
AlephiumAddress: AlephiumAddress;
|
|
@@ -4067,6 +4244,15 @@ export type MessageType = {
|
|
|
4067
4244
|
KaspaSignTx: KaspaSignTx;
|
|
4068
4245
|
KaspaTxInputRequest: KaspaTxInputRequest;
|
|
4069
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;
|
|
4070
4256
|
KaspaSignedTx: KaspaSignedTx;
|
|
4071
4257
|
LnurlAuth: LnurlAuth;
|
|
4072
4258
|
LnurlAuthResp: LnurlAuthResp;
|
|
@@ -4357,25 +4543,15 @@ export type MessageType = {
|
|
|
4357
4543
|
PaymentRequestMemo: PaymentRequestMemo;
|
|
4358
4544
|
TxAckPaymentRequest: TxAckPaymentRequest;
|
|
4359
4545
|
EthereumSignTypedDataQR: EthereumSignTypedDataQR;
|
|
4360
|
-
InternalMyAddressRequest: InternalMyAddressRequest;
|
|
4361
|
-
StartSession: StartSession;
|
|
4362
4546
|
SetBusy: SetBusy;
|
|
4363
4547
|
GetFirmwareHash: GetFirmwareHash;
|
|
4364
4548
|
FirmwareHash: FirmwareHash;
|
|
4365
4549
|
GetNonce: GetNonce;
|
|
4366
4550
|
Nonce: Nonce;
|
|
4367
4551
|
WriteSEPrivateKey: WriteSEPrivateKey;
|
|
4368
|
-
SetWallpaper: SetWallpaper;
|
|
4369
|
-
GetWallpaper: GetWallpaper;
|
|
4370
|
-
Wallpaper: Wallpaper;
|
|
4371
4552
|
UnlockPath: UnlockPath;
|
|
4372
4553
|
UnlockedPathRequest: UnlockedPathRequest;
|
|
4373
|
-
|
|
4374
|
-
ViewDetail: ViewDetail;
|
|
4375
|
-
ViewTip: ViewTip;
|
|
4376
|
-
ViewRawData: ViewRawData;
|
|
4377
|
-
ViewSignPage: ViewSignPage;
|
|
4378
|
-
ViewVerifyPage: ViewVerifyPage;
|
|
4554
|
+
UiAnimationRequest: UiAnimationRequest;
|
|
4379
4555
|
ProtocolInfoRequest: ProtocolInfoRequest;
|
|
4380
4556
|
ProtocolInfo: ProtocolInfo;
|
|
4381
4557
|
DeviceReboot: DeviceReboot;
|
|
@@ -4388,18 +4564,20 @@ export type MessageType = {
|
|
|
4388
4564
|
DeviceCertificateRead: DeviceCertificateRead;
|
|
4389
4565
|
DeviceCertificateSignature: DeviceCertificateSignature;
|
|
4390
4566
|
DeviceCertificateSign: DeviceCertificateSign;
|
|
4391
|
-
|
|
4392
|
-
DeviceFirmwareUpdateRequest: DeviceFirmwareUpdateRequest;
|
|
4393
|
-
DeviceFirmwareUpdateRecord: DeviceFirmwareUpdateRecord;
|
|
4394
|
-
DeviceFirmwareUpdateRecordFields: DeviceFirmwareUpdateRecordFields;
|
|
4395
|
-
DeviceFirmwareUpdateStatusGet: DeviceFirmwareUpdateStatusGet;
|
|
4396
|
-
DeviceFirmwareUpdateStatus: DeviceFirmwareUpdateStatus;
|
|
4567
|
+
DeviceMiscUsbMscControl: DeviceMiscUsbMscControl;
|
|
4397
4568
|
DeviceFactoryInfoManufactureTime: DeviceFactoryInfoManufactureTime;
|
|
4398
4569
|
DeviceFactoryInfo: DeviceFactoryInfo;
|
|
4399
4570
|
DeviceFactoryInfoSet: DeviceFactoryInfoSet;
|
|
4400
4571
|
DeviceFactoryInfoGet: DeviceFactoryInfoGet;
|
|
4401
4572
|
DeviceFactoryPermanentLock: DeviceFactoryPermanentLock;
|
|
4402
4573
|
DeviceFactoryTest: DeviceFactoryTest;
|
|
4574
|
+
DeviceFirmwareTarget: DeviceFirmwareTarget;
|
|
4575
|
+
DeviceFirmwareUpdateStage: DeviceFirmwareUpdateStage;
|
|
4576
|
+
DeviceFirmwareUpdateRequest: DeviceFirmwareUpdateRequest;
|
|
4577
|
+
DeviceFirmwareUpdateRecord: DeviceFirmwareUpdateRecord;
|
|
4578
|
+
DeviceFirmwareUpdateRecordFields: DeviceFirmwareUpdateRecordFields;
|
|
4579
|
+
DeviceFirmwareUpdateStatusGet: DeviceFirmwareUpdateStatusGet;
|
|
4580
|
+
DeviceFirmwareUpdateStatus: DeviceFirmwareUpdateStatus;
|
|
4403
4581
|
DeviceFirmwareImageInfo: DeviceFirmwareImageInfo;
|
|
4404
4582
|
DeviceHardwareInfo: DeviceHardwareInfo;
|
|
4405
4583
|
DeviceMainMcuInfo: DeviceMainMcuInfo;
|
|
@@ -4411,11 +4589,9 @@ export type MessageType = {
|
|
|
4411
4589
|
DeviceSessionGet: DeviceSessionGet;
|
|
4412
4590
|
DeviceSession: DeviceSession;
|
|
4413
4591
|
DeviceSessionAskPin: DeviceSessionAskPin;
|
|
4414
|
-
|
|
4592
|
+
DeviceSessionAskPassphrase: DeviceSessionAskPassphrase;
|
|
4415
4593
|
DeviceStatus: DeviceStatus;
|
|
4416
4594
|
DeviceStatusGet: DeviceStatusGet;
|
|
4417
|
-
DevGetOnboardingStatus: DevGetOnboardingStatus;
|
|
4418
|
-
DevOnboardingStatus: DevOnboardingStatus;
|
|
4419
4595
|
FilesystemPermissionFix: FilesystemPermissionFix;
|
|
4420
4596
|
FilesystemPathInfo: FilesystemPathInfo;
|
|
4421
4597
|
FilesystemPathInfoQuery: FilesystemPathInfoQuery;
|
|
@@ -4428,7 +4604,18 @@ export type MessageType = {
|
|
|
4428
4604
|
FilesystemDirMake: FilesystemDirMake;
|
|
4429
4605
|
FilesystemDirRemove: FilesystemDirRemove;
|
|
4430
4606
|
FilesystemFormat: FilesystemFormat;
|
|
4607
|
+
InternalMyAddressRequest: InternalMyAddressRequest;
|
|
4608
|
+
NftUpdate: NftUpdate;
|
|
4609
|
+
OnboardingSetupStatus: OnboardingSetupStatus;
|
|
4610
|
+
OnboardingStatusGet: OnboardingStatusGet;
|
|
4611
|
+
OnboardingStatus: OnboardingStatus;
|
|
4431
4612
|
PortfolioUpdate: PortfolioUpdate;
|
|
4613
|
+
ViewAmount: ViewAmount;
|
|
4614
|
+
ViewDetail: ViewDetail;
|
|
4615
|
+
ViewTip: ViewTip;
|
|
4616
|
+
ViewRawData: ViewRawData;
|
|
4617
|
+
ViewSignPage: ViewSignPage;
|
|
4618
|
+
ViewVerifyPage: ViewVerifyPage;
|
|
4432
4619
|
};
|
|
4433
4620
|
export type MessageKey = keyof MessageType;
|
|
4434
4621
|
export type MessageResponse<T extends MessageKey> = {
|