@onekeyfe/hwk-ledger-adapter 1.2.8-alpha.13 → 1.2.8-alpha.131
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 +13 -2
- package/dist/index.d.ts +13 -2
- package/dist/index.js +445 -296
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +231 -81
- package/dist/index.mjs.map +1 -1
- package/package.json +3 -3
package/dist/index.d.mts
CHANGED
|
@@ -166,6 +166,12 @@ declare class LedgerAdapter implements IHardwareWallet {
|
|
|
166
166
|
* that waits on a prompt nobody will answer. Device I/O already on the wire still drains.
|
|
167
167
|
*/
|
|
168
168
|
private _cancelOperationWork;
|
|
169
|
+
/**
|
|
170
|
+
* A running call by bare connectId (or still resolving its device by identity) may be on this
|
|
171
|
+
* connection, e.g. waiting for an unlock; its later stages need it, so it stays cached for that
|
|
172
|
+
* caller like any bare call's session. A lost connection is torn down regardless.
|
|
173
|
+
*/
|
|
174
|
+
private _bareCallMayUseConnection;
|
|
169
175
|
private _releaseOperationConnection;
|
|
170
176
|
private _releaseLostOperationConnection;
|
|
171
177
|
getDeviceInfo(connectIdOrOperationId: string, deviceId: string): Promise<Response<DeviceInfo>>;
|
|
@@ -222,6 +228,11 @@ declare class LedgerAdapter implements IHardwareWallet {
|
|
|
222
228
|
cancel(connectId?: string): void;
|
|
223
229
|
/** A non-empty deviceId is an expected chain fingerprint, not a transport identifier. */
|
|
224
230
|
getChainFingerprint(connectId: string, deviceId: string, chain: ChainForFingerprint): Promise<Response<string>>;
|
|
231
|
+
/**
|
|
232
|
+
* Fingerprints the first recorded chain whose app the device can open. Only a missing app
|
|
233
|
+
* moves on to the next chain; when every app is missing, the first chain offers its install.
|
|
234
|
+
*/
|
|
235
|
+
private _fingerprintFirstOpenableChain;
|
|
225
236
|
/** Saves a picked BLE endpoint; `identity` is set when its wallet was just checked. */
|
|
226
237
|
private _saveSelectedBleBinding;
|
|
227
238
|
private _dropSession;
|
|
@@ -530,8 +541,8 @@ declare class LedgerConnectorBase implements IConnector {
|
|
|
530
541
|
protected _emit<K extends ConnectorEventType>(event: K, data: ConnectorEventMap[K]): void;
|
|
531
542
|
/**
|
|
532
543
|
* Return a per-call ctx with the chain's Ledger app name pre-bound to
|
|
533
|
-
* wrapError, so chain handlers don't need to repeat
|
|
534
|
-
*
|
|
544
|
+
* UI prompts and wrapError, so chain handlers don't need to repeat the name.
|
|
545
|
+
* Falls through unchanged for unknown methods.
|
|
535
546
|
*/
|
|
536
547
|
private _ctxForMethod;
|
|
537
548
|
private _wrapError;
|
package/dist/index.d.ts
CHANGED
|
@@ -166,6 +166,12 @@ declare class LedgerAdapter implements IHardwareWallet {
|
|
|
166
166
|
* that waits on a prompt nobody will answer. Device I/O already on the wire still drains.
|
|
167
167
|
*/
|
|
168
168
|
private _cancelOperationWork;
|
|
169
|
+
/**
|
|
170
|
+
* A running call by bare connectId (or still resolving its device by identity) may be on this
|
|
171
|
+
* connection, e.g. waiting for an unlock; its later stages need it, so it stays cached for that
|
|
172
|
+
* caller like any bare call's session. A lost connection is torn down regardless.
|
|
173
|
+
*/
|
|
174
|
+
private _bareCallMayUseConnection;
|
|
169
175
|
private _releaseOperationConnection;
|
|
170
176
|
private _releaseLostOperationConnection;
|
|
171
177
|
getDeviceInfo(connectIdOrOperationId: string, deviceId: string): Promise<Response<DeviceInfo>>;
|
|
@@ -222,6 +228,11 @@ declare class LedgerAdapter implements IHardwareWallet {
|
|
|
222
228
|
cancel(connectId?: string): void;
|
|
223
229
|
/** A non-empty deviceId is an expected chain fingerprint, not a transport identifier. */
|
|
224
230
|
getChainFingerprint(connectId: string, deviceId: string, chain: ChainForFingerprint): Promise<Response<string>>;
|
|
231
|
+
/**
|
|
232
|
+
* Fingerprints the first recorded chain whose app the device can open. Only a missing app
|
|
233
|
+
* moves on to the next chain; when every app is missing, the first chain offers its install.
|
|
234
|
+
*/
|
|
235
|
+
private _fingerprintFirstOpenableChain;
|
|
225
236
|
/** Saves a picked BLE endpoint; `identity` is set when its wallet was just checked. */
|
|
226
237
|
private _saveSelectedBleBinding;
|
|
227
238
|
private _dropSession;
|
|
@@ -530,8 +541,8 @@ declare class LedgerConnectorBase implements IConnector {
|
|
|
530
541
|
protected _emit<K extends ConnectorEventType>(event: K, data: ConnectorEventMap[K]): void;
|
|
531
542
|
/**
|
|
532
543
|
* Return a per-call ctx with the chain's Ledger app name pre-bound to
|
|
533
|
-
* wrapError, so chain handlers don't need to repeat
|
|
534
|
-
*
|
|
544
|
+
* UI prompts and wrapError, so chain handlers don't need to repeat the name.
|
|
545
|
+
* Falls through unchanged for unknown methods.
|
|
535
546
|
*/
|
|
536
547
|
private _ctxForMethod;
|
|
537
548
|
private _wrapError;
|