@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
package/dist/index.js CHANGED
@@ -876,7 +876,6 @@ exports.LoggerNames = void 0;
876
876
  LoggerNames["HdTransportHttp"] = "@onekey/hd-transport-http";
877
877
  LoggerNames["HdTransportLowLevel"] = "@onekey/hd-transport-lowlevel";
878
878
  LoggerNames["HdBleTransport"] = "@onekey/hd-ble-transport";
879
- LoggerNames["HdWebBleTransport"] = "@onekey/hd-web-ble-transport";
880
879
  LoggerNames["Connect"] = "@onekey/connect";
881
880
  LoggerNames["Iframe"] = "IFrame";
882
881
  LoggerNames["SendMessage"] = "[SendMessage]";
@@ -893,7 +892,6 @@ const LoggerMap = {
893
892
  [exports.LoggerNames.HdBleSdk]: initLog(exports.LoggerNames.HdBleSdk),
894
893
  [exports.LoggerNames.HdTransportHttp]: initLog(exports.LoggerNames.HdTransportHttp),
895
894
  [exports.LoggerNames.HdBleTransport]: initLog(exports.LoggerNames.HdBleTransport),
896
- [exports.LoggerNames.HdWebBleTransport]: initLog(exports.LoggerNames.HdWebBleTransport),
897
895
  [exports.LoggerNames.HdTransportLowLevel]: initLog(exports.LoggerNames.HdTransportLowLevel),
898
896
  [exports.LoggerNames.Connect]: initLog(exports.LoggerNames.Connect),
899
897
  [exports.LoggerNames.Iframe]: initLog(exports.LoggerNames.Iframe),
@@ -24895,7 +24893,7 @@ DataManager.getTransportStatus = (localVersion) => {
24895
24893
  return isLatest ? 'valid' : 'outdated';
24896
24894
  };
24897
24895
  DataManager.getBridgeChangelog = () => { var _b; return (_b = _a$1.assets) === null || _b === void 0 ? void 0 : _b.bridge.changelog; };
24898
- DataManager.isBleConnect = (env) => env === 'react-native' || env === 'lowlevel' || env === 'desktop-web-ble';
24896
+ DataManager.isBleConnect = (env) => env === 'react-native' || env === 'lowlevel';
24899
24897
  DataManager.isWebUsbConnect = (env) => env === 'webusb';
24900
24898
 
24901
24899
  const PROTOBUF_MESSAGE_CONFIG = {
@@ -25626,7 +25624,7 @@ const UI_REQUEST = {
25626
25624
  BOOTLOADER: 'ui-device_bootloader_mode',
25627
25625
  NOT_IN_BOOTLOADER: 'ui-device_not_in_bootloader_mode',
25628
25626
  REQUIRE_MODE: 'ui-device_require_mode',
25629
- INITIALIZE: 'ui-device_not_initialized',
25627
+ NOT_INITIALIZE: 'ui-device_not_initialized',
25630
25628
  SEEDLESS: 'ui-device_seedless',
25631
25629
  FIRMWARE_OLD: 'ui-device_firmware_old',
25632
25630
  FIRMWARE_NOT_SUPPORTED: 'ui-device_firmware_unsupported',
@@ -25955,7 +25953,6 @@ const Log$c = getLogger(exports.LoggerNames.Transport);
25955
25953
  const BleLogger = getLogger(exports.LoggerNames.HdBleTransport);
25956
25954
  const HttpLogger = getLogger(exports.LoggerNames.HdTransportHttp);
25957
25955
  const LowLevelLogger = getLogger(exports.LoggerNames.HdTransportLowLevel);
25958
- const WebBleLogger = getLogger(exports.LoggerNames.HdWebBleTransport);
25959
25956
  class TransportManager {
25960
25957
  static load() {
25961
25958
  Log$c.debug('transport manager load');
@@ -25983,9 +25980,6 @@ class TransportManager {
25983
25980
  }
25984
25981
  yield this.transport.init(LowLevelLogger, DevicePool.emitter, this.plugin);
25985
25982
  }
25986
- else if (env === 'desktop-web-ble') {
25987
- yield this.transport.init(WebBleLogger);
25988
- }
25989
25983
  else {
25990
25984
  yield this.transport.init(HttpLogger);
25991
25985
  }
@@ -26900,8 +26894,8 @@ class Device extends events.exports {
26900
26894
  if (this.isBootloader() && !allow.includes(UI_REQUEST.BOOTLOADER)) {
26901
26895
  return UI_REQUEST.BOOTLOADER;
26902
26896
  }
26903
- if (!this.isInitialized() && !allow.includes(UI_REQUEST.INITIALIZE)) {
26904
- return UI_REQUEST.INITIALIZE;
26897
+ if (!this.isInitialized() && !allow.includes(UI_REQUEST.NOT_INITIALIZE)) {
26898
+ return UI_REQUEST.NOT_INITIALIZE;
26905
26899
  }
26906
26900
  if (this.isSeedless() && !allow.includes(UI_REQUEST.SEEDLESS)) {
26907
26901
  return UI_REQUEST.SEEDLESS;
@@ -27032,7 +27026,7 @@ class BaseMethod {
27032
27026
  this.connectId = payload.connectId || '';
27033
27027
  this.deviceId = payload.deviceId || '';
27034
27028
  this.useDevice = true;
27035
- this.notAllowDeviceMode = [UI_REQUEST.INITIALIZE];
27029
+ this.allowDeviceMode = [UI_REQUEST.NOT_INITIALIZE];
27036
27030
  this.requireDeviceMode = [];
27037
27031
  }
27038
27032
  getVersionRange() {
@@ -27098,9 +27092,9 @@ class BaseMethod {
27098
27092
 
27099
27093
  class TestInitializeDeviceDuration extends BaseMethod {
27100
27094
  init() {
27101
- this.notAllowDeviceMode = [
27102
- ...this.notAllowDeviceMode,
27103
- UI_REQUEST.INITIALIZE,
27095
+ this.allowDeviceMode = [
27096
+ ...this.allowDeviceMode,
27097
+ UI_REQUEST.NOT_INITIALIZE,
27104
27098
  UI_REQUEST.BOOTLOADER,
27105
27099
  ];
27106
27100
  this.useDevicePassphraseState = false;
@@ -27150,9 +27144,9 @@ class SearchDevices extends BaseMethod {
27150
27144
 
27151
27145
  class GetFeatures extends BaseMethod {
27152
27146
  init() {
27153
- this.notAllowDeviceMode = [
27154
- ...this.notAllowDeviceMode,
27155
- UI_REQUEST.INITIALIZE,
27147
+ this.allowDeviceMode = [
27148
+ ...this.allowDeviceMode,
27149
+ UI_REQUEST.NOT_INITIALIZE,
27156
27150
  UI_REQUEST.BOOTLOADER,
27157
27151
  ];
27158
27152
  this.useDevicePassphraseState = false;
@@ -27169,9 +27163,9 @@ class GetFeatures extends BaseMethod {
27169
27163
 
27170
27164
  class GetOnekeyFeatures extends BaseMethod {
27171
27165
  init() {
27172
- this.notAllowDeviceMode = [
27173
- ...this.notAllowDeviceMode,
27174
- UI_REQUEST.INITIALIZE,
27166
+ this.allowDeviceMode = [
27167
+ ...this.allowDeviceMode,
27168
+ UI_REQUEST.NOT_INITIALIZE,
27175
27169
  UI_REQUEST.BOOTLOADER,
27176
27170
  ];
27177
27171
  this.useDevicePassphraseState = false;
@@ -27190,7 +27184,7 @@ class GetOnekeyFeatures extends BaseMethod {
27190
27184
 
27191
27185
  class GetPassphraseState extends BaseMethod {
27192
27186
  init() {
27193
- this.notAllowDeviceMode = [...this.notAllowDeviceMode, UI_REQUEST.INITIALIZE];
27187
+ this.allowDeviceMode = [...this.allowDeviceMode, UI_REQUEST.NOT_INITIALIZE];
27194
27188
  this.useDevicePassphraseState = false;
27195
27189
  }
27196
27190
  run() {
@@ -27238,9 +27232,9 @@ class GetLogs extends BaseMethod {
27238
27232
 
27239
27233
  class CheckFirmwareRelease extends BaseMethod {
27240
27234
  init() {
27241
- this.notAllowDeviceMode = [
27242
- ...this.notAllowDeviceMode,
27243
- UI_REQUEST.INITIALIZE,
27235
+ this.allowDeviceMode = [
27236
+ ...this.allowDeviceMode,
27237
+ UI_REQUEST.NOT_INITIALIZE,
27244
27238
  UI_REQUEST.BOOTLOADER,
27245
27239
  ];
27246
27240
  this.useDevicePassphraseState = false;
@@ -27257,9 +27251,9 @@ class CheckFirmwareRelease extends BaseMethod {
27257
27251
 
27258
27252
  class CheckBLEFirmwareRelease extends BaseMethod {
27259
27253
  init() {
27260
- this.notAllowDeviceMode = [
27261
- ...this.notAllowDeviceMode,
27262
- UI_REQUEST.INITIALIZE,
27254
+ this.allowDeviceMode = [
27255
+ ...this.allowDeviceMode,
27256
+ UI_REQUEST.NOT_INITIALIZE,
27263
27257
  UI_REQUEST.BOOTLOADER,
27264
27258
  ];
27265
27259
  this.useDevicePassphraseState = false;
@@ -27360,7 +27354,7 @@ function getBridgeReleaseInfo({ deviceType, currentFirmwareVersion, willUpdateFi
27360
27354
 
27361
27355
  class CheckBridgeRelease extends BaseMethod {
27362
27356
  init() {
27363
- this.notAllowDeviceMode = [...this.notAllowDeviceMode, UI_REQUEST.BOOTLOADER];
27357
+ this.allowDeviceMode = [...this.allowDeviceMode, UI_REQUEST.BOOTLOADER];
27364
27358
  this.useDevicePassphraseState = false;
27365
27359
  this.skipForceUpdateCheck = true;
27366
27360
  }
@@ -27384,7 +27378,7 @@ class CheckBridgeRelease extends BaseMethod {
27384
27378
 
27385
27379
  class CheckBootloaderRelease extends BaseMethod {
27386
27380
  init() {
27387
- this.notAllowDeviceMode = [...this.notAllowDeviceMode, UI_REQUEST.BOOTLOADER];
27381
+ this.allowDeviceMode = [...this.allowDeviceMode, UI_REQUEST.BOOTLOADER];
27388
27382
  this.useDevicePassphraseState = false;
27389
27383
  this.skipForceUpdateCheck = true;
27390
27384
  }
@@ -27402,7 +27396,7 @@ class CheckBootloaderRelease extends BaseMethod {
27402
27396
 
27403
27397
  class CheckAllFirmwareRelease extends BaseMethod {
27404
27398
  init() {
27405
- this.notAllowDeviceMode = [...this.notAllowDeviceMode, UI_REQUEST.BOOTLOADER];
27399
+ this.allowDeviceMode = [...this.allowDeviceMode, UI_REQUEST.BOOTLOADER];
27406
27400
  this.useDevicePassphraseState = false;
27407
27401
  this.skipForceUpdateCheck = true;
27408
27402
  }
@@ -27520,6 +27514,27 @@ function hexToBytes(hex) {
27520
27514
  }
27521
27515
  return array;
27522
27516
  }
27517
+ function parseChainId(chainId) {
27518
+ if (!chainId) {
27519
+ return 0;
27520
+ }
27521
+ if (typeof chainId === 'string') {
27522
+ if (chainId.trim() === '') {
27523
+ return 0;
27524
+ }
27525
+ if (chainId.match(/^[0-9]+$/)) {
27526
+ return new BigNumber__default["default"](chainId, 10).toNumber();
27527
+ }
27528
+ if (chainId.startsWith('0x') || chainId.match(/^[0-9a-fA-F]+$/)) {
27529
+ return new BigNumber__default["default"](chainId, 16).toNumber();
27530
+ }
27531
+ throw new Error(`Invalid chainId ${chainId}`);
27532
+ }
27533
+ if (typeof chainId === 'number') {
27534
+ return new BigNumber__default["default"](chainId).toNumber();
27535
+ }
27536
+ throw new Error(`Invalid chainId ${chainId}`);
27537
+ }
27523
27538
 
27524
27539
  const invalidParameter = (message) => hdShared.ERRORS.TypedError(hdShared.HardwareErrorCode.CallMethodInvalidParameter, message);
27525
27540
  const invalidResponse = (message) => hdShared.ERRORS.TypedError(hdShared.HardwareErrorCode.CallMethodError, message);
@@ -28397,7 +28412,7 @@ class DeviceUpdateBootloader extends BaseMethod {
28397
28412
  };
28398
28413
  }
28399
28414
  init() {
28400
- this.notAllowDeviceMode = [UI_REQUEST.BOOTLOADER, UI_REQUEST.INITIALIZE];
28415
+ this.allowDeviceMode = [UI_REQUEST.BOOTLOADER, UI_REQUEST.NOT_INITIALIZE];
28401
28416
  this.requireDeviceMode = [];
28402
28417
  this.useDevicePassphraseState = false;
28403
28418
  this.skipForceUpdateCheck = true;
@@ -28506,7 +28521,7 @@ class FirmwareUpdate extends BaseMethod {
28506
28521
  };
28507
28522
  }
28508
28523
  init() {
28509
- this.notAllowDeviceMode = [UI_REQUEST.BOOTLOADER, UI_REQUEST.INITIALIZE];
28524
+ this.allowDeviceMode = [UI_REQUEST.BOOTLOADER, UI_REQUEST.NOT_INITIALIZE];
28510
28525
  this.requireDeviceMode = [];
28511
28526
  this.useDevicePassphraseState = false;
28512
28527
  this.skipForceUpdateCheck = true;
@@ -28647,7 +28662,7 @@ class FirmwareUpdateV2 extends BaseMethod {
28647
28662
  };
28648
28663
  }
28649
28664
  init() {
28650
- this.notAllowDeviceMode = [UI_REQUEST.BOOTLOADER, UI_REQUEST.INITIALIZE];
28665
+ this.allowDeviceMode = [UI_REQUEST.BOOTLOADER, UI_REQUEST.NOT_INITIALIZE];
28651
28666
  this.requireDeviceMode = [];
28652
28667
  this.useDevicePassphraseState = false;
28653
28668
  this.skipForceUpdateCheck = true;
@@ -29184,7 +29199,7 @@ class FirmwareUpdateV3 extends FirmwareUpdateBaseMethod {
29184
29199
  this.checkPromise = null;
29185
29200
  }
29186
29201
  init() {
29187
- this.notAllowDeviceMode = [UI_REQUEST.BOOTLOADER, UI_REQUEST.INITIALIZE];
29202
+ this.allowDeviceMode = [UI_REQUEST.BOOTLOADER, UI_REQUEST.NOT_INITIALIZE];
29188
29203
  this.requireDeviceMode = [];
29189
29204
  this.useDevicePassphraseState = false;
29190
29205
  this.skipForceUpdateCheck = true;
@@ -29581,7 +29596,7 @@ class CipherKeyValue extends BaseMethod {
29581
29596
  init() {
29582
29597
  var _a;
29583
29598
  this.checkDeviceId = true;
29584
- this.notAllowDeviceMode = [...this.notAllowDeviceMode, UI_REQUEST.INITIALIZE];
29599
+ this.allowDeviceMode = [...this.allowDeviceMode, UI_REQUEST.NOT_INITIALIZE];
29585
29600
  this.hasBundle = !!((_a = this.payload) === null || _a === void 0 ? void 0 : _a.bundle);
29586
29601
  const payload = this.hasBundle ? this.payload : { bundle: [this.payload] };
29587
29602
  validateParams(payload, [{ name: 'bundle', type: 'array' }]);
@@ -29811,7 +29826,7 @@ const networkConfigMap = {
29811
29826
  class AllNetworkGetAddress extends BaseMethod {
29812
29827
  init() {
29813
29828
  this.checkDeviceId = true;
29814
- this.notAllowDeviceMode = [...this.notAllowDeviceMode, UI_REQUEST.INITIALIZE];
29829
+ this.allowDeviceMode = [...this.allowDeviceMode, UI_REQUEST.NOT_INITIALIZE];
29815
29830
  validateParams(this.payload, [{ name: 'bundle', type: 'array' }]);
29816
29831
  this.payload.bundle.forEach((batch) => {
29817
29832
  validateParams(batch, [
@@ -30250,7 +30265,7 @@ class BTCGetAddress extends BaseMethod {
30250
30265
  }
30251
30266
  init() {
30252
30267
  this.checkDeviceId = true;
30253
- this.notAllowDeviceMode = [...this.notAllowDeviceMode, UI_REQUEST.INITIALIZE];
30268
+ this.allowDeviceMode = [...this.allowDeviceMode, UI_REQUEST.NOT_INITIALIZE];
30254
30269
  this.hasBundle = Object.prototype.hasOwnProperty.call(this.payload, 'bundle');
30255
30270
  const payload = this.hasBundle ? this.payload : { bundle: [this.payload] };
30256
30271
  validateParams(payload, [{ name: 'bundle', type: 'array' }]);
@@ -30449,7 +30464,7 @@ class BTCGetPublicKey extends BaseMethod {
30449
30464
  }
30450
30465
  init() {
30451
30466
  this.checkDeviceId = true;
30452
- this.notAllowDeviceMode = [...this.notAllowDeviceMode, UI_REQUEST.INITIALIZE];
30467
+ this.allowDeviceMode = [...this.allowDeviceMode, UI_REQUEST.NOT_INITIALIZE];
30453
30468
  this.hasBundle = Object.prototype.hasOwnProperty.call(this.payload, 'bundle');
30454
30469
  const payload = this.hasBundle ? this.payload : { bundle: [this.payload] };
30455
30470
  validateParams(payload, [{ name: 'bundle', type: 'array' }]);
@@ -30552,7 +30567,7 @@ class BTCGetPublicKey extends BaseMethod {
30552
30567
  class BTCSignMessage extends BaseMethod {
30553
30568
  init() {
30554
30569
  this.checkDeviceId = true;
30555
- this.notAllowDeviceMode = [...this.notAllowDeviceMode, UI_REQUEST.INITIALIZE];
30570
+ this.allowDeviceMode = [...this.allowDeviceMode, UI_REQUEST.NOT_INITIALIZE];
30556
30571
  validateParams(this.payload, [
30557
30572
  { name: 'path', required: true },
30558
30573
  { name: 'messageHex', type: 'hexString', required: true },
@@ -30608,7 +30623,7 @@ class BTCSignMessage extends BaseMethod {
30608
30623
  class BTCSignPsbt extends BaseMethod {
30609
30624
  init() {
30610
30625
  this.checkDeviceId = true;
30611
- this.notAllowDeviceMode = [...this.notAllowDeviceMode, UI_REQUEST.INITIALIZE];
30626
+ this.allowDeviceMode = [...this.allowDeviceMode, UI_REQUEST.NOT_INITIALIZE];
30612
30627
  validateParams(this.payload, [
30613
30628
  { name: 'psbt', type: 'hexString', required: true },
30614
30629
  { name: 'coin', type: 'string' },
@@ -30926,7 +30941,7 @@ var signtxLegacy = (typedCall, inputs, outputs, refTxsArray, options, coinName)
30926
30941
  class BTCSignTransaction extends BaseMethod {
30927
30942
  init() {
30928
30943
  this.checkDeviceId = true;
30929
- this.notAllowDeviceMode = [...this.notAllowDeviceMode, UI_REQUEST.INITIALIZE];
30944
+ this.allowDeviceMode = [...this.allowDeviceMode, UI_REQUEST.NOT_INITIALIZE];
30930
30945
  validateParams(this.payload, [
30931
30946
  { name: 'coin', type: 'string', required: true },
30932
30947
  { name: 'inputs', type: 'array', required: true },
@@ -31020,7 +31035,7 @@ class BTCSignTransaction extends BaseMethod {
31020
31035
  class BTCVerifyMessage extends BaseMethod {
31021
31036
  init() {
31022
31037
  this.checkDeviceId = true;
31023
- this.notAllowDeviceMode = [...this.notAllowDeviceMode, UI_REQUEST.INITIALIZE];
31038
+ this.allowDeviceMode = [...this.allowDeviceMode, UI_REQUEST.NOT_INITIALIZE];
31024
31039
  validateParams(this.payload, [
31025
31040
  { name: 'address', type: 'string', required: true },
31026
31041
  { name: 'messageHex', type: 'hexString', required: true },
@@ -31055,7 +31070,7 @@ class ConfluxGetAddress extends BaseMethod {
31055
31070
  }
31056
31071
  init() {
31057
31072
  var _a;
31058
- this.notAllowDeviceMode = [...this.notAllowDeviceMode, UI_REQUEST.INITIALIZE];
31073
+ this.allowDeviceMode = [...this.allowDeviceMode, UI_REQUEST.NOT_INITIALIZE];
31059
31074
  this.hasBundle = !!((_a = this.payload) === null || _a === void 0 ? void 0 : _a.bundle);
31060
31075
  const payload = this.hasBundle ? this.payload : { bundle: [this.payload] };
31061
31076
  validateParams(payload, [{ name: 'bundle', type: 'array' }]);
@@ -31106,7 +31121,7 @@ class ConfluxGetAddress extends BaseMethod {
31106
31121
 
31107
31122
  class ConfluxSignMessage extends BaseMethod {
31108
31123
  init() {
31109
- this.notAllowDeviceMode = [...this.notAllowDeviceMode, UI_REQUEST.INITIALIZE];
31124
+ this.allowDeviceMode = [...this.allowDeviceMode, UI_REQUEST.NOT_INITIALIZE];
31110
31125
  validateParams(this.payload, [
31111
31126
  { name: 'path', required: true },
31112
31127
  { name: 'messageHex', type: 'hexString', required: true },
@@ -31135,7 +31150,7 @@ class ConfluxSignMessage extends BaseMethod {
31135
31150
 
31136
31151
  class ConfluxSignMessageCIP23 extends BaseMethod {
31137
31152
  init() {
31138
- this.notAllowDeviceMode = [...this.notAllowDeviceMode, UI_REQUEST.INITIALIZE];
31153
+ this.allowDeviceMode = [...this.allowDeviceMode, UI_REQUEST.NOT_INITIALIZE];
31139
31154
  validateParams(this.payload, [
31140
31155
  { name: 'path', required: true },
31141
31156
  { name: 'domainHash', type: 'hexString', required: true },
@@ -31220,7 +31235,7 @@ class ConfluxSignTransaction extends BaseMethod {
31220
31235
  });
31221
31236
  }
31222
31237
  init() {
31223
- this.notAllowDeviceMode = [...this.notAllowDeviceMode, UI_REQUEST.INITIALIZE];
31238
+ this.allowDeviceMode = [...this.allowDeviceMode, UI_REQUEST.NOT_INITIALIZE];
31224
31239
  validateParams(this.payload, [
31225
31240
  { name: 'path', required: true },
31226
31241
  { name: 'transaction', type: 'object', required: true },
@@ -31285,7 +31300,7 @@ class EvmGetAddress extends BaseMethod {
31285
31300
  init() {
31286
31301
  var _a;
31287
31302
  this.checkDeviceId = true;
31288
- this.notAllowDeviceMode = [...this.notAllowDeviceMode, UI_REQUEST.INITIALIZE];
31303
+ this.allowDeviceMode = [...this.allowDeviceMode, UI_REQUEST.NOT_INITIALIZE];
31289
31304
  this.hasBundle = !!((_a = this.payload) === null || _a === void 0 ? void 0 : _a.bundle);
31290
31305
  const payload = this.hasBundle ? this.payload : { bundle: [this.payload] };
31291
31306
  validateParams(payload, [{ name: 'bundle', type: 'array' }]);
@@ -31370,7 +31385,7 @@ class EVMGetPublicKey extends BaseMethod {
31370
31385
  init() {
31371
31386
  var _a, _b, _c;
31372
31387
  this.checkDeviceId = true;
31373
- this.notAllowDeviceMode = [...this.notAllowDeviceMode, UI_REQUEST.INITIALIZE];
31388
+ this.allowDeviceMode = [...this.allowDeviceMode, UI_REQUEST.NOT_INITIALIZE];
31374
31389
  this.hasBundle = !!((_a = this.payload) === null || _a === void 0 ? void 0 : _a.bundle);
31375
31390
  this.useBatch = (_c = (_b = this.payload) === null || _b === void 0 ? void 0 : _b.bundle) === null || _c === void 0 ? void 0 : _c.every((item) => item.showOnOneKey !== true);
31376
31391
  const payload = this.hasBundle ? this.payload : { bundle: [this.payload] };
@@ -31461,7 +31476,7 @@ function signMessageLegacyV1 ({ typedCall, params, }) {
31461
31476
  class EVMSignMessage$2 extends BaseMethod {
31462
31477
  init() {
31463
31478
  this.checkDeviceId = true;
31464
- this.notAllowDeviceMode = [...this.notAllowDeviceMode, UI_REQUEST.INITIALIZE];
31479
+ this.allowDeviceMode = [...this.allowDeviceMode, UI_REQUEST.NOT_INITIALIZE];
31465
31480
  validateParams(this.payload, [
31466
31481
  { name: 'path', required: true },
31467
31482
  { name: 'messageHex', type: 'hexString', required: true },
@@ -31494,7 +31509,7 @@ class EVMSignMessage$2 extends BaseMethod {
31494
31509
  class EVMSignMessageEIP712 extends BaseMethod {
31495
31510
  init() {
31496
31511
  this.checkDeviceId = true;
31497
- this.notAllowDeviceMode = [...this.notAllowDeviceMode, UI_REQUEST.INITIALIZE];
31512
+ this.allowDeviceMode = [...this.allowDeviceMode, UI_REQUEST.NOT_INITIALIZE];
31498
31513
  validateParams(this.payload, [
31499
31514
  { name: 'path', required: true },
31500
31515
  { name: 'domainHash', type: 'hexString', required: true },
@@ -31648,7 +31663,7 @@ class EVMSignTransaction extends BaseMethod {
31648
31663
  }
31649
31664
  init() {
31650
31665
  this.checkDeviceId = true;
31651
- this.notAllowDeviceMode = [...this.notAllowDeviceMode, UI_REQUEST.INITIALIZE];
31666
+ this.allowDeviceMode = [...this.allowDeviceMode, UI_REQUEST.NOT_INITIALIZE];
31652
31667
  validateParams(this.payload, [
31653
31668
  { name: 'path', required: true },
31654
31669
  { name: 'transaction', type: 'object', required: true },
@@ -31892,7 +31907,7 @@ const getFieldType = (typeName, types) => {
31892
31907
  class EVMSignTypedData extends BaseMethod {
31893
31908
  init() {
31894
31909
  this.checkDeviceId = true;
31895
- this.notAllowDeviceMode = [...this.notAllowDeviceMode, UI_REQUEST.INITIALIZE];
31910
+ this.allowDeviceMode = [...this.allowDeviceMode, UI_REQUEST.NOT_INITIALIZE];
31896
31911
  validateParams(this.payload, [
31897
31912
  { name: 'path', required: true },
31898
31913
  { name: 'metamaskV4Compat', type: 'boolean' },
@@ -31920,7 +31935,6 @@ class EVMSignTypedData extends BaseMethod {
31920
31935
  }
31921
31936
  }
31922
31937
  handleSignTypedData({ typedCall, signData, response, supportTrezor, }) {
31923
- var _a;
31924
31938
  return __awaiter(this, void 0, void 0, function* () {
31925
31939
  const { types, primaryType, domain, message, } = signData;
31926
31940
  while (response.type === 'EthereumTypedDataStructRequest' ||
@@ -32012,7 +32026,7 @@ class EVMSignTypedData extends BaseMethod {
32012
32026
  gasToken: data.message.gasToken,
32013
32027
  refundReceiver: data.message.refundReceiver,
32014
32028
  nonce: formatAnyHex(new BigNumber__default["default"](data.message.nonce).toString(16)),
32015
- chain_id: new BigNumber__default["default"]((_a = data.domain.chainId) !== null && _a !== void 0 ? _a : '0x', 16).toNumber(),
32029
+ chain_id: parseChainId(data.domain.chainId),
32016
32030
  verifyingContract: data.domain.verifyingContract,
32017
32031
  };
32018
32032
  response = yield typedCall('EthereumGnosisSafeTxAck', ['EthereumTypedDataSignature', 'EthereumTypedDataSignatureOneKey'], param);
@@ -32220,7 +32234,7 @@ function verifyMessage ({ typedCall, params, }) {
32220
32234
  class EVMSignMessage$1 extends BaseMethod {
32221
32235
  init() {
32222
32236
  this.checkDeviceId = true;
32223
- this.notAllowDeviceMode = [...this.notAllowDeviceMode, UI_REQUEST.INITIALIZE];
32237
+ this.allowDeviceMode = [...this.allowDeviceMode, UI_REQUEST.NOT_INITIALIZE];
32224
32238
  validateParams(this.payload, [
32225
32239
  { name: 'address', type: 'string', required: true },
32226
32240
  { name: 'messageHex', type: 'hexString', required: true },
@@ -32259,7 +32273,7 @@ class StarcoinGetAddress extends BaseMethod {
32259
32273
  init() {
32260
32274
  var _a;
32261
32275
  this.checkDeviceId = true;
32262
- this.notAllowDeviceMode = [...this.notAllowDeviceMode, UI_REQUEST.INITIALIZE];
32276
+ this.allowDeviceMode = [...this.allowDeviceMode, UI_REQUEST.NOT_INITIALIZE];
32263
32277
  this.hasBundle = !!((_a = this.payload) === null || _a === void 0 ? void 0 : _a.bundle);
32264
32278
  const payload = this.hasBundle ? this.payload : { bundle: [this.payload] };
32265
32279
  validateParams(payload, [{ name: 'bundle', type: 'array' }]);
@@ -32307,7 +32321,7 @@ class StarcoinGetPublicKey extends BaseMethod {
32307
32321
  init() {
32308
32322
  var _a;
32309
32323
  this.checkDeviceId = true;
32310
- this.notAllowDeviceMode = [...this.notAllowDeviceMode, UI_REQUEST.INITIALIZE];
32324
+ this.allowDeviceMode = [...this.allowDeviceMode, UI_REQUEST.NOT_INITIALIZE];
32311
32325
  this.hasBundle = !!((_a = this.payload) === null || _a === void 0 ? void 0 : _a.bundle);
32312
32326
  const payload = this.hasBundle ? this.payload : { bundle: [this.payload] };
32313
32327
  validateParams(payload, [{ name: 'bundle', type: 'array' }]);
@@ -32345,7 +32359,7 @@ class StarcoinGetPublicKey extends BaseMethod {
32345
32359
  class StarcoinSignMessage extends BaseMethod {
32346
32360
  init() {
32347
32361
  this.checkDeviceId = true;
32348
- this.notAllowDeviceMode = [...this.notAllowDeviceMode, UI_REQUEST.INITIALIZE];
32362
+ this.allowDeviceMode = [...this.allowDeviceMode, UI_REQUEST.NOT_INITIALIZE];
32349
32363
  validateParams(this.payload, [
32350
32364
  { name: 'path', required: true },
32351
32365
  { name: 'messageHex', type: 'hexString', required: true },
@@ -32368,7 +32382,7 @@ class StarcoinSignMessage extends BaseMethod {
32368
32382
  class StarcoinSignTransaction extends BaseMethod {
32369
32383
  init() {
32370
32384
  this.checkDeviceId = true;
32371
- this.notAllowDeviceMode = [...this.notAllowDeviceMode, UI_REQUEST.INITIALIZE];
32385
+ this.allowDeviceMode = [...this.allowDeviceMode, UI_REQUEST.NOT_INITIALIZE];
32372
32386
  validateParams(this.payload, [
32373
32387
  { name: 'path', required: true },
32374
32388
  { name: 'rawTx', type: 'hexString', required: true },
@@ -32391,7 +32405,7 @@ class StarcoinSignTransaction extends BaseMethod {
32391
32405
  class EVMSignMessage extends BaseMethod {
32392
32406
  init() {
32393
32407
  this.checkDeviceId = true;
32394
- this.notAllowDeviceMode = [...this.notAllowDeviceMode, UI_REQUEST.INITIALIZE];
32408
+ this.allowDeviceMode = [...this.allowDeviceMode, UI_REQUEST.NOT_INITIALIZE];
32395
32409
  validateParams(this.payload, [
32396
32410
  { name: 'publicKey', type: 'string', required: true },
32397
32411
  { name: 'messageHex', type: 'hexString', required: true },
@@ -32421,7 +32435,7 @@ class NEMGetAddress extends BaseMethod {
32421
32435
  init() {
32422
32436
  var _a;
32423
32437
  this.checkDeviceId = true;
32424
- this.notAllowDeviceMode = [...this.notAllowDeviceMode, UI_REQUEST.INITIALIZE];
32438
+ this.allowDeviceMode = [...this.allowDeviceMode, UI_REQUEST.NOT_INITIALIZE];
32425
32439
  this.hasBundle = !!((_a = this.payload) === null || _a === void 0 ? void 0 : _a.bundle);
32426
32440
  const payload = this.hasBundle ? this.payload : { bundle: [this.payload] };
32427
32441
  validateParams(payload, [{ name: 'bundle', type: 'array' }]);
@@ -32636,7 +32650,7 @@ class NEMSignTransaction extends BaseMethod {
32636
32650
  }
32637
32651
  init() {
32638
32652
  this.checkDeviceId = true;
32639
- this.notAllowDeviceMode = [...this.notAllowDeviceMode, UI_REQUEST.INITIALIZE];
32653
+ this.allowDeviceMode = [...this.allowDeviceMode, UI_REQUEST.NOT_INITIALIZE];
32640
32654
  validateParams(this.payload, [
32641
32655
  { name: 'path', required: true },
32642
32656
  { name: 'transaction', type: 'object', required: true },
@@ -32661,7 +32675,7 @@ class SolGetAddress extends BaseMethod {
32661
32675
  init() {
32662
32676
  var _a;
32663
32677
  this.checkDeviceId = true;
32664
- this.notAllowDeviceMode = [...this.notAllowDeviceMode, UI_REQUEST.INITIALIZE];
32678
+ this.allowDeviceMode = [...this.allowDeviceMode, UI_REQUEST.NOT_INITIALIZE];
32665
32679
  this.hasBundle = !!((_a = this.payload) === null || _a === void 0 ? void 0 : _a.bundle);
32666
32680
  const payload = this.hasBundle ? this.payload : { bundle: [this.payload] };
32667
32681
  validateParams(payload, [{ name: 'bundle', type: 'array' }]);
@@ -32710,7 +32724,7 @@ class SolSignTransaction extends BaseMethod {
32710
32724
  init() {
32711
32725
  var _a;
32712
32726
  this.checkDeviceId = true;
32713
- this.notAllowDeviceMode = [...this.notAllowDeviceMode, UI_REQUEST.INITIALIZE];
32727
+ this.allowDeviceMode = [...this.allowDeviceMode, UI_REQUEST.NOT_INITIALIZE];
32714
32728
  this.hasBundle = !!((_a = this.payload) === null || _a === void 0 ? void 0 : _a.bundle);
32715
32729
  const payload = this.hasBundle ? this.payload : { bundle: [this.payload] };
32716
32730
  validateParams(payload, [{ name: 'bundle', type: 'array' }]);
@@ -32789,7 +32803,7 @@ class SolSignTransaction extends BaseMethod {
32789
32803
  class SolSignOffchainMessage extends BaseMethod {
32790
32804
  init() {
32791
32805
  this.checkDeviceId = true;
32792
- this.notAllowDeviceMode = [...this.notAllowDeviceMode, UI_REQUEST.INITIALIZE];
32806
+ this.allowDeviceMode = [...this.allowDeviceMode, UI_REQUEST.NOT_INITIALIZE];
32793
32807
  validateParams(this.payload, [
32794
32808
  { name: 'path', required: true },
32795
32809
  { name: 'messageHex', type: 'hexString', required: true },
@@ -32831,7 +32845,7 @@ class SolSignOffchainMessage extends BaseMethod {
32831
32845
  class SolSignMessage extends BaseMethod {
32832
32846
  init() {
32833
32847
  this.checkDeviceId = true;
32834
- this.notAllowDeviceMode = [...this.notAllowDeviceMode, UI_REQUEST.INITIALIZE];
32848
+ this.allowDeviceMode = [...this.allowDeviceMode, UI_REQUEST.NOT_INITIALIZE];
32835
32849
  validateParams(this.payload, [
32836
32850
  { name: 'path', required: true },
32837
32851
  { name: 'messageHex', type: 'hexString', required: true },
@@ -32878,7 +32892,7 @@ class StellarGetAddress extends BaseMethod {
32878
32892
  init() {
32879
32893
  var _a;
32880
32894
  this.checkDeviceId = true;
32881
- this.notAllowDeviceMode = [...this.notAllowDeviceMode, UI_REQUEST.INITIALIZE];
32895
+ this.allowDeviceMode = [...this.allowDeviceMode, UI_REQUEST.NOT_INITIALIZE];
32882
32896
  this.hasBundle = !!((_a = this.payload) === null || _a === void 0 ? void 0 : _a.bundle);
32883
32897
  const payload = this.hasBundle ? this.payload : { bundle: [this.payload] };
32884
32898
  validateParams(payload, [{ name: 'bundle', type: 'array' }]);
@@ -33047,7 +33061,7 @@ class StellarSignTransaction extends BaseMethod {
33047
33061
  }
33048
33062
  init() {
33049
33063
  this.checkDeviceId = true;
33050
- this.notAllowDeviceMode = [...this.notAllowDeviceMode, UI_REQUEST.INITIALIZE];
33064
+ this.allowDeviceMode = [...this.allowDeviceMode, UI_REQUEST.NOT_INITIALIZE];
33051
33065
  validateParams(this.payload, [
33052
33066
  { name: 'path', required: true },
33053
33067
  { name: 'networkPassphrase', type: 'string', required: true },
@@ -33100,7 +33114,7 @@ class TronGetAddress extends BaseMethod {
33100
33114
  init() {
33101
33115
  var _a;
33102
33116
  this.checkDeviceId = true;
33103
- this.notAllowDeviceMode = [...this.notAllowDeviceMode, UI_REQUEST.INITIALIZE];
33117
+ this.allowDeviceMode = [...this.allowDeviceMode, UI_REQUEST.NOT_INITIALIZE];
33104
33118
  this.hasBundle = !!((_a = this.payload) === null || _a === void 0 ? void 0 : _a.bundle);
33105
33119
  const payload = this.hasBundle ? this.payload : { bundle: [this.payload] };
33106
33120
  validateParams(payload, [{ name: 'bundle', type: 'array' }]);
@@ -33151,7 +33165,7 @@ class TronGetAddress extends BaseMethod {
33151
33165
  class TronSignMessage extends BaseMethod {
33152
33166
  init() {
33153
33167
  this.checkDeviceId = true;
33154
- this.notAllowDeviceMode = [...this.notAllowDeviceMode, UI_REQUEST.INITIALIZE];
33168
+ this.allowDeviceMode = [...this.allowDeviceMode, UI_REQUEST.NOT_INITIALIZE];
33155
33169
  validateParams(this.payload, [
33156
33170
  { name: 'path', required: true },
33157
33171
  { name: 'messageHex', type: 'hexString', required: true },
@@ -33279,7 +33293,7 @@ class TronSignTransaction extends BaseMethod {
33279
33293
  }
33280
33294
  init() {
33281
33295
  this.checkDeviceId = true;
33282
- this.notAllowDeviceMode = [...this.notAllowDeviceMode, UI_REQUEST.INITIALIZE];
33296
+ this.allowDeviceMode = [...this.allowDeviceMode, UI_REQUEST.NOT_INITIALIZE];
33283
33297
  validateParams(this.payload, [
33284
33298
  { name: 'path', required: true },
33285
33299
  { name: 'transaction', type: 'object', required: true },
@@ -33334,7 +33348,7 @@ class NearGetAddress extends BaseMethod {
33334
33348
  init() {
33335
33349
  var _a;
33336
33350
  this.checkDeviceId = true;
33337
- this.notAllowDeviceMode = [...this.notAllowDeviceMode, UI_REQUEST.INITIALIZE];
33351
+ this.allowDeviceMode = [...this.allowDeviceMode, UI_REQUEST.NOT_INITIALIZE];
33338
33352
  this.hasBundle = !!((_a = this.payload) === null || _a === void 0 ? void 0 : _a.bundle);
33339
33353
  const payload = this.hasBundle ? this.payload : { bundle: [this.payload] };
33340
33354
  validateParams(payload, [{ name: 'bundle', type: 'array' }]);
@@ -33385,7 +33399,7 @@ class NearGetAddress extends BaseMethod {
33385
33399
  class NearSignTransaction extends BaseMethod {
33386
33400
  init() {
33387
33401
  this.checkDeviceId = true;
33388
- this.notAllowDeviceMode = [...this.notAllowDeviceMode, UI_REQUEST.INITIALIZE];
33402
+ this.allowDeviceMode = [...this.allowDeviceMode, UI_REQUEST.NOT_INITIALIZE];
33389
33403
  validateParams(this.payload, [
33390
33404
  { name: 'path', required: true },
33391
33405
  { name: 'rawTx', type: 'hexString', required: true },
@@ -33421,7 +33435,7 @@ class AptosGetAddress extends BaseMethod {
33421
33435
  init() {
33422
33436
  var _a, _b;
33423
33437
  this.checkDeviceId = true;
33424
- this.notAllowDeviceMode = [...this.notAllowDeviceMode, UI_REQUEST.INITIALIZE];
33438
+ this.allowDeviceMode = [...this.allowDeviceMode, UI_REQUEST.NOT_INITIALIZE];
33425
33439
  this.hasBundle = !!((_a = this.payload) === null || _a === void 0 ? void 0 : _a.bundle);
33426
33440
  const payload = this.hasBundle ? this.payload : { bundle: [this.payload] };
33427
33441
  this.shouldConfirm =
@@ -33516,7 +33530,7 @@ class AptosGetPublicKey extends BaseMethod {
33516
33530
  init() {
33517
33531
  var _a;
33518
33532
  this.checkDeviceId = true;
33519
- this.notAllowDeviceMode = [...this.notAllowDeviceMode, UI_REQUEST.INITIALIZE];
33533
+ this.allowDeviceMode = [...this.allowDeviceMode, UI_REQUEST.NOT_INITIALIZE];
33520
33534
  this.hasBundle = !!((_a = this.payload) === null || _a === void 0 ? void 0 : _a.bundle);
33521
33535
  const payload = this.hasBundle ? this.payload : { bundle: [this.payload] };
33522
33536
  validateParams(payload, [{ name: 'bundle', type: 'array' }]);
@@ -33561,7 +33575,7 @@ class AptosGetPublicKey extends BaseMethod {
33561
33575
  class AptosSignTransaction extends BaseMethod {
33562
33576
  init() {
33563
33577
  this.checkDeviceId = true;
33564
- this.notAllowDeviceMode = [...this.notAllowDeviceMode, UI_REQUEST.INITIALIZE];
33578
+ this.allowDeviceMode = [...this.allowDeviceMode, UI_REQUEST.NOT_INITIALIZE];
33565
33579
  validateParams(this.payload, [
33566
33580
  { name: 'path', required: true },
33567
33581
  { name: 'rawTx', type: 'hexString', required: true },
@@ -33611,7 +33625,7 @@ class AptosSignTransaction extends BaseMethod {
33611
33625
  class AptosSignMessage extends BaseMethod {
33612
33626
  init() {
33613
33627
  this.checkDeviceId = true;
33614
- this.notAllowDeviceMode = [...this.notAllowDeviceMode, UI_REQUEST.INITIALIZE];
33628
+ this.allowDeviceMode = [...this.allowDeviceMode, UI_REQUEST.NOT_INITIALIZE];
33615
33629
  validateParams(this.payload, [
33616
33630
  { name: 'path', required: true },
33617
33631
  { name: 'payload', type: 'object', required: true },
@@ -33677,7 +33691,7 @@ class AlgoGetAddress extends BaseMethod {
33677
33691
  init() {
33678
33692
  var _a;
33679
33693
  this.checkDeviceId = true;
33680
- this.notAllowDeviceMode = [...this.notAllowDeviceMode];
33694
+ this.allowDeviceMode = [...this.allowDeviceMode];
33681
33695
  this.hasBundle = !!((_a = this.payload) === null || _a === void 0 ? void 0 : _a.bundle);
33682
33696
  const payload = this.hasBundle ? this.payload : { bundle: [this.payload] };
33683
33697
  validateParams(payload, [{ name: 'bundle', type: 'array' }]);
@@ -33732,7 +33746,7 @@ class AlgoSignTransaction extends BaseMethod {
33732
33746
  }
33733
33747
  init() {
33734
33748
  this.checkDeviceId = true;
33735
- this.notAllowDeviceMode = [...this.notAllowDeviceMode];
33749
+ this.allowDeviceMode = [...this.allowDeviceMode];
33736
33750
  validateParams(this.payload, [
33737
33751
  { name: 'path', required: true },
33738
33752
  { name: 'rawTx', type: 'hexString', required: true },
@@ -33771,7 +33785,7 @@ class CosmosGetAddress extends BaseMethod {
33771
33785
  init() {
33772
33786
  var _a;
33773
33787
  this.checkDeviceId = true;
33774
- this.notAllowDeviceMode = [...this.notAllowDeviceMode];
33788
+ this.allowDeviceMode = [...this.allowDeviceMode];
33775
33789
  this.hasBundle = !!((_a = this.payload) === null || _a === void 0 ? void 0 : _a.bundle);
33776
33790
  const payload = this.hasBundle ? this.payload : { bundle: [this.payload] };
33777
33791
  validateParams(payload, [{ name: 'bundle', type: 'array' }]);
@@ -33833,7 +33847,7 @@ class CosmosGetPublicKey extends BaseMethod {
33833
33847
  init() {
33834
33848
  var _a;
33835
33849
  this.checkDeviceId = true;
33836
- this.notAllowDeviceMode = [...this.notAllowDeviceMode, UI_REQUEST.INITIALIZE];
33850
+ this.allowDeviceMode = [...this.allowDeviceMode, UI_REQUEST.NOT_INITIALIZE];
33837
33851
  this.hasBundle = !!((_a = this.payload) === null || _a === void 0 ? void 0 : _a.bundle);
33838
33852
  const payload = this.hasBundle ? this.payload : { bundle: [this.payload] };
33839
33853
  validateParams(payload, [{ name: 'bundle', type: 'array' }]);
@@ -33894,7 +33908,7 @@ class CosmosSignTransaction extends BaseMethod {
33894
33908
  }
33895
33909
  init() {
33896
33910
  this.checkDeviceId = true;
33897
- this.notAllowDeviceMode = [...this.notAllowDeviceMode];
33911
+ this.allowDeviceMode = [...this.allowDeviceMode];
33898
33912
  validateParams(this.payload, [
33899
33913
  { name: 'path', required: true },
33900
33914
  { name: 'rawTx', type: 'hexString', required: true },
@@ -33937,7 +33951,7 @@ class XrpGetAddress$1 extends BaseMethod {
33937
33951
  init() {
33938
33952
  var _a;
33939
33953
  this.checkDeviceId = true;
33940
- this.notAllowDeviceMode = [...this.notAllowDeviceMode, UI_REQUEST.INITIALIZE];
33954
+ this.allowDeviceMode = [...this.allowDeviceMode, UI_REQUEST.NOT_INITIALIZE];
33941
33955
  this.hasBundle = !!((_a = this.payload) === null || _a === void 0 ? void 0 : _a.bundle);
33942
33956
  const payload = this.hasBundle ? this.payload : { bundle: [this.payload] };
33943
33957
  this.shouldConfirm = this.hasBundle
@@ -34018,7 +34032,7 @@ class XrpGetAddress extends BaseMethod {
34018
34032
  }
34019
34033
  init() {
34020
34034
  this.checkDeviceId = true;
34021
- this.notAllowDeviceMode = [...this.notAllowDeviceMode, UI_REQUEST.INITIALIZE];
34035
+ this.allowDeviceMode = [...this.allowDeviceMode, UI_REQUEST.NOT_INITIALIZE];
34022
34036
  const { payload } = this;
34023
34037
  validateParams(payload, [
34024
34038
  { name: 'path', required: true },
@@ -34098,7 +34112,7 @@ class SuiGetAddress extends BaseMethod {
34098
34112
  init() {
34099
34113
  var _a, _b;
34100
34114
  this.checkDeviceId = true;
34101
- this.notAllowDeviceMode = [...this.notAllowDeviceMode, UI_REQUEST.INITIALIZE];
34115
+ this.allowDeviceMode = [...this.allowDeviceMode, UI_REQUEST.NOT_INITIALIZE];
34102
34116
  this.hasBundle = !!((_a = this.payload) === null || _a === void 0 ? void 0 : _a.bundle);
34103
34117
  const payload = this.hasBundle ? this.payload : { bundle: [this.payload] };
34104
34118
  this.shouldConfirm =
@@ -34190,7 +34204,7 @@ class SuiGetPublicKey extends BaseMethod {
34190
34204
  init() {
34191
34205
  var _a;
34192
34206
  this.checkDeviceId = true;
34193
- this.notAllowDeviceMode = [...this.notAllowDeviceMode, UI_REQUEST.INITIALIZE];
34207
+ this.allowDeviceMode = [...this.allowDeviceMode, UI_REQUEST.NOT_INITIALIZE];
34194
34208
  this.hasBundle = !!((_a = this.payload) === null || _a === void 0 ? void 0 : _a.bundle);
34195
34209
  const payload = this.hasBundle ? this.payload : { bundle: [this.payload] };
34196
34210
  validateParams(payload, [{ name: 'bundle', type: 'array' }]);
@@ -34238,7 +34252,7 @@ class SuiGetPublicKey extends BaseMethod {
34238
34252
  class SuiSignMessage extends BaseMethod {
34239
34253
  init() {
34240
34254
  this.checkDeviceId = true;
34241
- this.notAllowDeviceMode = [...this.notAllowDeviceMode, UI_REQUEST.INITIALIZE];
34255
+ this.allowDeviceMode = [...this.allowDeviceMode, UI_REQUEST.NOT_INITIALIZE];
34242
34256
  validateParams(this.payload, [
34243
34257
  { name: 'path', required: true },
34244
34258
  { name: 'messageHex', type: 'hexString', required: true },
@@ -34291,7 +34305,7 @@ class SuiSignTransaction extends BaseMethod {
34291
34305
  }
34292
34306
  init() {
34293
34307
  this.checkDeviceId = true;
34294
- this.notAllowDeviceMode = [...this.notAllowDeviceMode, UI_REQUEST.INITIALIZE];
34308
+ this.allowDeviceMode = [...this.allowDeviceMode, UI_REQUEST.NOT_INITIALIZE];
34295
34309
  validateParams(this.payload, [
34296
34310
  { name: 'path', required: true },
34297
34311
  { name: 'rawTx', type: 'hexString', required: true },
@@ -34434,7 +34448,7 @@ class CardanoGetAddress extends BaseMethod {
34434
34448
  init() {
34435
34449
  var _a, _b, _c;
34436
34450
  this.checkDeviceId = true;
34437
- this.notAllowDeviceMode = [...this.notAllowDeviceMode, UI_REQUEST.INITIALIZE];
34451
+ this.allowDeviceMode = [...this.allowDeviceMode, UI_REQUEST.NOT_INITIALIZE];
34438
34452
  this.hasBundle = !!((_a = this.payload) === null || _a === void 0 ? void 0 : _a.bundle);
34439
34453
  this.isCheck = this.hasBundle
34440
34454
  ? !!((_b = this.payload) === null || _b === void 0 ? void 0 : _b.bundle.every((i) => !!i.isCheck))
@@ -34534,7 +34548,7 @@ class CardanoGetPublicKey extends BaseMethod {
34534
34548
  init() {
34535
34549
  var _a;
34536
34550
  this.checkDeviceId = true;
34537
- this.notAllowDeviceMode = [...this.notAllowDeviceMode, UI_REQUEST.INITIALIZE];
34551
+ this.allowDeviceMode = [...this.allowDeviceMode, UI_REQUEST.NOT_INITIALIZE];
34538
34552
  this.hasBundle = !!((_a = this.payload) === null || _a === void 0 ? void 0 : _a.bundle);
34539
34553
  const payload = this.hasBundle ? this.payload : { bundle: [this.payload] };
34540
34554
  validateParams(payload, [{ name: 'bundle', type: 'array' }]);
@@ -35089,7 +35103,7 @@ class CardanoSignTransaction extends BaseMethod {
35089
35103
  init() {
35090
35104
  var _a;
35091
35105
  this.checkDeviceId = true;
35092
- this.notAllowDeviceMode = [...this.notAllowDeviceMode, UI_REQUEST.INITIALIZE];
35106
+ this.allowDeviceMode = [...this.allowDeviceMode, UI_REQUEST.NOT_INITIALIZE];
35093
35107
  this.hasBundle = !!((_a = this.payload) === null || _a === void 0 ? void 0 : _a.bundle);
35094
35108
  const { payload } = this;
35095
35109
  if (payload.auxiliaryData && payload.auxiliaryData.governanceRegistrationParameters) {
@@ -35324,7 +35338,7 @@ class CardanoSignTransaction extends BaseMethod {
35324
35338
  class CardanoSignMessage extends BaseMethod {
35325
35339
  init() {
35326
35340
  this.checkDeviceId = true;
35327
- this.notAllowDeviceMode = [...this.notAllowDeviceMode, UI_REQUEST.INITIALIZE];
35341
+ this.allowDeviceMode = [...this.allowDeviceMode, UI_REQUEST.NOT_INITIALIZE];
35328
35342
  const { payload } = this;
35329
35343
  validateParams(payload, [
35330
35344
  { name: 'path', type: 'string', required: true },
@@ -35365,7 +35379,7 @@ class FilecoinGetAddress extends BaseMethod {
35365
35379
  init() {
35366
35380
  var _a;
35367
35381
  this.checkDeviceId = true;
35368
- this.notAllowDeviceMode = [...this.notAllowDeviceMode, UI_REQUEST.INITIALIZE];
35382
+ this.allowDeviceMode = [...this.allowDeviceMode, UI_REQUEST.NOT_INITIALIZE];
35369
35383
  this.hasBundle = !!((_a = this.payload) === null || _a === void 0 ? void 0 : _a.bundle);
35370
35384
  const payload = this.hasBundle ? this.payload : { bundle: [this.payload] };
35371
35385
  validateParams(payload, [{ name: 'bundle', type: 'array' }]);
@@ -35425,7 +35439,7 @@ class FilecoinSignTransaction extends BaseMethod {
35425
35439
  }
35426
35440
  init() {
35427
35441
  this.checkDeviceId = true;
35428
- this.notAllowDeviceMode = [...this.notAllowDeviceMode];
35442
+ this.allowDeviceMode = [...this.allowDeviceMode];
35429
35443
  validateParams(this.payload, [
35430
35444
  { name: 'path', required: true },
35431
35445
  { name: 'rawTx', type: 'hexString', required: true },
@@ -35518,7 +35532,7 @@ class PolkadotGetAddress extends BaseMethod {
35518
35532
  init() {
35519
35533
  var _a;
35520
35534
  this.checkDeviceId = true;
35521
- this.notAllowDeviceMode = [...this.notAllowDeviceMode];
35535
+ this.allowDeviceMode = [...this.allowDeviceMode];
35522
35536
  this.hasBundle = !!((_a = this.payload) === null || _a === void 0 ? void 0 : _a.bundle);
35523
35537
  const payload = this.hasBundle ? this.payload : { bundle: [this.payload] };
35524
35538
  validateParams(payload, [{ name: 'bundle', type: 'array' }]);
@@ -35580,7 +35594,7 @@ class PolkadotSignTransaction extends BaseMethod {
35580
35594
  }
35581
35595
  init() {
35582
35596
  this.checkDeviceId = true;
35583
- this.notAllowDeviceMode = [...this.notAllowDeviceMode];
35597
+ this.allowDeviceMode = [...this.allowDeviceMode];
35584
35598
  validateParams(this.payload, [
35585
35599
  { name: 'path', required: true },
35586
35600
  { name: 'network', required: true },
@@ -35617,7 +35631,7 @@ class KaspaGetAddress extends BaseMethod {
35617
35631
  init() {
35618
35632
  var _a;
35619
35633
  this.checkDeviceId = true;
35620
- this.notAllowDeviceMode = [...this.notAllowDeviceMode, UI_REQUEST.INITIALIZE];
35634
+ this.allowDeviceMode = [...this.allowDeviceMode, UI_REQUEST.NOT_INITIALIZE];
35621
35635
  this.hasBundle = !!((_a = this.payload) === null || _a === void 0 ? void 0 : _a.bundle);
35622
35636
  const payload = this.hasBundle ? this.payload : { bundle: [this.payload] };
35623
35637
  validateParams(payload, [{ name: 'bundle', type: 'array' }]);
@@ -36000,7 +36014,7 @@ class KaspaSignTransaction extends BaseMethod {
36000
36014
  init() {
36001
36015
  var _a, _b, _c, _d, _e;
36002
36016
  this.checkDeviceId = true;
36003
- this.notAllowDeviceMode = [...this.notAllowDeviceMode, UI_REQUEST.INITIALIZE];
36017
+ this.allowDeviceMode = [...this.allowDeviceMode, UI_REQUEST.NOT_INITIALIZE];
36004
36018
  const payload = this.payload;
36005
36019
  validateParams(payload, [
36006
36020
  { name: 'version', type: 'number' },
@@ -36111,7 +36125,7 @@ class NexaGetAddress extends BaseMethod {
36111
36125
  init() {
36112
36126
  var _a;
36113
36127
  this.checkDeviceId = true;
36114
- this.notAllowDeviceMode = [...this.notAllowDeviceMode, UI_REQUEST.INITIALIZE];
36128
+ this.allowDeviceMode = [...this.allowDeviceMode, UI_REQUEST.NOT_INITIALIZE];
36115
36129
  this.hasBundle = !!((_a = this.payload) === null || _a === void 0 ? void 0 : _a.bundle);
36116
36130
  const payload = this.hasBundle ? this.payload : { bundle: [this.payload] };
36117
36131
  validateParams(payload, [{ name: 'bundle', type: 'array' }]);
@@ -36245,7 +36259,7 @@ class NostrGetPublicKey extends BaseMethod {
36245
36259
  }
36246
36260
  init() {
36247
36261
  this.checkDeviceId = true;
36248
- this.notAllowDeviceMode = [...this.notAllowDeviceMode, UI_REQUEST.INITIALIZE];
36262
+ this.allowDeviceMode = [...this.allowDeviceMode, UI_REQUEST.NOT_INITIALIZE];
36249
36263
  this.hasBundle = Object.prototype.hasOwnProperty.call(this.payload, 'bundle');
36250
36264
  const payload = this.hasBundle ? this.payload : { bundle: [this.payload] };
36251
36265
  validateParams(payload, [{ name: 'bundle', type: 'array' }]);
@@ -36323,7 +36337,7 @@ class NostrSignEvent extends BaseMethod {
36323
36337
  }
36324
36338
  init() {
36325
36339
  this.checkDeviceId = true;
36326
- this.notAllowDeviceMode = [...this.notAllowDeviceMode, UI_REQUEST.INITIALIZE];
36340
+ this.allowDeviceMode = [...this.allowDeviceMode, UI_REQUEST.NOT_INITIALIZE];
36327
36341
  const { payload } = this;
36328
36342
  if (!validateEvent(payload.event)) {
36329
36343
  throw hdShared.ERRORS.TypedError(hdShared.HardwareErrorCode.CallMethodInvalidParameter, `Can't serialize event with wrong or missing properties`);
@@ -36372,7 +36386,7 @@ class NostrEncryptMessage extends BaseMethod {
36372
36386
  init() {
36373
36387
  var _a;
36374
36388
  this.checkDeviceId = true;
36375
- this.notAllowDeviceMode = [...this.notAllowDeviceMode, UI_REQUEST.INITIALIZE];
36389
+ this.allowDeviceMode = [...this.allowDeviceMode, UI_REQUEST.NOT_INITIALIZE];
36376
36390
  const { payload } = this;
36377
36391
  validateParams(payload, [
36378
36392
  { name: 'path', required: true },
@@ -36419,7 +36433,7 @@ class NostrDecryptMessage extends BaseMethod {
36419
36433
  init() {
36420
36434
  var _a;
36421
36435
  this.checkDeviceId = true;
36422
- this.notAllowDeviceMode = [...this.notAllowDeviceMode, UI_REQUEST.INITIALIZE];
36436
+ this.allowDeviceMode = [...this.allowDeviceMode, UI_REQUEST.NOT_INITIALIZE];
36423
36437
  const { payload } = this;
36424
36438
  validateParams(payload, [
36425
36439
  { name: 'path', required: true },
@@ -36465,7 +36479,7 @@ class NostrSignSchnorr extends BaseMethod {
36465
36479
  }
36466
36480
  init() {
36467
36481
  this.checkDeviceId = true;
36468
- this.notAllowDeviceMode = [...this.notAllowDeviceMode, UI_REQUEST.INITIALIZE];
36482
+ this.allowDeviceMode = [...this.allowDeviceMode, UI_REQUEST.NOT_INITIALIZE];
36469
36483
  const { payload } = this;
36470
36484
  validateParams(payload, [
36471
36485
  { name: 'path', required: true },
@@ -36506,7 +36520,7 @@ class LnurlAuth1 extends BaseMethod {
36506
36520
  }
36507
36521
  init() {
36508
36522
  this.checkDeviceId = true;
36509
- this.notAllowDeviceMode = [...this.notAllowDeviceMode, UI_REQUEST.INITIALIZE];
36523
+ this.allowDeviceMode = [...this.allowDeviceMode, UI_REQUEST.NOT_INITIALIZE];
36510
36524
  const { payload } = this;
36511
36525
  validateParams(payload, [
36512
36526
  { name: 'domain', type: 'string', required: true },
@@ -36544,7 +36558,7 @@ class NervosGetAddress extends BaseMethod {
36544
36558
  init() {
36545
36559
  var _a;
36546
36560
  this.checkDeviceId = true;
36547
- this.notAllowDeviceMode = [...this.notAllowDeviceMode, UI_REQUEST.INITIALIZE];
36561
+ this.allowDeviceMode = [...this.allowDeviceMode, UI_REQUEST.NOT_INITIALIZE];
36548
36562
  this.hasBundle = !!((_a = this.payload) === null || _a === void 0 ? void 0 : _a.bundle);
36549
36563
  const payload = this.hasBundle ? this.payload : { bundle: [this.payload] };
36550
36564
  validateParams(payload, [{ name: 'bundle', type: 'array' }]);
@@ -36628,7 +36642,7 @@ class NervosSignTransaction extends BaseMethod {
36628
36642
  }
36629
36643
  init() {
36630
36644
  this.checkDeviceId = true;
36631
- this.notAllowDeviceMode = [...this.notAllowDeviceMode];
36645
+ this.allowDeviceMode = [...this.allowDeviceMode];
36632
36646
  validateParams(this.payload, [
36633
36647
  { name: 'path', required: true },
36634
36648
  { name: 'rawTx', type: 'hexString', required: true },
@@ -36680,7 +36694,7 @@ class DnxGetAddress extends BaseMethod {
36680
36694
  init() {
36681
36695
  var _a;
36682
36696
  this.checkDeviceId = true;
36683
- this.notAllowDeviceMode = [...this.notAllowDeviceMode, UI_REQUEST.INITIALIZE];
36697
+ this.allowDeviceMode = [...this.allowDeviceMode, UI_REQUEST.NOT_INITIALIZE];
36684
36698
  this.hasBundle = !!((_a = this.payload) === null || _a === void 0 ? void 0 : _a.bundle);
36685
36699
  const payload = this.hasBundle ? this.payload : { bundle: [this.payload] };
36686
36700
  validateParams(payload, [{ name: 'bundle', type: 'array' }]);
@@ -36735,7 +36749,7 @@ class DnxSignTransaction extends BaseMethod {
36735
36749
  }
36736
36750
  init() {
36737
36751
  this.checkDeviceId = true;
36738
- this.notAllowDeviceMode = [...this.notAllowDeviceMode, UI_REQUEST.INITIALIZE];
36752
+ this.allowDeviceMode = [...this.allowDeviceMode, UI_REQUEST.NOT_INITIALIZE];
36739
36753
  const { payload } = this;
36740
36754
  const addressN = validatePath(payload.path, 3);
36741
36755
  validateParams(payload, [
@@ -36829,7 +36843,7 @@ class TonGetAddress extends BaseMethod {
36829
36843
  var _a;
36830
36844
  this.strictCheckDeviceSupport = true;
36831
36845
  this.checkDeviceId = true;
36832
- this.notAllowDeviceMode = [...this.notAllowDeviceMode, UI_REQUEST.INITIALIZE];
36846
+ this.allowDeviceMode = [...this.allowDeviceMode, UI_REQUEST.NOT_INITIALIZE];
36833
36847
  this.hasBundle = !!((_a = this.payload) === null || _a === void 0 ? void 0 : _a.bundle);
36834
36848
  const payload = this.hasBundle ? this.payload : { bundle: [this.payload] };
36835
36849
  this.shouldConfirm = this.hasBundle
@@ -36916,7 +36930,7 @@ class TonSignMessage extends BaseMethod {
36916
36930
  init() {
36917
36931
  this.strictCheckDeviceSupport = true;
36918
36932
  this.checkDeviceId = true;
36919
- this.notAllowDeviceMode = [...this.notAllowDeviceMode, UI_REQUEST.INITIALIZE];
36933
+ this.allowDeviceMode = [...this.allowDeviceMode, UI_REQUEST.NOT_INITIALIZE];
36920
36934
  validateParams(this.payload, [
36921
36935
  { name: 'path', required: true },
36922
36936
  { name: 'destination', type: 'string' },
@@ -37060,7 +37074,7 @@ class TonSignProof extends BaseMethod {
37060
37074
  init() {
37061
37075
  this.strictCheckDeviceSupport = true;
37062
37076
  this.checkDeviceId = true;
37063
- this.notAllowDeviceMode = [...this.notAllowDeviceMode, UI_REQUEST.INITIALIZE];
37077
+ this.allowDeviceMode = [...this.allowDeviceMode, UI_REQUEST.NOT_INITIALIZE];
37064
37078
  validateParams(this.payload, [
37065
37079
  { name: 'path', required: true },
37066
37080
  { name: 'appdomain', type: 'string' },
@@ -37112,7 +37126,7 @@ class ScdoGetAddress extends BaseMethod {
37112
37126
  init() {
37113
37127
  var _a;
37114
37128
  this.checkDeviceId = true;
37115
- this.notAllowDeviceMode = [...this.notAllowDeviceMode, UI_REQUEST.INITIALIZE];
37129
+ this.allowDeviceMode = [...this.allowDeviceMode, UI_REQUEST.NOT_INITIALIZE];
37116
37130
  this.hasBundle = !!((_a = this.payload) === null || _a === void 0 ? void 0 : _a.bundle);
37117
37131
  const payload = this.hasBundle ? this.payload : { bundle: [this.payload] };
37118
37132
  validateParams(payload, [{ name: 'bundle', type: 'array' }]);
@@ -37180,7 +37194,7 @@ class ScdoSignTransaction extends BaseMethod {
37180
37194
  }
37181
37195
  init() {
37182
37196
  this.checkDeviceId = true;
37183
- this.notAllowDeviceMode = [...this.notAllowDeviceMode, UI_REQUEST.INITIALIZE];
37197
+ this.allowDeviceMode = [...this.allowDeviceMode, UI_REQUEST.NOT_INITIALIZE];
37184
37198
  validateParams(this.payload, [
37185
37199
  { name: 'path', required: true },
37186
37200
  { name: 'nonce', required: true },
@@ -37233,7 +37247,7 @@ class ScdoSignTransaction extends BaseMethod {
37233
37247
  class ScdoSignMessage extends BaseMethod {
37234
37248
  init() {
37235
37249
  this.checkDeviceId = true;
37236
- this.notAllowDeviceMode = [...this.notAllowDeviceMode, UI_REQUEST.INITIALIZE];
37250
+ this.allowDeviceMode = [...this.allowDeviceMode, UI_REQUEST.NOT_INITIALIZE];
37237
37251
  validateParams(this.payload, [
37238
37252
  { name: 'path', required: true },
37239
37253
  { name: 'messageHex', type: 'hexString', required: true },
@@ -37268,7 +37282,7 @@ class AlephiumGetAddress extends BaseMethod {
37268
37282
  init() {
37269
37283
  var _a;
37270
37284
  this.checkDeviceId = true;
37271
- this.notAllowDeviceMode = [...this.notAllowDeviceMode, UI_REQUEST.INITIALIZE];
37285
+ this.allowDeviceMode = [...this.allowDeviceMode, UI_REQUEST.NOT_INITIALIZE];
37272
37286
  this.hasBundle = !!((_a = this.payload) === null || _a === void 0 ? void 0 : _a.bundle);
37273
37287
  const payload = this.hasBundle ? this.payload : { bundle: [this.payload] };
37274
37288
  validateParams(payload, [{ name: 'bundle', type: 'array' }]);
@@ -37355,7 +37369,7 @@ class AlephiumSignTransaction extends BaseMethod {
37355
37369
  }
37356
37370
  init() {
37357
37371
  this.checkDeviceId = true;
37358
- this.notAllowDeviceMode = [...this.notAllowDeviceMode, UI_REQUEST.INITIALIZE];
37372
+ this.allowDeviceMode = [...this.allowDeviceMode, UI_REQUEST.NOT_INITIALIZE];
37359
37373
  validateParams(this.payload, [
37360
37374
  { name: 'path', required: true },
37361
37375
  { name: 'rawTx', required: true, type: 'hexString' },
@@ -37396,7 +37410,7 @@ class AlephiumSignTransaction extends BaseMethod {
37396
37410
  class AlephiumSignMessage extends BaseMethod {
37397
37411
  init() {
37398
37412
  this.checkDeviceId = true;
37399
- this.notAllowDeviceMode = [...this.notAllowDeviceMode, UI_REQUEST.INITIALIZE];
37413
+ this.allowDeviceMode = [...this.allowDeviceMode, UI_REQUEST.NOT_INITIALIZE];
37400
37414
  validateParams(this.payload, [
37401
37415
  { name: 'path', required: true },
37402
37416
  { name: 'messageHex', type: 'hexString', required: true },
@@ -37463,7 +37477,7 @@ class BenfenGetAddress extends BaseMethod {
37463
37477
  init() {
37464
37478
  var _a, _b;
37465
37479
  this.checkDeviceId = true;
37466
- this.notAllowDeviceMode = [...this.notAllowDeviceMode, UI_REQUEST.INITIALIZE];
37480
+ this.allowDeviceMode = [...this.allowDeviceMode, UI_REQUEST.NOT_INITIALIZE];
37467
37481
  this.hasBundle = !!((_a = this.payload) === null || _a === void 0 ? void 0 : _a.bundle);
37468
37482
  const payload = this.hasBundle ? this.payload : { bundle: [this.payload] };
37469
37483
  this.shouldConfirm =
@@ -37554,7 +37568,7 @@ class BenfenGetPublicKey extends BaseMethod {
37554
37568
  init() {
37555
37569
  var _a;
37556
37570
  this.checkDeviceId = true;
37557
- this.notAllowDeviceMode = [...this.notAllowDeviceMode, UI_REQUEST.INITIALIZE];
37571
+ this.allowDeviceMode = [...this.allowDeviceMode, UI_REQUEST.NOT_INITIALIZE];
37558
37572
  this.hasBundle = !!((_a = this.payload) === null || _a === void 0 ? void 0 : _a.bundle);
37559
37573
  const payload = this.hasBundle ? this.payload : { bundle: [this.payload] };
37560
37574
  validateParams(payload, [{ name: 'bundle', type: 'array' }]);
@@ -37601,7 +37615,7 @@ class BenfenGetPublicKey extends BaseMethod {
37601
37615
  class BenfenSignMessage extends BaseMethod {
37602
37616
  init() {
37603
37617
  this.checkDeviceId = true;
37604
- this.notAllowDeviceMode = [...this.notAllowDeviceMode, UI_REQUEST.INITIALIZE];
37618
+ this.allowDeviceMode = [...this.allowDeviceMode, UI_REQUEST.NOT_INITIALIZE];
37605
37619
  validateParams(this.payload, [
37606
37620
  { name: 'path', required: true },
37607
37621
  { name: 'messageHex', type: 'hexString', required: true },
@@ -37654,7 +37668,7 @@ class BenfenSignTransaction extends BaseMethod {
37654
37668
  }
37655
37669
  init() {
37656
37670
  this.checkDeviceId = true;
37657
- this.notAllowDeviceMode = [...this.notAllowDeviceMode, UI_REQUEST.INITIALIZE];
37671
+ this.allowDeviceMode = [...this.allowDeviceMode, UI_REQUEST.NOT_INITIALIZE];
37658
37672
  validateParams(this.payload, [
37659
37673
  { name: 'path', required: true },
37660
37674
  { name: 'rawTx', type: 'hexString', required: true },
@@ -37702,7 +37716,7 @@ class NeoGetAddress extends BaseMethod {
37702
37716
  init() {
37703
37717
  var _a;
37704
37718
  this.checkDeviceId = true;
37705
- this.notAllowDeviceMode = [...this.notAllowDeviceMode, UI_REQUEST.INITIALIZE];
37719
+ this.allowDeviceMode = [...this.allowDeviceMode, UI_REQUEST.NOT_INITIALIZE];
37706
37720
  this.strictCheckDeviceSupport = true;
37707
37721
  this.hasBundle = !!((_a = this.payload) === null || _a === void 0 ? void 0 : _a.bundle);
37708
37722
  const payload = this.hasBundle ? this.payload : { bundle: [this.payload] };
@@ -37761,7 +37775,7 @@ class NeoGetAddress extends BaseMethod {
37761
37775
  class NeoSignTransaction extends BaseMethod {
37762
37776
  init() {
37763
37777
  this.checkDeviceId = true;
37764
- this.notAllowDeviceMode = [...this.notAllowDeviceMode, UI_REQUEST.INITIALIZE];
37778
+ this.allowDeviceMode = [...this.allowDeviceMode, UI_REQUEST.NOT_INITIALIZE];
37765
37779
  this.strictCheckDeviceSupport = true;
37766
37780
  validateParams(this.payload, [
37767
37781
  { name: 'path', required: true },
@@ -38312,7 +38326,7 @@ const onCallDevice = (context, message, method) => __awaiter(void 0, void 0, voi
38312
38326
  throw hdShared.ERRORS.TypedError(hdShared.HardwareErrorCode.DeviceNotSupportMethod);
38313
38327
  }
38314
38328
  }
38315
- const unexpectedMode = device.hasUnexpectedMode(method.notAllowDeviceMode, method.requireDeviceMode);
38329
+ const unexpectedMode = device.hasUnexpectedMode(method.allowDeviceMode, method.requireDeviceMode);
38316
38330
  if (unexpectedMode) {
38317
38331
  if (unexpectedMode === UI_REQUEST.NOT_IN_BOOTLOADER) {
38318
38332
  return Promise.reject(hdShared.ERRORS.TypedError(hdShared.HardwareErrorCode.RequiredButInBootloaderMode));