@dynamic-labs-wallet/browser 0.0.53 → 0.0.55

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.js CHANGED
@@ -416,6 +416,7 @@ const setupMessageTransportBridge = (messageTransport$1, iframe, iframeOrigin)=>
416
416
  // Forward the message to webview via postMessage
417
417
  if (message.origin === 'host') {
418
418
  var _iframe_contentWindow;
419
+ logger.debug(`[host bridge] host --> bridge --> iframe`, message);
419
420
  iframe == null ? void 0 : (_iframe_contentWindow = iframe.contentWindow) == null ? void 0 : _iframe_contentWindow.postMessage(message, iframeOrigin);
420
421
  }
421
422
  });
@@ -423,13 +424,16 @@ const setupMessageTransportBridge = (messageTransport$1, iframe, iframeOrigin)=>
423
424
  const { data } = message;
424
425
  if (!data) return;
425
426
  if ((data == null ? void 0 : data.origin) !== 'webview') {
427
+ logger.debug(`skipped message: ${JSON.stringify(data)}: origin is not host`);
426
428
  return;
427
429
  }
428
430
  if (typeof data !== 'object') {
431
+ logger.debug(`skipped message: ${JSON.stringify(data)}: data is not an object`);
429
432
  return;
430
433
  }
431
434
  try {
432
435
  const message = messageTransport.parseMessageTransportData(data);
436
+ logger.debug(`[host bridge] iframe --> bridge --> host`, message);
433
437
  messageTransport$1.emit(message);
434
438
  } catch (error) {
435
439
  if (!(error instanceof SyntaxError)) {
@@ -659,7 +663,7 @@ class DynamicWalletClient {
659
663
  try {
660
664
  const initializePromises = [
661
665
  this.restoreWallets(),
662
- this.initializeIframeCommunication()
666
+ this.useIframeStorage && this.initializeIframeCommunication()
663
667
  ];
664
668
  await Promise.all(initializePromises);
665
669
  return {
@@ -1127,9 +1131,13 @@ class DynamicWalletClient {
1127
1131
  return serializedEncryptedKeyShare;
1128
1132
  }
1129
1133
  /**
1130
- * helper function to store encrypted backup by wallet from iframe local storage
1134
+ * temporary helper function to store encrypted backup by wallet based on `useIframeStorage` flag
1135
+ * TODO: revise this to only use iframe storage when iframe is deployed
1131
1136
  */ async getClientKeySharesFromLocalStorage({ accountAddress }) {
1132
1137
  var _this_iframeStorage;
1138
+ if (!this.useIframeStorage) {
1139
+ return this.walletMap[accountAddress].clientKeyShares;
1140
+ }
1133
1141
  await this.initializeIframeCommunication();
1134
1142
  const walletObject = await ((_this_iframeStorage = this.iframeStorage) == null ? void 0 : _this_iframeStorage.getItem(accountAddress));
1135
1143
  if (!walletObject) {
@@ -1144,9 +1152,18 @@ class DynamicWalletClient {
1144
1152
  }
1145
1153
  }
1146
1154
  /**
1147
- * helper function to store encrypted backup by wallet from iframe local storage
1155
+ * temporary helper function to store encrypted backup by wallet based on `useIframeStorage` flag
1156
+ * TODO: revise this to only use iframe storage when iframe is deployed
1148
1157
  */ async setClientKeySharesToLocalStorage({ accountAddress, clientKeyShares, overwriteOrMerge = 'merge' }) {
1149
1158
  var _this_iframeStorage;
1159
+ if (!this.useIframeStorage) {
1160
+ var _this_walletMap_accountAddress;
1161
+ this.walletMap[accountAddress] = _extends({}, this.walletMap[accountAddress] || {}, {
1162
+ clientKeyShares: overwriteOrMerge === 'overwrite' ? clientKeyShares : mergeUniqueKeyShares(((_this_walletMap_accountAddress = this.walletMap[accountAddress]) == null ? void 0 : _this_walletMap_accountAddress.clientKeyShares) || [], clientKeyShares)
1163
+ });
1164
+ await this.storage.setItem(this.storageKey, JSON.stringify(this.walletMap));
1165
+ return;
1166
+ }
1150
1167
  await this.initializeIframeCommunication();
1151
1168
  await ((_this_iframeStorage = this.iframeStorage) == null ? void 0 : _this_iframeStorage.setItem(accountAddress, {
1152
1169
  clientKeyShares: overwriteOrMerge === 'overwrite' ? clientKeyShares : mergeUniqueKeyShares(await this.getClientKeySharesFromLocalStorage({
@@ -1410,11 +1427,12 @@ class DynamicWalletClient {
1410
1427
  clientKeyShares: decryptedKeyShares,
1411
1428
  overwriteOrMerge: 'merge'
1412
1429
  });
1413
- // Display the client shares in the container via iframe
1414
- const { iframeDisplay } = await this.initializeIframeDisplayForContainer({
1415
- container: displayContainer
1416
- });
1417
- iframeDisplay.displayClientShares(accountAddress);
1430
+ if (this.useIframeStorage) {
1431
+ const { iframeDisplay } = await this.initializeIframeDisplayForContainer({
1432
+ container: displayContainer
1433
+ });
1434
+ iframeDisplay.displayClientShares(accountAddress);
1435
+ }
1418
1436
  return decryptedKeyShares;
1419
1437
  }
1420
1438
  async exportClientKeyshares({ accountAddress, password }) {
@@ -1629,13 +1647,12 @@ class DynamicWalletClient {
1629
1647
  walletOperation: walletOperation,
1630
1648
  shareCount
1631
1649
  });
1632
- const existingKeyShares = await this.getClientKeySharesFromLocalStorage({
1633
- accountAddress
1634
- });
1635
- await this.setClientKeySharesToLocalStorage({
1636
- accountAddress,
1637
- clientKeyShares: mergeUniqueKeyShares(existingKeyShares, decryptedKeyShares)
1638
- });
1650
+ if (this.useIframeStorage) {
1651
+ var _this_iframeStorage;
1652
+ (_this_iframeStorage = this.iframeStorage) == null ? void 0 : _this_iframeStorage.setItem(`${accountAddress}`, JSON.stringify({
1653
+ clientKeyShares: decryptedKeyShares
1654
+ }));
1655
+ }
1639
1656
  this.logger.debug('Recovered backup', decryptedKeyShares);
1640
1657
  }
1641
1658
  const walletCount = Object.keys(this.walletMap).length;
@@ -1653,7 +1670,7 @@ class DynamicWalletClient {
1653
1670
  const user = await this.apiClient.getUser();
1654
1671
  const waasWallets = (_user_verifiedCredentials = user.verifiedCredentials) == null ? void 0 : _user_verifiedCredentials.filter((vc)=>vc.walletName === 'dynamicwaas');
1655
1672
  const wallets = waasWallets.map((vc)=>{
1656
- var _this_walletMap_vc_address, _vc_walletProperties;
1673
+ var _this_walletMap_vc_address, _this_walletMap_vc_address1, _vc_walletProperties;
1657
1674
  var _this_walletMap_vc_address_derivationPath;
1658
1675
  return {
1659
1676
  walletId: vc.id,
@@ -1662,17 +1679,19 @@ class DynamicWalletClient {
1662
1679
  clientKeySharesBackupInfo: getClientKeyShareBackupInfo({
1663
1680
  walletProperties: vc.walletProperties || {}
1664
1681
  }),
1665
- derivationPath: (_this_walletMap_vc_address_derivationPath = (_this_walletMap_vc_address = this.walletMap[vc.address]) == null ? void 0 : _this_walletMap_vc_address.derivationPath) != null ? _this_walletMap_vc_address_derivationPath : undefined,
1682
+ clientKeyShares: ((_this_walletMap_vc_address = this.walletMap[vc.address]) == null ? void 0 : _this_walletMap_vc_address.clientKeyShares) || [],
1683
+ derivationPath: (_this_walletMap_vc_address_derivationPath = (_this_walletMap_vc_address1 = this.walletMap[vc.address]) == null ? void 0 : _this_walletMap_vc_address1.derivationPath) != null ? _this_walletMap_vc_address_derivationPath : undefined,
1666
1684
  thresholdSignatureScheme: (_vc_walletProperties = vc.walletProperties) == null ? void 0 : _vc_walletProperties.thresholdSignatureScheme
1667
1685
  };
1668
1686
  });
1669
1687
  this.walletMap = wallets.reduce((acc, wallet)=>{
1670
- var _acc_accountAddress;
1688
+ var _acc_wallet_accountAddress, _acc_accountAddress;
1671
1689
  const accountAddress = wallet.accountAddress;
1672
1690
  acc[wallet.accountAddress] = {
1673
1691
  walletId: wallet.walletId,
1674
1692
  chainName: wallet.chainName,
1675
1693
  accountAddress: wallet.accountAddress,
1694
+ clientKeyShares: ((_acc_wallet_accountAddress = acc[wallet.accountAddress]) == null ? void 0 : _acc_wallet_accountAddress.clientKeyShares) || [],
1676
1695
  clientKeySharesBackupInfo: wallet.clientKeySharesBackupInfo,
1677
1696
  derivationPath: ((_acc_accountAddress = acc[accountAddress]) == null ? void 0 : _acc_accountAddress.derivationPath) || undefined,
1678
1697
  thresholdSignatureScheme: wallet.thresholdSignatureScheme
@@ -1691,6 +1710,8 @@ class DynamicWalletClient {
1691
1710
  this.memoryStorage = null;
1692
1711
  this.messageTransport = null;
1693
1712
  this.iframe = null;
1713
+ this.useIframeStorage = false // TODO: remove this when iframe is deployed
1714
+ ;
1694
1715
  this.iframeLoadPromise = null;
1695
1716
  this.environmentId = environmentId;
1696
1717
  this.storageKey = `${STORAGE_KEY}-${storageKey != null ? storageKey : environmentId}`;
@@ -1709,25 +1730,7 @@ class DynamicWalletClient {
1709
1730
  this.memoryStorage = {};
1710
1731
  this.storage = memoryLocalStorageAdapter(this.memoryStorage);
1711
1732
  }
1712
- let environment;
1713
- switch(baseApiUrl){
1714
- case undefined:
1715
- environment = core.ENVIRONMENT_ENUM.production;
1716
- break;
1717
- case core.DYNAMIC_AUTH_PROD_BASE_API_URL:
1718
- environment = core.ENVIRONMENT_ENUM.production;
1719
- break;
1720
- case core.DYNAMIC_AUTH_PREPROD_BASE_API_URL:
1721
- environment = core.ENVIRONMENT_ENUM.preprod;
1722
- break;
1723
- case core.DYNAMIC_AUTH_DEV_BASE_API_URL:
1724
- environment = core.ENVIRONMENT_ENUM.development;
1725
- break;
1726
- default:
1727
- environment = core.ENVIRONMENT_ENUM.development;
1728
- break;
1729
- }
1730
- this.iframeDomain = core.IFRAME_DOMAIN_MAP[environment];
1733
+ this.iframeDomain = core.IFRAME_DOMAIN;
1731
1734
  // Generate unique instanceId when client is created
1732
1735
  this.instanceId = crypto.randomUUID();
1733
1736
  // initialize the client
package/index.esm.js CHANGED
@@ -1,4 +1,4 @@
1
- import { SigningAlgorithm, MPC_RELAY_PROD_API_URL, getMPCChainConfig, BackupLocation, getClientThreshold, MPC_CONFIG, getTSSConfig, WalletOperation, getReshareConfig, DynamicApiClient, ENVIRONMENT_ENUM, DYNAMIC_AUTH_DEV_BASE_API_URL, DYNAMIC_AUTH_PREPROD_BASE_API_URL, DYNAMIC_AUTH_PROD_BASE_API_URL, IFRAME_DOMAIN_MAP } from '@dynamic-labs-wallet/core';
1
+ import { SigningAlgorithm, MPC_RELAY_PROD_API_URL, getMPCChainConfig, BackupLocation, getClientThreshold, MPC_CONFIG, getTSSConfig, WalletOperation, getReshareConfig, DynamicApiClient, IFRAME_DOMAIN } from '@dynamic-labs-wallet/core';
2
2
  export * from '@dynamic-labs-wallet/core';
3
3
  import { BIP340, Ed25519, Ecdsa, MessageHash, EcdsaKeygenResult, Ed25519KeygenResult, BIP340KeygenResult } from './internal/web';
4
4
  export { BIP340, BIP340InitKeygenResult, BIP340KeygenResult, Ecdsa, EcdsaInitKeygenResult, EcdsaKeygenResult, EcdsaPublicKey, EcdsaSignature, Ed25519, Ed25519InitKeygenResult, Ed25519KeygenResult, MessageHash } from './internal/web';
@@ -416,6 +416,7 @@ const setupMessageTransportBridge = (messageTransport, iframe, iframeOrigin)=>{
416
416
  // Forward the message to webview via postMessage
417
417
  if (message.origin === 'host') {
418
418
  var _iframe_contentWindow;
419
+ logger.debug(`[host bridge] host --> bridge --> iframe`, message);
419
420
  iframe == null ? void 0 : (_iframe_contentWindow = iframe.contentWindow) == null ? void 0 : _iframe_contentWindow.postMessage(message, iframeOrigin);
420
421
  }
421
422
  });
@@ -423,13 +424,16 @@ const setupMessageTransportBridge = (messageTransport, iframe, iframeOrigin)=>{
423
424
  const { data } = message;
424
425
  if (!data) return;
425
426
  if ((data == null ? void 0 : data.origin) !== 'webview') {
427
+ logger.debug(`skipped message: ${JSON.stringify(data)}: origin is not host`);
426
428
  return;
427
429
  }
428
430
  if (typeof data !== 'object') {
431
+ logger.debug(`skipped message: ${JSON.stringify(data)}: data is not an object`);
429
432
  return;
430
433
  }
431
434
  try {
432
435
  const message = parseMessageTransportData(data);
436
+ logger.debug(`[host bridge] iframe --> bridge --> host`, message);
433
437
  messageTransport.emit(message);
434
438
  } catch (error) {
435
439
  if (!(error instanceof SyntaxError)) {
@@ -659,7 +663,7 @@ class DynamicWalletClient {
659
663
  try {
660
664
  const initializePromises = [
661
665
  this.restoreWallets(),
662
- this.initializeIframeCommunication()
666
+ this.useIframeStorage && this.initializeIframeCommunication()
663
667
  ];
664
668
  await Promise.all(initializePromises);
665
669
  return {
@@ -1127,9 +1131,13 @@ class DynamicWalletClient {
1127
1131
  return serializedEncryptedKeyShare;
1128
1132
  }
1129
1133
  /**
1130
- * helper function to store encrypted backup by wallet from iframe local storage
1134
+ * temporary helper function to store encrypted backup by wallet based on `useIframeStorage` flag
1135
+ * TODO: revise this to only use iframe storage when iframe is deployed
1131
1136
  */ async getClientKeySharesFromLocalStorage({ accountAddress }) {
1132
1137
  var _this_iframeStorage;
1138
+ if (!this.useIframeStorage) {
1139
+ return this.walletMap[accountAddress].clientKeyShares;
1140
+ }
1133
1141
  await this.initializeIframeCommunication();
1134
1142
  const walletObject = await ((_this_iframeStorage = this.iframeStorage) == null ? void 0 : _this_iframeStorage.getItem(accountAddress));
1135
1143
  if (!walletObject) {
@@ -1144,9 +1152,18 @@ class DynamicWalletClient {
1144
1152
  }
1145
1153
  }
1146
1154
  /**
1147
- * helper function to store encrypted backup by wallet from iframe local storage
1155
+ * temporary helper function to store encrypted backup by wallet based on `useIframeStorage` flag
1156
+ * TODO: revise this to only use iframe storage when iframe is deployed
1148
1157
  */ async setClientKeySharesToLocalStorage({ accountAddress, clientKeyShares, overwriteOrMerge = 'merge' }) {
1149
1158
  var _this_iframeStorage;
1159
+ if (!this.useIframeStorage) {
1160
+ var _this_walletMap_accountAddress;
1161
+ this.walletMap[accountAddress] = _extends({}, this.walletMap[accountAddress] || {}, {
1162
+ clientKeyShares: overwriteOrMerge === 'overwrite' ? clientKeyShares : mergeUniqueKeyShares(((_this_walletMap_accountAddress = this.walletMap[accountAddress]) == null ? void 0 : _this_walletMap_accountAddress.clientKeyShares) || [], clientKeyShares)
1163
+ });
1164
+ await this.storage.setItem(this.storageKey, JSON.stringify(this.walletMap));
1165
+ return;
1166
+ }
1150
1167
  await this.initializeIframeCommunication();
1151
1168
  await ((_this_iframeStorage = this.iframeStorage) == null ? void 0 : _this_iframeStorage.setItem(accountAddress, {
1152
1169
  clientKeyShares: overwriteOrMerge === 'overwrite' ? clientKeyShares : mergeUniqueKeyShares(await this.getClientKeySharesFromLocalStorage({
@@ -1410,11 +1427,12 @@ class DynamicWalletClient {
1410
1427
  clientKeyShares: decryptedKeyShares,
1411
1428
  overwriteOrMerge: 'merge'
1412
1429
  });
1413
- // Display the client shares in the container via iframe
1414
- const { iframeDisplay } = await this.initializeIframeDisplayForContainer({
1415
- container: displayContainer
1416
- });
1417
- iframeDisplay.displayClientShares(accountAddress);
1430
+ if (this.useIframeStorage) {
1431
+ const { iframeDisplay } = await this.initializeIframeDisplayForContainer({
1432
+ container: displayContainer
1433
+ });
1434
+ iframeDisplay.displayClientShares(accountAddress);
1435
+ }
1418
1436
  return decryptedKeyShares;
1419
1437
  }
1420
1438
  async exportClientKeyshares({ accountAddress, password }) {
@@ -1629,13 +1647,12 @@ class DynamicWalletClient {
1629
1647
  walletOperation: walletOperation,
1630
1648
  shareCount
1631
1649
  });
1632
- const existingKeyShares = await this.getClientKeySharesFromLocalStorage({
1633
- accountAddress
1634
- });
1635
- await this.setClientKeySharesToLocalStorage({
1636
- accountAddress,
1637
- clientKeyShares: mergeUniqueKeyShares(existingKeyShares, decryptedKeyShares)
1638
- });
1650
+ if (this.useIframeStorage) {
1651
+ var _this_iframeStorage;
1652
+ (_this_iframeStorage = this.iframeStorage) == null ? void 0 : _this_iframeStorage.setItem(`${accountAddress}`, JSON.stringify({
1653
+ clientKeyShares: decryptedKeyShares
1654
+ }));
1655
+ }
1639
1656
  this.logger.debug('Recovered backup', decryptedKeyShares);
1640
1657
  }
1641
1658
  const walletCount = Object.keys(this.walletMap).length;
@@ -1653,7 +1670,7 @@ class DynamicWalletClient {
1653
1670
  const user = await this.apiClient.getUser();
1654
1671
  const waasWallets = (_user_verifiedCredentials = user.verifiedCredentials) == null ? void 0 : _user_verifiedCredentials.filter((vc)=>vc.walletName === 'dynamicwaas');
1655
1672
  const wallets = waasWallets.map((vc)=>{
1656
- var _this_walletMap_vc_address, _vc_walletProperties;
1673
+ var _this_walletMap_vc_address, _this_walletMap_vc_address1, _vc_walletProperties;
1657
1674
  var _this_walletMap_vc_address_derivationPath;
1658
1675
  return {
1659
1676
  walletId: vc.id,
@@ -1662,17 +1679,19 @@ class DynamicWalletClient {
1662
1679
  clientKeySharesBackupInfo: getClientKeyShareBackupInfo({
1663
1680
  walletProperties: vc.walletProperties || {}
1664
1681
  }),
1665
- derivationPath: (_this_walletMap_vc_address_derivationPath = (_this_walletMap_vc_address = this.walletMap[vc.address]) == null ? void 0 : _this_walletMap_vc_address.derivationPath) != null ? _this_walletMap_vc_address_derivationPath : undefined,
1682
+ clientKeyShares: ((_this_walletMap_vc_address = this.walletMap[vc.address]) == null ? void 0 : _this_walletMap_vc_address.clientKeyShares) || [],
1683
+ derivationPath: (_this_walletMap_vc_address_derivationPath = (_this_walletMap_vc_address1 = this.walletMap[vc.address]) == null ? void 0 : _this_walletMap_vc_address1.derivationPath) != null ? _this_walletMap_vc_address_derivationPath : undefined,
1666
1684
  thresholdSignatureScheme: (_vc_walletProperties = vc.walletProperties) == null ? void 0 : _vc_walletProperties.thresholdSignatureScheme
1667
1685
  };
1668
1686
  });
1669
1687
  this.walletMap = wallets.reduce((acc, wallet)=>{
1670
- var _acc_accountAddress;
1688
+ var _acc_wallet_accountAddress, _acc_accountAddress;
1671
1689
  const accountAddress = wallet.accountAddress;
1672
1690
  acc[wallet.accountAddress] = {
1673
1691
  walletId: wallet.walletId,
1674
1692
  chainName: wallet.chainName,
1675
1693
  accountAddress: wallet.accountAddress,
1694
+ clientKeyShares: ((_acc_wallet_accountAddress = acc[wallet.accountAddress]) == null ? void 0 : _acc_wallet_accountAddress.clientKeyShares) || [],
1676
1695
  clientKeySharesBackupInfo: wallet.clientKeySharesBackupInfo,
1677
1696
  derivationPath: ((_acc_accountAddress = acc[accountAddress]) == null ? void 0 : _acc_accountAddress.derivationPath) || undefined,
1678
1697
  thresholdSignatureScheme: wallet.thresholdSignatureScheme
@@ -1691,6 +1710,8 @@ class DynamicWalletClient {
1691
1710
  this.memoryStorage = null;
1692
1711
  this.messageTransport = null;
1693
1712
  this.iframe = null;
1713
+ this.useIframeStorage = false // TODO: remove this when iframe is deployed
1714
+ ;
1694
1715
  this.iframeLoadPromise = null;
1695
1716
  this.environmentId = environmentId;
1696
1717
  this.storageKey = `${STORAGE_KEY}-${storageKey != null ? storageKey : environmentId}`;
@@ -1709,25 +1730,7 @@ class DynamicWalletClient {
1709
1730
  this.memoryStorage = {};
1710
1731
  this.storage = memoryLocalStorageAdapter(this.memoryStorage);
1711
1732
  }
1712
- let environment;
1713
- switch(baseApiUrl){
1714
- case undefined:
1715
- environment = ENVIRONMENT_ENUM.production;
1716
- break;
1717
- case DYNAMIC_AUTH_PROD_BASE_API_URL:
1718
- environment = ENVIRONMENT_ENUM.production;
1719
- break;
1720
- case DYNAMIC_AUTH_PREPROD_BASE_API_URL:
1721
- environment = ENVIRONMENT_ENUM.preprod;
1722
- break;
1723
- case DYNAMIC_AUTH_DEV_BASE_API_URL:
1724
- environment = ENVIRONMENT_ENUM.development;
1725
- break;
1726
- default:
1727
- environment = ENVIRONMENT_ENUM.development;
1728
- break;
1729
- }
1730
- this.iframeDomain = IFRAME_DOMAIN_MAP[environment];
1733
+ this.iframeDomain = IFRAME_DOMAIN;
1731
1734
  // Generate unique instanceId when client is created
1732
1735
  this.instanceId = crypto.randomUUID();
1733
1736
  // initialize the client
package/package.json CHANGED
@@ -1,9 +1,9 @@
1
1
  {
2
2
  "name": "@dynamic-labs-wallet/browser",
3
- "version": "0.0.53",
3
+ "version": "0.0.55",
4
4
  "license": "Licensed under the Dynamic Labs, Inc. Terms Of Service (https://www.dynamic.xyz/terms-conditions)",
5
5
  "dependencies": {
6
- "@dynamic-labs-wallet/core": "0.0.53",
6
+ "@dynamic-labs-wallet/core": "0.0.55",
7
7
  "@dynamic-labs/logger": "^4.9.9",
8
8
  "@dynamic-labs/message-transport": "^4.9.9"
9
9
  },
package/src/client.d.ts CHANGED
@@ -24,6 +24,7 @@ export declare class DynamicWalletClient {
24
24
  protected messageTransport: MessageTransportWithDefaultOrigin | null;
25
25
  protected iframe: HTMLIFrameElement | null;
26
26
  readonly instanceId: string;
27
+ protected useIframeStorage: boolean;
27
28
  readonly iframeDomain: string;
28
29
  private iframeLoadPromise;
29
30
  constructor({ environmentId, authToken, baseApiUrl, baseMPCRelayApiUrl, storageKey, debug, }: DynamicWalletClientProps);
@@ -222,13 +223,15 @@ export declare class DynamicWalletClient {
222
223
  password?: string;
223
224
  }): Promise<string>;
224
225
  /**
225
- * helper function to store encrypted backup by wallet from iframe local storage
226
+ * temporary helper function to store encrypted backup by wallet based on `useIframeStorage` flag
227
+ * TODO: revise this to only use iframe storage when iframe is deployed
226
228
  */
227
229
  getClientKeySharesFromLocalStorage({ accountAddress, }: {
228
230
  accountAddress: string;
229
231
  }): Promise<ClientKeyShare[]>;
230
232
  /**
231
- * helper function to store encrypted backup by wallet from iframe local storage
233
+ * temporary helper function to store encrypted backup by wallet based on `useIframeStorage` flag
234
+ * TODO: revise this to only use iframe storage when iframe is deployed
232
235
  */
233
236
  setClientKeySharesToLocalStorage({ accountAddress, clientKeyShares, overwriteOrMerge, }: {
234
237
  accountAddress: string;
@@ -1 +1 @@
1
- {"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../../packages/src/client.ts"],"names":[],"mappings":"AAAA,OAAO,EAGL,wBAAwB,EACxB,gBAAgB,EAIhB,cAAc,EAEd,wBAAwB,EACxB,gBAAgB,EAChB,kBAAkB,EAClB,eAAe,EAMhB,MAAM,2BAA2B,CAAC;AAEnC,OAAO,EAIL,cAAc,EACd,iBAAiB,EACjB,mBAAmB,EACnB,kBAAkB,EAElB,cAAc,EACf,MAAM,eAAe,CAAC;AAEvB,OAAO,EAAE,sBAAsB,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAoBrE,OAAO,EAGL,gBAAgB,EAEjB,MAAM,yBAAyB,CAAC;AACjC,OAAO,EAAE,gBAAgB,EAAE,MAAM,SAAS,CAAC;AAS3C,OAAO,EAGL,KAAK,iCAAiC,EACvC,MAAM,iCAAiC,CAAC;AACzC,OAAO,EAAE,4BAA4B,EAAE,MAAM,+BAA+B,CAAC;AAE7E,OAAO,EAAE,2BAA2B,EAAE,MAAM,0BAA0B,CAAC;AAEvE,qBAAa,mBAAmB;IACvB,aAAa,EAAE,MAAM,CAAC;IACtB,UAAU,EAAE,MAA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EACnB,cAAc,EACd,QAAoB,EACpB,eAA8C,GAC/C,EAAE;QACD,cAAc,EAAE,MAAM,CAAC;QACvB,QAAQ,CAAC,EAAE,MAAM,CAAC;QAClB,eAAe,CAAC,EAAE,eAAe,CAAC;KACnC;IA6CK,mBAAmB,CAAC,EACxB,cAAc,GACf,EAAE;QACD,cAAc,EAAE,MAAM,CAAC;KACxB,GAAG,OAAO,CAAC,OAAO,CAAC;IAMpB;;OAEG;IACG,4BAA4B,CAAC,EACjC,cAAc,EACd,eAAiD,GAClD,EAAE;QACD,cAAc,EAAE,MAAM,CAAC;QACvB,eAAe,CAAC,EAAE,eAAe,CAAC;KACnC,GAAG,OAAO,CAAC,OAAO,CAAC;IAYpB;;OAEG;IACG,uCAAuC,CAAC,EAC5C,cAAc,EACd,eAAiD,GAClD,EAAE;QACD,cAAc,EAAE,MAAM,CAAC;QACvB,eAAe,CAAC,EAAE,eAAe,CAAC;KACnC,GAAG,OAAO,CAAC,OAAO,CAAC;IAgCd,iCAAiC,CAAC,EACtC,cAAc,GACf,EAAE;QACD,cAAc,EAAE,MAAM,CAAC;KACxB,GAAG,OAAO,CAAC,kBAAkB,CAAC;IAoBzB,SAAS,CAAC,EACd,cAAc,EACd,eAA8C,EAC9C,UAAsB,EACtB,QAAoB,GACrB,EAAE;QACD,cAAc,EAAE,MAAM,CAAC;QACvB,eAAe,CAAC,EAAE,eAAe,CAAC;QAClC,UAAU,CAAC,EAAE,MAAM,CAAC;QACpB,QAAQ,CAAC,EAAE,MAAM,CAAC;KACnB;IA2EK,UAAU;CAkCjB"}
1
+ {"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../../packages/src/client.ts"],"names":[],"mappings":"AAAA,OAAO,EAIL,wBAAwB,EACxB,gBAAgB,EAIhB,cAAc,EAEd,wBAAwB,EACxB,gBAAgB,EAChB,kBAAkB,EAClB,eAAe,EAChB,MAAM,2BAA2B,CAAC;AAEnC,OAAO,EAIL,cAAc,EACd,iBAAiB,EACjB,mBAAmB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SAAS,CAAC,EACd,cAAc,EACd,eAA8C,EAC9C,UAAsB,EACtB,QAAoB,GACrB,EAAE;QACD,cAAc,EAAE,MAAM,CAAC;QACvB,eAAe,CAAC,EAAE,eAAe,CAAC;QAClC,UAAU,CAAC,EAAE,MAAM,CAAC;QACpB,QAAQ,CAAC,EAAE,MAAM,CAAC;KACnB;IAyEK,UAAU;CAoCjB"}
@@ -1 +1 @@
1
- {"version":3,"file":"messageTransportBridge.d.ts","sourceRoot":"","sources":["../../src/services/messageTransportBridge.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,iCAAiC,EAGvC,MAAM,iCAAiC,CAAC;AAGzC,eAAO,MAAM,2BAA2B,qBACpB,iCAAiC,UAC3C,iBAAiB,gBACX,MAAM,SAgDrB,CAAC"}
1
+ {"version":3,"file":"messageTransportBridge.d.ts","sourceRoot":"","sources":["../../src/services/messageTransportBridge.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,iCAAiC,EAGvC,MAAM,iCAAiC,CAAC;AAGzC,eAAO,MAAM,2BAA2B,qBACpB,iCAAiC,UAC3C,iBAAiB,gBACX,MAAM,SAwDrB,CAAC"}
package/src/types.d.ts CHANGED
@@ -1,8 +1,10 @@
1
1
  import { KeyShareBackupInfo, ThresholdSignatureScheme } from '@dynamic-labs-wallet/core';
2
+ import { ClientKeyShare } from './mpc/types';
2
3
  export interface WalletProperties {
3
4
  chainName: string;
4
5
  walletId: string;
5
6
  accountAddress: string;
7
+ clientKeyShares: ClientKeyShare[];
6
8
  clientKeySharesBackupInfo: KeyShareBackupInfo;
7
9
  thresholdSignatureScheme: ThresholdSignatureScheme;
8
10
  derivationPath?: string;
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../packages/src/types.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,kBAAkB,EAClB,wBAAwB,EACzB,MAAM,2BAA2B,CAAC;AAEnC,MAAM,WAAW,gBAAgB;IAC/B,SAAS,EAAE,M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