@onekeyfe/hwk-adapter-core 1.2.3-alpha.1 → 1.2.3-alpha.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{chunk-72KOSYTH.mjs → chunk-E3UPXUN5.mjs} +15 -11
- package/dist/chunk-E3UPXUN5.mjs.map +1 -0
- package/dist/{chunk-KCIK56B5.mjs → chunk-ELC6PLKH.mjs} +2 -2
- package/dist/chunk-ELC6PLKH.mjs.map +1 -0
- package/dist/{chunk-RRCFH7X6.js → chunk-S7X2HM7P.js} +3 -3
- package/dist/chunk-S7X2HM7P.js.map +1 -0
- package/dist/{chunk-IZEVYMJK.js → chunk-Z3IH25KV.js} +15 -11
- package/dist/chunk-Z3IH25KV.js.map +1 -0
- package/dist/{errors-ChA_YEZY.d.ts → errors-C5GWtyVN.d.mts} +17 -9
- package/dist/{errors-ChA_YEZY.d.mts → errors-C5GWtyVN.d.ts} +17 -9
- package/dist/errors.d.mts +1 -1
- package/dist/errors.d.ts +1 -1
- package/dist/errors.js +2 -2
- package/dist/errors.mjs +1 -1
- package/dist/index.d.mts +134 -135
- package/dist/index.d.ts +134 -135
- package/dist/index.js +174 -181
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +144 -151
- package/dist/index.mjs.map +1 -1
- package/dist/{ui-events-BXI9BBpx.d.ts → ui-events-CbZdnS8a.d.mts} +10 -1
- package/dist/{ui-events-BXI9BBpx.d.mts → ui-events-CbZdnS8a.d.ts} +10 -1
- package/dist/ui-events.d.mts +1 -1
- package/dist/ui-events.d.ts +1 -1
- package/dist/ui-events.js +3 -3
- package/dist/ui-events.mjs +2 -2
- package/package.json +2 -2
- package/dist/chunk-72KOSYTH.mjs.map +0 -1
- package/dist/chunk-IZEVYMJK.js.map +0 -1
- package/dist/chunk-KCIK56B5.mjs.map +0 -1
- package/dist/chunk-RRCFH7X6.js.map +0 -1
package/dist/index.js
CHANGED
|
@@ -10,7 +10,7 @@ var _chunk7SFFS2NLjs = require('./chunk-7SFFS2NL.js');
|
|
|
10
10
|
|
|
11
11
|
|
|
12
12
|
|
|
13
|
-
var
|
|
13
|
+
var _chunkS7X2HM7Pjs = require('./chunk-S7X2HM7P.js');
|
|
14
14
|
|
|
15
15
|
|
|
16
16
|
|
|
@@ -19,7 +19,7 @@ var _chunkRRCFH7X6js = require('./chunk-RRCFH7X6.js');
|
|
|
19
19
|
|
|
20
20
|
|
|
21
21
|
|
|
22
|
-
var
|
|
22
|
+
var _chunkZ3IH25KVjs = require('./chunk-Z3IH25KV.js');
|
|
23
23
|
|
|
24
24
|
// src/types/response.ts
|
|
25
25
|
function success(payload) {
|
|
@@ -32,7 +32,7 @@ function failure(code, error, params, origin, recovery) {
|
|
|
32
32
|
error,
|
|
33
33
|
code,
|
|
34
34
|
...origin !== void 0 ? { origin } : {},
|
|
35
|
-
recovery: _nullishCoalesce(recovery, () => (
|
|
35
|
+
recovery: _nullishCoalesce(recovery, () => ( _chunkZ3IH25KVjs.defaultRecoveryForCode.call(void 0, code))),
|
|
36
36
|
...params ? { params } : {}
|
|
37
37
|
}
|
|
38
38
|
};
|
|
@@ -76,10 +76,6 @@ var DEVICE = {
|
|
|
76
76
|
DISCONNECT: "device-disconnect",
|
|
77
77
|
CHANGED: "device-changed",
|
|
78
78
|
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
79
|
/**
|
|
84
80
|
* Trezor-only. Emitted after a successful THP handshake that minted or
|
|
85
81
|
* refreshed pairing credentials. The host should persist `credentials`
|
|
@@ -99,7 +95,7 @@ var SDK = {
|
|
|
99
95
|
DEVICE_UNRESPONSIVE: "device-unresponsive",
|
|
100
96
|
DEVICE_RECOVERED: "device-recovered",
|
|
101
97
|
DEVICE_INTERACTION: "device-interaction",
|
|
102
|
-
|
|
98
|
+
OPERATION_ENDED: "operation-ended"
|
|
103
99
|
};
|
|
104
100
|
|
|
105
101
|
// src/utils/DeviceJobQueue.ts
|
|
@@ -130,12 +126,13 @@ var DeviceJobQueue = class {
|
|
|
130
126
|
abortController: ac,
|
|
131
127
|
startedAt: Date.now()
|
|
132
128
|
};
|
|
133
|
-
this._jobs.set(jobToken,
|
|
129
|
+
this._jobs.set(jobToken, activeJob);
|
|
134
130
|
const next = prev.catch(() => {
|
|
135
131
|
}).then(async () => {
|
|
136
132
|
if (this._generation !== gen) {
|
|
137
133
|
throw _nullishCoalesce(this._generationCancelReasons.get(gen), () => ( new Error("Job cancelled: queue was cleared")));
|
|
138
134
|
}
|
|
135
|
+
if (ac.signal.aborted) throw ac.signal.reason;
|
|
139
136
|
this._active = activeJob;
|
|
140
137
|
try {
|
|
141
138
|
return await job(ac.signal);
|
|
@@ -151,31 +148,27 @@ var DeviceJobQueue = class {
|
|
|
151
148
|
});
|
|
152
149
|
return next;
|
|
153
150
|
}
|
|
154
|
-
/** Cancel the
|
|
155
|
-
cancelActive(deviceId) {
|
|
151
|
+
/** Cancel the running job. `reason` becomes signal.reason. */
|
|
152
|
+
cancelActive(deviceId, reason) {
|
|
156
153
|
if (!this._active) return false;
|
|
157
154
|
if (deviceId && this._active.deviceId !== deviceId) return false;
|
|
158
|
-
this._active.abortController.abort(new Error("
|
|
155
|
+
this._active.abortController.abort(_nullishCoalesce(reason, () => ( new Error("Cancelled"))));
|
|
159
156
|
return true;
|
|
160
157
|
}
|
|
161
|
-
/** Force cancel the active job. `reason` becomes signal.reason. */
|
|
162
|
-
forceCancelActive(deviceId, reason) {
|
|
163
|
-
if (!this._active) return false;
|
|
164
|
-
if (deviceId && this._active.deviceId !== deviceId) return false;
|
|
165
|
-
this._active.abortController.abort(_nullishCoalesce(reason, () => ( new Error("Force cancelled for recovery"))));
|
|
166
|
-
return true;
|
|
167
|
-
}
|
|
168
|
-
/** Cancel the active job (alias for callers that previously needed multi-device cancel). */
|
|
169
|
-
cancelAllActive(reason) {
|
|
170
|
-
if (!this._active) return;
|
|
171
|
-
this._active.abortController.abort(_nullishCoalesce(reason, () => ( new Error("Cancelled by cancelAllActive"))));
|
|
172
|
-
}
|
|
173
158
|
/** Cancel the active job and invalidate queued jobs that have not started. */
|
|
174
159
|
cancelActiveAndPending(deviceId, reason) {
|
|
175
|
-
|
|
176
|
-
|
|
160
|
+
const cancelReason = _nullishCoalesce(reason, () => ( new Error("Cancelled by cancelActiveAndPending")));
|
|
161
|
+
if (deviceId) {
|
|
162
|
+
let cancelled = false;
|
|
163
|
+
for (const job of this._jobs.values()) {
|
|
164
|
+
if (job.deviceId === deviceId) {
|
|
165
|
+
job.abortController.abort(cancelReason);
|
|
166
|
+
cancelled = true;
|
|
167
|
+
}
|
|
168
|
+
}
|
|
169
|
+
return cancelled;
|
|
177
170
|
}
|
|
178
|
-
this.clear(
|
|
171
|
+
this.clear(cancelReason);
|
|
179
172
|
return true;
|
|
180
173
|
}
|
|
181
174
|
/** Get info about the currently active job, or null if idle. */
|
|
@@ -188,10 +181,6 @@ var DeviceJobQueue = class {
|
|
|
188
181
|
startedAt: this._active.startedAt
|
|
189
182
|
};
|
|
190
183
|
}
|
|
191
|
-
/** True if any job is currently running. */
|
|
192
|
-
isBusy() {
|
|
193
|
-
return this._jobs.size > 0;
|
|
194
|
-
}
|
|
195
184
|
clear(reason) {
|
|
196
185
|
const cancelledGeneration = this._generation;
|
|
197
186
|
this._generation++;
|
|
@@ -210,22 +199,28 @@ var DeviceJobQueue = class {
|
|
|
210
199
|
|
|
211
200
|
// src/utils/hardwareRuntimeId.ts
|
|
212
201
|
|
|
213
|
-
var HARDWARE_RUNTIME_ID_PREFIX = "hwk:runtime
|
|
202
|
+
var HARDWARE_RUNTIME_ID_PREFIX = "hwk:runtime";
|
|
214
203
|
var RANDOM_ID_BYTES = 16;
|
|
215
204
|
var RANDOM_ID_PATTERN = /^[0-9a-f]{32}$/;
|
|
205
|
+
var KINDS = /* @__PURE__ */ new Set([
|
|
206
|
+
"operation",
|
|
207
|
+
"search-target",
|
|
208
|
+
"link"
|
|
209
|
+
]);
|
|
216
210
|
var VENDORS = /* @__PURE__ */ new Set(["trezor", "ledger", "keystone"]);
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
211
|
+
function create(kind, vendor) {
|
|
212
|
+
return `${HARDWARE_RUNTIME_ID_PREFIX}:${kind}:${vendor}:${_utils.bytesToHex.call(void 0,
|
|
213
|
+
_utils.randomBytes.call(void 0, RANDOM_ID_BYTES)
|
|
214
|
+
)}`;
|
|
220
215
|
}
|
|
221
|
-
function
|
|
222
|
-
return
|
|
216
|
+
function createHardwareOperationId(vendor) {
|
|
217
|
+
return create("operation", vendor);
|
|
223
218
|
}
|
|
224
|
-
function createHardwareSearchTargetId(
|
|
225
|
-
return
|
|
219
|
+
function createHardwareSearchTargetId(vendor) {
|
|
220
|
+
return create("search-target", vendor);
|
|
226
221
|
}
|
|
227
|
-
function
|
|
228
|
-
return
|
|
222
|
+
function createHardwareLinkId(vendor) {
|
|
223
|
+
return create("link", vendor);
|
|
229
224
|
}
|
|
230
225
|
function hasHardwareRuntimeIdPrefix(value) {
|
|
231
226
|
return typeof value === "string" && value.startsWith(`${HARDWARE_RUNTIME_ID_PREFIX}:`);
|
|
@@ -233,50 +228,32 @@ function hasHardwareRuntimeIdPrefix(value) {
|
|
|
233
228
|
function parseHardwareRuntimeId(value) {
|
|
234
229
|
if (!hasHardwareRuntimeIdPrefix(value)) return void 0;
|
|
235
230
|
const parts = value.split(":");
|
|
236
|
-
|
|
237
|
-
const vendor = parts
|
|
238
|
-
if (!VENDORS.has(vendor)
|
|
239
|
-
|
|
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
|
-
};
|
|
231
|
+
if (parts.length !== 5) return void 0;
|
|
232
|
+
const [, , kind, vendor, nonce] = parts;
|
|
233
|
+
if (!KINDS.has(kind) || !VENDORS.has(vendor) || !RANDOM_ID_PATTERN.test(nonce)) {
|
|
234
|
+
return void 0;
|
|
254
235
|
}
|
|
255
|
-
return
|
|
236
|
+
return { kind, vendor };
|
|
256
237
|
}
|
|
257
|
-
function
|
|
258
|
-
return _optionalChain([parseHardwareRuntimeId, 'call', _3 => _3(value), 'optionalAccess', _4 => _4.kind]) === "
|
|
259
|
-
}
|
|
260
|
-
function isHardwareSearchTargetId(value) {
|
|
261
|
-
return _optionalChain([parseHardwareRuntimeId, 'call', _5 => _5(value), 'optionalAccess', _6 => _6.kind]) === "search-target";
|
|
238
|
+
function isHardwareOperationId(value) {
|
|
239
|
+
return _optionalChain([parseHardwareRuntimeId, 'call', _3 => _3(value), 'optionalAccess', _4 => _4.kind]) === "operation";
|
|
262
240
|
}
|
|
263
241
|
|
|
264
|
-
// src/utils/
|
|
265
|
-
var
|
|
266
|
-
var
|
|
242
|
+
// src/utils/OperationRegistry.ts
|
|
243
|
+
var OPERATION_DEFAULT_TTL_MS = 6e5;
|
|
244
|
+
var OperationRegistry = class {
|
|
267
245
|
constructor(options) {
|
|
268
246
|
this._active = /* @__PURE__ */ new Map();
|
|
269
247
|
this._ended = /* @__PURE__ */ new Map();
|
|
270
248
|
this._vendor = options.vendor;
|
|
271
|
-
this._ttlMs = _nullishCoalesce(options.ttlMs, () => (
|
|
249
|
+
this._ttlMs = _nullishCoalesce(options.ttlMs, () => ( OPERATION_DEFAULT_TTL_MS));
|
|
272
250
|
this._onEnded = options.onEnded;
|
|
273
251
|
}
|
|
274
252
|
create(params) {
|
|
275
253
|
const now = Date.now();
|
|
276
|
-
const
|
|
277
|
-
const
|
|
278
|
-
|
|
279
|
-
searchTargetId: params.searchTargetId,
|
|
254
|
+
const operationId = createHardwareOperationId(this._vendor);
|
|
255
|
+
const operation = {
|
|
256
|
+
operationId,
|
|
280
257
|
connectId: params.connectId,
|
|
281
258
|
device: params.device,
|
|
282
259
|
connectionKeys: Array.from(
|
|
@@ -289,35 +266,35 @@ var InteractionRegistry = class {
|
|
|
289
266
|
createdAt: now,
|
|
290
267
|
lastActiveAt: now
|
|
291
268
|
};
|
|
292
|
-
const timer = this._createTimer(
|
|
293
|
-
this._active.set(
|
|
294
|
-
return
|
|
269
|
+
const timer = this._createTimer(operationId);
|
|
270
|
+
this._active.set(operationId, { ...operation, timer, retainCount: 0 });
|
|
271
|
+
return operation;
|
|
295
272
|
}
|
|
296
|
-
resolve(
|
|
297
|
-
const active = this._active.get(
|
|
273
|
+
resolve(operationId) {
|
|
274
|
+
const active = this._active.get(operationId);
|
|
298
275
|
if (!active) {
|
|
299
|
-
const ended = this._ended.get(
|
|
276
|
+
const ended = this._ended.get(operationId);
|
|
300
277
|
if (ended) {
|
|
301
|
-
throw
|
|
302
|
-
code: 10113 /*
|
|
303
|
-
message: `Hardware
|
|
304
|
-
params: {
|
|
278
|
+
throw _chunkZ3IH25KVjs.createHwkError.call(void 0, {
|
|
279
|
+
code: 10113 /* OperationEnded */,
|
|
280
|
+
message: `Hardware operation has ended (${ended.reason})`,
|
|
281
|
+
params: { operationId, reason: ended.reason }
|
|
305
282
|
});
|
|
306
283
|
}
|
|
307
|
-
throw
|
|
308
|
-
code: 10112 /*
|
|
309
|
-
message: "Hardware
|
|
310
|
-
params: {
|
|
284
|
+
throw _chunkZ3IH25KVjs.createHwkError.call(void 0, {
|
|
285
|
+
code: 10112 /* OperationNotFound */,
|
|
286
|
+
message: "Hardware operation was not found",
|
|
287
|
+
params: { operationId }
|
|
311
288
|
});
|
|
312
289
|
}
|
|
313
290
|
if (active.timer) clearTimeout(active.timer);
|
|
314
291
|
active.lastActiveAt = Date.now();
|
|
315
|
-
active.timer = active.retainCount === 0 ? this._createTimer(
|
|
292
|
+
active.timer = active.retainCount === 0 ? this._createTimer(operationId) : void 0;
|
|
316
293
|
return active;
|
|
317
294
|
}
|
|
318
|
-
/** Keep an
|
|
319
|
-
retain(
|
|
320
|
-
const active = this.resolve(
|
|
295
|
+
/** Keep an operation alive while one device job is actively using it. */
|
|
296
|
+
retain(operationId) {
|
|
297
|
+
const active = this.resolve(operationId);
|
|
321
298
|
if (active.timer) clearTimeout(active.timer);
|
|
322
299
|
active.timer = void 0;
|
|
323
300
|
active.retainCount += 1;
|
|
@@ -325,31 +302,31 @@ var InteractionRegistry = class {
|
|
|
325
302
|
return () => {
|
|
326
303
|
if (released) return;
|
|
327
304
|
released = true;
|
|
328
|
-
const current = this._active.get(
|
|
305
|
+
const current = this._active.get(operationId);
|
|
329
306
|
if (!current) return;
|
|
330
307
|
current.retainCount = Math.max(0, current.retainCount - 1);
|
|
331
308
|
current.lastActiveAt = Date.now();
|
|
332
309
|
if (current.retainCount === 0) {
|
|
333
|
-
current.timer = this._createTimer(
|
|
310
|
+
current.timer = this._createTimer(operationId);
|
|
334
311
|
}
|
|
335
312
|
};
|
|
336
313
|
}
|
|
337
314
|
/** Return active or tombstoned binding data without refreshing its TTL. */
|
|
338
|
-
find(
|
|
339
|
-
return _nullishCoalesce(this._active.get(
|
|
315
|
+
find(operationId) {
|
|
316
|
+
return _nullishCoalesce(this._active.get(operationId), () => ( _optionalChain([this, 'access', _5 => _5._ended, 'access', _6 => _6.get, 'call', _7 => _7(operationId), 'optionalAccess', _8 => _8.operation])));
|
|
340
317
|
}
|
|
341
318
|
findActiveByConnectionKey(connectionKey) {
|
|
342
319
|
if (!connectionKey) return void 0;
|
|
343
320
|
return [...this._active.values()].find(
|
|
344
|
-
(
|
|
321
|
+
(operation) => operation.connectionKeys.includes(connectionKey)
|
|
345
322
|
);
|
|
346
323
|
}
|
|
347
324
|
/** Replace the live transport binding after the same target was reconnected. */
|
|
348
|
-
rebind(
|
|
349
|
-
const active = this._active.get(
|
|
325
|
+
rebind(operationId, params) {
|
|
326
|
+
const active = this._active.get(operationId);
|
|
350
327
|
if (!active) {
|
|
351
|
-
this.resolve(
|
|
352
|
-
throw new Error("Unreachable
|
|
328
|
+
this.resolve(operationId);
|
|
329
|
+
throw new Error("Unreachable operation rebind");
|
|
353
330
|
}
|
|
354
331
|
if (active.timer) clearTimeout(active.timer);
|
|
355
332
|
active.connectId = params.connectId;
|
|
@@ -358,42 +335,42 @@ var InteractionRegistry = class {
|
|
|
358
335
|
new Set([params.connectId, ..._nullishCoalesce(params.connectionKeys, () => ( []))].filter(Boolean))
|
|
359
336
|
);
|
|
360
337
|
active.lastActiveAt = Date.now();
|
|
361
|
-
active.timer = active.retainCount === 0 ? this._createTimer(
|
|
338
|
+
active.timer = active.retainCount === 0 ? this._createTimer(operationId) : void 0;
|
|
362
339
|
return active;
|
|
363
340
|
}
|
|
364
|
-
end(
|
|
365
|
-
const active = this._active.get(
|
|
341
|
+
end(operationId, reason) {
|
|
342
|
+
const active = this._active.get(operationId);
|
|
366
343
|
if (!active) return void 0;
|
|
367
344
|
if (active.timer) clearTimeout(active.timer);
|
|
368
|
-
this._active.delete(
|
|
345
|
+
this._active.delete(operationId);
|
|
369
346
|
this._rememberEnded(active, reason);
|
|
370
|
-
_optionalChain([this, 'access',
|
|
347
|
+
_optionalChain([this, 'access', _9 => _9._onEnded, 'optionalCall', _10 => _10(active, reason)]);
|
|
371
348
|
return active;
|
|
372
349
|
}
|
|
373
|
-
endByConnectionKey(connectionKey, reason,
|
|
350
|
+
endByConnectionKey(connectionKey, reason, exceptOperationId) {
|
|
374
351
|
if (!connectionKey) return;
|
|
375
|
-
for (const
|
|
376
|
-
if (
|
|
377
|
-
if (
|
|
378
|
-
this.end(
|
|
352
|
+
for (const operation of [...this._active.values()]) {
|
|
353
|
+
if (operation.operationId === exceptOperationId) continue;
|
|
354
|
+
if (operation.connectionKeys.includes(connectionKey)) {
|
|
355
|
+
this.end(operation.operationId, reason);
|
|
379
356
|
}
|
|
380
357
|
}
|
|
381
358
|
}
|
|
382
|
-
endAll(reason,
|
|
383
|
-
for (const
|
|
384
|
-
if (
|
|
385
|
-
this.end(
|
|
359
|
+
endAll(reason, exceptOperationId) {
|
|
360
|
+
for (const operationId of [...this._active.keys()]) {
|
|
361
|
+
if (operationId === exceptOperationId) continue;
|
|
362
|
+
this.end(operationId, reason);
|
|
386
363
|
}
|
|
387
364
|
}
|
|
388
|
-
_createTimer(
|
|
365
|
+
_createTimer(operationId) {
|
|
389
366
|
const timer = setTimeout(() => {
|
|
390
|
-
this.end(
|
|
367
|
+
this.end(operationId, "timeout");
|
|
391
368
|
}, this._ttlMs);
|
|
392
|
-
_optionalChain([timer, 'access',
|
|
369
|
+
_optionalChain([timer, 'access', _11 => _11.unref, 'optionalCall', _12 => _12()]);
|
|
393
370
|
return timer;
|
|
394
371
|
}
|
|
395
|
-
_rememberEnded(
|
|
396
|
-
this._ended.set(
|
|
372
|
+
_rememberEnded(operation, reason) {
|
|
373
|
+
this._ended.set(operation.operationId, { reason, operation });
|
|
397
374
|
if (this._ended.size <= 100) return;
|
|
398
375
|
const oldest = this._ended.keys().next().value;
|
|
399
376
|
if (oldest) this._ended.delete(oldest);
|
|
@@ -401,40 +378,40 @@ var InteractionRegistry = class {
|
|
|
401
378
|
};
|
|
402
379
|
|
|
403
380
|
// src/utils/hardwareOperationTarget.ts
|
|
404
|
-
function resolveHardwareOperationTarget(positionalTargetId,
|
|
381
|
+
function resolveHardwareOperationTarget(positionalTargetId, commonOperationId, expectedVendor) {
|
|
405
382
|
const normalizedPositionalTargetId = _nullishCoalesce(positionalTargetId, () => ( void 0));
|
|
406
|
-
const
|
|
407
|
-
const
|
|
383
|
+
const normalizedCommonOperationId = commonOperationId || void 0;
|
|
384
|
+
const positionalOperationId = isHardwareOperationId(normalizedPositionalTargetId) ? normalizedPositionalTargetId : void 0;
|
|
408
385
|
const parsedPositionalTarget = parseHardwareRuntimeId(normalizedPositionalTargetId);
|
|
409
|
-
const
|
|
386
|
+
const parsedCommonOperation = parseHardwareRuntimeId(normalizedCommonOperationId);
|
|
410
387
|
if (normalizedPositionalTargetId && hasHardwareRuntimeIdPrefix(normalizedPositionalTargetId) && !parsedPositionalTarget) {
|
|
411
388
|
return failure(10002 /* InvalidParams */, "Invalid hardware operation target id");
|
|
412
389
|
}
|
|
413
|
-
if (_optionalChain([parsedPositionalTarget, 'optionalAccess',
|
|
390
|
+
if (_optionalChain([parsedPositionalTarget, 'optionalAccess', _13 => _13.kind]) === "link") {
|
|
414
391
|
return failure(
|
|
415
392
|
10002 /* InvalidParams */,
|
|
416
|
-
"Hardware
|
|
393
|
+
"Hardware transport link id cannot be used as an operation target"
|
|
417
394
|
);
|
|
418
395
|
}
|
|
419
|
-
if (
|
|
420
|
-
return failure(10002 /* InvalidParams */, "Invalid hardware
|
|
396
|
+
if (normalizedCommonOperationId && _optionalChain([parsedCommonOperation, 'optionalAccess', _14 => _14.kind]) !== "operation") {
|
|
397
|
+
return failure(10002 /* InvalidParams */, "Invalid hardware operation id");
|
|
421
398
|
}
|
|
422
|
-
if (expectedVendor && (parsedPositionalTarget && parsedPositionalTarget.vendor !== expectedVendor ||
|
|
399
|
+
if (expectedVendor && (parsedPositionalTarget && parsedPositionalTarget.vendor !== expectedVendor || parsedCommonOperation && parsedCommonOperation.vendor !== expectedVendor)) {
|
|
423
400
|
return failure(
|
|
424
401
|
10002 /* InvalidParams */,
|
|
425
|
-
`Hardware
|
|
402
|
+
`Hardware operation does not belong to ${expectedVendor}`
|
|
426
403
|
);
|
|
427
404
|
}
|
|
428
|
-
if (
|
|
429
|
-
return failure(10002 /* InvalidParams */, "Conflicting hardware
|
|
430
|
-
|
|
431
|
-
|
|
405
|
+
if (positionalOperationId && normalizedCommonOperationId && positionalOperationId !== normalizedCommonOperationId) {
|
|
406
|
+
return failure(10002 /* InvalidParams */, "Conflicting hardware operation ids", {
|
|
407
|
+
positionalOperationId,
|
|
408
|
+
commonOperationId: normalizedCommonOperationId
|
|
432
409
|
});
|
|
433
410
|
}
|
|
434
|
-
const
|
|
411
|
+
const operationId = _nullishCoalesce(normalizedCommonOperationId, () => ( positionalOperationId));
|
|
435
412
|
return success({
|
|
436
|
-
|
|
437
|
-
targetId: _nullishCoalesce(
|
|
413
|
+
operationId,
|
|
414
|
+
targetId: _nullishCoalesce(operationId, () => ( normalizedPositionalTargetId))
|
|
438
415
|
});
|
|
439
416
|
}
|
|
440
417
|
|
|
@@ -474,14 +451,14 @@ function createBridgedConnector(vendor, connectionType, bridge) {
|
|
|
474
451
|
},
|
|
475
452
|
off: (event, handler) => {
|
|
476
453
|
const inner = handlerMap.get(event);
|
|
477
|
-
const bridgeHandler = _optionalChain([inner, 'optionalAccess',
|
|
454
|
+
const bridgeHandler = _optionalChain([inner, 'optionalAccess', _15 => _15.get, 'call', _16 => _16(handler)]);
|
|
478
455
|
if (!bridgeHandler || !inner) return;
|
|
479
456
|
bridge.offEvent({ vendor }, bridgeHandler);
|
|
480
457
|
inner.delete(handler);
|
|
481
458
|
if (inner.size === 0) handlerMap.delete(event);
|
|
482
459
|
},
|
|
483
460
|
reset: () => bridge.reset({ vendor }),
|
|
484
|
-
configure: bridge.configure ? (config) => _optionalChain([bridge, 'access',
|
|
461
|
+
configure: bridge.configure ? (config) => _optionalChain([bridge, 'access', _17 => _17.configure, 'optionalCall', _18 => _18({ vendor, config })]) : void 0,
|
|
485
462
|
setKnownCredentials: bridge.setKnownCredentials ? (credentials) => bridge.setKnownCredentials({ vendor, credentials }) : void 0
|
|
486
463
|
};
|
|
487
464
|
}
|
|
@@ -550,13 +527,13 @@ function isDeviceUnavailableError(error) {
|
|
|
550
527
|
return false;
|
|
551
528
|
}
|
|
552
529
|
function combinedDeviceNotFoundError(message) {
|
|
553
|
-
return
|
|
530
|
+
return _chunkZ3IH25KVjs.createHwkError.call(void 0, {
|
|
554
531
|
code: 10100 /* DeviceNotFound */,
|
|
555
532
|
message
|
|
556
533
|
});
|
|
557
534
|
}
|
|
558
535
|
function combinedSessionNotFoundError(message) {
|
|
559
|
-
return
|
|
536
|
+
return _chunkZ3IH25KVjs.createHwkError.call(void 0, {
|
|
560
537
|
code: 10101 /* DeviceDisconnected */,
|
|
561
538
|
message
|
|
562
539
|
});
|
|
@@ -585,7 +562,7 @@ function createCombinedConnector(connectors) {
|
|
|
585
562
|
};
|
|
586
563
|
const broadcastCredentials = async () => {
|
|
587
564
|
await Promise.all(
|
|
588
|
-
connectors.map((child) => Promise.resolve(_optionalChain([child, 'access',
|
|
565
|
+
connectors.map((child) => Promise.resolve(_optionalChain([child, 'access', _19 => _19.setKnownCredentials, 'optionalCall', _20 => _20(sharedCredentials)])))
|
|
589
566
|
);
|
|
590
567
|
};
|
|
591
568
|
for (const child of connectors) {
|
|
@@ -655,7 +632,7 @@ function createCombinedConnector(connectors) {
|
|
|
655
632
|
return merged.sort((a, b) => rank(a) - rank(b));
|
|
656
633
|
};
|
|
657
634
|
const resolveOwner = async (deviceId, transportType) => {
|
|
658
|
-
if (deviceId && deviceOwner.has(deviceId) && (!transportType || _optionalChain([deviceOwner, 'access',
|
|
635
|
+
if (deviceId && deviceOwner.has(deviceId) && (!transportType || _optionalChain([deviceOwner, 'access', _21 => _21.get, 'call', _22 => _22(deviceId), 'optionalAccess', _23 => _23.connectionType]) === transportType)) {
|
|
659
636
|
return { owner: deviceOwner.get(deviceId), deviceId };
|
|
660
637
|
}
|
|
661
638
|
const devices = await searchDevices({ waitForAll: Boolean(deviceId), transportType });
|
|
@@ -689,7 +666,7 @@ function createCombinedConnector(connectors) {
|
|
|
689
666
|
}
|
|
690
667
|
}
|
|
691
668
|
const message = lastError instanceof Error ? lastError.message : `Combined connector: device not found: ${deviceId}`;
|
|
692
|
-
throw
|
|
669
|
+
throw _chunkZ3IH25KVjs.createHwkError.call(void 0, {
|
|
693
670
|
code: 10100 /* DeviceNotFound */,
|
|
694
671
|
message
|
|
695
672
|
});
|
|
@@ -704,9 +681,9 @@ function createCombinedConnector(connectors) {
|
|
|
704
681
|
let owner;
|
|
705
682
|
let session;
|
|
706
683
|
if (deviceId) {
|
|
707
|
-
({ session, owner } = await connectByExplicitId(deviceId, _optionalChain([options, 'optionalAccess',
|
|
684
|
+
({ session, owner } = await connectByExplicitId(deviceId, _optionalChain([options, 'optionalAccess', _24 => _24.transportType])));
|
|
708
685
|
} else {
|
|
709
|
-
const resolved = await resolveOwner(void 0, _optionalChain([options, 'optionalAccess',
|
|
686
|
+
const resolved = await resolveOwner(void 0, _optionalChain([options, 'optionalAccess', _25 => _25.transportType]));
|
|
710
687
|
owner = resolved.owner;
|
|
711
688
|
session = await owner.connect(resolved.deviceId);
|
|
712
689
|
}
|
|
@@ -749,7 +726,7 @@ function createCombinedConnector(connectors) {
|
|
|
749
726
|
},
|
|
750
727
|
off: (event, handler) => {
|
|
751
728
|
const inner = forwarders.get(event);
|
|
752
|
-
const attached = _optionalChain([inner, 'optionalAccess',
|
|
729
|
+
const attached = _optionalChain([inner, 'optionalAccess', _26 => _26.get, 'call', _27 => _27(handler)]);
|
|
753
730
|
if (!attached || !inner) return;
|
|
754
731
|
for (const { child, handler: forward } of attached) {
|
|
755
732
|
child.off(event, forward);
|
|
@@ -764,7 +741,7 @@ function createCombinedConnector(connectors) {
|
|
|
764
741
|
forwarders.clear();
|
|
765
742
|
},
|
|
766
743
|
configure: connectors.some((c) => c.configure) ? async (config) => {
|
|
767
|
-
await Promise.all(connectors.map((child) => Promise.resolve(_optionalChain([child, 'access',
|
|
744
|
+
await Promise.all(connectors.map((child) => Promise.resolve(_optionalChain([child, 'access', _28 => _28.configure, 'optionalCall', _29 => _29(config)]))));
|
|
768
745
|
deviceOwner.clear();
|
|
769
746
|
sessionOwner.clear();
|
|
770
747
|
} : void 0,
|
|
@@ -808,44 +785,51 @@ var TypedEventEmitter = class {
|
|
|
808
785
|
}
|
|
809
786
|
/** Number of listeners registered for `event`. 0 if none. */
|
|
810
787
|
listenerCount(event) {
|
|
811
|
-
return _nullishCoalesce(_optionalChain([this, 'access',
|
|
788
|
+
return _nullishCoalesce(_optionalChain([this, 'access', _30 => _30._listeners, 'access', _31 => _31.get, 'call', _32 => _32(event), 'optionalAccess', _33 => _33.size]), () => ( 0));
|
|
812
789
|
}
|
|
813
790
|
};
|
|
814
791
|
|
|
815
792
|
// src/utils/requestSaveDeviceBinding.ts
|
|
816
793
|
async function requestSaveDeviceBinding(emitter, registry, binding, signal) {
|
|
817
|
-
const type =
|
|
818
|
-
|
|
819
|
-
|
|
794
|
+
const type = _chunkS7X2HM7Pjs.UI_REQUEST.REQUEST_SAVE_DEVICE_BINDING;
|
|
795
|
+
const declined = (reason) => {
|
|
796
|
+
emitter.emit(_chunkS7X2HM7Pjs.UI_REQUEST.DEVICE_BINDING_STATUS, {
|
|
797
|
+
type: _chunkS7X2HM7Pjs.UI_REQUEST.DEVICE_BINDING_STATUS,
|
|
798
|
+
payload: { selectionRequestId: binding.selectionRequestId, status: "failed" }
|
|
799
|
+
});
|
|
800
|
+
return { saved: false, reason };
|
|
801
|
+
};
|
|
802
|
+
if (!emitter.listenerCount(type)) {
|
|
803
|
+
return declined("skipped");
|
|
804
|
+
}
|
|
805
|
+
if (_optionalChain([signal, 'optionalAccess', _34 => _34.aborted])) throw signal.reason;
|
|
820
806
|
const requestId = registry.createRequestId();
|
|
821
807
|
const pending = registry.wait(type, { requestId });
|
|
822
808
|
void pending.catch(() => void 0);
|
|
823
809
|
const cancel = () => registry.cancel(type, requestId);
|
|
824
|
-
_optionalChain([signal, 'optionalAccess',
|
|
810
|
+
_optionalChain([signal, 'optionalAccess', _35 => _35.addEventListener, 'call', _36 => _36("abort", cancel, { once: true })]);
|
|
825
811
|
try {
|
|
826
812
|
emitter.emit(type, { type, payload: { ...binding, requestId } });
|
|
827
813
|
const response = await pending;
|
|
828
|
-
if (_optionalChain([signal, 'optionalAccess',
|
|
829
|
-
if (_optionalChain([response, 'optionalAccess',
|
|
830
|
-
|
|
831
|
-
code: 1e4 /* UnknownError */,
|
|
832
|
-
message: "Verified device binding could not be saved"
|
|
833
|
-
});
|
|
814
|
+
if (_optionalChain([signal, 'optionalAccess', _37 => _37.aborted])) throw signal.reason;
|
|
815
|
+
if (_optionalChain([response, 'optionalAccess', _38 => _38.saved]) !== true) {
|
|
816
|
+
return declined(_nullishCoalesce(_optionalChain([response, 'optionalAccess', _39 => _39.reason]), () => ( "skipped")));
|
|
834
817
|
}
|
|
835
|
-
emitter.emit(
|
|
836
|
-
type:
|
|
818
|
+
emitter.emit(_chunkS7X2HM7Pjs.UI_REQUEST.DEVICE_BINDING_STATUS, {
|
|
819
|
+
type: _chunkS7X2HM7Pjs.UI_REQUEST.DEVICE_BINDING_STATUS,
|
|
837
820
|
payload: { selectionRequestId: binding.selectionRequestId, status: "saved" }
|
|
838
821
|
});
|
|
839
|
-
return true;
|
|
822
|
+
return { saved: true };
|
|
840
823
|
} catch (error) {
|
|
841
|
-
emitter.emit(
|
|
842
|
-
type:
|
|
824
|
+
emitter.emit(_chunkS7X2HM7Pjs.UI_REQUEST.DEVICE_BINDING_STATUS, {
|
|
825
|
+
type: _chunkS7X2HM7Pjs.UI_REQUEST.DEVICE_BINDING_STATUS,
|
|
843
826
|
payload: {
|
|
844
827
|
selectionRequestId: binding.selectionRequestId,
|
|
845
|
-
status: _optionalChain([signal, 'optionalAccess',
|
|
828
|
+
status: _optionalChain([signal, 'optionalAccess', _40 => _40.aborted]) ? "cancelled" : "failed"
|
|
846
829
|
}
|
|
847
830
|
});
|
|
848
|
-
throw error;
|
|
831
|
+
if (_optionalChain([signal, 'optionalAccess', _41 => _41.aborted])) throw error;
|
|
832
|
+
return { saved: false, reason: "skipped" };
|
|
849
833
|
} finally {
|
|
850
834
|
_optionalChain([signal, 'optionalAccess', _42 => _42.removeEventListener, 'call', _43 => _43("abort", cancel)]);
|
|
851
835
|
registry.cancel(type, requestId);
|
|
@@ -859,18 +843,20 @@ async function requestBleDeviceSelection({
|
|
|
859
843
|
request,
|
|
860
844
|
scan,
|
|
861
845
|
signal,
|
|
846
|
+
allowUsbFallback = false,
|
|
862
847
|
pollIntervalMs = 1500
|
|
863
848
|
}) {
|
|
864
|
-
const type =
|
|
849
|
+
const type = _chunkS7X2HM7Pjs.UI_REQUEST.REQUEST_SELECT_DEVICE;
|
|
865
850
|
if (signal.aborted) throw signal.reason;
|
|
866
851
|
if (!emitter.listenerCount(type)) {
|
|
867
|
-
throw
|
|
852
|
+
throw _chunkZ3IH25KVjs.createHwkError.call(void 0, {
|
|
868
853
|
code: 10100 /* DeviceNotFound */,
|
|
869
854
|
message: "Select a Bluetooth device before continuing"
|
|
870
855
|
});
|
|
871
856
|
}
|
|
872
857
|
const requestId = registry.createRequestId();
|
|
873
|
-
let
|
|
858
|
+
let devices = allowUsbFallback ? request.devices.filter((device) => device.connectionType === "ble") : request.devices;
|
|
859
|
+
const publishedDevices = /* @__PURE__ */ new Map();
|
|
874
860
|
let stopped = false;
|
|
875
861
|
let timer;
|
|
876
862
|
let wake;
|
|
@@ -887,10 +873,13 @@ async function requestBleDeviceSelection({
|
|
|
887
873
|
const cancel = () => registry.cancel(type, requestId);
|
|
888
874
|
const reply = registry.wait(type, { requestId }).finally(stop);
|
|
889
875
|
void reply.catch(() => void 0);
|
|
890
|
-
const publish = () =>
|
|
891
|
-
|
|
892
|
-
|
|
893
|
-
|
|
876
|
+
const publish = () => {
|
|
877
|
+
for (const device of devices) publishedDevices.set(device.connectId, device);
|
|
878
|
+
emitter.emit(type, {
|
|
879
|
+
type,
|
|
880
|
+
payload: { ...request, devices, requestId, scanning: true }
|
|
881
|
+
});
|
|
882
|
+
};
|
|
894
883
|
signal.addEventListener("abort", cancel, { once: true });
|
|
895
884
|
let polling;
|
|
896
885
|
try {
|
|
@@ -900,31 +889,36 @@ async function requestBleDeviceSelection({
|
|
|
900
889
|
while (!stopped) {
|
|
901
890
|
const snapshot = await scan();
|
|
902
891
|
if (stopped || signal.aborted) return;
|
|
892
|
+
const usbFallback = allowUsbFallback ? snapshot.find((device2) => device2.connectionType === "usb") : void 0;
|
|
893
|
+
if (usbFallback) return usbFallback;
|
|
903
894
|
devices = snapshot;
|
|
904
895
|
publish();
|
|
905
896
|
if (stopped) return;
|
|
906
897
|
await waitForNextScan();
|
|
907
898
|
}
|
|
908
899
|
})();
|
|
909
|
-
const
|
|
900
|
+
const userSelection = reply.then((selected) => publishedDevices.get(selected.sdkConnectId));
|
|
901
|
+
const device = await Promise.race([
|
|
902
|
+
userSelection,
|
|
903
|
+
polling.then((usbFallback) => _nullishCoalesce(usbFallback, () => ( userSelection)))
|
|
904
|
+
]);
|
|
910
905
|
stop();
|
|
911
906
|
await polling;
|
|
912
907
|
if (signal.aborted) throw signal.reason;
|
|
913
|
-
const device = devices.find((candidate) => candidate.connectId === selected.sdkConnectId);
|
|
914
908
|
if (!device) {
|
|
915
|
-
throw
|
|
909
|
+
throw _chunkZ3IH25KVjs.createHwkError.call(void 0, {
|
|
916
910
|
code: 10100 /* DeviceNotFound */,
|
|
917
911
|
message: "Selected Bluetooth device is no longer available"
|
|
918
912
|
});
|
|
919
913
|
}
|
|
920
|
-
emitter.emit(
|
|
921
|
-
type:
|
|
914
|
+
emitter.emit(_chunkS7X2HM7Pjs.UI_REQUEST.DEVICE_BINDING_STATUS, {
|
|
915
|
+
type: _chunkS7X2HM7Pjs.UI_REQUEST.DEVICE_BINDING_STATUS,
|
|
922
916
|
payload: { selectionRequestId: requestId, status: "verifying" }
|
|
923
917
|
});
|
|
924
918
|
return { device, requestId };
|
|
925
919
|
} catch (error) {
|
|
926
|
-
emitter.emit(
|
|
927
|
-
type:
|
|
920
|
+
emitter.emit(_chunkS7X2HM7Pjs.UI_REQUEST.DEVICE_BINDING_STATUS, {
|
|
921
|
+
type: _chunkS7X2HM7Pjs.UI_REQUEST.DEVICE_BINDING_STATUS,
|
|
928
922
|
payload: { selectionRequestId: requestId, status: signal.aborted ? "cancelled" : "failed" }
|
|
929
923
|
});
|
|
930
924
|
throw error;
|
|
@@ -1307,6 +1301,5 @@ var DEVICE_CONNECT_RETRY_DELAY_MS = 1e3;
|
|
|
1307
1301
|
|
|
1308
1302
|
|
|
1309
1303
|
|
|
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;
|
|
1304
|
+
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 = _chunkZ3IH25KVjs.HardwareErrorCode; exports.OPERATION_DEFAULT_TTL_MS = OPERATION_DEFAULT_TTL_MS; exports.ORPHAN_ELIGIBLE_ERROR_CODES = _chunkZ3IH25KVjs.ORPHAN_ELIGIBLE_ERROR_CODES; exports.OperationRegistry = OperationRegistry; exports.SDK = SDK; exports.TypedEventEmitter = TypedEventEmitter; exports.UI_EVENT = _chunkS7X2HM7Pjs.UI_EVENT; exports.UI_REQUEST = _chunkS7X2HM7Pjs.UI_REQUEST; exports.UI_REQUEST_CANCELLED_TAG = _chunkS7X2HM7Pjs.UI_REQUEST_CANCELLED_TAG; exports.UI_REQUEST_DEFAULT_TIMEOUT_MS = _chunkS7X2HM7Pjs.UI_REQUEST_DEFAULT_TIMEOUT_MS; exports.UI_REQUEST_PREEMPTED_TAG = _chunkS7X2HM7Pjs.UI_REQUEST_PREEMPTED_TAG; exports.UI_REQUEST_TIMEOUT_TAG = _chunkS7X2HM7Pjs.UI_REQUEST_TIMEOUT_TAG; exports.UI_RESPONSE = _chunkS7X2HM7Pjs.UI_RESPONSE; exports.UiRequestRegistry = _chunkS7X2HM7Pjs.UiRequestRegistry; exports.batchCall = batchCall; exports.buildUnsupportedMethodResponse = buildUnsupportedMethodResponse; exports.bytesToHex = bytesToHex3; exports.canReplayHardwareMethodAfterTransportFailure = canReplayHardwareMethodAfterTransportFailure; exports.compareSemver = compareSemver; exports.createBridgedConnector = createBridgedConnector; exports.createCombinedConnector = createCombinedConnector; exports.createHardwareLinkId = createHardwareLinkId; exports.createHardwareOperationId = createHardwareOperationId; exports.createHardwareSearchTargetId = createHardwareSearchTargetId; exports.createHwkError = _chunkZ3IH25KVjs.createHwkError; exports.defaultOriginForCode = _chunkZ3IH25KVjs.defaultOriginForCode; exports.defaultRecoveryForCode = _chunkZ3IH25KVjs.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.isHardwareOperationId = isHardwareOperationId; exports.isHwkRecoveryHint = _chunkZ3IH25KVjs.isHwkRecoveryHint; exports.isKnownNonTargetHardwareVendor = isKnownNonTargetHardwareVendor; exports.operationMayHaveCompletedParams = _chunkZ3IH25KVjs.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;
|
|
1312
1305
|
//# sourceMappingURL=index.js.map
|