@dynamic-labs-wallet/browser-wallet-client 1.0.54 → 1.0.56

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/index.cjs CHANGED
@@ -15,7 +15,7 @@ function _extends() {
15
15
  return _extends.apply(this, arguments);
16
16
  }
17
17
 
18
- class iframeMessageHandler {
18
+ class IframeMessageHandler {
19
19
  // Handle error response from iframe message handler
20
20
  handleIframeMessageResponseError(response) {
21
21
  if (typeof response === 'object' && response !== null && 'error' in response) {
@@ -773,7 +773,7 @@ class IframeManager {
773
773
  } else {
774
774
  throw new Error('No sandbox host or iframe available');
775
775
  }
776
- this.iframeMessageHandler = new iframeMessageHandler(this.messageTransport);
776
+ this.iframeMessageHandler = new IframeMessageHandler(this.messageTransport);
777
777
  // Set up request channel to handle messages from iframe (for secureStorage,
778
778
  // getSignedSessionId, and the unauthorized notification)
779
779
  if (this.secureStorage || this.getSignedSessionIdCallback || this.onUnauthorized) {
@@ -1005,7 +1005,7 @@ class IframeManager {
1005
1005
  // branch below instead of adopting the corpse.
1006
1006
  if ((_IframeManager_sharedWaasSDKContainer = IframeManager.sharedWaasSDKContainer) == null ? void 0 : _IframeManager_sharedWaasSDKContainer.isAlive()) {
1007
1007
  this.adoptSharedContainer();
1008
- return Promise.resolve();
1008
+ return;
1009
1009
  }
1010
1010
  // If a load is in progress, wait for it, then assign
1011
1011
  if (IframeManager.iframeLoadPromise) {
@@ -1207,7 +1207,7 @@ class IframeManager {
1207
1207
  messageTransport: messageTransport.createMessageTransport()
1208
1208
  });
1209
1209
  const cleanupBridge = setupMessageTransportBridge(transport, iframe, this.iframeDomain);
1210
- const iframeDisplay = new iframeMessageHandler(transport);
1210
+ const iframeDisplay = new IframeMessageHandler(transport);
1211
1211
  // Set up iframe request handlers on this transport so the display iframe
1212
1212
  // can access key shares (e.g. for exportPrivateKey) and signed session ID
1213
1213
  if (this.secureStorage || this.getSignedSessionIdCallback) {
@@ -1222,7 +1222,7 @@ class IframeManager {
1222
1222
  iframeDisplay,
1223
1223
  cleanup: ()=>{
1224
1224
  cleanupBridge();
1225
- container.removeChild(iframe);
1225
+ iframe.remove();
1226
1226
  }
1227
1227
  };
1228
1228
  } catch (error) {
@@ -1303,7 +1303,7 @@ class IframeManager {
1303
1303
  messageTransport: messageTransport.createMessageTransport()
1304
1304
  });
1305
1305
  const cleanupBridge = this.setupWaasSDKContainerBridge(transport, waasSDKContainer);
1306
- const iframeDisplay = new iframeMessageHandler(transport);
1306
+ const iframeDisplay = new IframeMessageHandler(transport);
1307
1307
  // Set up iframe request handlers on this transport so the display
1308
1308
  // container can access key shares (e.g. for exportPrivateKey) and the
1309
1309
  // signed session ID — mirrors initializeIframeDisplayForContainer.
package/index.esm.js CHANGED
@@ -14,7 +14,7 @@ function _extends() {
14
14
  return _extends.apply(this, arguments);
15
15
  }
16
16
 
17
- class iframeMessageHandler {
17
+ class IframeMessageHandler {
18
18
  // Handle error response from iframe message handler
19
19
  handleIframeMessageResponseError(response) {
20
20
  if (typeof response === 'object' && response !== null && 'error' in response) {
@@ -772,7 +772,7 @@ class IframeManager {
772
772
  } else {
773
773
  throw new Error('No sandbox host or iframe available');
774
774
  }
775
- this.iframeMessageHandler = new iframeMessageHandler(this.messageTransport);
775
+ this.iframeMessageHandler = new IframeMessageHandler(this.messageTransport);
776
776
  // Set up request channel to handle messages from iframe (for secureStorage,
777
777
  // getSignedSessionId, and the unauthorized notification)
778
778
  if (this.secureStorage || this.getSignedSessionIdCallback || this.onUnauthorized) {
@@ -1004,7 +1004,7 @@ class IframeManager {
1004
1004
  // branch below instead of adopting the corpse.
1005
1005
  if ((_IframeManager_sharedWaasSDKContainer = IframeManager.sharedWaasSDKContainer) == null ? void 0 : _IframeManager_sharedWaasSDKContainer.isAlive()) {
1006
1006
  this.adoptSharedContainer();
1007
- return Promise.resolve();
1007
+ return;
1008
1008
  }
1009
1009
  // If a load is in progress, wait for it, then assign
1010
1010
  if (IframeManager.iframeLoadPromise) {
@@ -1206,7 +1206,7 @@ class IframeManager {
1206
1206
  messageTransport: createMessageTransport()
1207
1207
  });
1208
1208
  const cleanupBridge = setupMessageTransportBridge(transport, iframe, this.iframeDomain);
1209
- const iframeDisplay = new iframeMessageHandler(transport);
1209
+ const iframeDisplay = new IframeMessageHandler(transport);
1210
1210
  // Set up iframe request handlers on this transport so the display iframe
1211
1211
  // can access key shares (e.g. for exportPrivateKey) and signed session ID
1212
1212
  if (this.secureStorage || this.getSignedSessionIdCallback) {
@@ -1221,7 +1221,7 @@ class IframeManager {
1221
1221
  iframeDisplay,
1222
1222
  cleanup: ()=>{
1223
1223
  cleanupBridge();
1224
- container.removeChild(iframe);
1224
+ iframe.remove();
1225
1225
  }
1226
1226
  };
1227
1227
  } catch (error) {
@@ -1302,7 +1302,7 @@ class IframeManager {
1302
1302
  messageTransport: createMessageTransport()
1303
1303
  });
1304
1304
  const cleanupBridge = this.setupWaasSDKContainerBridge(transport, waasSDKContainer);
1305
- const iframeDisplay = new iframeMessageHandler(transport);
1305
+ const iframeDisplay = new IframeMessageHandler(transport);
1306
1306
  // Set up iframe request handlers on this transport so the display
1307
1307
  // container can access key shares (e.g. for exportPrivateKey) and the
1308
1308
  // signed session ID — mirrors initializeIframeDisplayForContainer.
package/package.json CHANGED
@@ -1,10 +1,10 @@
1
1
  {
2
2
  "name": "@dynamic-labs-wallet/browser-wallet-client",
3
- "version": "1.0.54",
3
+ "version": "1.0.56",
4
4
  "license": "MIT",
5
5
  "type": "module",
6
6
  "dependencies": {
7
- "@dynamic-labs-wallet/core": "1.0.54",
7
+ "@dynamic-labs-wallet/core": "1.0.56",
8
8
  "@dynamic-labs/logger": "^4.81.0",
9
9
  "@dynamic-labs/message-transport": "^4.81.0"
10
10
  },
@@ -1,6 +1,6 @@
1
1
  import { AuthMode, type CreateWaasSDKContainer, type IframeRequestMessages, type SecureStorageAdapter, type WaasSDKContainer } from '@dynamic-labs-wallet/core';
2
2
  import { type MessageTransportWithDefaultOrigin, type RequestChannel } from '@dynamic-labs/message-transport';
3
- import { iframeMessageHandler } from '../../services/iframeMessageHandler.js';
3
+ import { IframeMessageHandler } from '../../services/iframeMessageHandler.js';
4
4
  export declare class IframeManager {
5
5
  protected chainName: string;
6
6
  protected logger: import("@dynamic-labs/logger").Logger;
@@ -13,7 +13,7 @@ export declare class IframeManager {
13
13
  baseApiUrl: string;
14
14
  baseMPCRelayApiUrl: string;
15
15
  protected messageTransport: MessageTransportWithDefaultOrigin | null;
16
- protected iframeMessageHandler: iframeMessageHandler | null;
16
+ protected iframeMessageHandler: IframeMessageHandler | null;
17
17
  /** Teardown function returned by setupMessageTransportBridge — detaches all
18
18
  * listeners. Tracked so we can rebuild the bridge on iframe recovery without
19
19
  * leaking listeners against the dead iframe. */
@@ -278,7 +278,7 @@ export declare class IframeManager {
278
278
  container: HTMLElement;
279
279
  }): Promise<{
280
280
  iframe: HTMLIFrameElement;
281
- iframeDisplay: iframeMessageHandler;
281
+ iframeDisplay: IframeMessageHandler;
282
282
  cleanup: () => void;
283
283
  }>;
284
284
  /**
@@ -311,7 +311,7 @@ export declare class IframeManager {
311
311
  initializeDisplayForWaasSDKContainer({ waasSDKContainer }: {
312
312
  waasSDKContainer: WaasSDKContainer;
313
313
  }): Promise<{
314
- iframeDisplay: iframeMessageHandler;
314
+ iframeDisplay: IframeMessageHandler;
315
315
  cleanup: () => void;
316
316
  }>;
317
317
  cleanup(): Promise<void>;
@@ -1,6 +1,6 @@
1
1
  import type { AuthMode, BackupKeySharesToGoogleDriveRequest, BackupKeySharesToICloudRequest, LinkWalletToBusinessAccountRequest, AddBusinessAccountMemberRequest, AddBusinessAccountSignerRequest, AddBusinessAccountSignerReshareRequest, CreateWalletAccountRequest, CreateWalletAccountResponse, CreateBusinessAccountRequest, DelegateKeySharesRequest, ExportClientKeysharesFromGoogleDriveRequest, ExportClientKeysharesRequest, ExportPrivateKeyRequest, GetWalletRecoveryStateRequest, GetWalletRequest, GetAllWalletsRequest, GetWalletResponse, GetWalletsRequest, IframeRequestMessages, ImportPrivateKeyRequest, IsPasswordEncryptedRequest, MessageTransportErrorResponse, MigrateFromFireblocksRequest, MigrateFromFireblocksResponse, OfflineExportPrivateKeyRequest, OfflineExportPrivateKeyResponse, FindAleoOwnedRecordsRequest, FindAleoOwnedRecordsResponse, ProveAleoTransactionRequest, ProveAleoTransactionResponse, RefreshWalletAccountSharesRequest, RequestWithElevatedAccessToken, RequestWithTraceContext, RequiresPasswordForOperationRequest, ReshareRequest, RevokeDelegationRequest, SetPasswordRequest, SignMessageRequest, SignRawMessageRequest, SignTransactionRequest, SignTypedDataRequest, TraceContext, GetPrivateBalanceRequest, GetPrivateBalanceResponse, RegisterDustRequest, RegisterDustResponse, CreateTransferTransactionRequest, CreateTransferTransactionResponse, SubmitTransactionRequest, SubmitTransactionResponse, RevertTransactionRequest, RevertTransactionResponse, UnlockWalletRequest, UpdatePasswordRequest, VerifyPasswordRequest, WalletRecoveryState, GetBusinessAccountRequest, ListBusinessAccountsRequest, BusinessAccount, BusinessAccountDetail, BusinessAccountList, BusinessAccountMember, BusinessAccountSigner } from '@dynamic-labs-wallet/core';
2
2
  import { type MessageTransportWithDefaultOrigin, type RequestChannel } from '@dynamic-labs/message-transport';
3
- export declare class iframeMessageHandler {
3
+ export declare class IframeMessageHandler {
4
4
  requestChannel: RequestChannel<IframeRequestMessages>;
5
5
  constructor(messageTransport: MessageTransportWithDefaultOrigin);
6
6
  private handleIframeMessageResponseError;