@onekeyfe/hd-transport 1.2.0-alpha.3 → 1.2.0-alpha.4
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/README.md +1 -1
- package/__tests__/protocol-v2.test.js +104 -77
- package/dist/constants.d.ts +2 -2
- package/dist/index.d.ts +329 -232
- package/dist/index.js +63 -43
- package/dist/protocols/v2/session.d.ts +1 -1
- package/dist/protocols/v2/session.d.ts.map +1 -1
- package/dist/types/messages.d.ts +235 -157
- package/dist/types/messages.d.ts.map +1 -1
- package/messages-protocol-v2.json +486 -1072
- package/package.json +2 -2
- package/scripts/protobuf-build.sh +51 -143
- package/src/constants.ts +2 -2
- package/src/protocols/v2/session.ts +4 -5
- package/src/types/messages.ts +291 -193
package/dist/index.js
CHANGED
|
@@ -268,7 +268,7 @@ const PROTOCOL_V1_USB_PACKET_SIZE = PROTOCOL_V1_CHUNK_PAYLOAD_SIZE + 1;
|
|
|
268
268
|
const PROTOCOL_V1_MESSAGE_HEADER_SIZE = 2 + 4;
|
|
269
269
|
const PROTOCOL_V1_ENVELOPE_HEADER_SIZE = 1 + 1 + PROTOCOL_V1_MESSAGE_HEADER_SIZE;
|
|
270
270
|
const PROTOCOL_V2_FRAME_MAX_BYTES = 4608;
|
|
271
|
-
const PROTOCOL_V2_WEBUSB_FILE_CHUNK_SIZE =
|
|
271
|
+
const PROTOCOL_V2_WEBUSB_FILE_CHUNK_SIZE = 4000;
|
|
272
272
|
const PROTOCOL_V2_BLE_FILE_CHUNK_SIZE = 1800;
|
|
273
273
|
const PROTOCOL_V2_FILE_CHUNK_SIZE = PROTOCOL_V2_WEBUSB_FILE_CHUNK_SIZE;
|
|
274
274
|
const PROTOCOL_V2_CHANNEL_USB = 0;
|
|
@@ -956,7 +956,7 @@ function withProtocolTimeout(promise, timeoutMs, createTimeoutError, onTimeout)
|
|
|
956
956
|
}
|
|
957
957
|
});
|
|
958
958
|
}
|
|
959
|
-
const PROTOCOL_V2_WRITE_WATCHDOG_TIMEOUT_MS =
|
|
959
|
+
const PROTOCOL_V2_WRITE_WATCHDOG_TIMEOUT_MS = 0;
|
|
960
960
|
class ProtocolV2Session {
|
|
961
961
|
constructor(options) {
|
|
962
962
|
this.pendingCall = Promise.resolve();
|
|
@@ -1232,6 +1232,9 @@ exports.FailureType = void 0;
|
|
|
1232
1232
|
FailureType[FailureType["Failure_WipeCodeMismatch"] = 13] = "Failure_WipeCodeMismatch";
|
|
1233
1233
|
FailureType[FailureType["Failure_InvalidSession"] = 14] = "Failure_InvalidSession";
|
|
1234
1234
|
FailureType[FailureType["Failure_FirmwareError"] = 99] = "Failure_FirmwareError";
|
|
1235
|
+
FailureType[FailureType["Failure_InvalidMessage"] = 1] = "Failure_InvalidMessage";
|
|
1236
|
+
FailureType[FailureType["Failure_UndefinedError"] = 2] = "Failure_UndefinedError";
|
|
1237
|
+
FailureType[FailureType["Failure_UsageError"] = 3] = "Failure_UsageError";
|
|
1235
1238
|
})(exports.FailureType || (exports.FailureType = {}));
|
|
1236
1239
|
exports.Enum_ButtonRequestType = void 0;
|
|
1237
1240
|
(function (Enum_ButtonRequestType) {
|
|
@@ -1513,12 +1516,45 @@ exports.ViewTipType = void 0;
|
|
|
1513
1516
|
ViewTipType[ViewTipType["Warning"] = 3] = "Warning";
|
|
1514
1517
|
ViewTipType[ViewTipType["Danger"] = 4] = "Danger";
|
|
1515
1518
|
})(exports.ViewTipType || (exports.ViewTipType = {}));
|
|
1516
|
-
exports.
|
|
1517
|
-
(function (
|
|
1518
|
-
|
|
1519
|
-
|
|
1520
|
-
|
|
1521
|
-
})(exports.
|
|
1519
|
+
exports.DeviceRebootType = void 0;
|
|
1520
|
+
(function (DeviceRebootType) {
|
|
1521
|
+
DeviceRebootType[DeviceRebootType["Normal"] = 0] = "Normal";
|
|
1522
|
+
DeviceRebootType[DeviceRebootType["Romloader"] = 1] = "Romloader";
|
|
1523
|
+
DeviceRebootType[DeviceRebootType["Bootloader"] = 2] = "Bootloader";
|
|
1524
|
+
})(exports.DeviceRebootType || (exports.DeviceRebootType = {}));
|
|
1525
|
+
exports.DeviceFirmwareTargetType = void 0;
|
|
1526
|
+
(function (DeviceFirmwareTargetType) {
|
|
1527
|
+
DeviceFirmwareTargetType[DeviceFirmwareTargetType["FW_MGMT_TARGET_INVALID"] = 0] = "FW_MGMT_TARGET_INVALID";
|
|
1528
|
+
DeviceFirmwareTargetType[DeviceFirmwareTargetType["FW_MGMT_TARGET_CRATE"] = 1] = "FW_MGMT_TARGET_CRATE";
|
|
1529
|
+
DeviceFirmwareTargetType[DeviceFirmwareTargetType["FW_MGMT_TARGET_ROMLOADER"] = 2] = "FW_MGMT_TARGET_ROMLOADER";
|
|
1530
|
+
DeviceFirmwareTargetType[DeviceFirmwareTargetType["FW_MGMT_TARGET_BOOTLOADER"] = 3] = "FW_MGMT_TARGET_BOOTLOADER";
|
|
1531
|
+
DeviceFirmwareTargetType[DeviceFirmwareTargetType["FW_MGMT_TARGET_APPLICATION_P1"] = 4] = "FW_MGMT_TARGET_APPLICATION_P1";
|
|
1532
|
+
DeviceFirmwareTargetType[DeviceFirmwareTargetType["FW_MGMT_TARGET_APPLICATION_P2"] = 5] = "FW_MGMT_TARGET_APPLICATION_P2";
|
|
1533
|
+
DeviceFirmwareTargetType[DeviceFirmwareTargetType["FW_MGMT_TARGET_COPROCESSOR"] = 6] = "FW_MGMT_TARGET_COPROCESSOR";
|
|
1534
|
+
DeviceFirmwareTargetType[DeviceFirmwareTargetType["FW_MGMT_TARGET_SE01"] = 7] = "FW_MGMT_TARGET_SE01";
|
|
1535
|
+
DeviceFirmwareTargetType[DeviceFirmwareTargetType["FW_MGMT_TARGET_SE02"] = 8] = "FW_MGMT_TARGET_SE02";
|
|
1536
|
+
DeviceFirmwareTargetType[DeviceFirmwareTargetType["FW_MGMT_TARGET_SE03"] = 9] = "FW_MGMT_TARGET_SE03";
|
|
1537
|
+
DeviceFirmwareTargetType[DeviceFirmwareTargetType["FW_MGMT_TARGET_SE04"] = 10] = "FW_MGMT_TARGET_SE04";
|
|
1538
|
+
})(exports.DeviceFirmwareTargetType || (exports.DeviceFirmwareTargetType = {}));
|
|
1539
|
+
exports.DeviceFirmwareUpdateTaskStatus = void 0;
|
|
1540
|
+
(function (DeviceFirmwareUpdateTaskStatus) {
|
|
1541
|
+
DeviceFirmwareUpdateTaskStatus[DeviceFirmwareUpdateTaskStatus["FW_MGMT_UPDATER_TASK_STATUS_PENDING"] = 0] = "FW_MGMT_UPDATER_TASK_STATUS_PENDING";
|
|
1542
|
+
DeviceFirmwareUpdateTaskStatus[DeviceFirmwareUpdateTaskStatus["FW_MGMT_UPDATER_TASK_STATUS_IN_PROGRESS"] = 1] = "FW_MGMT_UPDATER_TASK_STATUS_IN_PROGRESS";
|
|
1543
|
+
DeviceFirmwareUpdateTaskStatus[DeviceFirmwareUpdateTaskStatus["FW_MGMT_UPDATER_TASK_STATUS_FINISHED"] = 2] = "FW_MGMT_UPDATER_TASK_STATUS_FINISHED";
|
|
1544
|
+
DeviceFirmwareUpdateTaskStatus[DeviceFirmwareUpdateTaskStatus["FW_MGMT_UPDATER_TASK_STATUS_FAILED_FILE_NOT_FOUND"] = 3] = "FW_MGMT_UPDATER_TASK_STATUS_FAILED_FILE_NOT_FOUND";
|
|
1545
|
+
DeviceFirmwareUpdateTaskStatus[DeviceFirmwareUpdateTaskStatus["FW_MGMT_UPDATER_TASK_STATUS_FAILED_FILE_READ"] = 4] = "FW_MGMT_UPDATER_TASK_STATUS_FAILED_FILE_READ";
|
|
1546
|
+
DeviceFirmwareUpdateTaskStatus[DeviceFirmwareUpdateTaskStatus["FW_MGMT_UPDATER_TASK_STATUS_FAILED_FILE_WRITE"] = 5] = "FW_MGMT_UPDATER_TASK_STATUS_FAILED_FILE_WRITE";
|
|
1547
|
+
DeviceFirmwareUpdateTaskStatus[DeviceFirmwareUpdateTaskStatus["FW_MGMT_UPDATER_TASK_STATUS_FAILED_VERIFY"] = 6] = "FW_MGMT_UPDATER_TASK_STATUS_FAILED_VERIFY";
|
|
1548
|
+
DeviceFirmwareUpdateTaskStatus[DeviceFirmwareUpdateTaskStatus["FW_MGMT_UPDATER_TASK_STATUS_FAILED_INSTALL"] = 7] = "FW_MGMT_UPDATER_TASK_STATUS_FAILED_INSTALL";
|
|
1549
|
+
DeviceFirmwareUpdateTaskStatus[DeviceFirmwareUpdateTaskStatus["FW_MGMT_UPDATER_TASK_STATUS_FAILED_ABORT"] = 8] = "FW_MGMT_UPDATER_TASK_STATUS_FAILED_ABORT";
|
|
1550
|
+
DeviceFirmwareUpdateTaskStatus[DeviceFirmwareUpdateTaskStatus["FW_MGMT_UPDATER_TASK_STATUS_FAILED_BUSY"] = 9] = "FW_MGMT_UPDATER_TASK_STATUS_FAILED_BUSY";
|
|
1551
|
+
DeviceFirmwareUpdateTaskStatus[DeviceFirmwareUpdateTaskStatus["FW_MGMT_UPDATER_TASK_STATUS_FAILED_ENTRY_OUT_OF_BOUNDS"] = 10] = "FW_MGMT_UPDATER_TASK_STATUS_FAILED_ENTRY_OUT_OF_BOUNDS";
|
|
1552
|
+
})(exports.DeviceFirmwareUpdateTaskStatus || (exports.DeviceFirmwareUpdateTaskStatus = {}));
|
|
1553
|
+
exports.DeviceFactoryAck = void 0;
|
|
1554
|
+
(function (DeviceFactoryAck) {
|
|
1555
|
+
DeviceFactoryAck[DeviceFactoryAck["FACTORY_ACK_SUCCESS"] = 0] = "FACTORY_ACK_SUCCESS";
|
|
1556
|
+
DeviceFactoryAck[DeviceFactoryAck["FACTORY_ACK_FAIL"] = 1] = "FACTORY_ACK_FAIL";
|
|
1557
|
+
})(exports.DeviceFactoryAck || (exports.DeviceFactoryAck = {}));
|
|
1522
1558
|
exports.DeviceType = void 0;
|
|
1523
1559
|
(function (DeviceType) {
|
|
1524
1560
|
DeviceType[DeviceType["CLASSIC1"] = 0] = "CLASSIC1";
|
|
@@ -1527,37 +1563,20 @@ exports.DeviceType = void 0;
|
|
|
1527
1563
|
DeviceType[DeviceType["TOUCH"] = 3] = "TOUCH";
|
|
1528
1564
|
DeviceType[DeviceType["PRO"] = 5] = "PRO";
|
|
1529
1565
|
DeviceType[DeviceType["CLASSIC1S_PURE"] = 6] = "CLASSIC1S_PURE";
|
|
1566
|
+
DeviceType[DeviceType["PRO2"] = 7] = "PRO2";
|
|
1567
|
+
DeviceType[DeviceType["NEO"] = 8] = "NEO";
|
|
1530
1568
|
})(exports.DeviceType || (exports.DeviceType = {}));
|
|
1531
|
-
exports.
|
|
1532
|
-
(function (
|
|
1533
|
-
|
|
1534
|
-
|
|
1535
|
-
})(exports.
|
|
1536
|
-
exports.
|
|
1537
|
-
(function (
|
|
1538
|
-
|
|
1539
|
-
|
|
1540
|
-
|
|
1541
|
-
})(exports.
|
|
1542
|
-
exports.DevFirmwareTargetType = void 0;
|
|
1543
|
-
(function (DevFirmwareTargetType) {
|
|
1544
|
-
DevFirmwareTargetType[DevFirmwareTargetType["TARGET_MAIN_APP"] = 0] = "TARGET_MAIN_APP";
|
|
1545
|
-
DevFirmwareTargetType[DevFirmwareTargetType["TARGET_MAIN_BOOT"] = 1] = "TARGET_MAIN_BOOT";
|
|
1546
|
-
DevFirmwareTargetType[DevFirmwareTargetType["TARGET_BT"] = 2] = "TARGET_BT";
|
|
1547
|
-
DevFirmwareTargetType[DevFirmwareTargetType["TARGET_SE1"] = 3] = "TARGET_SE1";
|
|
1548
|
-
DevFirmwareTargetType[DevFirmwareTargetType["TARGET_SE2"] = 4] = "TARGET_SE2";
|
|
1549
|
-
DevFirmwareTargetType[DevFirmwareTargetType["TARGET_SE3"] = 5] = "TARGET_SE3";
|
|
1550
|
-
DevFirmwareTargetType[DevFirmwareTargetType["TARGET_SE4"] = 6] = "TARGET_SE4";
|
|
1551
|
-
DevFirmwareTargetType[DevFirmwareTargetType["TARGET_RESOURCE"] = 10] = "TARGET_RESOURCE";
|
|
1552
|
-
})(exports.DevFirmwareTargetType || (exports.DevFirmwareTargetType = {}));
|
|
1553
|
-
exports.OnboardingStep = void 0;
|
|
1554
|
-
(function (OnboardingStep) {
|
|
1555
|
-
OnboardingStep[OnboardingStep["ONBOARDING_STEP_UNKNOWN"] = 0] = "ONBOARDING_STEP_UNKNOWN";
|
|
1556
|
-
OnboardingStep[OnboardingStep["ONBOARDING_STEP_DEVICE_VERIFICATION"] = 1] = "ONBOARDING_STEP_DEVICE_VERIFICATION";
|
|
1557
|
-
OnboardingStep[OnboardingStep["ONBOARDING_STEP_PERSONALIZATION"] = 2] = "ONBOARDING_STEP_PERSONALIZATION";
|
|
1558
|
-
OnboardingStep[OnboardingStep["ONBOARDING_STEP_SETUP"] = 3] = "ONBOARDING_STEP_SETUP";
|
|
1559
|
-
OnboardingStep[OnboardingStep["ONBOARDING_STEP_FIRMWARE"] = 4] = "ONBOARDING_STEP_FIRMWARE";
|
|
1560
|
-
})(exports.OnboardingStep || (exports.OnboardingStep = {}));
|
|
1569
|
+
exports.DeviceSeType = void 0;
|
|
1570
|
+
(function (DeviceSeType) {
|
|
1571
|
+
DeviceSeType[DeviceSeType["THD89"] = 0] = "THD89";
|
|
1572
|
+
DeviceSeType[DeviceSeType["SE608A"] = 1] = "SE608A";
|
|
1573
|
+
})(exports.DeviceSeType || (exports.DeviceSeType = {}));
|
|
1574
|
+
exports.DeviceSEState = void 0;
|
|
1575
|
+
(function (DeviceSEState) {
|
|
1576
|
+
DeviceSEState[DeviceSEState["BOOT"] = 0] = "BOOT";
|
|
1577
|
+
DeviceSEState[DeviceSEState["APP_FACTORY"] = 51] = "APP_FACTORY";
|
|
1578
|
+
DeviceSEState[DeviceSEState["APP"] = 85] = "APP";
|
|
1579
|
+
})(exports.DeviceSEState || (exports.DeviceSEState = {}));
|
|
1561
1580
|
|
|
1562
1581
|
var messages = /*#__PURE__*/Object.freeze({
|
|
1563
1582
|
__proto__: null,
|
|
@@ -1624,12 +1643,13 @@ var messages = /*#__PURE__*/Object.freeze({
|
|
|
1624
1643
|
get WallpaperTarget () { return exports.WallpaperTarget; },
|
|
1625
1644
|
get MoneroNetworkType () { return exports.MoneroNetworkType; },
|
|
1626
1645
|
get ViewTipType () { return exports.ViewTipType; },
|
|
1627
|
-
get
|
|
1646
|
+
get DeviceRebootType () { return exports.DeviceRebootType; },
|
|
1647
|
+
get DeviceFirmwareTargetType () { return exports.DeviceFirmwareTargetType; },
|
|
1648
|
+
get DeviceFirmwareUpdateTaskStatus () { return exports.DeviceFirmwareUpdateTaskStatus; },
|
|
1649
|
+
get DeviceFactoryAck () { return exports.DeviceFactoryAck; },
|
|
1628
1650
|
get DeviceType () { return exports.DeviceType; },
|
|
1629
|
-
get
|
|
1630
|
-
get
|
|
1631
|
-
get DevFirmwareTargetType () { return exports.DevFirmwareTargetType; },
|
|
1632
|
-
get OnboardingStep () { return exports.OnboardingStep; }
|
|
1651
|
+
get DeviceSeType () { return exports.DeviceSeType; },
|
|
1652
|
+
get DeviceSEState () { return exports.DeviceSEState; }
|
|
1633
1653
|
});
|
|
1634
1654
|
|
|
1635
1655
|
protobuf__namespace.util.Long = Long__default["default"];
|
|
@@ -30,7 +30,7 @@ export declare function hexToBytes(hex: string): Uint8Array;
|
|
|
30
30
|
export declare function bytesToHex(bytes: Uint8Array): string;
|
|
31
31
|
export declare function getErrorMessage(error: unknown): string;
|
|
32
32
|
export declare function withProtocolTimeout<T>(promise: Promise<T>, timeoutMs: number | undefined, createTimeoutError: () => Error, onTimeout?: () => void): Promise<T>;
|
|
33
|
-
export declare const PROTOCOL_V2_WRITE_WATCHDOG_TIMEOUT_MS =
|
|
33
|
+
export declare const PROTOCOL_V2_WRITE_WATCHDOG_TIMEOUT_MS = 0;
|
|
34
34
|
export declare class ProtocolV2Session {
|
|
35
35
|
private readonly options;
|
|
36
36
|
private pendingCall;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"session.d.ts","sourceRoot":"","sources":["../../../src/protocols/v2/session.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,wBAAwB,EAAE,iBAAiB,EAAE,MAAM,mBAAm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ACxB,aAAa,EACb,aAAa,GACd,EAAE;IACD,IAAI,EAAE,CACJ,IAAI,EAAE,MAAM,EACZ,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAC7B,OAAO,CAAC,EAAE,qBAAqB,KAC5B,OAAO,CAAC,iBAAiB,CAAC,CAAC;IAChC,SAAS,EAAE,MAAM,CAAC;IAClB,MAAM,CAAC,EAAE,cAAc,CAAC;IACxB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,aAAa,CAAC,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,GAAG,IAAI,CAAC;IAC3C,aAAa,CAAC,EAAE,CAAC,KAAK,EAAE,OAAO,KAAK,OAAO,CAAC,IAAI,CAAC,GAAG,IAAI,CAAC;CAC1D,oBAoBA"}
|
package/dist/types/messages.d.ts
CHANGED
|
@@ -882,11 +882,15 @@ export declare enum FailureType {
|
|
|
882
882
|
Failure_PinMismatch = 12,
|
|
883
883
|
Failure_WipeCodeMismatch = 13,
|
|
884
884
|
Failure_InvalidSession = 14,
|
|
885
|
-
Failure_FirmwareError = 99
|
|
885
|
+
Failure_FirmwareError = 99,
|
|
886
|
+
Failure_InvalidMessage = 1,
|
|
887
|
+
Failure_UndefinedError = 2,
|
|
888
|
+
Failure_UsageError = 3
|
|
886
889
|
}
|
|
887
890
|
export type Failure = {
|
|
888
891
|
code?: FailureType;
|
|
889
892
|
message?: string;
|
|
893
|
+
subcode?: number;
|
|
890
894
|
};
|
|
891
895
|
export declare enum Enum_ButtonRequestType {
|
|
892
896
|
ButtonRequest_Other = 1,
|
|
@@ -1869,6 +1873,28 @@ export type OnekeyFeatures = {
|
|
|
1869
1873
|
onekey_se02_boot_build_id?: string;
|
|
1870
1874
|
onekey_se03_boot_build_id?: string;
|
|
1871
1875
|
onekey_se04_boot_build_id?: string;
|
|
1876
|
+
onekey_romloader_version?: string;
|
|
1877
|
+
onekey_bootloader_version?: string;
|
|
1878
|
+
onekey_romloader_hash?: string;
|
|
1879
|
+
onekey_bootloader_hash?: string;
|
|
1880
|
+
onekey_romloader_build_id?: string;
|
|
1881
|
+
onekey_bootloader_build_id?: string;
|
|
1882
|
+
onekey_coprocessor_bt_name?: string;
|
|
1883
|
+
onekey_coprocessor_version?: string;
|
|
1884
|
+
onekey_coprocessor_build_id?: string;
|
|
1885
|
+
onekey_coprocessor_hash?: string;
|
|
1886
|
+
onekey_se01_bootloader_version?: string;
|
|
1887
|
+
onekey_se02_bootloader_version?: string;
|
|
1888
|
+
onekey_se03_bootloader_version?: string;
|
|
1889
|
+
onekey_se04_bootloader_version?: string;
|
|
1890
|
+
onekey_se01_bootloader_hash?: string;
|
|
1891
|
+
onekey_se02_bootloader_hash?: string;
|
|
1892
|
+
onekey_se03_bootloader_hash?: string;
|
|
1893
|
+
onekey_se04_bootloader_hash?: string;
|
|
1894
|
+
onekey_se01_bootloader_build_id?: string;
|
|
1895
|
+
onekey_se02_bootloader_build_id?: string;
|
|
1896
|
+
onekey_se03_bootloader_build_id?: string;
|
|
1897
|
+
onekey_se04_bootloader_build_id?: string;
|
|
1872
1898
|
};
|
|
1873
1899
|
export type LockDevice = {};
|
|
1874
1900
|
export type EndSession = {};
|
|
@@ -3325,19 +3351,17 @@ export type TxAckPaymentRequest = {
|
|
|
3325
3351
|
amount?: UintType;
|
|
3326
3352
|
signature: string;
|
|
3327
3353
|
};
|
|
3328
|
-
export type DebugLinkInput = {
|
|
3329
|
-
x?: number;
|
|
3330
|
-
y?: number;
|
|
3331
|
-
duration_ms?: number;
|
|
3332
|
-
x_end?: number;
|
|
3333
|
-
y_end?: number;
|
|
3334
|
-
};
|
|
3335
3354
|
export type InternalMyAddressRequest = {
|
|
3336
3355
|
coin_type: number;
|
|
3337
3356
|
chain_id: number;
|
|
3338
3357
|
account_index: number;
|
|
3339
3358
|
derive_type: number;
|
|
3340
3359
|
};
|
|
3360
|
+
export type StartSession = {
|
|
3361
|
+
session_id?: string;
|
|
3362
|
+
_skip_passphrase?: boolean;
|
|
3363
|
+
derive_cardano?: boolean;
|
|
3364
|
+
};
|
|
3341
3365
|
export type SetBusy = {
|
|
3342
3366
|
expiry_ms?: number;
|
|
3343
3367
|
};
|
|
@@ -3414,17 +3438,122 @@ export type ViewVerifyPage = {
|
|
|
3414
3438
|
address: string;
|
|
3415
3439
|
path: string;
|
|
3416
3440
|
};
|
|
3417
|
-
export type
|
|
3418
|
-
export type
|
|
3419
|
-
|
|
3441
|
+
export type ProtocolInfoRequest = {};
|
|
3442
|
+
export type ProtocolInfo = {
|
|
3443
|
+
version: number;
|
|
3444
|
+
supported_messages: number[];
|
|
3445
|
+
protobuf_definition?: string;
|
|
3420
3446
|
};
|
|
3421
|
-
export declare enum
|
|
3447
|
+
export declare enum DeviceRebootType {
|
|
3422
3448
|
Normal = 0,
|
|
3423
|
-
|
|
3449
|
+
Romloader = 1,
|
|
3424
3450
|
Bootloader = 2
|
|
3425
3451
|
}
|
|
3426
|
-
export type
|
|
3427
|
-
reboot_type:
|
|
3452
|
+
export type DeviceReboot = {
|
|
3453
|
+
reboot_type: DeviceRebootType;
|
|
3454
|
+
};
|
|
3455
|
+
export type DeviceSettings = {
|
|
3456
|
+
label?: string;
|
|
3457
|
+
bt_enable?: boolean;
|
|
3458
|
+
language?: string;
|
|
3459
|
+
};
|
|
3460
|
+
export type DeviceSettingsGet = {};
|
|
3461
|
+
export type DeviceSettingsSet = {
|
|
3462
|
+
settings: DeviceSettings;
|
|
3463
|
+
};
|
|
3464
|
+
export type DeviceCertificate = {
|
|
3465
|
+
cert_and_pubkey: string;
|
|
3466
|
+
private_key?: string;
|
|
3467
|
+
};
|
|
3468
|
+
export type DeviceCertificateWrite = {
|
|
3469
|
+
cert: DeviceCertificate;
|
|
3470
|
+
};
|
|
3471
|
+
export type DeviceCertificateRead = {};
|
|
3472
|
+
export type DeviceCertificateSignature = {
|
|
3473
|
+
data: string;
|
|
3474
|
+
};
|
|
3475
|
+
export type DeviceCertificateSign = {
|
|
3476
|
+
data: string;
|
|
3477
|
+
};
|
|
3478
|
+
export declare enum DeviceFirmwareTargetType {
|
|
3479
|
+
FW_MGMT_TARGET_INVALID = 0,
|
|
3480
|
+
FW_MGMT_TARGET_CRATE = 1,
|
|
3481
|
+
FW_MGMT_TARGET_ROMLOADER = 2,
|
|
3482
|
+
FW_MGMT_TARGET_BOOTLOADER = 3,
|
|
3483
|
+
FW_MGMT_TARGET_APPLICATION_P1 = 4,
|
|
3484
|
+
FW_MGMT_TARGET_APPLICATION_P2 = 5,
|
|
3485
|
+
FW_MGMT_TARGET_COPROCESSOR = 6,
|
|
3486
|
+
FW_MGMT_TARGET_SE01 = 7,
|
|
3487
|
+
FW_MGMT_TARGET_SE02 = 8,
|
|
3488
|
+
FW_MGMT_TARGET_SE03 = 9,
|
|
3489
|
+
FW_MGMT_TARGET_SE04 = 10
|
|
3490
|
+
}
|
|
3491
|
+
export declare enum DeviceFirmwareUpdateTaskStatus {
|
|
3492
|
+
FW_MGMT_UPDATER_TASK_STATUS_PENDING = 0,
|
|
3493
|
+
FW_MGMT_UPDATER_TASK_STATUS_IN_PROGRESS = 1,
|
|
3494
|
+
FW_MGMT_UPDATER_TASK_STATUS_FINISHED = 2,
|
|
3495
|
+
FW_MGMT_UPDATER_TASK_STATUS_FAILED_FILE_NOT_FOUND = 3,
|
|
3496
|
+
FW_MGMT_UPDATER_TASK_STATUS_FAILED_FILE_READ = 4,
|
|
3497
|
+
FW_MGMT_UPDATER_TASK_STATUS_FAILED_FILE_WRITE = 5,
|
|
3498
|
+
FW_MGMT_UPDATER_TASK_STATUS_FAILED_VERIFY = 6,
|
|
3499
|
+
FW_MGMT_UPDATER_TASK_STATUS_FAILED_INSTALL = 7,
|
|
3500
|
+
FW_MGMT_UPDATER_TASK_STATUS_FAILED_ABORT = 8,
|
|
3501
|
+
FW_MGMT_UPDATER_TASK_STATUS_FAILED_BUSY = 9,
|
|
3502
|
+
FW_MGMT_UPDATER_TASK_STATUS_FAILED_ENTRY_OUT_OF_BOUNDS = 10
|
|
3503
|
+
}
|
|
3504
|
+
export type DeviceFirmwareTarget = {
|
|
3505
|
+
target_id: DeviceFirmwareTargetType;
|
|
3506
|
+
path: string;
|
|
3507
|
+
};
|
|
3508
|
+
export type DeviceFirmwareUpdateRequest = {
|
|
3509
|
+
targets: DeviceFirmwareTarget[];
|
|
3510
|
+
};
|
|
3511
|
+
export type DeviceFirmwareUpdateRecord = {
|
|
3512
|
+
target_id: DeviceFirmwareTargetType;
|
|
3513
|
+
status?: DeviceFirmwareUpdateTaskStatus;
|
|
3514
|
+
payload_version?: number;
|
|
3515
|
+
path?: string;
|
|
3516
|
+
};
|
|
3517
|
+
export type DeviceFirmwareUpdateRecordFields = {
|
|
3518
|
+
status?: boolean;
|
|
3519
|
+
payload_version?: boolean;
|
|
3520
|
+
path?: boolean;
|
|
3521
|
+
};
|
|
3522
|
+
export type DeviceFirmwareUpdateStatusGet = {
|
|
3523
|
+
fields?: DeviceFirmwareUpdateRecordFields;
|
|
3524
|
+
};
|
|
3525
|
+
export type DeviceFirmwareUpdateStatus = {
|
|
3526
|
+
records: DeviceFirmwareUpdateRecord[];
|
|
3527
|
+
};
|
|
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;
|
|
3428
3557
|
};
|
|
3429
3558
|
export declare enum DeviceType {
|
|
3430
3559
|
CLASSIC1 = 0,
|
|
@@ -3432,130 +3561,96 @@ export declare enum DeviceType {
|
|
|
3432
3561
|
MINI = 2,
|
|
3433
3562
|
TOUCH = 3,
|
|
3434
3563
|
PRO = 5,
|
|
3435
|
-
CLASSIC1S_PURE = 6
|
|
3564
|
+
CLASSIC1S_PURE = 6,
|
|
3565
|
+
PRO2 = 7,
|
|
3566
|
+
NEO = 8
|
|
3436
3567
|
}
|
|
3437
|
-
export declare enum
|
|
3568
|
+
export declare enum DeviceSeType {
|
|
3438
3569
|
THD89 = 0,
|
|
3439
3570
|
SE608A = 1
|
|
3440
3571
|
}
|
|
3441
|
-
export declare enum
|
|
3572
|
+
export declare enum DeviceSEState {
|
|
3442
3573
|
BOOT = 0,
|
|
3443
3574
|
APP_FACTORY = 51,
|
|
3444
3575
|
APP = 85
|
|
3445
3576
|
}
|
|
3446
|
-
export type
|
|
3577
|
+
export type DeviceFirmwareImageInfo = {
|
|
3447
3578
|
version?: string;
|
|
3448
3579
|
build_id?: string;
|
|
3449
3580
|
hash?: string;
|
|
3450
3581
|
};
|
|
3451
|
-
export type
|
|
3452
|
-
|
|
3582
|
+
export type DeviceHardwareInfo = {
|
|
3583
|
+
Device_type?: DeviceType;
|
|
3453
3584
|
serial_no?: string;
|
|
3454
|
-
device_id?: string;
|
|
3455
3585
|
hardware_version?: string;
|
|
3456
3586
|
hardware_version_raw_adc?: number;
|
|
3457
3587
|
};
|
|
3458
|
-
export type
|
|
3459
|
-
|
|
3460
|
-
|
|
3461
|
-
|
|
3462
|
-
|
|
3463
|
-
|
|
3464
|
-
|
|
3465
|
-
|
|
3466
|
-
|
|
3467
|
-
|
|
3468
|
-
|
|
3469
|
-
|
|
3470
|
-
|
|
3471
|
-
|
|
3472
|
-
|
|
3473
|
-
|
|
3474
|
-
|
|
3475
|
-
|
|
3588
|
+
export type DeviceMainMcuInfo = {
|
|
3589
|
+
romloader?: DeviceFirmwareImageInfo;
|
|
3590
|
+
bootloader?: DeviceFirmwareImageInfo;
|
|
3591
|
+
application?: DeviceFirmwareImageInfo;
|
|
3592
|
+
application_data?: DeviceFirmwareImageInfo;
|
|
3593
|
+
};
|
|
3594
|
+
export type DeviceCoprocessorInfo = {
|
|
3595
|
+
bootloader?: DeviceFirmwareImageInfo;
|
|
3596
|
+
application?: DeviceFirmwareImageInfo;
|
|
3597
|
+
bt_adv_name?: string;
|
|
3598
|
+
bt_mac?: string;
|
|
3599
|
+
};
|
|
3600
|
+
export type DeviceSEInfo = {
|
|
3601
|
+
bootloader?: DeviceFirmwareImageInfo;
|
|
3602
|
+
application?: DeviceFirmwareImageInfo;
|
|
3603
|
+
type?: DeviceSeType;
|
|
3604
|
+
state?: DeviceSEState;
|
|
3605
|
+
};
|
|
3606
|
+
export type DeviceInfoTargets = {
|
|
3476
3607
|
hw?: boolean;
|
|
3477
3608
|
fw?: boolean;
|
|
3478
|
-
|
|
3609
|
+
coprocessor?: boolean;
|
|
3479
3610
|
se1?: boolean;
|
|
3480
3611
|
se2?: boolean;
|
|
3481
3612
|
se3?: boolean;
|
|
3482
3613
|
se4?: boolean;
|
|
3483
3614
|
status?: boolean;
|
|
3484
3615
|
};
|
|
3485
|
-
export type
|
|
3616
|
+
export type DeviceInfoTypes = {
|
|
3486
3617
|
version?: boolean;
|
|
3487
3618
|
build_id?: boolean;
|
|
3488
3619
|
hash?: boolean;
|
|
3489
3620
|
specific?: boolean;
|
|
3490
3621
|
};
|
|
3491
|
-
export type
|
|
3492
|
-
|
|
3493
|
-
|
|
3494
|
-
init_states?: boolean;
|
|
3495
|
-
backup_required?: boolean;
|
|
3496
|
-
passphrase_protection?: boolean;
|
|
3497
|
-
label?: string;
|
|
3498
|
-
};
|
|
3499
|
-
export type DevGetDeviceInfo = {
|
|
3500
|
-
targets?: DevInfoTargets;
|
|
3501
|
-
types?: DevInfoTypes;
|
|
3622
|
+
export type DeviceInfoGet = {
|
|
3623
|
+
targets?: DeviceInfoTargets;
|
|
3624
|
+
types?: DeviceInfoTypes;
|
|
3502
3625
|
};
|
|
3503
3626
|
export type ProtocolV2DeviceInfo = {
|
|
3504
3627
|
protocol_version: number;
|
|
3505
|
-
hw?:
|
|
3506
|
-
fw?:
|
|
3507
|
-
|
|
3508
|
-
se1?:
|
|
3509
|
-
se2?:
|
|
3510
|
-
se3?:
|
|
3511
|
-
se4?:
|
|
3512
|
-
status?:
|
|
3513
|
-
};
|
|
3514
|
-
export
|
|
3515
|
-
|
|
3516
|
-
TARGET_MAIN_BOOT = 1,
|
|
3517
|
-
TARGET_BT = 2,
|
|
3518
|
-
TARGET_SE1 = 3,
|
|
3519
|
-
TARGET_SE2 = 4,
|
|
3520
|
-
TARGET_SE3 = 5,
|
|
3521
|
-
TARGET_SE4 = 6,
|
|
3522
|
-
TARGET_RESOURCE = 10
|
|
3523
|
-
}
|
|
3524
|
-
export type DevFirmwareTarget = {
|
|
3525
|
-
target_id: DevFirmwareTargetType;
|
|
3526
|
-
path: string;
|
|
3527
|
-
};
|
|
3528
|
-
export type DevFirmwareUpdate = {
|
|
3529
|
-
targets: DevFirmwareTarget[];
|
|
3530
|
-
};
|
|
3531
|
-
export type DevFirmwareInstallProgress = {
|
|
3532
|
-
target_id: DevFirmwareTargetType;
|
|
3533
|
-
progress: number;
|
|
3534
|
-
stage?: string;
|
|
3535
|
-
};
|
|
3536
|
-
export type DevFirmwareUpdateStatusEntry = {
|
|
3537
|
-
target_id: DevFirmwareTargetType;
|
|
3538
|
-
status: number;
|
|
3539
|
-
};
|
|
3540
|
-
export type DevGetFirmwareUpdateStatus = {};
|
|
3541
|
-
export type DevFirmwareUpdateStatus = {
|
|
3542
|
-
targets: DevFirmwareUpdateStatusEntry[];
|
|
3628
|
+
hw?: DeviceHardwareInfo;
|
|
3629
|
+
fw?: DeviceMainMcuInfo;
|
|
3630
|
+
coprocessor?: DeviceCoprocessorInfo;
|
|
3631
|
+
se1?: DeviceSEInfo;
|
|
3632
|
+
se2?: DeviceSEInfo;
|
|
3633
|
+
se3?: DeviceSEInfo;
|
|
3634
|
+
se4?: DeviceSEInfo;
|
|
3635
|
+
status?: DeviceStatus;
|
|
3636
|
+
};
|
|
3637
|
+
export type DeviceSessionGet = {
|
|
3638
|
+
session_id?: string;
|
|
3543
3639
|
};
|
|
3544
|
-
export type
|
|
3545
|
-
|
|
3546
|
-
|
|
3547
|
-
pre_firmware?: string;
|
|
3640
|
+
export type DeviceSession = {
|
|
3641
|
+
session_id?: string;
|
|
3642
|
+
btc_test_address?: string;
|
|
3548
3643
|
};
|
|
3549
|
-
export type
|
|
3550
|
-
|
|
3551
|
-
|
|
3552
|
-
|
|
3553
|
-
|
|
3554
|
-
|
|
3555
|
-
|
|
3556
|
-
|
|
3644
|
+
export type DeviceStatus = {
|
|
3645
|
+
device_id?: string;
|
|
3646
|
+
unlocked?: boolean;
|
|
3647
|
+
init_states?: boolean;
|
|
3648
|
+
backup_required?: boolean;
|
|
3649
|
+
passphrase_enabled?: boolean;
|
|
3650
|
+
attach_to_pin_enabled?: boolean;
|
|
3651
|
+
unlocked_by_attach_to_pin?: boolean;
|
|
3557
3652
|
};
|
|
3558
|
-
export type
|
|
3653
|
+
export type FilesystemPermissionFix = {};
|
|
3559
3654
|
export type FilesystemPathInfo = {
|
|
3560
3655
|
exist: boolean;
|
|
3561
3656
|
size: number;
|
|
@@ -3612,31 +3707,6 @@ export type FilesystemDirRemove = {
|
|
|
3612
3707
|
path: string;
|
|
3613
3708
|
};
|
|
3614
3709
|
export type FilesystemFormat = {};
|
|
3615
|
-
export declare enum OnboardingStep {
|
|
3616
|
-
ONBOARDING_STEP_UNKNOWN = 0,
|
|
3617
|
-
ONBOARDING_STEP_DEVICE_VERIFICATION = 1,
|
|
3618
|
-
ONBOARDING_STEP_PERSONALIZATION = 2,
|
|
3619
|
-
ONBOARDING_STEP_SETUP = 3,
|
|
3620
|
-
ONBOARDING_STEP_FIRMWARE = 4
|
|
3621
|
-
}
|
|
3622
|
-
export type GetOnboardingStatus = {};
|
|
3623
|
-
export type NewDevice = {
|
|
3624
|
-
seedcard_backup?: boolean;
|
|
3625
|
-
};
|
|
3626
|
-
export type Restore = {
|
|
3627
|
-
mnemonic?: boolean;
|
|
3628
|
-
seedcard?: boolean;
|
|
3629
|
-
};
|
|
3630
|
-
export type Setup = {
|
|
3631
|
-
new_device?: NewDevice;
|
|
3632
|
-
restore?: Restore;
|
|
3633
|
-
};
|
|
3634
|
-
export type OnboardingStatus = {
|
|
3635
|
-
step: OnboardingStep;
|
|
3636
|
-
setup?: Setup;
|
|
3637
|
-
detail_code?: number;
|
|
3638
|
-
detail_str?: string;
|
|
3639
|
-
};
|
|
3640
3710
|
export type MessageType = {
|
|
3641
3711
|
AlephiumGetAddress: AlephiumGetAddress;
|
|
3642
3712
|
AlephiumAddress: AlephiumAddress;
|
|
@@ -4200,8 +4270,8 @@ export type MessageType = {
|
|
|
4200
4270
|
CoinPurchaseMemo: CoinPurchaseMemo;
|
|
4201
4271
|
PaymentRequestMemo: PaymentRequestMemo;
|
|
4202
4272
|
TxAckPaymentRequest: TxAckPaymentRequest;
|
|
4203
|
-
DebugLinkInput: DebugLinkInput;
|
|
4204
4273
|
InternalMyAddressRequest: InternalMyAddressRequest;
|
|
4274
|
+
StartSession: StartSession;
|
|
4205
4275
|
SetBusy: SetBusy;
|
|
4206
4276
|
GetFirmwareHash: GetFirmwareHash;
|
|
4207
4277
|
FirmwareHash: FirmwareHash;
|
|
@@ -4218,28 +4288,41 @@ export type MessageType = {
|
|
|
4218
4288
|
ViewTip: ViewTip;
|
|
4219
4289
|
ViewSignPage: ViewSignPage;
|
|
4220
4290
|
ViewVerifyPage: ViewVerifyPage;
|
|
4221
|
-
|
|
4222
|
-
|
|
4223
|
-
|
|
4224
|
-
|
|
4225
|
-
|
|
4226
|
-
|
|
4227
|
-
|
|
4228
|
-
|
|
4229
|
-
|
|
4230
|
-
|
|
4231
|
-
|
|
4232
|
-
|
|
4233
|
-
|
|
4234
|
-
|
|
4235
|
-
|
|
4236
|
-
|
|
4237
|
-
|
|
4238
|
-
|
|
4239
|
-
|
|
4240
|
-
|
|
4241
|
-
|
|
4242
|
-
|
|
4291
|
+
ProtocolInfoRequest: ProtocolInfoRequest;
|
|
4292
|
+
ProtocolInfo: ProtocolInfo;
|
|
4293
|
+
DeviceReboot: DeviceReboot;
|
|
4294
|
+
DeviceSettings: DeviceSettings;
|
|
4295
|
+
DeviceSettingsGet: DeviceSettingsGet;
|
|
4296
|
+
DeviceSettingsSet: DeviceSettingsSet;
|
|
4297
|
+
DeviceCertificate: DeviceCertificate;
|
|
4298
|
+
DeviceCertificateWrite: DeviceCertificateWrite;
|
|
4299
|
+
DeviceCertificateRead: DeviceCertificateRead;
|
|
4300
|
+
DeviceCertificateSignature: DeviceCertificateSignature;
|
|
4301
|
+
DeviceCertificateSign: DeviceCertificateSign;
|
|
4302
|
+
DeviceFirmwareTarget: DeviceFirmwareTarget;
|
|
4303
|
+
DeviceFirmwareUpdateRequest: DeviceFirmwareUpdateRequest;
|
|
4304
|
+
DeviceFirmwareUpdateRecord: DeviceFirmwareUpdateRecord;
|
|
4305
|
+
DeviceFirmwareUpdateRecordFields: DeviceFirmwareUpdateRecordFields;
|
|
4306
|
+
DeviceFirmwareUpdateStatusGet: DeviceFirmwareUpdateStatusGet;
|
|
4307
|
+
DeviceFirmwareUpdateStatus: DeviceFirmwareUpdateStatus;
|
|
4308
|
+
DeviceFactoryInfoManufactureTime: DeviceFactoryInfoManufactureTime;
|
|
4309
|
+
DeviceFactoryInfo: DeviceFactoryInfo;
|
|
4310
|
+
DeviceFactoryInfoSet: DeviceFactoryInfoSet;
|
|
4311
|
+
DeviceFactoryInfoGet: DeviceFactoryInfoGet;
|
|
4312
|
+
DeviceFactoryPermanentLock: DeviceFactoryPermanentLock;
|
|
4313
|
+
DeviceFactoryTest: DeviceFactoryTest;
|
|
4314
|
+
DeviceFirmwareImageInfo: DeviceFirmwareImageInfo;
|
|
4315
|
+
DeviceHardwareInfo: DeviceHardwareInfo;
|
|
4316
|
+
DeviceMainMcuInfo: DeviceMainMcuInfo;
|
|
4317
|
+
DeviceCoprocessorInfo: DeviceCoprocessorInfo;
|
|
4318
|
+
DeviceSEInfo: DeviceSEInfo;
|
|
4319
|
+
DeviceInfoTargets: DeviceInfoTargets;
|
|
4320
|
+
DeviceInfoTypes: DeviceInfoTypes;
|
|
4321
|
+
DeviceInfoGet: DeviceInfoGet;
|
|
4322
|
+
DeviceSessionGet: DeviceSessionGet;
|
|
4323
|
+
DeviceSession: DeviceSession;
|
|
4324
|
+
DeviceStatus: DeviceStatus;
|
|
4325
|
+
FilesystemPermissionFix: FilesystemPermissionFix;
|
|
4243
4326
|
FilesystemPathInfo: FilesystemPathInfo;
|
|
4244
4327
|
FilesystemPathInfoQuery: FilesystemPathInfoQuery;
|
|
4245
4328
|
FilesystemFile: FilesystemFile;
|
|
@@ -4251,11 +4334,6 @@ export type MessageType = {
|
|
|
4251
4334
|
FilesystemDirMake: FilesystemDirMake;
|
|
4252
4335
|
FilesystemDirRemove: FilesystemDirRemove;
|
|
4253
4336
|
FilesystemFormat: FilesystemFormat;
|
|
4254
|
-
GetOnboardingStatus: GetOnboardingStatus;
|
|
4255
|
-
NewDevice: NewDevice;
|
|
4256
|
-
Restore: Restore;
|
|
4257
|
-
Setup: Setup;
|
|
4258
|
-
OnboardingStatus: OnboardingStatus;
|
|
4259
4337
|
};
|
|
4260
4338
|
export type MessageKey = keyof MessageType;
|
|
4261
4339
|
export type MessageResponse<T extends MessageKey> = {
|