@onekeyfe/hwk-adapter-core 1.2.3-alpha.1 → 1.2.3-alpha.11

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 (37) hide show
  1. package/dist/{chunk-RRCFH7X6.js → chunk-BAGEFFFY.js} +3 -32
  2. package/dist/chunk-BAGEFFFY.js.map +1 -0
  3. package/dist/{chunk-IZEVYMJK.js → chunk-SZZF623R.js} +55 -142
  4. package/dist/chunk-SZZF623R.js.map +1 -0
  5. package/dist/{chunk-KCIK56B5.mjs → chunk-U63HTLGJ.mjs} +2 -31
  6. package/dist/chunk-U63HTLGJ.mjs.map +1 -0
  7. package/dist/{chunk-72KOSYTH.mjs → chunk-YA4BWFTZ.mjs} +55 -142
  8. package/dist/chunk-YA4BWFTZ.mjs.map +1 -0
  9. package/dist/errors.d.mts +207 -1
  10. package/dist/errors.d.ts +207 -1
  11. package/dist/errors.js +2 -8
  12. package/dist/errors.js.map +1 -1
  13. package/dist/errors.mjs +3 -9
  14. package/dist/index.d.mts +57 -530
  15. package/dist/index.d.ts +57 -530
  16. package/dist/index.js +58 -600
  17. package/dist/index.js.map +1 -1
  18. package/dist/index.mjs +49 -591
  19. package/dist/index.mjs.map +1 -1
  20. package/dist/{ui-events-BXI9BBpx.d.ts → ui-events-Cb7haAeE.d.mts} +3 -19
  21. package/dist/{ui-events-BXI9BBpx.d.mts → ui-events-Cb7haAeE.d.ts} +3 -19
  22. package/dist/ui-events.d.mts +1 -1
  23. package/dist/ui-events.d.ts +1 -1
  24. package/dist/ui-events.js +2 -3
  25. package/dist/ui-events.js.map +1 -1
  26. package/dist/ui-events.mjs +1 -2
  27. package/package.json +2 -2
  28. package/dist/chunk-3M3GMF64.mjs +0 -68
  29. package/dist/chunk-3M3GMF64.mjs.map +0 -1
  30. package/dist/chunk-72KOSYTH.mjs.map +0 -1
  31. package/dist/chunk-7SFFS2NL.js +0 -68
  32. package/dist/chunk-7SFFS2NL.js.map +0 -1
  33. package/dist/chunk-IZEVYMJK.js.map +0 -1
  34. package/dist/chunk-KCIK56B5.mjs.map +0 -1
  35. package/dist/chunk-RRCFH7X6.js.map +0 -1
  36. package/dist/errors-ChA_YEZY.d.mts +0 -296
  37. package/dist/errors-ChA_YEZY.d.ts +0 -296
package/dist/index.js CHANGED
@@ -1,49 +1,31 @@
1
1
  "use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } } function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }
2
2
 
3
- var _chunk7SFFS2NLjs = require('./chunk-7SFFS2NL.js');
4
3
 
5
4
 
6
5
 
6
+ var _chunkSZZF623Rjs = require('./chunk-SZZF623R.js');
7
7
 
8
8
 
9
9
 
10
10
 
11
11
 
12
12
 
13
- var _chunkRRCFH7X6js = require('./chunk-RRCFH7X6.js');
14
13
 
15
14
 
16
15
 
17
-
18
-
19
-
20
-
21
-
22
- var _chunkIZEVYMJKjs = require('./chunk-IZEVYMJK.js');
16
+ var _chunkBAGEFFFYjs = require('./chunk-BAGEFFFY.js');
23
17
 
24
18
  // src/types/response.ts
25
19
  function success(payload) {
26
20
  return { success: true, payload };
27
21
  }
28
- function failure(code, error, params, origin, recovery) {
22
+ function failure(code, error, params) {
29
23
  return {
30
24
  success: false,
31
- payload: {
32
- error,
33
- code,
34
- ...origin !== void 0 ? { origin } : {},
35
- recovery: _nullishCoalesce(recovery, () => ( _chunkIZEVYMJKjs.defaultRecoveryForCode.call(void 0, code))),
36
- ...params ? { params } : {}
37
- }
25
+ payload: { error, code, ...params ? { params } : {} }
38
26
  };
39
27
  }
40
28
 
41
- // src/types/device.ts
42
- function resolveSearchTargetReusePolicy(device) {
43
- if (_optionalChain([device, 'access', _ => _.capabilities, 'optionalAccess', _2 => _2.persistentDeviceIdentity])) return "reconnectable";
44
- return "current-discovery";
45
- }
46
-
47
29
  // src/types/fingerprint.ts
48
30
  var _sha256 = require('@noble/hashes/sha256');
49
31
  var _utils = require('@noble/hashes/utils');
@@ -53,21 +35,11 @@ var CHAIN_FINGERPRINT_PATHS = {
53
35
  // Cointype 1 (testnet) is rejected by some Ledger BTC App configurations.
54
36
  btc: "m/44'/0'/0'",
55
37
  sol: "m/44'/501'/0'",
56
- tron: "m/44'/195'/0'/0/0",
57
- // Shielded UA (single Orchard receiver) derived from the transparent path.
58
- zcash: "m/44'/133'/0'/0/0"
38
+ tron: "m/44'/195'/0'/0/0"
59
39
  };
60
- function parseBip32MasterFingerprint(value) {
61
- if (typeof value !== "string") return void 0;
62
- const normalized = value.trim().toLowerCase();
63
- return /^[0-9a-f]{8}$/.test(normalized) ? normalized : void 0;
64
- }
65
40
  function deriveDeviceFingerprint(value) {
66
41
  return _utils.bytesToHex.call(void 0, _sha256.sha256.call(void 0, _utils.utf8ToBytes.call(void 0, value))).slice(0, 16);
67
42
  }
68
- function deriveWalletId(canonicalPublicMaterial) {
69
- return _utils.bytesToHex.call(void 0, _sha256.sha256.call(void 0, _utils.utf8ToBytes.call(void 0, `onekey-hwk-wallet-id:v1:${canonicalPublicMaterial}`)));
70
- }
71
43
 
72
44
  // src/events/device.ts
73
45
  var DEVICE_EVENT = "DEVICE_EVENT";
@@ -76,10 +48,6 @@ var DEVICE = {
76
48
  DISCONNECT: "device-disconnect",
77
49
  CHANGED: "device-changed",
78
50
  FEATURES: "features",
79
- /** Trezor transport binding, emitted only after matching the expected firmware device_id. */
80
- TREZOR_CONNECTION_VERIFIED: "device-trezor-connection-verified",
81
- /** Ledger BLE address repair, emitted only after matching the stored chain fingerprint. */
82
- LEDGER_CONNECTION_VERIFIED: "device-ledger-connection-verified",
83
51
  /**
84
52
  * Trezor-only. Emitted after a successful THP handshake that minted or
85
53
  * refreshed pairing credentials. The host should persist `credentials`
@@ -98,8 +66,7 @@ var SDK = {
98
66
  DEVICE_STUCK: "device-stuck",
99
67
  DEVICE_UNRESPONSIVE: "device-unresponsive",
100
68
  DEVICE_RECOVERED: "device-recovered",
101
- DEVICE_INTERACTION: "device-interaction",
102
- INTERACTION_ENDED: "interaction-ended"
69
+ DEVICE_INTERACTION: "device-interaction"
103
70
  };
104
71
 
105
72
  // src/utils/DeviceJobQueue.ts
@@ -208,236 +175,6 @@ var DeviceJobQueue = class {
208
175
  }
209
176
  };
210
177
 
211
- // src/utils/hardwareRuntimeId.ts
212
-
213
- var HARDWARE_RUNTIME_ID_PREFIX = "hwk:runtime:v1";
214
- var RANDOM_ID_BYTES = 16;
215
- var RANDOM_ID_PATTERN = /^[0-9a-f]{32}$/;
216
- var VENDORS = /* @__PURE__ */ new Set(["trezor", "ledger", "keystone"]);
217
- var CONNECTION_TYPES = /* @__PURE__ */ new Set(["usb", "ble", "qr"]);
218
- function createNonce() {
219
- return _utils.bytesToHex.call(void 0, _utils.randomBytes.call(void 0, RANDOM_ID_BYTES));
220
- }
221
- function createHardwareInteractionId(vendor) {
222
- return `${HARDWARE_RUNTIME_ID_PREFIX}:interaction:${vendor}:${createNonce()}`;
223
- }
224
- function createHardwareSearchTargetId(params) {
225
- return `${HARDWARE_RUNTIME_ID_PREFIX}:search-target:${params.vendor}:${params.connectionType}:${createNonce()}`;
226
- }
227
- function createHardwareConnectorSessionId(params) {
228
- return `${HARDWARE_RUNTIME_ID_PREFIX}:connector-session:${params.vendor}:${params.connectionType}:${createNonce()}`;
229
- }
230
- function hasHardwareRuntimeIdPrefix(value) {
231
- return typeof value === "string" && value.startsWith(`${HARDWARE_RUNTIME_ID_PREFIX}:`);
232
- }
233
- function parseHardwareRuntimeId(value) {
234
- if (!hasHardwareRuntimeIdPrefix(value)) return void 0;
235
- const parts = value.split(":");
236
- const kind = parts[3];
237
- const vendor = parts[4];
238
- if (!VENDORS.has(vendor)) return void 0;
239
- if (kind === "interaction" && parts.length === 6 && RANDOM_ID_PATTERN.test(parts[5])) {
240
- return {
241
- kind,
242
- vendor,
243
- nonce: parts[5]
244
- };
245
- }
246
- const connectionType = parts[5];
247
- if ((kind === "search-target" || kind === "connector-session") && parts.length === 7 && CONNECTION_TYPES.has(connectionType) && RANDOM_ID_PATTERN.test(parts[6])) {
248
- return {
249
- kind,
250
- vendor,
251
- connectionType,
252
- nonce: parts[6]
253
- };
254
- }
255
- return void 0;
256
- }
257
- function isHardwareInteractionId(value) {
258
- return _optionalChain([parseHardwareRuntimeId, 'call', _3 => _3(value), 'optionalAccess', _4 => _4.kind]) === "interaction";
259
- }
260
- function isHardwareSearchTargetId(value) {
261
- return _optionalChain([parseHardwareRuntimeId, 'call', _5 => _5(value), 'optionalAccess', _6 => _6.kind]) === "search-target";
262
- }
263
-
264
- // src/utils/InteractionRegistry.ts
265
- var INTERACTION_DEFAULT_TTL_MS = 6e5;
266
- var InteractionRegistry = class {
267
- constructor(options) {
268
- this._active = /* @__PURE__ */ new Map();
269
- this._ended = /* @__PURE__ */ new Map();
270
- this._vendor = options.vendor;
271
- this._ttlMs = _nullishCoalesce(options.ttlMs, () => ( INTERACTION_DEFAULT_TTL_MS));
272
- this._onEnded = options.onEnded;
273
- }
274
- create(params) {
275
- const now = Date.now();
276
- const interactionId = createHardwareInteractionId(this._vendor);
277
- const interaction = {
278
- interactionId,
279
- searchTargetId: params.searchTargetId,
280
- connectId: params.connectId,
281
- device: params.device,
282
- connectionKeys: Array.from(
283
- new Set(
284
- [params.searchTargetId, params.connectId, ..._nullishCoalesce(params.connectionKeys, () => ( []))].filter(
285
- Boolean
286
- )
287
- )
288
- ),
289
- createdAt: now,
290
- lastActiveAt: now
291
- };
292
- const timer = this._createTimer(interactionId);
293
- this._active.set(interactionId, { ...interaction, timer, retainCount: 0 });
294
- return interaction;
295
- }
296
- resolve(interactionId) {
297
- const active = this._active.get(interactionId);
298
- if (!active) {
299
- const ended = this._ended.get(interactionId);
300
- if (ended) {
301
- throw _chunkIZEVYMJKjs.createHwkError.call(void 0, {
302
- code: 10113 /* InteractionEnded */,
303
- message: `Hardware interaction has ended (${ended.reason})`,
304
- params: { interactionId, reason: ended.reason }
305
- });
306
- }
307
- throw _chunkIZEVYMJKjs.createHwkError.call(void 0, {
308
- code: 10112 /* InteractionNotFound */,
309
- message: "Hardware interaction was not found",
310
- params: { interactionId }
311
- });
312
- }
313
- if (active.timer) clearTimeout(active.timer);
314
- active.lastActiveAt = Date.now();
315
- active.timer = active.retainCount === 0 ? this._createTimer(interactionId) : void 0;
316
- return active;
317
- }
318
- /** Keep an interaction alive while one device job is actively using it. */
319
- retain(interactionId) {
320
- const active = this.resolve(interactionId);
321
- if (active.timer) clearTimeout(active.timer);
322
- active.timer = void 0;
323
- active.retainCount += 1;
324
- let released = false;
325
- return () => {
326
- if (released) return;
327
- released = true;
328
- const current = this._active.get(interactionId);
329
- if (!current) return;
330
- current.retainCount = Math.max(0, current.retainCount - 1);
331
- current.lastActiveAt = Date.now();
332
- if (current.retainCount === 0) {
333
- current.timer = this._createTimer(interactionId);
334
- }
335
- };
336
- }
337
- /** Return active or tombstoned binding data without refreshing its TTL. */
338
- find(interactionId) {
339
- return _nullishCoalesce(this._active.get(interactionId), () => ( _optionalChain([this, 'access', _7 => _7._ended, 'access', _8 => _8.get, 'call', _9 => _9(interactionId), 'optionalAccess', _10 => _10.interaction])));
340
- }
341
- findActiveByConnectionKey(connectionKey) {
342
- if (!connectionKey) return void 0;
343
- return [...this._active.values()].find(
344
- (interaction) => interaction.connectionKeys.includes(connectionKey)
345
- );
346
- }
347
- /** Replace the live transport binding after the same target was reconnected. */
348
- rebind(interactionId, params) {
349
- const active = this._active.get(interactionId);
350
- if (!active) {
351
- this.resolve(interactionId);
352
- throw new Error("Unreachable interaction rebind");
353
- }
354
- if (active.timer) clearTimeout(active.timer);
355
- active.connectId = params.connectId;
356
- active.device = params.device;
357
- active.connectionKeys = Array.from(
358
- new Set([params.connectId, ..._nullishCoalesce(params.connectionKeys, () => ( []))].filter(Boolean))
359
- );
360
- active.lastActiveAt = Date.now();
361
- active.timer = active.retainCount === 0 ? this._createTimer(interactionId) : void 0;
362
- return active;
363
- }
364
- end(interactionId, reason) {
365
- const active = this._active.get(interactionId);
366
- if (!active) return void 0;
367
- if (active.timer) clearTimeout(active.timer);
368
- this._active.delete(interactionId);
369
- this._rememberEnded(active, reason);
370
- _optionalChain([this, 'access', _11 => _11._onEnded, 'optionalCall', _12 => _12(active, reason)]);
371
- return active;
372
- }
373
- endByConnectionKey(connectionKey, reason, exceptInteractionId) {
374
- if (!connectionKey) return;
375
- for (const interaction of [...this._active.values()]) {
376
- if (interaction.interactionId === exceptInteractionId) continue;
377
- if (interaction.connectionKeys.includes(connectionKey)) {
378
- this.end(interaction.interactionId, reason);
379
- }
380
- }
381
- }
382
- endAll(reason, exceptInteractionId) {
383
- for (const interactionId of [...this._active.keys()]) {
384
- if (interactionId === exceptInteractionId) continue;
385
- this.end(interactionId, reason);
386
- }
387
- }
388
- _createTimer(interactionId) {
389
- const timer = setTimeout(() => {
390
- this.end(interactionId, "timeout");
391
- }, this._ttlMs);
392
- _optionalChain([timer, 'access', _13 => _13.unref, 'optionalCall', _14 => _14()]);
393
- return timer;
394
- }
395
- _rememberEnded(interaction, reason) {
396
- this._ended.set(interaction.interactionId, { reason, interaction });
397
- if (this._ended.size <= 100) return;
398
- const oldest = this._ended.keys().next().value;
399
- if (oldest) this._ended.delete(oldest);
400
- }
401
- };
402
-
403
- // src/utils/hardwareOperationTarget.ts
404
- function resolveHardwareOperationTarget(positionalTargetId, commonInteractionId, expectedVendor) {
405
- const normalizedPositionalTargetId = _nullishCoalesce(positionalTargetId, () => ( void 0));
406
- const normalizedCommonInteractionId = commonInteractionId || void 0;
407
- const positionalInteractionId = isHardwareInteractionId(normalizedPositionalTargetId) ? normalizedPositionalTargetId : void 0;
408
- const parsedPositionalTarget = parseHardwareRuntimeId(normalizedPositionalTargetId);
409
- const parsedCommonInteraction = parseHardwareRuntimeId(normalizedCommonInteractionId);
410
- if (normalizedPositionalTargetId && hasHardwareRuntimeIdPrefix(normalizedPositionalTargetId) && !parsedPositionalTarget) {
411
- return failure(10002 /* InvalidParams */, "Invalid hardware operation target id");
412
- }
413
- if (_optionalChain([parsedPositionalTarget, 'optionalAccess', _15 => _15.kind]) === "connector-session") {
414
- return failure(
415
- 10002 /* InvalidParams */,
416
- "Hardware connector session id cannot be used as an operation target"
417
- );
418
- }
419
- if (normalizedCommonInteractionId && _optionalChain([parsedCommonInteraction, 'optionalAccess', _16 => _16.kind]) !== "interaction") {
420
- return failure(10002 /* InvalidParams */, "Invalid hardware interaction id");
421
- }
422
- if (expectedVendor && (parsedPositionalTarget && parsedPositionalTarget.vendor !== expectedVendor || parsedCommonInteraction && parsedCommonInteraction.vendor !== expectedVendor)) {
423
- return failure(
424
- 10002 /* InvalidParams */,
425
- `Hardware interaction does not belong to ${expectedVendor}`
426
- );
427
- }
428
- if (positionalInteractionId && normalizedCommonInteractionId && positionalInteractionId !== normalizedCommonInteractionId) {
429
- return failure(10002 /* InvalidParams */, "Conflicting hardware interaction ids", {
430
- positionalInteractionId,
431
- commonInteractionId: normalizedCommonInteractionId
432
- });
433
- }
434
- const interactionId = _nullishCoalesce(normalizedCommonInteractionId, () => ( positionalInteractionId));
435
- return success({
436
- interactionId,
437
- targetId: _nullishCoalesce(interactionId, () => ( normalizedPositionalTargetId))
438
- });
439
- }
440
-
441
178
  // src/types/connector.ts
442
179
  var EConnectorInteraction = /* @__PURE__ */ ((EConnectorInteraction2) => {
443
180
  EConnectorInteraction2["Searching"] = "searching";
@@ -453,7 +190,7 @@ function createBridgedConnector(vendor, connectionType, bridge) {
453
190
  return {
454
191
  connectionType,
455
192
  searchDevices: (options) => bridge.searchDevices({ vendor, options }),
456
- connect: (deviceId, options) => bridge.connect({ vendor, deviceId, ...options ? { options } : {} }),
193
+ connect: (deviceId) => bridge.connect({ vendor, deviceId }),
457
194
  disconnect: (sessionId) => bridge.disconnect({ vendor, sessionId }),
458
195
  call: (sessionId, method, callParams) => bridge.call({ vendor, sessionId, method, callParams }),
459
196
  cancel: (sessionId) => bridge.cancel({ vendor, sessionId }),
@@ -474,14 +211,14 @@ function createBridgedConnector(vendor, connectionType, bridge) {
474
211
  },
475
212
  off: (event, handler) => {
476
213
  const inner = handlerMap.get(event);
477
- const bridgeHandler = _optionalChain([inner, 'optionalAccess', _17 => _17.get, 'call', _18 => _18(handler)]);
214
+ const bridgeHandler = _optionalChain([inner, 'optionalAccess', _ => _.get, 'call', _2 => _2(handler)]);
478
215
  if (!bridgeHandler || !inner) return;
479
216
  bridge.offEvent({ vendor }, bridgeHandler);
480
217
  inner.delete(handler);
481
218
  if (inner.size === 0) handlerMap.delete(event);
482
219
  },
483
220
  reset: () => bridge.reset({ vendor }),
484
- configure: bridge.configure ? (config) => _optionalChain([bridge, 'access', _19 => _19.configure, 'optionalCall', _20 => _20({ vendor, config })]) : void 0,
221
+ configure: bridge.configure ? (config) => _optionalChain([bridge, 'access', _3 => _3.configure, 'optionalCall', _4 => _4({ vendor, config })]) : void 0,
485
222
  setKnownCredentials: bridge.setKnownCredentials ? (credentials) => bridge.setKnownCredentials({ vendor, credentials }) : void 0
486
223
  };
487
224
  }
@@ -550,13 +287,13 @@ function isDeviceUnavailableError(error) {
550
287
  return false;
551
288
  }
552
289
  function combinedDeviceNotFoundError(message) {
553
- return _chunkIZEVYMJKjs.createHwkError.call(void 0, {
290
+ return _chunkSZZF623Rjs.createHwkError.call(void 0, {
554
291
  code: 10100 /* DeviceNotFound */,
555
292
  message
556
293
  });
557
294
  }
558
295
  function combinedSessionNotFoundError(message) {
559
- return _chunkIZEVYMJKjs.createHwkError.call(void 0, {
296
+ return _chunkSZZF623Rjs.createHwkError.call(void 0, {
560
297
  code: 10101 /* DeviceDisconnected */,
561
298
  message
562
299
  });
@@ -585,7 +322,7 @@ function createCombinedConnector(connectors) {
585
322
  };
586
323
  const broadcastCredentials = async () => {
587
324
  await Promise.all(
588
- connectors.map((child) => Promise.resolve(_optionalChain([child, 'access', _21 => _21.setKnownCredentials, 'optionalCall', _22 => _22(sharedCredentials)])))
325
+ connectors.map((child) => Promise.resolve(_optionalChain([child, 'access', _5 => _5.setKnownCredentials, 'optionalCall', _6 => _6(sharedCredentials)])))
589
326
  );
590
327
  };
591
328
  for (const child of connectors) {
@@ -594,14 +331,10 @@ function createCombinedConnector(connectors) {
594
331
  });
595
332
  }
596
333
  const searchDevices = async (options = {}) => {
597
- const selectedConnectors = connectors.map((child, index) => ({ child, index })).filter(
598
- ({ child }) => !options.transportType || child.connectionType === options.transportType
599
- );
600
- if (!selectedConnectors.length) return [];
601
334
  const perConnector = [];
602
- await new Promise((resolve, reject) => {
335
+ await new Promise((resolve) => {
603
336
  let finished = false;
604
- let remaining = selectedConnectors.length;
337
+ let remaining = connectors.length;
605
338
  let settleTimer;
606
339
  const finish = () => {
607
340
  if (finished) return;
@@ -609,20 +342,19 @@ function createCombinedConnector(connectors) {
609
342
  if (settleTimer) clearTimeout(settleTimer);
610
343
  resolve();
611
344
  };
612
- selectedConnectors.forEach(({ child, index }) => {
613
- void child.searchDevices(options.purpose ? { purpose: options.purpose } : void 0).then(
345
+ connectors.forEach((child, index) => {
346
+ void child.searchDevices().then(
614
347
  (devices) => devices.map((device) => ({
615
348
  ...device,
616
349
  connectionType: _nullishCoalesce(device.connectionType, () => ( child.connectionType))
617
350
  }))
618
- ).catch((error) => {
619
- if (options.transportType) {
620
- finished = true;
621
- if (settleTimer) clearTimeout(settleTimer);
622
- reject(error);
623
- }
624
- return [];
625
- }).then((devices) => {
351
+ ).catch(
352
+ () => (
353
+ // A transport that can't scan (powered off, unauthorized, absent)
354
+ // must not fail the whole fused search.
355
+ []
356
+ )
357
+ ).then((devices) => {
626
358
  remaining -= 1;
627
359
  if (!finished) {
628
360
  perConnector.push({ index, devices });
@@ -639,12 +371,7 @@ function createCombinedConnector(connectors) {
639
371
  });
640
372
  });
641
373
  perConnector.sort((a, b) => a.index - b.index);
642
- if (!options.transportType) deviceOwner.clear();
643
- else {
644
- for (const [id, owner] of deviceOwner) {
645
- if (owner.connectionType === options.transportType) deviceOwner.delete(id);
646
- }
647
- }
374
+ deviceOwner.clear();
648
375
  const merged = [];
649
376
  perConnector.forEach(({ index, devices }) => {
650
377
  for (const device of devices) {
@@ -654,11 +381,11 @@ function createCombinedConnector(connectors) {
654
381
  });
655
382
  return merged.sort((a, b) => rank(a) - rank(b));
656
383
  };
657
- const resolveOwner = async (deviceId, transportType) => {
658
- if (deviceId && deviceOwner.has(deviceId) && (!transportType || _optionalChain([deviceOwner, 'access', _23 => _23.get, 'call', _24 => _24(deviceId), 'optionalAccess', _25 => _25.connectionType]) === transportType)) {
384
+ const resolveOwner = async (deviceId) => {
385
+ if (deviceId && deviceOwner.has(deviceId)) {
659
386
  return { owner: deviceOwner.get(deviceId), deviceId };
660
387
  }
661
- const devices = await searchDevices({ waitForAll: Boolean(deviceId), transportType });
388
+ const devices = await searchDevices({ waitForAll: Boolean(deviceId) });
662
389
  if (deviceId) {
663
390
  const owner = deviceOwner.get(deviceId);
664
391
  if (!owner)
@@ -669,14 +396,13 @@ function createCombinedConnector(connectors) {
669
396
  if (!first) throw combinedDeviceNotFoundError("Combined connector: no devices found");
670
397
  return { owner: deviceOwner.get(first.connectId), deviceId: first.connectId };
671
398
  };
672
- const connectByExplicitId = async (deviceId, transportType) => {
399
+ const connectByExplicitId = async (deviceId) => {
673
400
  const cachedOwner = deviceOwner.get(deviceId);
674
- if (cachedOwner && (!transportType || cachedOwner.connectionType === transportType)) {
401
+ if (cachedOwner) {
675
402
  return { session: await cachedOwner.connect(deviceId), owner: cachedOwner };
676
403
  }
677
404
  let lastError;
678
405
  for (const child of connectors) {
679
- if (transportType && child.connectionType !== transportType) continue;
680
406
  try {
681
407
  const session = await child.connect(deviceId);
682
408
  deviceOwner.set(deviceId, child);
@@ -689,7 +415,7 @@ function createCombinedConnector(connectors) {
689
415
  }
690
416
  }
691
417
  const message = lastError instanceof Error ? lastError.message : `Combined connector: device not found: ${deviceId}`;
692
- throw _chunkIZEVYMJKjs.createHwkError.call(void 0, {
418
+ throw _chunkSZZF623Rjs.createHwkError.call(void 0, {
693
419
  code: 10100 /* DeviceNotFound */,
694
420
  message
695
421
  });
@@ -698,15 +424,14 @@ function createCombinedConnector(connectors) {
698
424
  // Nominal value only — the per-device `connectionType` is authoritative
699
425
  // for a fused connector.
700
426
  connectionType: connectors[0].connectionType,
701
- availableTransports: [...new Set(connectors.map((child) => child.connectionType))],
702
- searchDevices: (options) => searchDevices(options),
703
- connect: async (deviceId, options) => {
427
+ searchDevices: (options) => searchDevices({ waitForAll: _optionalChain([options, 'optionalAccess', _7 => _7.waitForAll]) }),
428
+ connect: async (deviceId) => {
704
429
  let owner;
705
430
  let session;
706
431
  if (deviceId) {
707
- ({ session, owner } = await connectByExplicitId(deviceId, _optionalChain([options, 'optionalAccess', _26 => _26.transportType])));
432
+ ({ session, owner } = await connectByExplicitId(deviceId));
708
433
  } else {
709
- const resolved = await resolveOwner(void 0, _optionalChain([options, 'optionalAccess', _27 => _27.transportType]));
434
+ const resolved = await resolveOwner();
710
435
  owner = resolved.owner;
711
436
  session = await owner.connect(resolved.deviceId);
712
437
  }
@@ -749,7 +474,7 @@ function createCombinedConnector(connectors) {
749
474
  },
750
475
  off: (event, handler) => {
751
476
  const inner = forwarders.get(event);
752
- const attached = _optionalChain([inner, 'optionalAccess', _28 => _28.get, 'call', _29 => _29(handler)]);
477
+ const attached = _optionalChain([inner, 'optionalAccess', _8 => _8.get, 'call', _9 => _9(handler)]);
753
478
  if (!attached || !inner) return;
754
479
  for (const { child, handler: forward } of attached) {
755
480
  child.off(event, forward);
@@ -764,7 +489,7 @@ function createCombinedConnector(connectors) {
764
489
  forwarders.clear();
765
490
  },
766
491
  configure: connectors.some((c) => c.configure) ? async (config) => {
767
- await Promise.all(connectors.map((child) => Promise.resolve(_optionalChain([child, 'access', _30 => _30.configure, 'optionalCall', _31 => _31(config)]))));
492
+ await Promise.all(connectors.map((child) => Promise.resolve(_optionalChain([child, 'access', _10 => _10.configure, 'optionalCall', _11 => _11(config)]))));
768
493
  deviceOwner.clear();
769
494
  sessionOwner.clear();
770
495
  } : void 0,
@@ -808,134 +533,10 @@ var TypedEventEmitter = class {
808
533
  }
809
534
  /** Number of listeners registered for `event`. 0 if none. */
810
535
  listenerCount(event) {
811
- return _nullishCoalesce(_optionalChain([this, 'access', _32 => _32._listeners, 'access', _33 => _33.get, 'call', _34 => _34(event), 'optionalAccess', _35 => _35.size]), () => ( 0));
536
+ return _nullishCoalesce(_optionalChain([this, 'access', _12 => _12._listeners, 'access', _13 => _13.get, 'call', _14 => _14(event), 'optionalAccess', _15 => _15.size]), () => ( 0));
812
537
  }
813
538
  };
814
539
 
815
- // src/utils/requestSaveDeviceBinding.ts
816
- async function requestSaveDeviceBinding(emitter, registry, binding, signal) {
817
- const type = _chunkRRCFH7X6js.UI_REQUEST.REQUEST_SAVE_DEVICE_BINDING;
818
- if (!emitter.listenerCount(type)) return false;
819
- if (_optionalChain([signal, 'optionalAccess', _36 => _36.aborted])) throw signal.reason;
820
- const requestId = registry.createRequestId();
821
- const pending = registry.wait(type, { requestId });
822
- void pending.catch(() => void 0);
823
- const cancel = () => registry.cancel(type, requestId);
824
- _optionalChain([signal, 'optionalAccess', _37 => _37.addEventListener, 'call', _38 => _38("abort", cancel, { once: true })]);
825
- try {
826
- emitter.emit(type, { type, payload: { ...binding, requestId } });
827
- const response = await pending;
828
- if (_optionalChain([signal, 'optionalAccess', _39 => _39.aborted])) throw signal.reason;
829
- if (_optionalChain([response, 'optionalAccess', _40 => _40.saved]) !== true) {
830
- throw _chunkIZEVYMJKjs.createHwkError.call(void 0, {
831
- code: 1e4 /* UnknownError */,
832
- message: "Verified device binding could not be saved"
833
- });
834
- }
835
- emitter.emit(_chunkRRCFH7X6js.UI_REQUEST.DEVICE_BINDING_STATUS, {
836
- type: _chunkRRCFH7X6js.UI_REQUEST.DEVICE_BINDING_STATUS,
837
- payload: { selectionRequestId: binding.selectionRequestId, status: "saved" }
838
- });
839
- return true;
840
- } catch (error) {
841
- emitter.emit(_chunkRRCFH7X6js.UI_REQUEST.DEVICE_BINDING_STATUS, {
842
- type: _chunkRRCFH7X6js.UI_REQUEST.DEVICE_BINDING_STATUS,
843
- payload: {
844
- selectionRequestId: binding.selectionRequestId,
845
- status: _optionalChain([signal, 'optionalAccess', _41 => _41.aborted]) ? "cancelled" : "failed"
846
- }
847
- });
848
- throw error;
849
- } finally {
850
- _optionalChain([signal, 'optionalAccess', _42 => _42.removeEventListener, 'call', _43 => _43("abort", cancel)]);
851
- registry.cancel(type, requestId);
852
- }
853
- }
854
-
855
- // src/utils/requestBleDeviceSelection.ts
856
- async function requestBleDeviceSelection({
857
- emitter,
858
- registry,
859
- request,
860
- scan,
861
- signal,
862
- pollIntervalMs = 1500
863
- }) {
864
- const type = _chunkRRCFH7X6js.UI_REQUEST.REQUEST_SELECT_DEVICE;
865
- if (signal.aborted) throw signal.reason;
866
- if (!emitter.listenerCount(type)) {
867
- throw _chunkIZEVYMJKjs.createHwkError.call(void 0, {
868
- code: 10100 /* DeviceNotFound */,
869
- message: "Select a Bluetooth device before continuing"
870
- });
871
- }
872
- const requestId = registry.createRequestId();
873
- let { devices } = request;
874
- let stopped = false;
875
- let timer;
876
- let wake;
877
- const stop = () => {
878
- stopped = true;
879
- if (timer !== void 0) clearTimeout(timer);
880
- _optionalChain([wake, 'optionalCall', _44 => _44()]);
881
- };
882
- const waitForNextScan = () => new Promise((resolve) => {
883
- wake = resolve;
884
- timer = setTimeout(resolve, pollIntervalMs);
885
- if (stopped) resolve();
886
- });
887
- const cancel = () => registry.cancel(type, requestId);
888
- const reply = registry.wait(type, { requestId }).finally(stop);
889
- void reply.catch(() => void 0);
890
- const publish = () => emitter.emit(type, {
891
- type,
892
- payload: { ...request, devices, requestId, scanning: true }
893
- });
894
- signal.addEventListener("abort", cancel, { once: true });
895
- let polling;
896
- try {
897
- publish();
898
- polling = (async () => {
899
- await Promise.resolve();
900
- while (!stopped) {
901
- const snapshot = await scan();
902
- if (stopped || signal.aborted) return;
903
- devices = snapshot;
904
- publish();
905
- if (stopped) return;
906
- await waitForNextScan();
907
- }
908
- })();
909
- const selected = await Promise.race([reply, polling.then(() => reply)]);
910
- stop();
911
- await polling;
912
- if (signal.aborted) throw signal.reason;
913
- const device = devices.find((candidate) => candidate.connectId === selected.sdkConnectId);
914
- if (!device) {
915
- throw _chunkIZEVYMJKjs.createHwkError.call(void 0, {
916
- code: 10100 /* DeviceNotFound */,
917
- message: "Selected Bluetooth device is no longer available"
918
- });
919
- }
920
- emitter.emit(_chunkRRCFH7X6js.UI_REQUEST.DEVICE_BINDING_STATUS, {
921
- type: _chunkRRCFH7X6js.UI_REQUEST.DEVICE_BINDING_STATUS,
922
- payload: { selectionRequestId: requestId, status: "verifying" }
923
- });
924
- return { device, requestId };
925
- } catch (error) {
926
- emitter.emit(_chunkRRCFH7X6js.UI_REQUEST.DEVICE_BINDING_STATUS, {
927
- type: _chunkRRCFH7X6js.UI_REQUEST.DEVICE_BINDING_STATUS,
928
- payload: { selectionRequestId: requestId, status: signal.aborted ? "cancelled" : "failed" }
929
- });
930
- throw error;
931
- } finally {
932
- stop();
933
- signal.removeEventListener("abort", cancel);
934
- registry.cancel(type, requestId);
935
- await _optionalChain([polling, 'optionalAccess', _45 => _45.catch, 'call', _46 => _46(() => void 0)]);
936
- }
937
- }
938
-
939
540
  // src/utils/semver.ts
940
541
  function compareSemver(a, b) {
941
542
  const pa = a.split(".").map(Number);
@@ -963,97 +564,15 @@ function padHex64(hex) {
963
564
  function hexToBytes(hex) {
964
565
  return _utils.hexToBytes.call(void 0, stripHex(hex));
965
566
  }
966
- function bytesToHex3(bytes) {
567
+ function bytesToHex2(bytes) {
967
568
  return _utils.bytesToHex.call(void 0, bytes);
968
569
  }
969
570
 
970
- // src/utils/solanaOffchainMessage.ts
971
- var SOLANA_OFFCHAIN_SIGNING_DOMAIN = Uint8Array.of(
972
- 255,
973
- ...Array.from("solana offchain", (character) => character.charCodeAt(0))
974
- );
975
- var SOLANA_PUBLIC_KEY_LENGTH = 32;
976
- var MAX_SOLANA_OFFCHAIN_SIGNERS = 255;
977
- function compareBytes(a, b) {
978
- for (let index = 0; index < a.length; index += 1) {
979
- const difference = (_nullishCoalesce(a[index], () => ( 0))) - (_nullishCoalesce(b[index], () => ( 0)));
980
- if (difference !== 0) return difference;
981
- }
982
- return a.length - b.length;
983
- }
984
- function bytesEqual(a, b) {
985
- return a.length === b.length && a.every((value, index) => value === b[index]);
986
- }
987
- function decodeUtf8Strict(bytes) {
988
- let encoded = "";
989
- for (const value of bytes) {
990
- encoded += `%${value.toString(16).padStart(2, "0")}`;
991
- }
992
- return decodeURIComponent(encoded);
993
- }
994
- function prepareSolanaOffchainMessageV1({
995
- message,
996
- requiredSigners
997
- }) {
998
- if (message.length === 0) {
999
- throw new Error("Solana off-chain message cannot be empty");
1000
- }
1001
- if (requiredSigners.length === 0 || requiredSigners.length > MAX_SOLANA_OFFCHAIN_SIGNERS) {
1002
- throw new Error("Solana off-chain message requires between 1 and 255 signers");
1003
- }
1004
- let messageText;
1005
- try {
1006
- messageText = decodeUtf8Strict(message);
1007
- } catch (e3) {
1008
- throw new Error("Solana off-chain message must contain valid UTF-8");
1009
- }
1010
- const signerBytes = requiredSigners.map((signer, index) => {
1011
- let bytes;
1012
- try {
1013
- bytes = hexToBytes(signer);
1014
- } catch (e4) {
1015
- throw new Error(`Solana off-chain signer ${index} must be a hex public key`);
1016
- }
1017
- if (bytes.length !== SOLANA_PUBLIC_KEY_LENGTH) {
1018
- throw new Error(`Solana off-chain signer ${index} must be 32 bytes`);
1019
- }
1020
- return bytes;
1021
- });
1022
- signerBytes.sort(compareBytes);
1023
- for (let index = 1; index < signerBytes.length; index += 1) {
1024
- if (bytesEqual(signerBytes[index - 1], signerBytes[index])) {
1025
- throw new Error("Solana off-chain signers must be unique");
1026
- }
1027
- }
1028
- const serializedMessage = new Uint8Array(
1029
- SOLANA_OFFCHAIN_SIGNING_DOMAIN.length + 2 + signerBytes.length * SOLANA_PUBLIC_KEY_LENGTH + message.length
1030
- );
1031
- let offset = 0;
1032
- serializedMessage.set(SOLANA_OFFCHAIN_SIGNING_DOMAIN, offset);
1033
- offset += SOLANA_OFFCHAIN_SIGNING_DOMAIN.length;
1034
- serializedMessage[offset] = 1;
1035
- offset += 1;
1036
- serializedMessage[offset] = signerBytes.length;
1037
- offset += 1;
1038
- for (const signer of signerBytes) {
1039
- serializedMessage.set(signer, offset);
1040
- offset += SOLANA_PUBLIC_KEY_LENGTH;
1041
- }
1042
- serializedMessage.set(message, offset);
1043
- return {
1044
- messageText,
1045
- requiredSigners: signerBytes.map(bytesToHex3),
1046
- serializedMessage
1047
- };
1048
- }
1049
-
1050
571
  // src/utils/deviceIdentity.ts
1051
572
  var ONEKEY_BLE_SERVICE_UUID = "00000001-0000-1000-8000-00805f9b34fb";
1052
573
  var TREZOR_BLE_SERVICE_UUID = "8c000001-a59b-4d58-a9ad-073df69fa1b1";
1053
574
  var LEDGER_USB_VENDOR_ID = 11415;
1054
- var KEYSTONE_USB_VENDOR_ID = 4617;
1055
- var KEYSTONE_USB_PRODUCT_ID = 12289;
1056
- var lower = (value) => _nullishCoalesce(_optionalChain([value, 'optionalAccess', _47 => _47.trim, 'call', _48 => _48(), 'access', _49 => _49.toLowerCase, 'call', _50 => _50()]), () => ( ""));
575
+ var lower = (value) => _nullishCoalesce(_optionalChain([value, 'optionalAccess', _16 => _16.trim, 'call', _17 => _17(), 'access', _18 => _18.toLowerCase, 'call', _19 => _19()]), () => ( ""));
1057
576
  var hasServiceUuid = (input, uuid) => {
1058
577
  const expected = uuid.toLowerCase();
1059
578
  const values = [
@@ -1075,11 +594,6 @@ function detectHardwareVendorFromDescriptor(input) {
1075
594
  if (typeof input.vendor === "number" && input.vendor === LEDGER_USB_VENDOR_ID || input.vendorId === LEDGER_USB_VENDOR_ID || manufacturerName.includes("ledger")) {
1076
595
  return "ledger";
1077
596
  }
1078
- const usbVendorId = typeof input.vendor === "number" ? input.vendor : input.vendorId;
1079
- const usbProductId = typeof input.product === "number" ? input.product : input.productId;
1080
- if (usbVendorId === KEYSTONE_USB_VENDOR_ID && usbProductId === KEYSTONE_USB_PRODUCT_ID || manufacturerName.includes("keystone")) {
1081
- return "keystone";
1082
- }
1083
597
  return void 0;
1084
598
  }
1085
599
  function isKnownNonTargetHardwareVendor(input, targetVendor) {
@@ -1096,69 +610,35 @@ async function batchCall(params, callFn, onProgress) {
1096
610
  return result;
1097
611
  }
1098
612
  results.push(result.payload);
1099
- _optionalChain([onProgress, 'optionalCall', _51 => _51({ index: i, total: params.length })]);
613
+ _optionalChain([onProgress, 'optionalCall', _20 => _20({ index: i, total: params.length })]);
1100
614
  }
1101
615
  return { success: true, payload: results };
1102
616
  }
1103
617
 
1104
618
  // src/utils/methodCatalog.ts
1105
619
  var HARDWARE_METHOD_CATALOG = {
1106
- evmGetAddress: { chain: "evm", allNetwork: true, replayAfterTransportFailure: "safe" },
1107
- evmSignTransaction: {
1108
- chain: "evm",
1109
- allNetwork: false,
1110
- replayAfterTransportFailure: "unsafe"
1111
- },
1112
- evmSignMessage: { chain: "evm", allNetwork: false, replayAfterTransportFailure: "unsafe" },
1113
- evmSignTypedData: { chain: "evm", allNetwork: false, replayAfterTransportFailure: "unsafe" },
1114
- btcGetAddress: { chain: "btc", allNetwork: true, replayAfterTransportFailure: "safe" },
1115
- btcGetPublicKey: { chain: "btc", allNetwork: true, replayAfterTransportFailure: "safe" },
1116
- btcSignTransaction: {
1117
- chain: "btc",
1118
- allNetwork: false,
1119
- replayAfterTransportFailure: "unsafe"
1120
- },
1121
- btcSignPsbt: { chain: "btc", allNetwork: false, replayAfterTransportFailure: "unsafe" },
1122
- btcSignMessage: { chain: "btc", allNetwork: false, replayAfterTransportFailure: "unsafe" },
1123
- btcGetMasterFingerprint: {
1124
- chain: "btc",
1125
- allNetwork: false,
1126
- replayAfterTransportFailure: "safe"
1127
- },
1128
- solGetAddress: { chain: "sol", allNetwork: true, replayAfterTransportFailure: "safe" },
1129
- solSignTransaction: {
1130
- chain: "sol",
1131
- allNetwork: false,
1132
- replayAfterTransportFailure: "unsafe"
1133
- },
1134
- solSignMessage: { chain: "sol", allNetwork: false, replayAfterTransportFailure: "unsafe" },
1135
- tronGetAddress: { chain: "tron", allNetwork: true, replayAfterTransportFailure: "safe" },
1136
- tronSignTransaction: {
1137
- chain: "tron",
1138
- allNetwork: false,
1139
- replayAfterTransportFailure: "unsafe"
1140
- },
1141
- tronSignMessage: { chain: "tron", allNetwork: false, replayAfterTransportFailure: "unsafe" },
1142
- zcashGetFullViewingKey: {
1143
- chain: "zcash",
1144
- allNetwork: false,
1145
- replayAfterTransportFailure: "safe"
1146
- },
1147
- zcashGetShieldedAddress: {
1148
- chain: "zcash",
1149
- allNetwork: false,
1150
- replayAfterTransportFailure: "safe"
1151
- }
620
+ evmGetAddress: { chain: "evm", allNetwork: true },
621
+ evmSignTransaction: { chain: "evm", allNetwork: false },
622
+ evmSignMessage: { chain: "evm", allNetwork: false },
623
+ evmSignTypedData: { chain: "evm", allNetwork: false },
624
+ btcGetAddress: { chain: "btc", allNetwork: true },
625
+ btcGetPublicKey: { chain: "btc", allNetwork: true },
626
+ btcSignTransaction: { chain: "btc", allNetwork: false },
627
+ btcSignPsbt: { chain: "btc", allNetwork: false },
628
+ btcSignMessage: { chain: "btc", allNetwork: false },
629
+ btcGetMasterFingerprint: { chain: "btc", allNetwork: false },
630
+ solGetAddress: { chain: "sol", allNetwork: true },
631
+ solSignTransaction: { chain: "sol", allNetwork: false },
632
+ solSignMessage: { chain: "sol", allNetwork: false },
633
+ tronGetAddress: { chain: "tron", allNetwork: true },
634
+ tronSignTransaction: { chain: "tron", allNetwork: false },
635
+ tronSignMessage: { chain: "tron", allNetwork: false }
1152
636
  };
1153
637
  var ALL_NETWORK_METHOD_NAMES = Object.entries(HARDWARE_METHOD_CATALOG).filter(([, metadata]) => metadata.allNetwork).map(([method]) => method);
1154
638
  var ALL_NETWORK_METHOD_SET = new Set(ALL_NETWORK_METHOD_NAMES);
1155
639
  function getHardwareMethodMetadata(method) {
1156
640
  return HARDWARE_METHOD_CATALOG[method];
1157
641
  }
1158
- var SAFE_NON_CHAIN_METHODS = /* @__PURE__ */ new Set(["getFeatures", "authenticateDevice"]);
1159
- function canReplayHardwareMethodAfterTransportFailure(method) {
1160
- return _optionalChain([getHardwareMethodMetadata, 'call', _52 => _52(method), 'optionalAccess', _53 => _53.replayAfterTransportFailure]) === "safe" || SAFE_NON_CHAIN_METHODS.has(method);
1161
- }
1162
642
  function isAllNetworkMethodName(method) {
1163
643
  return ALL_NETWORK_METHOD_SET.has(method);
1164
644
  }
@@ -1186,7 +666,7 @@ async function runAllNetworkGetAddress({
1186
666
  continue;
1187
667
  }
1188
668
  const method = item.methodName;
1189
- const unsupportedNetwork = _optionalChain([buildUnsupportedNetworkResponse, 'optionalCall', _54 => _54(item, method)]);
669
+ const unsupportedNetwork = _optionalChain([buildUnsupportedNetworkResponse, 'optionalCall', _21 => _21(item, method)]);
1190
670
  if (unsupportedNetwork) {
1191
671
  responses.push(unsupportedNetwork);
1192
672
  continue;
@@ -1286,27 +766,5 @@ var DEVICE_CONNECT_RETRY_DELAY_MS = 1e3;
1286
766
 
1287
767
 
1288
768
 
1289
-
1290
-
1291
-
1292
-
1293
-
1294
-
1295
-
1296
-
1297
-
1298
-
1299
-
1300
-
1301
-
1302
-
1303
-
1304
-
1305
-
1306
-
1307
-
1308
-
1309
-
1310
-
1311
- exports.ALL_NETWORK_METHOD_NAMES = ALL_NETWORK_METHOD_NAMES; exports.CHAIN_FINGERPRINT_PATHS = CHAIN_FINGERPRINT_PATHS; exports.DEVICE = DEVICE; exports.DEVICE_CONNECT_RETRY_DELAY_MS = DEVICE_CONNECT_RETRY_DELAY_MS; exports.DEVICE_EVENT = DEVICE_EVENT; exports.DeviceJobQueue = DeviceJobQueue; exports.EConnectorInteraction = EConnectorInteraction; exports.HARDWARE_METHOD_CATALOG = HARDWARE_METHOD_CATALOG; exports.HARDWARE_RUNTIME_ID_PREFIX = HARDWARE_RUNTIME_ID_PREFIX; exports.HardwareErrorCode = _chunkIZEVYMJKjs.HardwareErrorCode; exports.INTERACTION_DEFAULT_TTL_MS = INTERACTION_DEFAULT_TTL_MS; exports.InteractionRegistry = InteractionRegistry; exports.ORPHAN_ELIGIBLE_ERROR_CODES = _chunkIZEVYMJKjs.ORPHAN_ELIGIBLE_ERROR_CODES; exports.SDK = SDK; exports.TypedEventEmitter = TypedEventEmitter; exports.UI_EVENT = _chunkRRCFH7X6js.UI_EVENT; exports.UI_REQUEST = _chunkRRCFH7X6js.UI_REQUEST; exports.UI_REQUEST_CANCELLED_TAG = _chunkRRCFH7X6js.UI_REQUEST_CANCELLED_TAG; exports.UI_REQUEST_DEFAULT_TIMEOUT_MS = _chunkRRCFH7X6js.UI_REQUEST_DEFAULT_TIMEOUT_MS; exports.UI_REQUEST_PREEMPTED_TAG = _chunkRRCFH7X6js.UI_REQUEST_PREEMPTED_TAG; exports.UI_REQUEST_TIMEOUT_TAG = _chunkRRCFH7X6js.UI_REQUEST_TIMEOUT_TAG; exports.UI_RESPONSE = _chunkRRCFH7X6js.UI_RESPONSE; exports.UiRequestRegistry = _chunkRRCFH7X6js.UiRequestRegistry; exports.batchCall = batchCall; exports.buildUnsupportedMethodResponse = buildUnsupportedMethodResponse; exports.bytesToHex = bytesToHex3; exports.canReplayHardwareMethodAfterTransportFailure = canReplayHardwareMethodAfterTransportFailure; exports.compareSemver = compareSemver; exports.createBridgedConnector = createBridgedConnector; exports.createCombinedConnector = createCombinedConnector; exports.createHardwareConnectorSessionId = createHardwareConnectorSessionId; exports.createHardwareInteractionId = createHardwareInteractionId; exports.createHardwareSearchTargetId = createHardwareSearchTargetId; exports.createHwkError = _chunkIZEVYMJKjs.createHwkError; exports.defaultOriginForCode = _chunkIZEVYMJKjs.defaultOriginForCode; exports.defaultRecoveryForCode = _chunkIZEVYMJKjs.defaultRecoveryForCode; exports.deriveDeviceFingerprint = deriveDeviceFingerprint; exports.deriveWalletId = deriveWalletId; exports.detectHardwareVendorFromDescriptor = detectHardwareVendorFromDescriptor; exports.enrichErrorMessage = _chunk7SFFS2NLjs.enrichErrorMessage; exports.ensure0x = ensure0x; exports.failure = failure; exports.getAllNetworkMethodChain = getAllNetworkMethodChain; exports.getHardwareMethodMetadata = getHardwareMethodMetadata; exports.hasHardwareRuntimeIdPrefix = hasHardwareRuntimeIdPrefix; exports.hexToBytes = hexToBytes; exports.isAllNetworkMethodName = isAllNetworkMethodName; exports.isHardwareInteractionId = isHardwareInteractionId; exports.isHardwareSearchTargetId = isHardwareSearchTargetId; exports.isHwkRecoveryHint = _chunkIZEVYMJKjs.isHwkRecoveryHint; exports.isKnownNonTargetHardwareVendor = isKnownNonTargetHardwareVendor; exports.operationMayHaveCompletedParams = _chunkIZEVYMJKjs.operationMayHaveCompletedParams; exports.padHex64 = padHex64; exports.parseBip32MasterFingerprint = parseBip32MasterFingerprint; exports.parseHardwareRuntimeId = parseHardwareRuntimeId; exports.prepareSolanaOffchainMessageV1 = prepareSolanaOffchainMessageV1; exports.rehydrateConnectorError = rehydrateConnectorError; exports.requestBleDeviceSelection = requestBleDeviceSelection; exports.requestSaveDeviceBinding = requestSaveDeviceBinding; exports.resolveHardwareOperationTarget = resolveHardwareOperationTarget; exports.resolveSearchTargetReusePolicy = resolveSearchTargetReusePolicy; exports.runAllNetworkGetAddress = runAllNetworkGetAddress; exports.serializeConnectorError = serializeConnectorError; exports.stripHex = stripHex; exports.success = success;
769
+ exports.ALL_NETWORK_METHOD_NAMES = ALL_NETWORK_METHOD_NAMES; exports.CHAIN_FINGERPRINT_PATHS = CHAIN_FINGERPRINT_PATHS; exports.DEVICE = DEVICE; exports.DEVICE_CONNECT_RETRY_DELAY_MS = DEVICE_CONNECT_RETRY_DELAY_MS; exports.DEVICE_EVENT = DEVICE_EVENT; exports.DeviceJobQueue = DeviceJobQueue; exports.EConnectorInteraction = EConnectorInteraction; exports.HARDWARE_METHOD_CATALOG = HARDWARE_METHOD_CATALOG; exports.HardwareErrorCode = _chunkSZZF623Rjs.HardwareErrorCode; exports.ORPHAN_ELIGIBLE_ERROR_CODES = _chunkSZZF623Rjs.ORPHAN_ELIGIBLE_ERROR_CODES; exports.SDK = SDK; exports.TypedEventEmitter = TypedEventEmitter; exports.UI_EVENT = _chunkBAGEFFFYjs.UI_EVENT; exports.UI_REQUEST = _chunkBAGEFFFYjs.UI_REQUEST; exports.UI_REQUEST_CANCELLED_TAG = _chunkBAGEFFFYjs.UI_REQUEST_CANCELLED_TAG; exports.UI_REQUEST_DEFAULT_TIMEOUT_MS = _chunkBAGEFFFYjs.UI_REQUEST_DEFAULT_TIMEOUT_MS; exports.UI_REQUEST_PREEMPTED_TAG = _chunkBAGEFFFYjs.UI_REQUEST_PREEMPTED_TAG; exports.UI_REQUEST_TIMEOUT_TAG = _chunkBAGEFFFYjs.UI_REQUEST_TIMEOUT_TAG; exports.UI_RESPONSE = _chunkBAGEFFFYjs.UI_RESPONSE; exports.UiRequestRegistry = _chunkBAGEFFFYjs.UiRequestRegistry; exports.batchCall = batchCall; exports.buildUnsupportedMethodResponse = buildUnsupportedMethodResponse; exports.bytesToHex = bytesToHex2; exports.compareSemver = compareSemver; exports.createBridgedConnector = createBridgedConnector; exports.createCombinedConnector = createCombinedConnector; exports.createHwkError = _chunkSZZF623Rjs.createHwkError; exports.deriveDeviceFingerprint = deriveDeviceFingerprint; exports.detectHardwareVendorFromDescriptor = detectHardwareVendorFromDescriptor; exports.enrichErrorMessage = _chunkSZZF623Rjs.enrichErrorMessage; exports.ensure0x = ensure0x; exports.failure = failure; exports.getAllNetworkMethodChain = getAllNetworkMethodChain; exports.getHardwareMethodMetadata = getHardwareMethodMetadata; exports.hexToBytes = hexToBytes; exports.isAllNetworkMethodName = isAllNetworkMethodName; exports.isKnownNonTargetHardwareVendor = isKnownNonTargetHardwareVendor; exports.padHex64 = padHex64; exports.rehydrateConnectorError = rehydrateConnectorError; exports.runAllNetworkGetAddress = runAllNetworkGetAddress; exports.serializeConnectorError = serializeConnectorError; exports.stripHex = stripHex; exports.success = success;
1312
770
  //# sourceMappingURL=index.js.map