@onekeyfe/hd-transport 1.2.0-alpha.12 → 1.2.0-alpha.14
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 +21 -9
- package/__tests__/protocol-v2.test.js +99 -3
- package/dist/index.d.ts +78 -10
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +79 -7
- package/dist/protocols/index.d.ts +7 -0
- package/dist/protocols/index.d.ts.map +1 -1
- package/dist/protocols/v2/session.d.ts.map +1 -1
- package/dist/types/messages.d.ts +49 -7
- package/dist/types/messages.d.ts.map +1 -1
- package/messages-protocol-v2.json +422 -16
- package/package.json +3 -3
- package/scripts/protobuf-build.sh +20 -232
- package/scripts/protobuf-types.js +9 -0
- package/src/protocols/index.ts +14 -2
- package/src/protocols/v2/session.ts +23 -0
- package/src/types/messages.ts +50 -7
package/dist/types/messages.d.ts
CHANGED
|
@@ -1827,6 +1827,19 @@ export type Features = {
|
|
|
1827
1827
|
onekey_se04_state?: string | null;
|
|
1828
1828
|
attach_to_pin_user?: boolean;
|
|
1829
1829
|
unlocked_attach_pin?: boolean;
|
|
1830
|
+
coprocessor_bt_name?: string;
|
|
1831
|
+
coprocessor_version?: string;
|
|
1832
|
+
coprocessor_bt_enable?: boolean;
|
|
1833
|
+
romloader_version?: string;
|
|
1834
|
+
onekey_romloader_version?: string;
|
|
1835
|
+
onekey_romloader_hash?: string;
|
|
1836
|
+
onekey_bootloader_version?: string;
|
|
1837
|
+
onekey_bootloader_hash?: string;
|
|
1838
|
+
onekey_bootloader_build_id?: string;
|
|
1839
|
+
onekey_coprocessor_bt_name?: string;
|
|
1840
|
+
onekey_coprocessor_version?: string;
|
|
1841
|
+
onekey_coprocessor_build_id?: string;
|
|
1842
|
+
onekey_coprocessor_hash?: string;
|
|
1830
1843
|
};
|
|
1831
1844
|
export type OnekeyFeatures = {
|
|
1832
1845
|
onekey_device_type?: OneKeyDeviceType;
|
|
@@ -3440,7 +3453,10 @@ export type ViewRawData = {
|
|
|
3440
3453
|
};
|
|
3441
3454
|
export declare enum ViewSignLayout {
|
|
3442
3455
|
LayoutDefault = 0,
|
|
3443
|
-
LayoutSafeTxCreate = 1
|
|
3456
|
+
LayoutSafeTxCreate = 1,
|
|
3457
|
+
LayoutFinalConfirm = 2,
|
|
3458
|
+
Layout7702 = 3,
|
|
3459
|
+
LayoutFlat = 4
|
|
3444
3460
|
}
|
|
3445
3461
|
export type ViewSignPage = {
|
|
3446
3462
|
title: string;
|
|
@@ -3696,11 +3712,9 @@ export type DeviceSession = {
|
|
|
3696
3712
|
btc_test_address?: string;
|
|
3697
3713
|
};
|
|
3698
3714
|
export type DeviceSessionAskPin = {};
|
|
3699
|
-
export
|
|
3700
|
-
|
|
3701
|
-
|
|
3702
|
-
passphrase_protection?: boolean;
|
|
3703
|
-
};
|
|
3715
|
+
export declare enum DeviceSessionAskPin_FailureSubCodes {
|
|
3716
|
+
UserCancel = 1
|
|
3717
|
+
}
|
|
3704
3718
|
export type DeviceStatus = {
|
|
3705
3719
|
device_id?: string;
|
|
3706
3720
|
unlocked?: boolean;
|
|
@@ -3793,6 +3807,35 @@ export type FilesystemFormat = {
|
|
|
3793
3807
|
user: boolean;
|
|
3794
3808
|
};
|
|
3795
3809
|
export type PortfolioUpdate = {};
|
|
3810
|
+
export declare enum ProtocolV2FailureType {
|
|
3811
|
+
Failure_InvalidMessage = 1,
|
|
3812
|
+
Failure_UndefinedError = 2,
|
|
3813
|
+
Failure_UsageError = 3,
|
|
3814
|
+
Failure_DataError = 4,
|
|
3815
|
+
Failure_ProcessError = 5
|
|
3816
|
+
}
|
|
3817
|
+
export declare enum Enum_ProtocolV2Capability {
|
|
3818
|
+
Capability_Bitcoin = 1,
|
|
3819
|
+
Capability_Bitcoin_like = 2,
|
|
3820
|
+
Capability_Binance = 3,
|
|
3821
|
+
Capability_Cardano = 4,
|
|
3822
|
+
Capability_Crypto = 5,
|
|
3823
|
+
Capability_EOS = 6,
|
|
3824
|
+
Capability_Ethereum = 7,
|
|
3825
|
+
Capability_Lisk = 8,
|
|
3826
|
+
Capability_Monero = 9,
|
|
3827
|
+
Capability_NEM = 10,
|
|
3828
|
+
Capability_Ripple = 11,
|
|
3829
|
+
Capability_Stellar = 12,
|
|
3830
|
+
Capability_Tezos = 13,
|
|
3831
|
+
Capability_U2F = 14,
|
|
3832
|
+
Capability_Shamir = 15,
|
|
3833
|
+
Capability_ShamirGroups = 16,
|
|
3834
|
+
Capability_PassphraseEntry = 17,
|
|
3835
|
+
Capability_AttachToPin = 18,
|
|
3836
|
+
Capability_EthereumTypedData = 1000
|
|
3837
|
+
}
|
|
3838
|
+
export type ProtocolV2Capability = keyof typeof Enum_ProtocolV2Capability;
|
|
3796
3839
|
export type MessageType = {
|
|
3797
3840
|
AlephiumGetAddress: AlephiumGetAddress;
|
|
3798
3841
|
AlephiumAddress: AlephiumAddress;
|
|
@@ -4411,7 +4454,6 @@ export type MessageType = {
|
|
|
4411
4454
|
DeviceSessionGet: DeviceSessionGet;
|
|
4412
4455
|
DeviceSession: DeviceSession;
|
|
4413
4456
|
DeviceSessionAskPin: DeviceSessionAskPin;
|
|
4414
|
-
DeviceSessionPinResult: DeviceSessionPinResult;
|
|
4415
4457
|
DeviceStatus: DeviceStatus;
|
|
4416
4458
|
DeviceStatusGet: DeviceStatusGet;
|
|
4417
4459
|
DevGetOnboardingStatus: DevGetOnboardingStatus;
|