@onekeyfe/hd-core 1.0.34-alpha.0 → 1.0.34

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 (127) hide show
  1. package/dist/api/BaseMethod.d.ts +1 -1
  2. package/dist/api/BaseMethod.d.ts.map +1 -1
  3. package/dist/api/helpers/hexUtils.d.ts +1 -0
  4. package/dist/api/helpers/hexUtils.d.ts.map +1 -1
  5. package/dist/data-manager/DataManager.d.ts.map +1 -1
  6. package/dist/data-manager/TransportManager.d.ts.map +1 -1
  7. package/dist/events/ui-request.d.ts +1 -1
  8. package/dist/index.d.ts +3 -4
  9. package/dist/index.js +139 -125
  10. package/dist/types/api/firmwareUpdate.d.ts +1 -1
  11. package/dist/types/api/firmwareUpdate.d.ts.map +1 -1
  12. package/dist/types/settings.d.ts +1 -1
  13. package/dist/types/settings.d.ts.map +1 -1
  14. package/dist/utils/logger.d.ts +0 -2
  15. package/dist/utils/logger.d.ts.map +1 -1
  16. package/package.json +4 -4
  17. package/src/api/BaseMethod.ts +3 -2
  18. package/src/api/CheckAllFirmwareRelease.ts +1 -1
  19. package/src/api/CheckBLEFirmwareRelease.ts +3 -3
  20. package/src/api/CheckBootloaderRelease.ts +1 -1
  21. package/src/api/CheckBridgeRelease.ts +1 -1
  22. package/src/api/CheckFirmwareRelease.ts +3 -3
  23. package/src/api/CipherKeyValue.ts +1 -1
  24. package/src/api/FirmwareUpdate.ts +1 -1
  25. package/src/api/FirmwareUpdateV2.ts +1 -1
  26. package/src/api/FirmwareUpdateV3.ts +1 -1
  27. package/src/api/GetFeatures.ts +3 -3
  28. package/src/api/GetOnekeyFeatures.ts +3 -3
  29. package/src/api/GetPassphraseState.ts +1 -1
  30. package/src/api/alephium/AlephiumGetAddress.ts +1 -1
  31. package/src/api/alephium/AlephiumSignMessage.ts +1 -1
  32. package/src/api/alephium/AlephiumSignTransaction.ts +1 -1
  33. package/src/api/algo/AlgoGetAddress.ts +1 -1
  34. package/src/api/algo/AlgoSignTransaction.ts +1 -1
  35. package/src/api/allnetwork/AllNetworkGetAddress.ts +1 -1
  36. package/src/api/aptos/AptosGetAddress.ts +1 -1
  37. package/src/api/aptos/AptosGetPublicKey.ts +1 -1
  38. package/src/api/aptos/AptosSignMessage.ts +1 -1
  39. package/src/api/aptos/AptosSignTransaction.ts +1 -1
  40. package/src/api/benfen/BenfenGetAddress.ts +1 -1
  41. package/src/api/benfen/BenfenGetPublicKey.ts +1 -1
  42. package/src/api/benfen/BenfenSignMessage.ts +1 -1
  43. package/src/api/benfen/BenfenSignTransaction.ts +1 -1
  44. package/src/api/btc/BTCGetAddress.ts +1 -1
  45. package/src/api/btc/BTCGetPublicKey.ts +1 -1
  46. package/src/api/btc/BTCSignMessage.ts +1 -1
  47. package/src/api/btc/BTCSignPsbt.ts +1 -1
  48. package/src/api/btc/BTCSignTransaction.ts +1 -1
  49. package/src/api/btc/BTCVerifyMessage.ts +1 -1
  50. package/src/api/cardano/CardanoGetAddress.ts +1 -1
  51. package/src/api/cardano/CardanoGetPublicKey.ts +1 -1
  52. package/src/api/cardano/CardanoSignMessage.ts +1 -1
  53. package/src/api/cardano/CardanoSignTransaction.ts +1 -1
  54. package/src/api/conflux/ConfluxGetAddress.ts +1 -1
  55. package/src/api/conflux/ConfluxSignMessage.ts +1 -1
  56. package/src/api/conflux/ConfluxSignMessageCIP23.ts +1 -1
  57. package/src/api/conflux/ConfluxSignTransaction.ts +1 -1
  58. package/src/api/cosmos/CosmosGetAddress.ts +1 -1
  59. package/src/api/cosmos/CosmosGetPublicKey.ts +1 -1
  60. package/src/api/cosmos/CosmosSignTransaction.ts +1 -1
  61. package/src/api/device/DeviceUpdateBootloader.ts +1 -1
  62. package/src/api/dynex/DnxGetAddress.ts +1 -1
  63. package/src/api/dynex/DnxSignTransaction.ts +1 -1
  64. package/src/api/evm/EVMGetAddress.ts +1 -1
  65. package/src/api/evm/EVMGetPublicKey.ts +1 -1
  66. package/src/api/evm/EVMSignMessage.ts +1 -1
  67. package/src/api/evm/EVMSignMessageEIP712.ts +1 -1
  68. package/src/api/evm/EVMSignTransaction.ts +1 -1
  69. package/src/api/evm/EVMSignTypedData.ts +3 -3
  70. package/src/api/evm/EVMVerifyMessage.ts +1 -1
  71. package/src/api/filecoin/FilecoinGetAddress.ts +1 -1
  72. package/src/api/filecoin/FilecoinSignTransaction.ts +1 -1
  73. package/src/api/helpers/hexUtils.ts +29 -0
  74. package/src/api/kaspa/KaspaGetAddress.ts +1 -1
  75. package/src/api/kaspa/KaspaSignTransaction.ts +1 -1
  76. package/src/api/lightning/LnurlAuth.ts +1 -1
  77. package/src/api/near/NearGetAddress.ts +1 -1
  78. package/src/api/near/NearSignTransaction.ts +1 -1
  79. package/src/api/nem/NEMGetAddress.ts +1 -1
  80. package/src/api/nem/NEMSignTransaction.ts +1 -1
  81. package/src/api/neo/NeoGetAddress.ts +1 -1
  82. package/src/api/neo/NeoSignTransaction.ts +1 -1
  83. package/src/api/nervos/NervosGetAddress.ts +1 -1
  84. package/src/api/nervos/NervosSignTransaction.ts +1 -1
  85. package/src/api/nexa/NexaGetAddress.ts +1 -1
  86. package/src/api/nostr/NostrDecryptMessage.ts +1 -1
  87. package/src/api/nostr/NostrEncryptMessage.ts +1 -1
  88. package/src/api/nostr/NostrGetPublicKey.ts +1 -1
  89. package/src/api/nostr/NostrSignEvent.ts +1 -1
  90. package/src/api/nostr/NostrSignSchnorr.ts +1 -1
  91. package/src/api/polkadot/PolkadotGetAddress.ts +1 -1
  92. package/src/api/polkadot/PolkadotSignTransaction.ts +1 -1
  93. package/src/api/scdo/ScdoGetAddress.ts +1 -1
  94. package/src/api/scdo/ScdoSignMessage.ts +1 -1
  95. package/src/api/scdo/ScdoSignTransaction.ts +1 -1
  96. package/src/api/solana/SolGetAddress.ts +1 -1
  97. package/src/api/solana/SolSignMessage.ts +1 -1
  98. package/src/api/solana/SolSignOffchainMessage.ts +1 -1
  99. package/src/api/solana/SolSignTransaction.ts +1 -1
  100. package/src/api/starcoin/StarcoinGetAddress.ts +1 -1
  101. package/src/api/starcoin/StarcoinGetPublicKey.ts +1 -1
  102. package/src/api/starcoin/StarcoinSignMessage.ts +1 -1
  103. package/src/api/starcoin/StarcoinSignTransaction.ts +1 -1
  104. package/src/api/starcoin/StarcoinVerifyMessage.ts +1 -1
  105. package/src/api/stellar/StellarGetAddress.ts +1 -1
  106. package/src/api/stellar/StellarSignTransaction.ts +1 -1
  107. package/src/api/sui/SuiGetAddress.ts +1 -1
  108. package/src/api/sui/SuiGetPublicKey.ts +1 -1
  109. package/src/api/sui/SuiSignMessage.ts +1 -1
  110. package/src/api/sui/SuiSignTransaction.ts +1 -1
  111. package/src/api/test/TestInitializeDeviceDuration.ts +3 -3
  112. package/src/api/ton/TonGetAddress.ts +1 -1
  113. package/src/api/ton/TonSignMessage.ts +1 -1
  114. package/src/api/ton/TonSignProof.ts +1 -1
  115. package/src/api/tron/TronGetAddress.ts +1 -1
  116. package/src/api/tron/TronSignMessage.ts +1 -1
  117. package/src/api/tron/TronSignTransaction.ts +1 -1
  118. package/src/api/xrp/XrpGetAddress.ts +1 -1
  119. package/src/api/xrp/XrpSignTransaction.ts +1 -1
  120. package/src/core/index.ts +1 -1
  121. package/src/data-manager/DataManager.ts +1 -1
  122. package/src/data-manager/TransportManager.ts +0 -3
  123. package/src/device/Device.ts +2 -2
  124. package/src/events/ui-request.ts +1 -1
  125. package/src/types/api/firmwareUpdate.ts +1 -1
  126. package/src/types/settings.ts +1 -9
  127. package/src/utils/logger.ts +0 -2
@@ -18,7 +18,7 @@ export declare function firmwareUpdate(connectId: string | undefined, params: Pa
18
18
  export declare function firmwareUpdate(connectId: string | undefined, params: Params<FirmwareUpdateBinaryParams> & {
19
19
  rebootOnSuccess?: boolean;
20
20
  }): Response<PROTO.Success>;
21
- type IPlatform = 'native' | 'desktop' | 'ext' | 'web' | 'webEmbed';
21
+ type IPlatform = 'native' | 'desktop' | 'ext' | 'web' | 'web-embed';
22
22
  type Platform = {
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C,KAAK,CAAC,OAAO,CAAC,CAAC;AAE3B,MAAM,WAAW,sBAAsB;IACrC,UAAU,CAAC,EAAE,MAAM,EAAE,CAAC;IACtB,SAAS,CAAC,EAAE,WAAW,CAAC;IAExB,eAAe,CAAC,EAAE,MAAM,EAAE,CAAC;IAC3B,cAAc,CAAC,EAAE,WAAW,CAAC;IAE7B,iBAAiB,CAAC,EAAE,MAAM,EAAE,CAAC;IAC7B,gBAAgB,CAAC,EAAE,WAAW,CAAC;IAE/B,cAAc,CAAC,EAAE,WAAW,CAAC;IAC7B,eAAe,CAAC,EAAE,OAAO,CAAC;IAE1B,QAAQ,EAAE,SAAS,CAAC;CACrB;AAED,MAAM,CAAC,OAAO,UAAU,gBAAgB,CACtC,SAAS,EAAE,MAAM,GAAG,SAAS,EAC7B,MAAM,EAAE,MAAM,CAAC,sBAAsB,CAAC,GACrC,QAAQ,CAAC;IACV,UAAU,EAAE,MAAM,CAAC;IACnB,eAAe,EAAE,MAAM,CAAC;IACxB,iBAAiB,EAAE,MAAM,CAAC;CAC3B,CAAC,CAAC"}
@@ -12,7 +12,7 @@ export type ConnectSettings = {
12
12
  priority: number;
13
13
  trustedHost: boolean;
14
14
  supportedBrowser?: boolean;
15
- env: 'node' | 'web' | 'webextension' | 'electron' | 'react-native' | 'webusb' | 'desktop-web-ble' | 'lowlevel';
15
+ env: 'node' | 'web' | 'webextension' | 'electron' | 'react-native' | 'webusb' | 'lowlevel';
16
16
  timestamp: number;
17
17
  isFrame?: boolean;
18
18
  preRelease?: boolean;
@@ -1 +1 @@
1
- {"version":3,"file":"settings.d.ts","sourceRoot":"","sources":["../../src/types/settings.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC;AAE5C,MAAM,MAAM,eAAe,GAAG;IAC5B,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,kBAAkB,CAAC,EAAE,OAAO,CAAC;I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CAAC;CACH,CAAC;AAEF,MAAM,MAAM,oBAAoB,GAAG;IACjC,MAAM,EAAE,SAAS,CAAC,QAAQ,CAAC,CAAC;CAC7B,GAAG,aAAa,CAAC"}
@@ -34,7 +34,6 @@ export declare enum LoggerNames {
34
34
  HdTransportHttp = "@onekey/hd-transport-http",
35
35
  HdTransportLowLevel = "@onekey/hd-transport-lowlevel",
36
36
  HdBleTransport = "@onekey/hd-ble-transport",
37
- HdWebBleTransport = "@onekey/hd-web-ble-transport",
38
37
  Connect = "@onekey/connect",
39
38
  Iframe = "IFrame",
40
39
  SendMessage = "[SendMessage]",
@@ -51,7 +50,6 @@ export declare const LoggerMap: {
51
50
  "@onekey/hd-ble-sdk": Log;
52
51
  "@onekey/hd-transport-http": Log;
53
52
  "@onekey/hd-ble-transport": Log;
54
- "@onekey/hd-web-ble-transport": Log;
55
53
  "@onekey/hd-transport-lowlevel": Log;
56
54
  "@onekey/connect": Log;
57
55
  IFrame: Log;
@@ -1 +1 @@
1
- {"version":3,"file":"logger.d.ts","sourceRoot":"","sources":["../../src/utils/logger.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,WAAW,CAAC;AAGxC,KAAK,UAAU,GAAG;IAChB,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;IACf,OAAO,EAAE,GAAG,EAAE,CAAC;IACf,SAAS,EAAE,MAAM,CAAC;CACnB,CAAC;AAMF,cAAM,GAAG;IACP,MAAM,EAAE,MAAM,CAAC;IAEf,OAAO,EAAE,OAAO,CAAC;IAEjB,QAAQ,EAAE,UAAU,EAAE,CAAC;gBAEX,MAAM,EAAE,MAAM,EAAE,OAAO,EAAE,OAAO;IAM5C,UAAU,CAAC,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,GAAG,IAAI,EAAE,GAAG,EAAE;IAYxD,GAAG,CAAC,GAAG,IAAI,EAAE,GAAG,EAAE;IASlB,KAAK,CAAC,GAAG,IA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 "version": "1.0.34",
4
4
  "description": "> TODO: description",
5
5
  "author": "OneKey",
6
6
  "homepage": "https://github.com/OneKeyHQ/hardware-js-sdk#readme",
@@ -25,8 +25,8 @@
25
25
  "url": "https://github.com/OneKeyHQ/hardware-js-sdk/issues"
26
26
  },
27
27
  "dependencies": {
28
- "@onekeyfe/hd-shared": "^1.0.34-alpha.0",
29
- "@onekeyfe/hd-transport": "^1.0.34-alpha.0",
28
+ "@onekeyfe/hd-shared": "^1.0.34",
29
+ "@onekeyfe/hd-transport": "^1.0.34",
30
30
  "axios": "^0.27.2",
31
31
  "bignumber.js": "^9.0.2",
32
32
  "bytebuffer": "^5.0.1",
@@ -46,5 +46,5 @@
46
46
  "@types/web-bluetooth": "^0.0.21",
47
47
  "ripple-keypairs": "^1.1.4"
48
48
  },
49
- "gitHead": "a910879dea6198bd96016aec81429f31b9692bf1"
49
+ "gitHead": "3172095f33c4637dd76b36fee3ea0cfa0bd3ae40"
50
50
  }
@@ -58,8 +58,9 @@ export abstract class BaseMethod<Params = undefined> {
58
58
 
59
59
  /**
60
60
  * 不允许的设备模式。如果当前设备模式在该数组中,则抛出异常。
61
+ * NOT_INITIALIZE, BOOTLOADER, SEEDLESS
61
62
  */
62
- notAllowDeviceMode: string[];
63
+ allowDeviceMode: string[];
63
64
 
64
65
  /**
65
66
  * 依赖的设备模式
@@ -105,7 +106,7 @@ export abstract class BaseMethod<Params = undefined> {
105
106
  this.connectId = payload.connectId || '';
106
107
  this.deviceId = payload.deviceId || '';
107
108
  this.useDevice = true;
108
- this.notAllowDeviceMode = [UI_REQUEST.INITIALIZE];
109
+ this.allowDeviceMode = [UI_REQUEST.NOT_INITIALIZE];
109
110
  this.requireDeviceMode = [];
110
111
  }
111
112
 
@@ -15,7 +15,7 @@ import { getDeviceFirmwareVersion, getDeviceType } from '../utils';
15
15
 
16
16
  export default class CheckAllFirmwareRelease extends BaseMethod {
17
17
  init() {
18
- this.notAllowDeviceMode = [...this.notAllowDeviceMode, UI_REQUEST.BOOTLOADER];
18
+ this.allowDeviceMode = [...this.allowDeviceMode, UI_REQUEST.BOOTLOADER];
19
19
  this.useDevicePassphraseState = false;
20
20
  this.skipForceUpdateCheck = true;
21
21
  }
@@ -5,9 +5,9 @@ import { getBleFirmwareReleaseInfo } from './firmware/releaseHelper';
5
5
 
6
6
  export default class CheckBLEFirmwareRelease extends BaseMethod {
7
7
  init() {
8
- this.notAllowDeviceMode = [
9
- ...this.notAllowDeviceMode,
10
- UI_REQUEST.INITIALIZE,
8
+ this.allowDeviceMode = [
9
+ ...this.allowDeviceMode,
10
+ UI_REQUEST.NOT_INITIALIZE,
11
11
  UI_REQUEST.BOOTLOADER,
12
12
  ];
13
13
  this.useDevicePassphraseState = false;
@@ -5,7 +5,7 @@ import { getBootloaderReleaseInfo } from './firmware/releaseHelper';
5
5
 
6
6
  export default class CheckBootloaderRelease extends BaseMethod {
7
7
  init() {
8
- this.notAllowDeviceMode = [...this.notAllowDeviceMode, UI_REQUEST.BOOTLOADER];
8
+ this.allowDeviceMode = [...this.allowDeviceMode, UI_REQUEST.BOOTLOADER];
9
9
  this.useDevicePassphraseState = false;
10
10
  this.skipForceUpdateCheck = true;
11
11
  }
@@ -5,7 +5,7 @@ import { getBridgeReleaseInfo } from '../utils/bridgeUpdate';
5
5
 
6
6
  export default class CheckBridgeRelease extends BaseMethod {
7
7
  init() {
8
- this.notAllowDeviceMode = [...this.notAllowDeviceMode, UI_REQUEST.BOOTLOADER];
8
+ this.allowDeviceMode = [...this.allowDeviceMode, UI_REQUEST.BOOTLOADER];
9
9
  this.useDevicePassphraseState = false;
10
10
  this.skipForceUpdateCheck = true;
11
11
  }
@@ -5,9 +5,9 @@ import { getFirmwareReleaseInfo } from './firmware/releaseHelper';
5
5
 
6
6
  export default class CheckFirmwareRelease extends BaseMethod {
7
7
  init() {
8
- this.notAllowDeviceMode = [
9
- ...this.notAllowDeviceMode,
10
- UI_REQUEST.INITIALIZE,
8
+ this.allowDeviceMode = [
9
+ ...this.allowDeviceMode,
10
+ UI_REQUEST.NOT_INITIALIZE,
11
11
  UI_REQUEST.BOOTLOADER,
12
12
  ];
13
13
  this.useDevicePassphraseState = false;
@@ -11,7 +11,7 @@ export default class CipherKeyValue extends BaseMethod<HardwareCipherKeyValue[]>
11
11
 
12
12
  init() {
13
13
  this.checkDeviceId = true;
14
- this.notAllowDeviceMode = [...this.notAllowDeviceMode, UI_REQUEST.INITIALIZE];
14
+ this.allowDeviceMode = [...this.allowDeviceMode, UI_REQUEST.NOT_INITIALIZE];
15
15
 
16
16
  this.hasBundle = !!this.payload?.bundle;
17
17
  const payload = this.hasBundle ? this.payload : { bundle: [this.payload] };
@@ -31,7 +31,7 @@ export default class FirmwareUpdate extends BaseMethod<Params> {
31
31
  checkPromise: Deferred<any> | null = null;
32
32
 
33
33
  init() {
34
- this.notAllowDeviceMode = [UI_REQUEST.BOOTLOADER, UI_REQUEST.INITIALIZE];
34
+ this.allowDeviceMode = [UI_REQUEST.BOOTLOADER, UI_REQUEST.NOT_INITIALIZE];
35
35
  this.requireDeviceMode = [];
36
36
  this.useDevicePassphraseState = false;
37
37
  this.skipForceUpdateCheck = true;
@@ -43,7 +43,7 @@ export default class FirmwareUpdateV2 extends BaseMethod<Params> {
43
43
  checkPromise: Deferred<any> | null = null;
44
44
 
45
45
  init() {
46
- this.notAllowDeviceMode = [UI_REQUEST.BOOTLOADER, UI_REQUEST.INITIALIZE];
46
+ this.allowDeviceMode = [UI_REQUEST.BOOTLOADER, UI_REQUEST.NOT_INITIALIZE];
47
47
  this.requireDeviceMode = [];
48
48
  this.useDevicePassphraseState = false;
49
49
  this.skipForceUpdateCheck = true;
@@ -38,7 +38,7 @@ export default class FirmwareUpdateV3 extends FirmwareUpdateBaseMethod<FirmwareU
38
38
  checkPromise: Deferred<any> | null = null;
39
39
 
40
40
  init() {
41
- this.notAllowDeviceMode = [UI_REQUEST.BOOTLOADER, UI_REQUEST.INITIALIZE];
41
+ this.allowDeviceMode = [UI_REQUEST.BOOTLOADER, UI_REQUEST.NOT_INITIALIZE];
42
42
  this.requireDeviceMode = [];
43
43
  this.useDevicePassphraseState = false;
44
44
  this.skipForceUpdateCheck = true;
@@ -4,9 +4,9 @@ import { BaseMethod } from './BaseMethod';
4
4
 
5
5
  export default class GetFeatures extends BaseMethod {
6
6
  init() {
7
- this.notAllowDeviceMode = [
8
- ...this.notAllowDeviceMode,
9
- UI_REQUEST.INITIALIZE,
7
+ this.allowDeviceMode = [
8
+ ...this.allowDeviceMode,
9
+ UI_REQUEST.NOT_INITIALIZE,
10
10
  UI_REQUEST.BOOTLOADER,
11
11
  ];
12
12
  this.useDevicePassphraseState = false;
@@ -5,9 +5,9 @@ import { BaseMethod } from './BaseMethod';
5
5
 
6
6
  export default class GetOnekeyFeatures extends BaseMethod {
7
7
  init() {
8
- this.notAllowDeviceMode = [
9
- ...this.notAllowDeviceMode,
10
- UI_REQUEST.INITIALIZE,
8
+ this.allowDeviceMode = [
9
+ ...this.allowDeviceMode,
10
+ UI_REQUEST.NOT_INITIALIZE,
11
11
  UI_REQUEST.BOOTLOADER,
12
12
  ];
13
13
  this.useDevicePassphraseState = false;
@@ -5,7 +5,7 @@ import { BaseMethod } from './BaseMethod';
5
5
 
6
6
  export default class GetPassphraseState extends BaseMethod {
7
7
  init() {
8
- this.notAllowDeviceMode = [...this.notAllowDeviceMode, UI_REQUEST.INITIALIZE];
8
+ this.allowDeviceMode = [...this.allowDeviceMode, UI_REQUEST.NOT_INITIALIZE];
9
9
  this.useDevicePassphraseState = false;
10
10
  }
11
11
 
@@ -10,7 +10,7 @@ export default class AlephiumGetAddress extends BaseMethod<HardwareAlephiumGetAd
10
10
 
11
11
  init() {
12
12
  this.checkDeviceId = true;
13
- this.notAllowDeviceMode = [...this.notAllowDeviceMode, UI_REQUEST.INITIALIZE];
13
+ this.allowDeviceMode = [...this.allowDeviceMode, UI_REQUEST.NOT_INITIALIZE];
14
14
 
15
15
  this.hasBundle = !!this.payload?.bundle;
16
16
  const payload = this.hasBundle ? this.payload : { bundle: [this.payload] };
@@ -8,7 +8,7 @@ import { stripHexPrefix } from '../helpers/hexUtils';
8
8
  export default class AlephiumSignMessage extends BaseMethod<HardwareAlephiumSignMessage> {
9
9
  init() {
10
10
  this.checkDeviceId = true;
11
- this.notAllowDeviceMode = [...this.notAllowDeviceMode, UI_REQUEST.INITIALIZE];
11
+ this.allowDeviceMode = [...this.allowDeviceMode, UI_REQUEST.NOT_INITIALIZE];
12
12
 
13
13
  // check payload
14
14
  validateParams(this.payload, [
@@ -15,7 +15,7 @@ import type { TypedResponseMessage } from '../../device/DeviceCommands';
15
15
  export default class AlephiumSignTransaction extends BaseMethod<HardwareAlephiumSignTx> {
16
16
  init() {
17
17
  this.checkDeviceId = true;
18
- this.notAllowDeviceMode = [...this.notAllowDeviceMode, UI_REQUEST.INITIALIZE];
18
+ this.allowDeviceMode = [...this.allowDeviceMode, UI_REQUEST.NOT_INITIALIZE];
19
19
 
20
20
  // check payload
21
21
  validateParams(this.payload, [
@@ -10,7 +10,7 @@ export default class AlgoGetAddress extends BaseMethod<HardwareAlgoGetAddress[]>
10
10
 
11
11
  init() {
12
12
  this.checkDeviceId = true;
13
- this.notAllowDeviceMode = [...this.notAllowDeviceMode];
13
+ this.allowDeviceMode = [...this.allowDeviceMode];
14
14
 
15
15
  this.hasBundle = !!this.payload?.bundle;
16
16
  const payload = this.hasBundle ? this.payload : { bundle: [this.payload] };
@@ -10,7 +10,7 @@ export default class AlgoSignTransaction extends BaseMethod<HardwareAlgorandSign
10
10
 
11
11
  init() {
12
12
  this.checkDeviceId = true;
13
- this.notAllowDeviceMode = [...this.notAllowDeviceMode];
13
+ this.allowDeviceMode = [...this.allowDeviceMode];
14
14
 
15
15
  // check payload
16
16
  validateParams(this.payload, [
@@ -248,7 +248,7 @@ export default class AllNetworkGetAddress extends BaseMethod<
248
248
  > {
249
249
  init() {
250
250
  this.checkDeviceId = true;
251
- this.notAllowDeviceMode = [...this.notAllowDeviceMode, UI_REQUEST.INITIALIZE];
251
+ this.allowDeviceMode = [...this.allowDeviceMode, UI_REQUEST.NOT_INITIALIZE];
252
252
 
253
253
  // check payload
254
254
  validateParams(this.payload, [{ name: 'bundle', type: 'array' }]);
@@ -18,7 +18,7 @@ export default class AptosGetAddress extends BaseMethod<HardwareAptosGetAddress[
18
18
 
19
19
  init() {
20
20
  this.checkDeviceId = true;
21
- this.notAllowDeviceMode = [...this.notAllowDeviceMode, UI_REQUEST.INITIALIZE];
21
+ this.allowDeviceMode = [...this.allowDeviceMode, UI_REQUEST.NOT_INITIALIZE];
22
22
 
23
23
  this.hasBundle = !!this.payload?.bundle;
24
24
  const payload = this.hasBundle ? this.payload : { bundle: [this.payload] };
@@ -10,7 +10,7 @@ export default class AptosGetPublicKey extends BaseMethod<any> {
10
10
 
11
11
  init() {
12
12
  this.checkDeviceId = true;
13
- this.notAllowDeviceMode = [...this.notAllowDeviceMode, UI_REQUEST.INITIALIZE];
13
+ this.allowDeviceMode = [...this.allowDeviceMode, UI_REQUEST.NOT_INITIALIZE];
14
14
 
15
15
  this.hasBundle = !!this.payload?.bundle;
16
16
  const payload = this.hasBundle ? this.payload : { bundle: [this.payload] };
@@ -8,7 +8,7 @@ import { AptosMessageSignature, AptosSignMessageParams } from '../../types';
8
8
  export default class AptosSignMessage extends BaseMethod<HardwareAptosSignMessage> {
9
9
  init() {
10
10
  this.checkDeviceId = true;
11
- this.notAllowDeviceMode = [...this.notAllowDeviceMode, UI_REQUEST.INITIALIZE];
11
+ this.allowDeviceMode = [...this.allowDeviceMode, UI_REQUEST.NOT_INITIALIZE];
12
12
 
13
13
  // check payload
14
14
  validateParams(this.payload, [
@@ -8,7 +8,7 @@ import { formatAnyHex } from '../helpers/hexUtils';
8
8
  export default class AptosSignTransaction extends BaseMethod<HardwareAptosSignTx> {
9
9
  init() {
10
10
  this.checkDeviceId = true;
11
- this.notAllowDeviceMode = [...this.notAllowDeviceMode, UI_REQUEST.INITIALIZE];
11
+ this.allowDeviceMode = [...this.allowDeviceMode, UI_REQUEST.NOT_INITIALIZE];
12
12
 
13
13
  // check payload
14
14
  validateParams(this.payload, [
@@ -18,7 +18,7 @@ export default class BenfenGetAddress extends BaseMethod<HardwareBenfenGetAddres
18
18
 
19
19
  init() {
20
20
  this.checkDeviceId = true;
21
- this.notAllowDeviceMode = [...this.notAllowDeviceMode, UI_REQUEST.INITIALIZE];
21
+ this.allowDeviceMode = [...this.allowDeviceMode, UI_REQUEST.NOT_INITIALIZE];
22
22
 
23
23
  this.hasBundle = !!this.payload?.bundle;
24
24
  const payload = this.hasBundle ? this.payload : { bundle: [this.payload] };
@@ -12,7 +12,7 @@ export default class BenfenGetPublicKey extends BaseMethod<any> {
12
12
 
13
13
  init() {
14
14
  this.checkDeviceId = true;
15
- this.notAllowDeviceMode = [...this.notAllowDeviceMode, UI_REQUEST.INITIALIZE];
15
+ this.allowDeviceMode = [...this.allowDeviceMode, UI_REQUEST.NOT_INITIALIZE];
16
16
 
17
17
  this.hasBundle = !!this.payload?.bundle;
18
18
  const payload = this.hasBundle ? this.payload : { bundle: [this.payload] };
@@ -8,7 +8,7 @@ import { stripHexPrefix } from '../helpers/hexUtils';
8
8
  export default class BenfenSignMessage extends BaseMethod<HardwareBenfenSignMessage> {
9
9
  init() {
10
10
  this.checkDeviceId = true;
11
- this.notAllowDeviceMode = [...this.notAllowDeviceMode, UI_REQUEST.INITIALIZE];
11
+ this.allowDeviceMode = [...this.allowDeviceMode, UI_REQUEST.NOT_INITIALIZE];
12
12
 
13
13
  validateParams(this.payload, [
14
14
  { name: 'path', required: true },
@@ -11,7 +11,7 @@ import type { TypedResponseMessage } from '../../device/DeviceCommands';
11
11
  export default class BenfenSignTransaction extends BaseMethod<BenfenSignTx> {
12
12
  init() {
13
13
  this.checkDeviceId = true;
14
- this.notAllowDeviceMode = [...this.notAllowDeviceMode, UI_REQUEST.INITIALIZE];
14
+ this.allowDeviceMode = [...this.allowDeviceMode, UI_REQUEST.NOT_INITIALIZE];
15
15
 
16
16
  validateParams(this.payload, [
17
17
  { name: 'path', required: true },
@@ -12,7 +12,7 @@ export default class BTCGetAddress extends BaseMethod<GetAddress[]> {
12
12
 
13
13
  init() {
14
14
  this.checkDeviceId = true;
15
- this.notAllowDeviceMode = [...this.notAllowDeviceMode, UI_REQUEST.INITIALIZE];
15
+ this.allowDeviceMode = [...this.allowDeviceMode, UI_REQUEST.NOT_INITIALIZE];
16
16
 
17
17
  this.hasBundle = Object.prototype.hasOwnProperty.call(this.payload, 'bundle');
18
18
  const payload = this.hasBundle ? this.payload : { bundle: [this.payload] };
@@ -15,7 +15,7 @@ export default class BTCGetPublicKey extends BaseMethod<GetPublicKey[]> {
15
15
 
16
16
  init() {
17
17
  this.checkDeviceId = true;
18
- this.notAllowDeviceMode = [...this.notAllowDeviceMode, UI_REQUEST.INITIALIZE];
18
+ this.allowDeviceMode = [...this.allowDeviceMode, UI_REQUEST.NOT_INITIALIZE];
19
19
 
20
20
  this.hasBundle = Object.prototype.hasOwnProperty.call(this.payload, 'bundle');
21
21
  const payload = this.hasBundle ? this.payload : { bundle: [this.payload] };
@@ -10,7 +10,7 @@ import { getBitcoinForkVersionRange } from './helpers/versionLimit';
10
10
  export default class BTCSignMessage extends BaseMethod<SignMessage> {
11
11
  init() {
12
12
  this.checkDeviceId = true;
13
- this.notAllowDeviceMode = [...this.notAllowDeviceMode, UI_REQUEST.INITIALIZE];
13
+ this.allowDeviceMode = [...this.allowDeviceMode, UI_REQUEST.NOT_INITIALIZE];
14
14
 
15
15
  validateParams(this.payload, [
16
16
  { name: 'path', required: true },
@@ -10,7 +10,7 @@ import { getDeviceType } from '../../utils';
10
10
  export default class BTCSignPsbt extends BaseMethod<SignPsbt> {
11
11
  init() {
12
12
  this.checkDeviceId = true;
13
- this.notAllowDeviceMode = [...this.notAllowDeviceMode, UI_REQUEST.INITIALIZE];
13
+ this.allowDeviceMode = [...this.allowDeviceMode, UI_REQUEST.NOT_INITIALIZE];
14
14
 
15
15
  validateParams(this.payload, [
16
16
  { name: 'psbt', type: 'hexString', required: true },
@@ -27,7 +27,7 @@ type Params = {
27
27
  export default class BTCSignTransaction extends BaseMethod<Params> {
28
28
  init() {
29
29
  this.checkDeviceId = true;
30
- this.notAllowDeviceMode = [...this.notAllowDeviceMode, UI_REQUEST.INITIALIZE];
30
+ this.allowDeviceMode = [...this.allowDeviceMode, UI_REQUEST.NOT_INITIALIZE];
31
31
 
32
32
  validateParams(this.payload, [
33
33
  { name: 'coin', type: 'string', required: true },
@@ -10,7 +10,7 @@ import { getBitcoinForkVersionRange } from './helpers/versionLimit';
10
10
  export default class BTCVerifyMessage extends BaseMethod<VerifyMessage> {
11
11
  init() {
12
12
  this.checkDeviceId = true;
13
- this.notAllowDeviceMode = [...this.notAllowDeviceMode, UI_REQUEST.INITIALIZE];
13
+ this.allowDeviceMode = [...this.allowDeviceMode, UI_REQUEST.NOT_INITIALIZE];
14
14
 
15
15
  validateParams(this.payload, [
16
16
  { name: 'address', type: 'string', required: true },
@@ -18,7 +18,7 @@ export default class CardanoGetAddress extends BaseMethod<CardanoGetAddressParam
18
18
 
19
19
  init() {
20
20
  this.checkDeviceId = true;
21
- this.notAllowDeviceMode = [...this.notAllowDeviceMode, UI_REQUEST.INITIALIZE];
21
+ this.allowDeviceMode = [...this.allowDeviceMode, UI_REQUEST.NOT_INITIALIZE];
22
22
 
23
23
  this.hasBundle = !!this.payload?.bundle;
24
24
  this.isCheck = this.hasBundle
@@ -10,7 +10,7 @@ export default class CardanoGetPublicKey extends BaseMethod<CardanoPublicKeyPara
10
10
 
11
11
  init() {
12
12
  this.checkDeviceId = true;
13
- this.notAllowDeviceMode = [...this.notAllowDeviceMode, UI_REQUEST.INITIALIZE];
13
+ this.allowDeviceMode = [...this.allowDeviceMode, UI_REQUEST.NOT_INITIALIZE];
14
14
 
15
15
  this.hasBundle = !!this.payload?.bundle;
16
16
  const payload = this.hasBundle ? this.payload : { bundle: [this.payload] };
@@ -12,7 +12,7 @@ export default class CardanoSignMessage extends BaseMethod<CardanoSignMessagePar
12
12
 
13
13
  init() {
14
14
  this.checkDeviceId = true;
15
- this.notAllowDeviceMode = [...this.notAllowDeviceMode, UI_REQUEST.INITIALIZE];
15
+ this.allowDeviceMode = [...this.allowDeviceMode, UI_REQUEST.NOT_INITIALIZE];
16
16
 
17
17
  const { payload } = this;
18
18
  validateParams(payload, [
@@ -47,7 +47,7 @@ export default class CardanoSignTransaction extends BaseMethod<any> {
47
47
 
48
48
  init() {
49
49
  this.checkDeviceId = true;
50
- this.notAllowDeviceMode = [...this.notAllowDeviceMode, UI_REQUEST.INITIALIZE];
50
+ this.allowDeviceMode = [...this.allowDeviceMode, UI_REQUEST.NOT_INITIALIZE];
51
51
 
52
52
  this.hasBundle = !!this.payload?.bundle;
53
53
 
@@ -9,7 +9,7 @@ export default class ConfluxGetAddress extends BaseMethod<HardwareConfluxGetAddr
9
9
  hasBundle = false;
10
10
 
11
11
  init() {
12
- this.notAllowDeviceMode = [...this.notAllowDeviceMode, UI_REQUEST.INITIALIZE];
12
+ this.allowDeviceMode = [...this.allowDeviceMode, UI_REQUEST.NOT_INITIALIZE];
13
13
 
14
14
  this.hasBundle = !!this.payload?.bundle;
15
15
  const payload = this.hasBundle ? this.payload : { bundle: [this.payload] };
@@ -7,7 +7,7 @@ import { formatAnyHex } from '../helpers/hexUtils';
7
7
 
8
8
  export default class ConfluxSignMessage extends BaseMethod<HardwareConfluxSignMessage> {
9
9
  init() {
10
- this.notAllowDeviceMode = [...this.notAllowDeviceMode, UI_REQUEST.INITIALIZE];
10
+ this.allowDeviceMode = [...this.allowDeviceMode, UI_REQUEST.NOT_INITIALIZE];
11
11
 
12
12
  // check payload
13
13
  validateParams(this.payload, [
@@ -7,7 +7,7 @@ import { formatAnyHex } from '../helpers/hexUtils';
7
7
 
8
8
  export default class ConfluxSignMessageCIP23 extends BaseMethod<HardwareConfluxSignMessageCIP23> {
9
9
  init() {
10
- this.notAllowDeviceMode = [...this.notAllowDeviceMode, UI_REQUEST.INITIALIZE];
10
+ this.allowDeviceMode = [...this.allowDeviceMode, UI_REQUEST.NOT_INITIALIZE];
11
11
 
12
12
  validateParams(this.payload, [
13
13
  { name: 'path', required: true },
@@ -20,7 +20,7 @@ export default class ConfluxSignTransaction extends BaseMethod {
20
20
  formattedTx: ConfluxTransaction | undefined;
21
21
 
22
22
  init() {
23
- this.notAllowDeviceMode = [...this.notAllowDeviceMode, UI_REQUEST.INITIALIZE];
23
+ this.allowDeviceMode = [...this.allowDeviceMode, UI_REQUEST.NOT_INITIALIZE];
24
24
 
25
25
  validateParams(this.payload, [
26
26
  { name: 'path', required: true },
@@ -10,7 +10,7 @@ export default class CosmosGetAddress extends BaseMethod<HardwareCosmosGetAddres
10
10
 
11
11
  init() {
12
12
  this.checkDeviceId = true;
13
- this.notAllowDeviceMode = [...this.notAllowDeviceMode];
13
+ this.allowDeviceMode = [...this.allowDeviceMode];
14
14
 
15
15
  this.hasBundle = !!this.payload?.bundle;
16
16
  const payload = this.hasBundle ? this.payload : { bundle: [this.payload] };
@@ -10,7 +10,7 @@ export default class CosmosGetPublicKey extends BaseMethod<any> {
10
10
 
11
11
  init() {
12
12
  this.checkDeviceId = true;
13
- this.notAllowDeviceMode = [...this.notAllowDeviceMode, UI_REQUEST.INITIALIZE];
13
+ this.allowDeviceMode = [...this.allowDeviceMode, UI_REQUEST.NOT_INITIALIZE];
14
14
 
15
15
  this.hasBundle = !!this.payload?.bundle;
16
16
  const payload = this.hasBundle ? this.payload : { bundle: [this.payload] };
@@ -10,7 +10,7 @@ export default class CosmosSignTransaction extends BaseMethod<HardwareCosmosSign
10
10
 
11
11
  init() {
12
12
  this.checkDeviceId = true;
13
- this.notAllowDeviceMode = [...this.notAllowDeviceMode];
13
+ this.allowDeviceMode = [...this.allowDeviceMode];
14
14
 
15
15
  // check payload
16
16
  validateParams(this.payload, [
@@ -16,7 +16,7 @@ export default class DeviceUpdateBootloader extends BaseMethod {
16
16
  checkPromise: Deferred<any> | null = null;
17
17
 
18
18
  init() {
19
- this.notAllowDeviceMode = [UI_REQUEST.BOOTLOADER, UI_REQUEST.INITIALIZE];
19
+ this.allowDeviceMode = [UI_REQUEST.BOOTLOADER, UI_REQUEST.NOT_INITIALIZE];
20
20
  this.requireDeviceMode = [];
21
21
  this.useDevicePassphraseState = false;
22
22
  this.skipForceUpdateCheck = true;
@@ -11,7 +11,7 @@ export default class DnxGetAddress extends BaseMethod<HardwareDnxGetAddress[]> {
11
11
 
12
12
  init() {
13
13
  this.checkDeviceId = true;
14
- this.notAllowDeviceMode = [...this.notAllowDeviceMode, UI_REQUEST.INITIALIZE];
14
+ this.allowDeviceMode = [...this.allowDeviceMode, UI_REQUEST.NOT_INITIALIZE];
15
15
 
16
16
  this.hasBundle = !!this.payload?.bundle;
17
17
  const payload = this.hasBundle ? this.payload : { bundle: [this.payload] };
@@ -13,7 +13,7 @@ export default class DnxSignTransaction extends BaseMethod<DnxSignTx> {
13
13
 
14
14
  init() {
15
15
  this.checkDeviceId = true;
16
- this.notAllowDeviceMode = [...this.notAllowDeviceMode, UI_REQUEST.INITIALIZE];
16
+ this.allowDeviceMode = [...this.allowDeviceMode, UI_REQUEST.NOT_INITIALIZE];
17
17
 
18
18
  const { payload } = this;
19
19
  // init params
@@ -13,7 +13,7 @@ export default class EvmGetAddress extends BaseMethod<EthereumGetAddressOneKey[]
13
13
 
14
14
  init() {
15
15
  this.checkDeviceId = true;
16
- this.notAllowDeviceMode = [...this.notAllowDeviceMode, UI_REQUEST.INITIALIZE];
16
+ this.allowDeviceMode = [...this.allowDeviceMode, UI_REQUEST.NOT_INITIALIZE];
17
17
 
18
18
  this.hasBundle = !!this.payload?.bundle;
19
19
  const payload = this.hasBundle ? this.payload : { bundle: [this.payload] };