@onekeyfe/hwk-keystone-adapter 1.2.8-alpha.121 → 1.2.8-alpha.122
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/index.d.mts +5 -18
- package/dist/index.d.ts +5 -18
- package/dist/index.js +72 -324
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +72 -330
- package/dist/index.mjs.map +1 -1
- package/package.json +3 -3
package/dist/index.d.mts
CHANGED
|
@@ -133,8 +133,6 @@ declare class KeystoneUrEngine {
|
|
|
133
133
|
* hdkey source fingerprint is the mfp only because every request here derives from the seed.
|
|
134
134
|
*/
|
|
135
135
|
parseAccountResponse(ur: KeystoneUr): KeystoneParsedMultiAccounts;
|
|
136
|
-
/** Device exports are opt-in: request responses retain their existing format/path checks. */
|
|
137
|
-
parseAccountExport(ur: KeystoneUr): KeystoneParsedMultiAccounts;
|
|
138
136
|
buildEthSignRequest(input: KeystoneEthSignRequestInput): KeystoneUr;
|
|
139
137
|
parseEthSignature(ur: KeystoneUr): KeystoneEthSignatureResult;
|
|
140
138
|
/** Derives an EVM address offline; `relativeDerivePath` is relative to the xpub, e.g. `'0/0'`. */
|
|
@@ -195,9 +193,8 @@ interface KeystoneDeviceRecord {
|
|
|
195
193
|
hardwareDeviceId?: string;
|
|
196
194
|
/** Model string from the device (e.g. "Keystone 3 Pro"); not unique per unit. */
|
|
197
195
|
model?: string;
|
|
198
|
-
/** Last QR response's display metadata, not a capability check for the next QR request. */
|
|
199
196
|
deviceVersion?: string;
|
|
200
|
-
|
|
197
|
+
importedAt: number;
|
|
201
198
|
/** Connector session id while a live USB session exists; its presence routes calls over USB. */
|
|
202
199
|
usbSessionId?: string;
|
|
203
200
|
/**
|
|
@@ -220,16 +217,9 @@ declare function placeholderDeviceInfo(): DeviceInfo;
|
|
|
220
217
|
type BundleAccess = {
|
|
221
218
|
channel: 'qr';
|
|
222
219
|
scanned: ReadonlyMap<string, KeystoneAccountEntry>;
|
|
223
|
-
firmwareVersion?: string;
|
|
224
|
-
accountExport?: boolean;
|
|
225
220
|
} | {
|
|
226
221
|
channel: 'usb';
|
|
227
222
|
usbSessionId: string;
|
|
228
|
-
qrFallback: QrFallbackChoice;
|
|
229
|
-
};
|
|
230
|
-
/** The answer to "show it as a QR?" for a request USB cannot carry; a bundle asks only once. */
|
|
231
|
-
type QrFallbackChoice = {
|
|
232
|
-
confirmed?: boolean;
|
|
233
223
|
};
|
|
234
224
|
interface ImportFromQrOptions {
|
|
235
225
|
/**
|
|
@@ -404,8 +394,10 @@ declare class KeystoneAdapter implements IHardwareWallet {
|
|
|
404
394
|
* a leaf path, so it is cut to the account path Keystone expects.
|
|
405
395
|
*/
|
|
406
396
|
private _ensureWalletKnown;
|
|
407
|
-
|
|
408
|
-
|
|
397
|
+
/**
|
|
398
|
+
* The operation owning the running job, so a mid-call UI request can name it. Unpinned jobs map
|
|
399
|
+
* through the operation route; a cold start returns undefined.
|
|
400
|
+
*/
|
|
409
401
|
private _activeOperationId;
|
|
410
402
|
/** Routes are keyed by connectId; a job key may be the bare master fingerprint. */
|
|
411
403
|
private _operationRouteForIdentifier;
|
|
@@ -414,11 +406,6 @@ declare class KeystoneAdapter implements IHardwareWallet {
|
|
|
414
406
|
* a cancel reach the wait before the QR timeout.
|
|
415
407
|
*/
|
|
416
408
|
private _awaitQrResponse;
|
|
417
|
-
/**
|
|
418
|
-
* Asks whether a request too large for USB may be shown as a QR. A timeout or an unanswered
|
|
419
|
-
* prompt reads as no; a cancelled call keeps its own error.
|
|
420
|
-
*/
|
|
421
|
-
private _confirmQrFallback;
|
|
422
409
|
/** Shows `data` for the device to scan, or with no `data` asks the host to scan the device. */
|
|
423
410
|
private _requestQrAndAwaitResponse;
|
|
424
411
|
private _callUsbResolveUr;
|
package/dist/index.d.ts
CHANGED
|
@@ -133,8 +133,6 @@ declare class KeystoneUrEngine {
|
|
|
133
133
|
* hdkey source fingerprint is the mfp only because every request here derives from the seed.
|
|
134
134
|
*/
|
|
135
135
|
parseAccountResponse(ur: KeystoneUr): KeystoneParsedMultiAccounts;
|
|
136
|
-
/** Device exports are opt-in: request responses retain their existing format/path checks. */
|
|
137
|
-
parseAccountExport(ur: KeystoneUr): KeystoneParsedMultiAccounts;
|
|
138
136
|
buildEthSignRequest(input: KeystoneEthSignRequestInput): KeystoneUr;
|
|
139
137
|
parseEthSignature(ur: KeystoneUr): KeystoneEthSignatureResult;
|
|
140
138
|
/** Derives an EVM address offline; `relativeDerivePath` is relative to the xpub, e.g. `'0/0'`. */
|
|
@@ -195,9 +193,8 @@ interface KeystoneDeviceRecord {
|
|
|
195
193
|
hardwareDeviceId?: string;
|
|
196
194
|
/** Model string from the device (e.g. "Keystone 3 Pro"); not unique per unit. */
|
|
197
195
|
model?: string;
|
|
198
|
-
/** Last QR response's display metadata, not a capability check for the next QR request. */
|
|
199
196
|
deviceVersion?: string;
|
|
200
|
-
|
|
197
|
+
importedAt: number;
|
|
201
198
|
/** Connector session id while a live USB session exists; its presence routes calls over USB. */
|
|
202
199
|
usbSessionId?: string;
|
|
203
200
|
/**
|
|
@@ -220,16 +217,9 @@ declare function placeholderDeviceInfo(): DeviceInfo;
|
|
|
220
217
|
type BundleAccess = {
|
|
221
218
|
channel: 'qr';
|
|
222
219
|
scanned: ReadonlyMap<string, KeystoneAccountEntry>;
|
|
223
|
-
firmwareVersion?: string;
|
|
224
|
-
accountExport?: boolean;
|
|
225
220
|
} | {
|
|
226
221
|
channel: 'usb';
|
|
227
222
|
usbSessionId: string;
|
|
228
|
-
qrFallback: QrFallbackChoice;
|
|
229
|
-
};
|
|
230
|
-
/** The answer to "show it as a QR?" for a request USB cannot carry; a bundle asks only once. */
|
|
231
|
-
type QrFallbackChoice = {
|
|
232
|
-
confirmed?: boolean;
|
|
233
223
|
};
|
|
234
224
|
interface ImportFromQrOptions {
|
|
235
225
|
/**
|
|
@@ -404,8 +394,10 @@ declare class KeystoneAdapter implements IHardwareWallet {
|
|
|
404
394
|
* a leaf path, so it is cut to the account path Keystone expects.
|
|
405
395
|
*/
|
|
406
396
|
private _ensureWalletKnown;
|
|
407
|
-
|
|
408
|
-
|
|
397
|
+
/**
|
|
398
|
+
* The operation owning the running job, so a mid-call UI request can name it. Unpinned jobs map
|
|
399
|
+
* through the operation route; a cold start returns undefined.
|
|
400
|
+
*/
|
|
409
401
|
private _activeOperationId;
|
|
410
402
|
/** Routes are keyed by connectId; a job key may be the bare master fingerprint. */
|
|
411
403
|
private _operationRouteForIdentifier;
|
|
@@ -414,11 +406,6 @@ declare class KeystoneAdapter implements IHardwareWallet {
|
|
|
414
406
|
* a cancel reach the wait before the QR timeout.
|
|
415
407
|
*/
|
|
416
408
|
private _awaitQrResponse;
|
|
417
|
-
/**
|
|
418
|
-
* Asks whether a request too large for USB may be shown as a QR. A timeout or an unanswered
|
|
419
|
-
* prompt reads as no; a cancelled call keeps its own error.
|
|
420
|
-
*/
|
|
421
|
-
private _confirmQrFallback;
|
|
422
409
|
/** Shows `data` for the device to scan, or with no `data` asks the host to scan the device. */
|
|
423
410
|
private _requestQrAndAwaitResponse;
|
|
424
411
|
private _callUsbResolveUr;
|