@onekeyfe/hwk-keystone-adapter 1.2.8-alpha.120 → 1.2.8-alpha.121

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 CHANGED
@@ -133,6 +133,8 @@ 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;
136
138
  buildEthSignRequest(input: KeystoneEthSignRequestInput): KeystoneUr;
137
139
  parseEthSignature(ur: KeystoneUr): KeystoneEthSignatureResult;
138
140
  /** Derives an EVM address offline; `relativeDerivePath` is relative to the xpub, e.g. `'0/0'`. */
@@ -193,8 +195,9 @@ interface KeystoneDeviceRecord {
193
195
  hardwareDeviceId?: string;
194
196
  /** Model string from the device (e.g. "Keystone 3 Pro"); not unique per unit. */
195
197
  model?: string;
198
+ /** Last QR response's display metadata, not a capability check for the next QR request. */
196
199
  deviceVersion?: string;
197
- importedAt: number;
200
+ usbFirmwareVersion?: string;
198
201
  /** Connector session id while a live USB session exists; its presence routes calls over USB. */
199
202
  usbSessionId?: string;
200
203
  /**
@@ -217,9 +220,16 @@ declare function placeholderDeviceInfo(): DeviceInfo;
217
220
  type BundleAccess = {
218
221
  channel: 'qr';
219
222
  scanned: ReadonlyMap<string, KeystoneAccountEntry>;
223
+ firmwareVersion?: string;
224
+ accountExport?: boolean;
220
225
  } | {
221
226
  channel: 'usb';
222
227
  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;
223
233
  };
224
234
  interface ImportFromQrOptions {
225
235
  /**
@@ -394,10 +404,8 @@ declare class KeystoneAdapter implements IHardwareWallet {
394
404
  * a leaf path, so it is cut to the account path Keystone expects.
395
405
  */
396
406
  private _ensureWalletKnown;
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
- */
407
+ private _assertQrChainSupported;
408
+ /** Only an operation id supplied to the running call owns its UI prompts. */
401
409
  private _activeOperationId;
402
410
  /** Routes are keyed by connectId; a job key may be the bare master fingerprint. */
403
411
  private _operationRouteForIdentifier;
@@ -406,6 +414,11 @@ declare class KeystoneAdapter implements IHardwareWallet {
406
414
  * a cancel reach the wait before the QR timeout.
407
415
  */
408
416
  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;
409
422
  /** Shows `data` for the device to scan, or with no `data` asks the host to scan the device. */
410
423
  private _requestQrAndAwaitResponse;
411
424
  private _callUsbResolveUr;
package/dist/index.d.ts CHANGED
@@ -133,6 +133,8 @@ 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;
136
138
  buildEthSignRequest(input: KeystoneEthSignRequestInput): KeystoneUr;
137
139
  parseEthSignature(ur: KeystoneUr): KeystoneEthSignatureResult;
138
140
  /** Derives an EVM address offline; `relativeDerivePath` is relative to the xpub, e.g. `'0/0'`. */
@@ -193,8 +195,9 @@ interface KeystoneDeviceRecord {
193
195
  hardwareDeviceId?: string;
194
196
  /** Model string from the device (e.g. "Keystone 3 Pro"); not unique per unit. */
195
197
  model?: string;
198
+ /** Last QR response's display metadata, not a capability check for the next QR request. */
196
199
  deviceVersion?: string;
197
- importedAt: number;
200
+ usbFirmwareVersion?: string;
198
201
  /** Connector session id while a live USB session exists; its presence routes calls over USB. */
199
202
  usbSessionId?: string;
200
203
  /**
@@ -217,9 +220,16 @@ declare function placeholderDeviceInfo(): DeviceInfo;
217
220
  type BundleAccess = {
218
221
  channel: 'qr';
219
222
  scanned: ReadonlyMap<string, KeystoneAccountEntry>;
223
+ firmwareVersion?: string;
224
+ accountExport?: boolean;
220
225
  } | {
221
226
  channel: 'usb';
222
227
  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;
223
233
  };
224
234
  interface ImportFromQrOptions {
225
235
  /**
@@ -394,10 +404,8 @@ declare class KeystoneAdapter implements IHardwareWallet {
394
404
  * a leaf path, so it is cut to the account path Keystone expects.
395
405
  */
396
406
  private _ensureWalletKnown;
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
- */
407
+ private _assertQrChainSupported;
408
+ /** Only an operation id supplied to the running call owns its UI prompts. */
401
409
  private _activeOperationId;
402
410
  /** Routes are keyed by connectId; a job key may be the bare master fingerprint. */
403
411
  private _operationRouteForIdentifier;
@@ -406,6 +414,11 @@ declare class KeystoneAdapter implements IHardwareWallet {
406
414
  * a cancel reach the wait before the QR timeout.
407
415
  */
408
416
  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;
409
422
  /** Shows `data` for the device to scan, or with no `data` asks the host to scan the device. */
410
423
  private _requestQrAndAwaitResponse;
411
424
  private _callUsbResolveUr;