@dynamic-labs-wallet/browser 0.0.246 → 0.0.248

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
@@ -1732,7 +1732,7 @@ class DynamicWalletClient {
1732
1732
  });
1733
1733
  return data;
1734
1734
  }
1735
- async forwardMPCClientSign({ chainName, message, roomId, keyShare, derivationPath, formattedMessage, dynamicRequestId, isFormatted, traceContext }) {
1735
+ async forwardMPCClientSign({ chainName, message, roomId, keyShare, derivationPath, formattedMessage, dynamicRequestId, isFormatted, traceContext, bitcoinConfig }) {
1736
1736
  try {
1737
1737
  if (!this.apiClient.forwardMPCClient.connected) {
1738
1738
  await this.initializeForwardMPCClient();
@@ -1742,12 +1742,14 @@ class DynamicWalletClient {
1742
1742
  isFormatted,
1743
1743
  chainName
1744
1744
  });
1745
+ const chainConfig = core.getMPCChainConfig(chainName, bitcoinConfig);
1746
+ const signingAlgo = chainConfig.signingAlgorithm;
1745
1747
  this.logger.info('Forward MPC enabled, signing message with forward MPC', this.getTraceContext(traceContext));
1746
1748
  const signature = await this.apiClient.forwardMPCClient.signMessage({
1747
1749
  keyshare: keyShare,
1748
- message: chainName === 'SVM' ? formattedMessage : messageForForwardMPC,
1750
+ message: chainName === 'SVM' || chainName === 'TON' ? formattedMessage : messageForForwardMPC,
1749
1751
  relayDomain: this.baseMPCRelayApiUrl || '',
1750
- signingAlgo: chainName === 'EVM' ? 'ECDSA' : 'ED25519',
1752
+ signingAlgo: signingAlgo,
1751
1753
  hashAlgo: chainName === 'EVM' && !isFormatted ? 'keccak256' : undefined,
1752
1754
  derivationPath: derivationPath,
1753
1755
  roomUuid: roomId,
@@ -1759,8 +1761,9 @@ class DynamicWalletClient {
1759
1761
  if (!(signatureBytes instanceof Uint8Array)) {
1760
1762
  throw new TypeError(`Invalid signature format: expected Uint8Array, got ${typeof signatureBytes}`);
1761
1763
  }
1762
- // Convert to EcdsaSignature
1763
- if (chainName === 'EVM') {
1764
+ // Convert to EcdsaSignature for ECDSA signing algorithm (EVM and BTC Native SegWit)
1765
+ // For BIP340 (BTC Taproot) and ED25519 (SVM/SUI), return raw bytes
1766
+ if (signingAlgo === 'ECDSA') {
1764
1767
  const ecdsaSignature = web.EcdsaSignature.fromBuffer(signatureBytes);
1765
1768
  return ecdsaSignature;
1766
1769
  } else {
@@ -1801,7 +1804,8 @@ class DynamicWalletClient {
1801
1804
  formattedMessage,
1802
1805
  dynamicRequestId,
1803
1806
  isFormatted,
1804
- traceContext
1807
+ traceContext,
1808
+ bitcoinConfig
1805
1809
  });
1806
1810
  }
1807
1811
  // Unwrap MessageHash for BIP340 as it expects Uint8Array or hex string
@@ -1884,10 +1888,8 @@ class DynamicWalletClient {
1884
1888
  operation: 'serverSign'
1885
1889
  }, this.getTraceContext(traceContext)));
1886
1890
  const derivationPath = wallet.derivationPath && wallet.derivationPath != '' ? new Uint32Array(Object.values(JSON.parse(wallet.derivationPath))) : undefined;
1887
- // Perform the client sign and return the signature
1888
- const clientKeyShares = await this.getClientKeySharesFromLocalStorage({
1889
- accountAddress
1890
- });
1891
+ // Ensure client key shares exist before signing
1892
+ const clientKeyShares = await this.ensureClientShare(accountAddress, chainName);
1891
1893
  const signature = await this.clientSign({
1892
1894
  chainName,
1893
1895
  message,
@@ -1953,9 +1955,17 @@ class DynamicWalletClient {
1953
1955
  password,
1954
1956
  signedSessionId
1955
1957
  });
1958
+ const walletProperties = this.walletMap[accountAddress];
1959
+ let bitcoinConfig;
1960
+ if (chainName === 'BTC' && (walletProperties == null ? void 0 : walletProperties.addressType)) {
1961
+ bitcoinConfig = {
1962
+ addressType: walletProperties.addressType
1963
+ };
1964
+ }
1956
1965
  const mpcSigner = getMPCSigner({
1957
1966
  chainName,
1958
- baseRelayUrl: this.baseMPCRelayApiUrl
1967
+ baseRelayUrl: this.baseMPCRelayApiUrl,
1968
+ bitcoinConfig
1959
1969
  });
1960
1970
  // Create the room and refresh the shares
1961
1971
  const data = await this.apiClient.refreshWalletAccountShares({
@@ -1964,14 +1974,14 @@ class DynamicWalletClient {
1964
1974
  mfaToken
1965
1975
  });
1966
1976
  const roomId = data.roomId;
1967
- const clientKeyShares = await this.getClientKeySharesFromLocalStorage({
1968
- accountAddress
1969
- });
1977
+ // Ensure client key shares exist before refresh
1978
+ const clientKeyShares = await this.ensureClientShare(accountAddress, chainName);
1970
1979
  const refreshResults = await Promise.all(clientKeyShares.map((clientKeyShare)=>mpcSigner.refresh(roomId, clientKeyShare)));
1971
- await this.setClientKeySharesToLocalStorage({
1980
+ await this.setClientKeySharesToStorage({
1972
1981
  accountAddress,
1973
1982
  clientKeyShares: refreshResults,
1974
- overwriteOrMerge: 'overwrite'
1983
+ overwriteOrMerge: 'overwrite',
1984
+ chainName
1975
1985
  });
1976
1986
  await this.storeEncryptedBackupByWallet({
1977
1987
  accountAddress,
@@ -2053,8 +2063,9 @@ class DynamicWalletClient {
2053
2063
  }, ()=>mpcSigner.initKeygen()));
2054
2064
  const newClientKeygenIds = newClientInitKeygenResults.map((result)=>result.keygenId);
2055
2065
  // Get existing client shares
2056
- const existingClientKeyShares = (await this.getClientKeySharesFromLocalStorage({
2057
- accountAddress
2066
+ const existingClientKeyShares = (await this.getClientKeySharesFromStorage({
2067
+ accountAddress,
2068
+ chainName
2058
2069
  })).slice(0, existingClientShareCount);
2059
2070
  const existingClientKeygenIds = await Promise.all(existingClientKeyShares.map(async (keyShare)=>await this.getExportId({
2060
2071
  chainName,
@@ -2112,6 +2123,10 @@ class DynamicWalletClient {
2112
2123
  oldThresholdSignatureScheme,
2113
2124
  newThresholdSignatureScheme
2114
2125
  });
2126
+ // Ensure existing client key shares exist before reshare
2127
+ if (existingClientKeyShares.length === 0) {
2128
+ throw new Error(`Client key shares are required for reshare operation but none were found for account address: ${accountAddress}`);
2129
+ }
2115
2130
  const clientKeygenIds = [
2116
2131
  ...newClientKeygenIds,
2117
2132
  ...existingClientKeygenIds
@@ -2136,9 +2151,17 @@ class DynamicWalletClient {
2136
2151
  ...serverKeygenIds,
2137
2152
  ...newServerKeygenIds
2138
2153
  ];
2154
+ const walletProperties = this.walletMap[accountAddress];
2155
+ let bitcoinConfig;
2156
+ if (chainName === 'BTC' && (walletProperties == null ? void 0 : walletProperties.addressType)) {
2157
+ bitcoinConfig = {
2158
+ addressType: walletProperties.addressType
2159
+ };
2160
+ }
2139
2161
  const mpcSigner = getMPCSigner({
2140
2162
  chainName,
2141
- baseRelayUrl: this.baseMPCRelayApiUrl
2163
+ baseRelayUrl: this.baseMPCRelayApiUrl,
2164
+ bitcoinConfig
2142
2165
  });
2143
2166
  const existingResharePromises = existingClientKeyShares.map((keyShare)=>mpcSigner.reshareRemainingParty(roomId, newMpcConfig.threshold, keyShare, allPartyKeygenIds));
2144
2167
  const newResharePromises = newClientInitKeygenResults.map((keygenResult)=>mpcSigner.reshareNewParty(roomId, oldMpcConfig.threshold, newMpcConfig.threshold, keygenResult, allPartyKeygenIds));
@@ -2184,10 +2207,12 @@ class DynamicWalletClient {
2184
2207
  this.walletMap[accountAddress] = _extends({}, this.walletMap[accountAddress], {
2185
2208
  thresholdSignatureScheme: newThresholdSignatureScheme
2186
2209
  });
2187
- await this.setClientKeySharesToLocalStorage({
2210
+ // store client key shares to storage (localStorage or secureStorage)
2211
+ await this.setClientKeySharesToStorage({
2188
2212
  accountAddress,
2189
2213
  clientKeyShares: distribution.clientShares,
2190
- overwriteOrMerge: 'overwrite'
2214
+ overwriteOrMerge: 'overwrite',
2215
+ chainName
2191
2216
  });
2192
2217
  await this.backupSharesWithDistribution({
2193
2218
  accountAddress,
@@ -2212,10 +2237,11 @@ class DynamicWalletClient {
2212
2237
  this.walletMap[accountAddress] = _extends({}, this.walletMap[accountAddress], {
2213
2238
  thresholdSignatureScheme: oldThresholdSignatureScheme
2214
2239
  });
2215
- await this.setClientKeySharesToLocalStorage({
2240
+ await this.setClientKeySharesToStorage({
2216
2241
  accountAddress,
2217
2242
  clientKeyShares: [],
2218
- overwriteOrMerge: 'overwrite'
2243
+ overwriteOrMerge: 'overwrite',
2244
+ chainName
2219
2245
  });
2220
2246
  throw error;
2221
2247
  }
@@ -2355,7 +2381,7 @@ class DynamicWalletClient {
2355
2381
  }
2356
2382
  }
2357
2383
  async getReconstructedKeyShare(accountAddress, mpcSigner) {
2358
- const clientKeyShares = await this.getClientKeySharesFromLocalStorage({
2384
+ const clientKeyShares = await this.getClientKeySharesFromStorage({
2359
2385
  accountAddress
2360
2386
  });
2361
2387
  if (!clientKeyShares || clientKeyShares.length === 0) {
@@ -2413,6 +2439,7 @@ class DynamicWalletClient {
2413
2439
  }
2414
2440
  async offlineExportKey({ chainName, keyShares, derivationPath }) {
2415
2441
  try {
2442
+ // Enforce share presence
2416
2443
  if (!keyShares || keyShares.length < 2) {
2417
2444
  throw new Error(`Must provide at least min threshold of key shares`);
2418
2445
  }
@@ -2468,9 +2495,36 @@ class DynamicWalletClient {
2468
2495
  return serializedEncryptedKeyShare;
2469
2496
  }
2470
2497
  /**
2471
- * helper function to store encrypted backup by wallet from iframe local storage
2472
- */ async getClientKeySharesFromLocalStorage({ accountAddress }) {
2473
- var _this_storage;
2498
+ * Helper function to get client key shares from storage.
2499
+ * Uses secureStorage when available (mobile), otherwise falls back to localStorage (browser).
2500
+ */ async getClientKeySharesFromStorage({ accountAddress, chainName }) {
2501
+ var _this_walletMap_accountAddress, _this_storage;
2502
+ // Get chainName from walletMap if not provided
2503
+ const resolvedChainName = chainName || ((_this_walletMap_accountAddress = this.walletMap[accountAddress]) == null ? void 0 : _this_walletMap_accountAddress.chainName);
2504
+ if (!resolvedChainName) {
2505
+ this.logger.debug(`[DynamicWaasWalletClient] No chainName found for accountAddress: ${accountAddress}, falling back to localStorage lookup`);
2506
+ }
2507
+ // Use secure storage if available (mobile)
2508
+ if (this.secureStorage) {
2509
+ if (!resolvedChainName) {
2510
+ this.logger.warn(`[DynamicWaasWalletClient] secureStorage requires chainName but it was not provided for accountAddress: ${accountAddress}`);
2511
+ return [];
2512
+ }
2513
+ try {
2514
+ return await this.secureStorage.getClientKeyShare(resolvedChainName, accountAddress);
2515
+ } catch (error) {
2516
+ logError({
2517
+ message: `Error getting client key shares from secure storage for accountAddress: ${accountAddress}`,
2518
+ error: error,
2519
+ context: {
2520
+ accountAddress,
2521
+ chainName: resolvedChainName
2522
+ }
2523
+ });
2524
+ return [];
2525
+ }
2526
+ }
2527
+ // Fallback to localStorage (browser)
2474
2528
  const walletObject = await ((_this_storage = this.storage) == null ? void 0 : _this_storage.getItem(accountAddress));
2475
2529
  if (!walletObject) {
2476
2530
  this.logger.debug(`[DynamicWaasWalletClient] No item found in iframe local storage for accountAddress: ${accountAddress}`);
@@ -2496,16 +2550,67 @@ class DynamicWalletClient {
2496
2550
  }
2497
2551
  }
2498
2552
  /**
2499
- * helper function to store encrypted backup by wallet from iframe local storage
2500
- */ async setClientKeySharesToLocalStorage({ accountAddress, clientKeyShares, overwriteOrMerge = 'merge' }) {
2501
- var _this_storage;
2553
+ * Helper function to store client key shares in storage.
2554
+ * Uses secureStorage when available (mobile), otherwise falls back to localStorage (browser).
2555
+ */ async setClientKeySharesToStorage({ accountAddress, clientKeyShares, overwriteOrMerge = 'merge', chainName }) {
2556
+ var _this_walletMap_accountAddress, _this_storage;
2557
+ // Get chainName from walletMap if not provided
2558
+ const resolvedChainName = chainName || ((_this_walletMap_accountAddress = this.walletMap[accountAddress]) == null ? void 0 : _this_walletMap_accountAddress.chainName);
2559
+ // Use secure storage if available (mobile)
2560
+ if (this.secureStorage) {
2561
+ if (!resolvedChainName) {
2562
+ const error = new Error(`secureStorage requires chainName but it was not provided for accountAddress: ${accountAddress}`);
2563
+ logError({
2564
+ message: error.message,
2565
+ error,
2566
+ context: {
2567
+ accountAddress
2568
+ }
2569
+ });
2570
+ throw error;
2571
+ }
2572
+ try {
2573
+ const sharesToStore = overwriteOrMerge === 'overwrite' ? clientKeyShares : mergeUniqueKeyShares(await this.getClientKeySharesFromStorage({
2574
+ accountAddress,
2575
+ chainName: resolvedChainName
2576
+ }), clientKeyShares);
2577
+ await this.secureStorage.setClientKeyShare(resolvedChainName, accountAddress, sharesToStore);
2578
+ return;
2579
+ } catch (error) {
2580
+ logError({
2581
+ message: `Error setting client key shares in secure storage for accountAddress: ${accountAddress}`,
2582
+ error: error,
2583
+ context: {
2584
+ accountAddress,
2585
+ chainName: resolvedChainName
2586
+ }
2587
+ });
2588
+ throw error;
2589
+ }
2590
+ }
2591
+ // Fallback to localStorage (browser)
2502
2592
  const stringifiedClientKeyShares = JSON.stringify({
2503
- clientKeyShares: overwriteOrMerge === 'overwrite' ? clientKeyShares : mergeUniqueKeyShares(await this.getClientKeySharesFromLocalStorage({
2504
- accountAddress
2593
+ clientKeyShares: overwriteOrMerge === 'overwrite' ? clientKeyShares : mergeUniqueKeyShares(await this.getClientKeySharesFromStorage({
2594
+ accountAddress,
2595
+ chainName: resolvedChainName
2505
2596
  }), clientKeyShares)
2506
2597
  });
2507
2598
  await ((_this_storage = this.storage) == null ? void 0 : _this_storage.setItem(accountAddress, stringifiedClientKeyShares));
2508
2599
  }
2600
+ /**
2601
+ * Ensures that client key shares exist for the given account address.
2602
+ * Throws an error if no shares are found.
2603
+ * This method enforces share presence before sensitive operations.
2604
+ */ async ensureClientShare(accountAddress, chainName) {
2605
+ const shares = await this.getClientKeySharesFromStorage({
2606
+ accountAddress,
2607
+ chainName
2608
+ });
2609
+ if (!shares || shares.length === 0) {
2610
+ throw new Error(`Client key share is missing for account address: ${accountAddress}`);
2611
+ }
2612
+ return shares;
2613
+ }
2509
2614
  async backupSharesWithDistribution({ accountAddress, password, signedSessionId, distribution, preserveDelegatedLocation = false }) {
2510
2615
  const dynamicRequestId = uuid.v4();
2511
2616
  try {
@@ -2612,7 +2717,10 @@ class DynamicWalletClient {
2612
2717
  this.walletMap[accountAddress] = _extends({}, this.walletMap[accountAddress], {
2613
2718
  clientKeySharesBackupInfo: updatedBackupInfo
2614
2719
  });
2615
- await this.storage.setItem(this.storageKey, JSON.stringify(this.walletMap));
2720
+ // Store wallet map metadata in localStorage (browser only, not needed on mobile)
2721
+ if (this.storage) {
2722
+ await this.storage.setItem(this.storageKey, JSON.stringify(this.walletMap));
2723
+ }
2616
2724
  return backupData;
2617
2725
  } catch (error) {
2618
2726
  logError({
@@ -2658,7 +2766,7 @@ class DynamicWalletClient {
2658
2766
  * @returns Promise with backup metadata including share locations and IDs
2659
2767
  */ async storeEncryptedBackupByWallet({ accountAddress, clientKeyShares = undefined, password = undefined, signedSessionId, cloudProviders = [], delegatedKeyshare = undefined }) {
2660
2768
  var _this_walletMap_accountAddress, _this_walletMap_accountAddress1;
2661
- const keySharesToBackup = clientKeyShares != null ? clientKeyShares : await this.getClientKeySharesFromLocalStorage({
2769
+ const keySharesToBackup = clientKeyShares != null ? clientKeyShares : await this.getClientKeySharesFromStorage({
2662
2770
  accountAddress
2663
2771
  });
2664
2772
  // Check if we should backup to cloud providers (either requested or already exists)
@@ -2841,12 +2949,15 @@ class DynamicWalletClient {
2841
2949
  password: password != null ? password : this.environmentId
2842
2950
  })));
2843
2951
  if (storeRecoveredShares) {
2844
- await this.setClientKeySharesToLocalStorage({
2952
+ await this.setClientKeySharesToStorage({
2845
2953
  accountAddress,
2846
2954
  clientKeyShares: decryptedKeyShares,
2847
2955
  overwriteOrMerge: 'merge'
2848
2956
  });
2849
- await this.storage.setItem(this.storageKey, JSON.stringify(this.walletMap));
2957
+ // Store wallet map metadata in localStorage (browser only, not needed on mobile)
2958
+ if (this.storage) {
2959
+ await this.storage.setItem(this.storageKey, JSON.stringify(this.walletMap));
2960
+ }
2850
2961
  }
2851
2962
  return decryptedKeyShares;
2852
2963
  } catch (error) {
@@ -2863,6 +2974,12 @@ class DynamicWalletClient {
2863
2974
  }
2864
2975
  }
2865
2976
  async restoreWallets() {
2977
+ // On mobile with secureStorage, walletMap metadata is not persisted in localStorage
2978
+ // Key shares are stored in secureStorage instead
2979
+ if (!this.storage) {
2980
+ // Mobile mode: walletMap will be populated from server on first getWallet call
2981
+ return;
2982
+ }
2866
2983
  const wallets = await this.storage.getItem(this.storageKey);
2867
2984
  if (!wallets) {
2868
2985
  return;
@@ -3140,18 +3257,20 @@ class DynamicWalletClient {
3140
3257
  }
3141
3258
  }
3142
3259
  async exportClientKeyshares({ accountAddress, password, signedSessionId }) {
3260
+ var _this_walletMap_accountAddress;
3143
3261
  await this.verifyPassword({
3144
3262
  accountAddress,
3145
3263
  password,
3146
3264
  walletOperation: core.WalletOperation.REACH_ALL_PARTIES,
3147
3265
  signedSessionId
3148
3266
  });
3149
- const clientKeyShares = await this.getClientKeySharesFromLocalStorage({
3150
- accountAddress
3151
- });
3152
3267
  if (!accountAddress) {
3153
3268
  throw new Error('Must provide an account address');
3154
3269
  }
3270
+ // Get chainName from walletMap
3271
+ const chainName = (_this_walletMap_accountAddress = this.walletMap[accountAddress]) == null ? void 0 : _this_walletMap_accountAddress.chainName;
3272
+ // Ensure client key shares exist before export
3273
+ const clientKeyShares = await this.ensureClientShare(accountAddress, chainName);
3155
3274
  const derivationPath = this.walletMap[accountAddress].derivationPath;
3156
3275
  const text = JSON.stringify({
3157
3276
  keyShares: clientKeyShares,
@@ -3170,7 +3289,7 @@ class DynamicWalletClient {
3170
3289
  walletOperation: core.WalletOperation.REACH_THRESHOLD,
3171
3290
  signedSessionId
3172
3291
  });
3173
- return this.getClientKeySharesFromLocalStorage({
3292
+ return this.getClientKeySharesFromStorage({
3174
3293
  accountAddress
3175
3294
  });
3176
3295
  }
@@ -3208,7 +3327,7 @@ class DynamicWalletClient {
3208
3327
  shareCount
3209
3328
  });
3210
3329
  const { dynamic: requiredDynamicKeyShareIds = [] } = shares;
3211
- const clientKeyShares = await this.getClientKeySharesFromLocalStorage({
3330
+ const clientKeyShares = await this.getClientKeySharesFromStorage({
3212
3331
  accountAddress
3213
3332
  });
3214
3333
  if (requiredDynamicKeyShareIds.length <= ((clientKeyShares == null ? void 0 : clientKeyShares.length) || 0)) {
@@ -3292,7 +3411,7 @@ class DynamicWalletClient {
3292
3411
  const clientKeySharesBackupInfo = await this.getWalletClientKeyShareBackupInfo({
3293
3412
  accountAddress
3294
3413
  });
3295
- const clientKeyShares = await this.getClientKeySharesFromLocalStorage({
3414
+ const clientKeyShares = await this.getClientKeySharesFromStorage({
3296
3415
  accountAddress
3297
3416
  });
3298
3417
  if (walletOperation === core.WalletOperation.REACH_ALL_PARTIES || walletOperation === core.WalletOperation.REFRESH || walletOperation === core.WalletOperation.RESHARE) {
@@ -3375,10 +3494,10 @@ class DynamicWalletClient {
3375
3494
  signedSessionId,
3376
3495
  shareCount
3377
3496
  });
3378
- const existingKeyShares = await this.getClientKeySharesFromLocalStorage({
3497
+ const existingKeyShares = await this.getClientKeySharesFromStorage({
3379
3498
  accountAddress
3380
3499
  });
3381
- await this.setClientKeySharesToLocalStorage({
3500
+ await this.setClientKeySharesToStorage({
3382
3501
  accountAddress,
3383
3502
  clientKeyShares: mergeUniqueKeyShares(existingKeyShares, decryptedKeyShares)
3384
3503
  });
@@ -3501,7 +3620,8 @@ class DynamicWalletClient {
3501
3620
  }
3502
3621
  }
3503
3622
  async restoreRooms() {
3504
- const roomData = await this.storage.getItem(`${this.storageKey}-rooms`);
3623
+ var _this_storage;
3624
+ const roomData = await ((_this_storage = this.storage) == null ? void 0 : _this_storage.getItem(`${this.storageKey}-rooms`));
3505
3625
  if (!roomData) {
3506
3626
  return {};
3507
3627
  }
@@ -3528,8 +3648,9 @@ class DynamicWalletClient {
3528
3648
  return DynamicWalletClient.rooms;
3529
3649
  }
3530
3650
  async setRooms(numberOfParties, rooms) {
3651
+ var _this_storage;
3531
3652
  DynamicWalletClient.rooms[numberOfParties] = rooms;
3532
- await this.storage.setItem(`${this.storageKey}-rooms`, JSON.stringify(DynamicWalletClient.rooms));
3653
+ await ((_this_storage = this.storage) == null ? void 0 : _this_storage.setItem(`${this.storageKey}-rooms`, JSON.stringify(DynamicWalletClient.rooms)));
3533
3654
  }
3534
3655
  getNumberOfParties(roomType, thresholdSignatureScheme) {
3535
3656
  const MPC_SCHEME_CONFIG = core.MPC_CONFIG[thresholdSignatureScheme];
@@ -3575,7 +3696,7 @@ class DynamicWalletClient {
3575
3696
  }, traceContext);
3576
3697
  }
3577
3698
  constructor({ environmentId, baseApiUrl, baseMPCRelayApiUrl, storageKey, debug, featureFlags, authMode = core.AuthMode.HEADER, authToken = undefined, backupServiceAuthToken, // Represents the version of the client SDK used by developer
3578
- sdkVersion, forwardMPCClient, baseClientKeysharesRelayApiUrl, iCloudConfig }){
3699
+ sdkVersion, forwardMPCClient, baseClientKeysharesRelayApiUrl, iCloudConfig }, internalOptions){
3579
3700
  this.userId = undefined;
3580
3701
  this.sessionId = undefined;
3581
3702
  this.initializePromise = null;
@@ -3592,6 +3713,10 @@ class DynamicWalletClient {
3592
3713
  this.authMode = authMode;
3593
3714
  this.sdkVersion = sdkVersion;
3594
3715
  this.baseClientKeysharesRelayApiUrl = baseClientKeysharesRelayApiUrl;
3716
+ // Set secure storage adapter if provided (internal use only)
3717
+ if (internalOptions == null ? void 0 : internalOptions.secureStorage) {
3718
+ this.secureStorage = internalOptions.secureStorage;
3719
+ }
3595
3720
  this.apiClient = new core.DynamicApiClient({
3596
3721
  environmentId,
3597
3722
  authToken,
@@ -3605,12 +3730,14 @@ class DynamicWalletClient {
3605
3730
  this.debug = Boolean(debug);
3606
3731
  this.logger.setLogLevel(this.debug ? logger$1.LogLevel.DEBUG : DEFAULT_LOG_LEVEL);
3607
3732
  this.featureFlags = featureFlags || {};
3608
- // setup storage
3609
- if (supportsLocalStorage()) {
3610
- this.storage = localStorageAdapter;
3611
- } else {
3612
- this.memoryStorage = {};
3613
- this.storage = memoryLocalStorageAdapter(this.memoryStorage);
3733
+ // setup storage (only used when secureStorage is not set)
3734
+ if (!this.secureStorage) {
3735
+ if (supportsLocalStorage()) {
3736
+ this.storage = localStorageAdapter;
3737
+ } else {
3738
+ this.memoryStorage = {};
3739
+ this.storage = memoryLocalStorageAdapter(this.memoryStorage);
3740
+ }
3614
3741
  }
3615
3742
  const environment = core.getEnvironmentFromUrl(baseApiUrl);
3616
3743
  this.iframeDomain = core.IFRAME_DOMAIN_MAP[environment];
package/index.esm.js CHANGED
@@ -1733,7 +1733,7 @@ class DynamicWalletClient {
1733
1733
  });
1734
1734
  return data;
1735
1735
  }
1736
- async forwardMPCClientSign({ chainName, message, roomId, keyShare, derivationPath, formattedMessage, dynamicRequestId, isFormatted, traceContext }) {
1736
+ async forwardMPCClientSign({ chainName, message, roomId, keyShare, derivationPath, formattedMessage, dynamicRequestId, isFormatted, traceContext, bitcoinConfig }) {
1737
1737
  try {
1738
1738
  if (!this.apiClient.forwardMPCClient.connected) {
1739
1739
  await this.initializeForwardMPCClient();
@@ -1743,12 +1743,14 @@ class DynamicWalletClient {
1743
1743
  isFormatted,
1744
1744
  chainName
1745
1745
  });
1746
+ const chainConfig = getMPCChainConfig(chainName, bitcoinConfig);
1747
+ const signingAlgo = chainConfig.signingAlgorithm;
1746
1748
  this.logger.info('Forward MPC enabled, signing message with forward MPC', this.getTraceContext(traceContext));
1747
1749
  const signature = await this.apiClient.forwardMPCClient.signMessage({
1748
1750
  keyshare: keyShare,
1749
- message: chainName === 'SVM' ? formattedMessage : messageForForwardMPC,
1751
+ message: chainName === 'SVM' || chainName === 'TON' ? formattedMessage : messageForForwardMPC,
1750
1752
  relayDomain: this.baseMPCRelayApiUrl || '',
1751
- signingAlgo: chainName === 'EVM' ? 'ECDSA' : 'ED25519',
1753
+ signingAlgo: signingAlgo,
1752
1754
  hashAlgo: chainName === 'EVM' && !isFormatted ? 'keccak256' : undefined,
1753
1755
  derivationPath: derivationPath,
1754
1756
  roomUuid: roomId,
@@ -1760,8 +1762,9 @@ class DynamicWalletClient {
1760
1762
  if (!(signatureBytes instanceof Uint8Array)) {
1761
1763
  throw new TypeError(`Invalid signature format: expected Uint8Array, got ${typeof signatureBytes}`);
1762
1764
  }
1763
- // Convert to EcdsaSignature
1764
- if (chainName === 'EVM') {
1765
+ // Convert to EcdsaSignature for ECDSA signing algorithm (EVM and BTC Native SegWit)
1766
+ // For BIP340 (BTC Taproot) and ED25519 (SVM/SUI), return raw bytes
1767
+ if (signingAlgo === 'ECDSA') {
1765
1768
  const ecdsaSignature = EcdsaSignature.fromBuffer(signatureBytes);
1766
1769
  return ecdsaSignature;
1767
1770
  } else {
@@ -1802,7 +1805,8 @@ class DynamicWalletClient {
1802
1805
  formattedMessage,
1803
1806
  dynamicRequestId,
1804
1807
  isFormatted,
1805
- traceContext
1808
+ traceContext,
1809
+ bitcoinConfig
1806
1810
  });
1807
1811
  }
1808
1812
  // Unwrap MessageHash for BIP340 as it expects Uint8Array or hex string
@@ -1885,10 +1889,8 @@ class DynamicWalletClient {
1885
1889
  operation: 'serverSign'
1886
1890
  }, this.getTraceContext(traceContext)));
1887
1891
  const derivationPath = wallet.derivationPath && wallet.derivationPath != '' ? new Uint32Array(Object.values(JSON.parse(wallet.derivationPath))) : undefined;
1888
- // Perform the client sign and return the signature
1889
- const clientKeyShares = await this.getClientKeySharesFromLocalStorage({
1890
- accountAddress
1891
- });
1892
+ // Ensure client key shares exist before signing
1893
+ const clientKeyShares = await this.ensureClientShare(accountAddress, chainName);
1892
1894
  const signature = await this.clientSign({
1893
1895
  chainName,
1894
1896
  message,
@@ -1954,9 +1956,17 @@ class DynamicWalletClient {
1954
1956
  password,
1955
1957
  signedSessionId
1956
1958
  });
1959
+ const walletProperties = this.walletMap[accountAddress];
1960
+ let bitcoinConfig;
1961
+ if (chainName === 'BTC' && (walletProperties == null ? void 0 : walletProperties.addressType)) {
1962
+ bitcoinConfig = {
1963
+ addressType: walletProperties.addressType
1964
+ };
1965
+ }
1957
1966
  const mpcSigner = getMPCSigner({
1958
1967
  chainName,
1959
- baseRelayUrl: this.baseMPCRelayApiUrl
1968
+ baseRelayUrl: this.baseMPCRelayApiUrl,
1969
+ bitcoinConfig
1960
1970
  });
1961
1971
  // Create the room and refresh the shares
1962
1972
  const data = await this.apiClient.refreshWalletAccountShares({
@@ -1965,14 +1975,14 @@ class DynamicWalletClient {
1965
1975
  mfaToken
1966
1976
  });
1967
1977
  const roomId = data.roomId;
1968
- const clientKeyShares = await this.getClientKeySharesFromLocalStorage({
1969
- accountAddress
1970
- });
1978
+ // Ensure client key shares exist before refresh
1979
+ const clientKeyShares = await this.ensureClientShare(accountAddress, chainName);
1971
1980
  const refreshResults = await Promise.all(clientKeyShares.map((clientKeyShare)=>mpcSigner.refresh(roomId, clientKeyShare)));
1972
- await this.setClientKeySharesToLocalStorage({
1981
+ await this.setClientKeySharesToStorage({
1973
1982
  accountAddress,
1974
1983
  clientKeyShares: refreshResults,
1975
- overwriteOrMerge: 'overwrite'
1984
+ overwriteOrMerge: 'overwrite',
1985
+ chainName
1976
1986
  });
1977
1987
  await this.storeEncryptedBackupByWallet({
1978
1988
  accountAddress,
@@ -2054,8 +2064,9 @@ class DynamicWalletClient {
2054
2064
  }, ()=>mpcSigner.initKeygen()));
2055
2065
  const newClientKeygenIds = newClientInitKeygenResults.map((result)=>result.keygenId);
2056
2066
  // Get existing client shares
2057
- const existingClientKeyShares = (await this.getClientKeySharesFromLocalStorage({
2058
- accountAddress
2067
+ const existingClientKeyShares = (await this.getClientKeySharesFromStorage({
2068
+ accountAddress,
2069
+ chainName
2059
2070
  })).slice(0, existingClientShareCount);
2060
2071
  const existingClientKeygenIds = await Promise.all(existingClientKeyShares.map(async (keyShare)=>await this.getExportId({
2061
2072
  chainName,
@@ -2113,6 +2124,10 @@ class DynamicWalletClient {
2113
2124
  oldThresholdSignatureScheme,
2114
2125
  newThresholdSignatureScheme
2115
2126
  });
2127
+ // Ensure existing client key shares exist before reshare
2128
+ if (existingClientKeyShares.length === 0) {
2129
+ throw new Error(`Client key shares are required for reshare operation but none were found for account address: ${accountAddress}`);
2130
+ }
2116
2131
  const clientKeygenIds = [
2117
2132
  ...newClientKeygenIds,
2118
2133
  ...existingClientKeygenIds
@@ -2137,9 +2152,17 @@ class DynamicWalletClient {
2137
2152
  ...serverKeygenIds,
2138
2153
  ...newServerKeygenIds
2139
2154
  ];
2155
+ const walletProperties = this.walletMap[accountAddress];
2156
+ let bitcoinConfig;
2157
+ if (chainName === 'BTC' && (walletProperties == null ? void 0 : walletProperties.addressType)) {
2158
+ bitcoinConfig = {
2159
+ addressType: walletProperties.addressType
2160
+ };
2161
+ }
2140
2162
  const mpcSigner = getMPCSigner({
2141
2163
  chainName,
2142
- baseRelayUrl: this.baseMPCRelayApiUrl
2164
+ baseRelayUrl: this.baseMPCRelayApiUrl,
2165
+ bitcoinConfig
2143
2166
  });
2144
2167
  const existingResharePromises = existingClientKeyShares.map((keyShare)=>mpcSigner.reshareRemainingParty(roomId, newMpcConfig.threshold, keyShare, allPartyKeygenIds));
2145
2168
  const newResharePromises = newClientInitKeygenResults.map((keygenResult)=>mpcSigner.reshareNewParty(roomId, oldMpcConfig.threshold, newMpcConfig.threshold, keygenResult, allPartyKeygenIds));
@@ -2185,10 +2208,12 @@ class DynamicWalletClient {
2185
2208
  this.walletMap[accountAddress] = _extends({}, this.walletMap[accountAddress], {
2186
2209
  thresholdSignatureScheme: newThresholdSignatureScheme
2187
2210
  });
2188
- await this.setClientKeySharesToLocalStorage({
2211
+ // store client key shares to storage (localStorage or secureStorage)
2212
+ await this.setClientKeySharesToStorage({
2189
2213
  accountAddress,
2190
2214
  clientKeyShares: distribution.clientShares,
2191
- overwriteOrMerge: 'overwrite'
2215
+ overwriteOrMerge: 'overwrite',
2216
+ chainName
2192
2217
  });
2193
2218
  await this.backupSharesWithDistribution({
2194
2219
  accountAddress,
@@ -2213,10 +2238,11 @@ class DynamicWalletClient {
2213
2238
  this.walletMap[accountAddress] = _extends({}, this.walletMap[accountAddress], {
2214
2239
  thresholdSignatureScheme: oldThresholdSignatureScheme
2215
2240
  });
2216
- await this.setClientKeySharesToLocalStorage({
2241
+ await this.setClientKeySharesToStorage({
2217
2242
  accountAddress,
2218
2243
  clientKeyShares: [],
2219
- overwriteOrMerge: 'overwrite'
2244
+ overwriteOrMerge: 'overwrite',
2245
+ chainName
2220
2246
  });
2221
2247
  throw error;
2222
2248
  }
@@ -2356,7 +2382,7 @@ class DynamicWalletClient {
2356
2382
  }
2357
2383
  }
2358
2384
  async getReconstructedKeyShare(accountAddress, mpcSigner) {
2359
- const clientKeyShares = await this.getClientKeySharesFromLocalStorage({
2385
+ const clientKeyShares = await this.getClientKeySharesFromStorage({
2360
2386
  accountAddress
2361
2387
  });
2362
2388
  if (!clientKeyShares || clientKeyShares.length === 0) {
@@ -2414,6 +2440,7 @@ class DynamicWalletClient {
2414
2440
  }
2415
2441
  async offlineExportKey({ chainName, keyShares, derivationPath }) {
2416
2442
  try {
2443
+ // Enforce share presence
2417
2444
  if (!keyShares || keyShares.length < 2) {
2418
2445
  throw new Error(`Must provide at least min threshold of key shares`);
2419
2446
  }
@@ -2469,9 +2496,36 @@ class DynamicWalletClient {
2469
2496
  return serializedEncryptedKeyShare;
2470
2497
  }
2471
2498
  /**
2472
- * helper function to store encrypted backup by wallet from iframe local storage
2473
- */ async getClientKeySharesFromLocalStorage({ accountAddress }) {
2474
- var _this_storage;
2499
+ * Helper function to get client key shares from storage.
2500
+ * Uses secureStorage when available (mobile), otherwise falls back to localStorage (browser).
2501
+ */ async getClientKeySharesFromStorage({ accountAddress, chainName }) {
2502
+ var _this_walletMap_accountAddress, _this_storage;
2503
+ // Get chainName from walletMap if not provided
2504
+ const resolvedChainName = chainName || ((_this_walletMap_accountAddress = this.walletMap[accountAddress]) == null ? void 0 : _this_walletMap_accountAddress.chainName);
2505
+ if (!resolvedChainName) {
2506
+ this.logger.debug(`[DynamicWaasWalletClient] No chainName found for accountAddress: ${accountAddress}, falling back to localStorage lookup`);
2507
+ }
2508
+ // Use secure storage if available (mobile)
2509
+ if (this.secureStorage) {
2510
+ if (!resolvedChainName) {
2511
+ this.logger.warn(`[DynamicWaasWalletClient] secureStorage requires chainName but it was not provided for accountAddress: ${accountAddress}`);
2512
+ return [];
2513
+ }
2514
+ try {
2515
+ return await this.secureStorage.getClientKeyShare(resolvedChainName, accountAddress);
2516
+ } catch (error) {
2517
+ logError({
2518
+ message: `Error getting client key shares from secure storage for accountAddress: ${accountAddress}`,
2519
+ error: error,
2520
+ context: {
2521
+ accountAddress,
2522
+ chainName: resolvedChainName
2523
+ }
2524
+ });
2525
+ return [];
2526
+ }
2527
+ }
2528
+ // Fallback to localStorage (browser)
2475
2529
  const walletObject = await ((_this_storage = this.storage) == null ? void 0 : _this_storage.getItem(accountAddress));
2476
2530
  if (!walletObject) {
2477
2531
  this.logger.debug(`[DynamicWaasWalletClient] No item found in iframe local storage for accountAddress: ${accountAddress}`);
@@ -2497,16 +2551,67 @@ class DynamicWalletClient {
2497
2551
  }
2498
2552
  }
2499
2553
  /**
2500
- * helper function to store encrypted backup by wallet from iframe local storage
2501
- */ async setClientKeySharesToLocalStorage({ accountAddress, clientKeyShares, overwriteOrMerge = 'merge' }) {
2502
- var _this_storage;
2554
+ * Helper function to store client key shares in storage.
2555
+ * Uses secureStorage when available (mobile), otherwise falls back to localStorage (browser).
2556
+ */ async setClientKeySharesToStorage({ accountAddress, clientKeyShares, overwriteOrMerge = 'merge', chainName }) {
2557
+ var _this_walletMap_accountAddress, _this_storage;
2558
+ // Get chainName from walletMap if not provided
2559
+ const resolvedChainName = chainName || ((_this_walletMap_accountAddress = this.walletMap[accountAddress]) == null ? void 0 : _this_walletMap_accountAddress.chainName);
2560
+ // Use secure storage if available (mobile)
2561
+ if (this.secureStorage) {
2562
+ if (!resolvedChainName) {
2563
+ const error = new Error(`secureStorage requires chainName but it was not provided for accountAddress: ${accountAddress}`);
2564
+ logError({
2565
+ message: error.message,
2566
+ error,
2567
+ context: {
2568
+ accountAddress
2569
+ }
2570
+ });
2571
+ throw error;
2572
+ }
2573
+ try {
2574
+ const sharesToStore = overwriteOrMerge === 'overwrite' ? clientKeyShares : mergeUniqueKeyShares(await this.getClientKeySharesFromStorage({
2575
+ accountAddress,
2576
+ chainName: resolvedChainName
2577
+ }), clientKeyShares);
2578
+ await this.secureStorage.setClientKeyShare(resolvedChainName, accountAddress, sharesToStore);
2579
+ return;
2580
+ } catch (error) {
2581
+ logError({
2582
+ message: `Error setting client key shares in secure storage for accountAddress: ${accountAddress}`,
2583
+ error: error,
2584
+ context: {
2585
+ accountAddress,
2586
+ chainName: resolvedChainName
2587
+ }
2588
+ });
2589
+ throw error;
2590
+ }
2591
+ }
2592
+ // Fallback to localStorage (browser)
2503
2593
  const stringifiedClientKeyShares = JSON.stringify({
2504
- clientKeyShares: overwriteOrMerge === 'overwrite' ? clientKeyShares : mergeUniqueKeyShares(await this.getClientKeySharesFromLocalStorage({
2505
- accountAddress
2594
+ clientKeyShares: overwriteOrMerge === 'overwrite' ? clientKeyShares : mergeUniqueKeyShares(await this.getClientKeySharesFromStorage({
2595
+ accountAddress,
2596
+ chainName: resolvedChainName
2506
2597
  }), clientKeyShares)
2507
2598
  });
2508
2599
  await ((_this_storage = this.storage) == null ? void 0 : _this_storage.setItem(accountAddress, stringifiedClientKeyShares));
2509
2600
  }
2601
+ /**
2602
+ * Ensures that client key shares exist for the given account address.
2603
+ * Throws an error if no shares are found.
2604
+ * This method enforces share presence before sensitive operations.
2605
+ */ async ensureClientShare(accountAddress, chainName) {
2606
+ const shares = await this.getClientKeySharesFromStorage({
2607
+ accountAddress,
2608
+ chainName
2609
+ });
2610
+ if (!shares || shares.length === 0) {
2611
+ throw new Error(`Client key share is missing for account address: ${accountAddress}`);
2612
+ }
2613
+ return shares;
2614
+ }
2510
2615
  async backupSharesWithDistribution({ accountAddress, password, signedSessionId, distribution, preserveDelegatedLocation = false }) {
2511
2616
  const dynamicRequestId = v4();
2512
2617
  try {
@@ -2613,7 +2718,10 @@ class DynamicWalletClient {
2613
2718
  this.walletMap[accountAddress] = _extends({}, this.walletMap[accountAddress], {
2614
2719
  clientKeySharesBackupInfo: updatedBackupInfo
2615
2720
  });
2616
- await this.storage.setItem(this.storageKey, JSON.stringify(this.walletMap));
2721
+ // Store wallet map metadata in localStorage (browser only, not needed on mobile)
2722
+ if (this.storage) {
2723
+ await this.storage.setItem(this.storageKey, JSON.stringify(this.walletMap));
2724
+ }
2617
2725
  return backupData;
2618
2726
  } catch (error) {
2619
2727
  logError({
@@ -2659,7 +2767,7 @@ class DynamicWalletClient {
2659
2767
  * @returns Promise with backup metadata including share locations and IDs
2660
2768
  */ async storeEncryptedBackupByWallet({ accountAddress, clientKeyShares = undefined, password = undefined, signedSessionId, cloudProviders = [], delegatedKeyshare = undefined }) {
2661
2769
  var _this_walletMap_accountAddress, _this_walletMap_accountAddress1;
2662
- const keySharesToBackup = clientKeyShares != null ? clientKeyShares : await this.getClientKeySharesFromLocalStorage({
2770
+ const keySharesToBackup = clientKeyShares != null ? clientKeyShares : await this.getClientKeySharesFromStorage({
2663
2771
  accountAddress
2664
2772
  });
2665
2773
  // Check if we should backup to cloud providers (either requested or already exists)
@@ -2842,12 +2950,15 @@ class DynamicWalletClient {
2842
2950
  password: password != null ? password : this.environmentId
2843
2951
  })));
2844
2952
  if (storeRecoveredShares) {
2845
- await this.setClientKeySharesToLocalStorage({
2953
+ await this.setClientKeySharesToStorage({
2846
2954
  accountAddress,
2847
2955
  clientKeyShares: decryptedKeyShares,
2848
2956
  overwriteOrMerge: 'merge'
2849
2957
  });
2850
- await this.storage.setItem(this.storageKey, JSON.stringify(this.walletMap));
2958
+ // Store wallet map metadata in localStorage (browser only, not needed on mobile)
2959
+ if (this.storage) {
2960
+ await this.storage.setItem(this.storageKey, JSON.stringify(this.walletMap));
2961
+ }
2851
2962
  }
2852
2963
  return decryptedKeyShares;
2853
2964
  } catch (error) {
@@ -2864,6 +2975,12 @@ class DynamicWalletClient {
2864
2975
  }
2865
2976
  }
2866
2977
  async restoreWallets() {
2978
+ // On mobile with secureStorage, walletMap metadata is not persisted in localStorage
2979
+ // Key shares are stored in secureStorage instead
2980
+ if (!this.storage) {
2981
+ // Mobile mode: walletMap will be populated from server on first getWallet call
2982
+ return;
2983
+ }
2867
2984
  const wallets = await this.storage.getItem(this.storageKey);
2868
2985
  if (!wallets) {
2869
2986
  return;
@@ -3141,18 +3258,20 @@ class DynamicWalletClient {
3141
3258
  }
3142
3259
  }
3143
3260
  async exportClientKeyshares({ accountAddress, password, signedSessionId }) {
3261
+ var _this_walletMap_accountAddress;
3144
3262
  await this.verifyPassword({
3145
3263
  accountAddress,
3146
3264
  password,
3147
3265
  walletOperation: WalletOperation.REACH_ALL_PARTIES,
3148
3266
  signedSessionId
3149
3267
  });
3150
- const clientKeyShares = await this.getClientKeySharesFromLocalStorage({
3151
- accountAddress
3152
- });
3153
3268
  if (!accountAddress) {
3154
3269
  throw new Error('Must provide an account address');
3155
3270
  }
3271
+ // Get chainName from walletMap
3272
+ const chainName = (_this_walletMap_accountAddress = this.walletMap[accountAddress]) == null ? void 0 : _this_walletMap_accountAddress.chainName;
3273
+ // Ensure client key shares exist before export
3274
+ const clientKeyShares = await this.ensureClientShare(accountAddress, chainName);
3156
3275
  const derivationPath = this.walletMap[accountAddress].derivationPath;
3157
3276
  const text = JSON.stringify({
3158
3277
  keyShares: clientKeyShares,
@@ -3171,7 +3290,7 @@ class DynamicWalletClient {
3171
3290
  walletOperation: WalletOperation.REACH_THRESHOLD,
3172
3291
  signedSessionId
3173
3292
  });
3174
- return this.getClientKeySharesFromLocalStorage({
3293
+ return this.getClientKeySharesFromStorage({
3175
3294
  accountAddress
3176
3295
  });
3177
3296
  }
@@ -3209,7 +3328,7 @@ class DynamicWalletClient {
3209
3328
  shareCount
3210
3329
  });
3211
3330
  const { dynamic: requiredDynamicKeyShareIds = [] } = shares;
3212
- const clientKeyShares = await this.getClientKeySharesFromLocalStorage({
3331
+ const clientKeyShares = await this.getClientKeySharesFromStorage({
3213
3332
  accountAddress
3214
3333
  });
3215
3334
  if (requiredDynamicKeyShareIds.length <= ((clientKeyShares == null ? void 0 : clientKeyShares.length) || 0)) {
@@ -3293,7 +3412,7 @@ class DynamicWalletClient {
3293
3412
  const clientKeySharesBackupInfo = await this.getWalletClientKeyShareBackupInfo({
3294
3413
  accountAddress
3295
3414
  });
3296
- const clientKeyShares = await this.getClientKeySharesFromLocalStorage({
3415
+ const clientKeyShares = await this.getClientKeySharesFromStorage({
3297
3416
  accountAddress
3298
3417
  });
3299
3418
  if (walletOperation === WalletOperation.REACH_ALL_PARTIES || walletOperation === WalletOperation.REFRESH || walletOperation === WalletOperation.RESHARE) {
@@ -3376,10 +3495,10 @@ class DynamicWalletClient {
3376
3495
  signedSessionId,
3377
3496
  shareCount
3378
3497
  });
3379
- const existingKeyShares = await this.getClientKeySharesFromLocalStorage({
3498
+ const existingKeyShares = await this.getClientKeySharesFromStorage({
3380
3499
  accountAddress
3381
3500
  });
3382
- await this.setClientKeySharesToLocalStorage({
3501
+ await this.setClientKeySharesToStorage({
3383
3502
  accountAddress,
3384
3503
  clientKeyShares: mergeUniqueKeyShares(existingKeyShares, decryptedKeyShares)
3385
3504
  });
@@ -3502,7 +3621,8 @@ class DynamicWalletClient {
3502
3621
  }
3503
3622
  }
3504
3623
  async restoreRooms() {
3505
- const roomData = await this.storage.getItem(`${this.storageKey}-rooms`);
3624
+ var _this_storage;
3625
+ const roomData = await ((_this_storage = this.storage) == null ? void 0 : _this_storage.getItem(`${this.storageKey}-rooms`));
3506
3626
  if (!roomData) {
3507
3627
  return {};
3508
3628
  }
@@ -3529,8 +3649,9 @@ class DynamicWalletClient {
3529
3649
  return DynamicWalletClient.rooms;
3530
3650
  }
3531
3651
  async setRooms(numberOfParties, rooms) {
3652
+ var _this_storage;
3532
3653
  DynamicWalletClient.rooms[numberOfParties] = rooms;
3533
- await this.storage.setItem(`${this.storageKey}-rooms`, JSON.stringify(DynamicWalletClient.rooms));
3654
+ await ((_this_storage = this.storage) == null ? void 0 : _this_storage.setItem(`${this.storageKey}-rooms`, JSON.stringify(DynamicWalletClient.rooms)));
3534
3655
  }
3535
3656
  getNumberOfParties(roomType, thresholdSignatureScheme) {
3536
3657
  const MPC_SCHEME_CONFIG = MPC_CONFIG[thresholdSignatureScheme];
@@ -3576,7 +3697,7 @@ class DynamicWalletClient {
3576
3697
  }, traceContext);
3577
3698
  }
3578
3699
  constructor({ environmentId, baseApiUrl, baseMPCRelayApiUrl, storageKey, debug, featureFlags, authMode = AuthMode.HEADER, authToken = undefined, backupServiceAuthToken, // Represents the version of the client SDK used by developer
3579
- sdkVersion, forwardMPCClient, baseClientKeysharesRelayApiUrl, iCloudConfig }){
3700
+ sdkVersion, forwardMPCClient, baseClientKeysharesRelayApiUrl, iCloudConfig }, internalOptions){
3580
3701
  this.userId = undefined;
3581
3702
  this.sessionId = undefined;
3582
3703
  this.initializePromise = null;
@@ -3593,6 +3714,10 @@ class DynamicWalletClient {
3593
3714
  this.authMode = authMode;
3594
3715
  this.sdkVersion = sdkVersion;
3595
3716
  this.baseClientKeysharesRelayApiUrl = baseClientKeysharesRelayApiUrl;
3717
+ // Set secure storage adapter if provided (internal use only)
3718
+ if (internalOptions == null ? void 0 : internalOptions.secureStorage) {
3719
+ this.secureStorage = internalOptions.secureStorage;
3720
+ }
3596
3721
  this.apiClient = new DynamicApiClient({
3597
3722
  environmentId,
3598
3723
  authToken,
@@ -3606,12 +3731,14 @@ class DynamicWalletClient {
3606
3731
  this.debug = Boolean(debug);
3607
3732
  this.logger.setLogLevel(this.debug ? LogLevel.DEBUG : DEFAULT_LOG_LEVEL);
3608
3733
  this.featureFlags = featureFlags || {};
3609
- // setup storage
3610
- if (supportsLocalStorage()) {
3611
- this.storage = localStorageAdapter;
3612
- } else {
3613
- this.memoryStorage = {};
3614
- this.storage = memoryLocalStorageAdapter(this.memoryStorage);
3734
+ // setup storage (only used when secureStorage is not set)
3735
+ if (!this.secureStorage) {
3736
+ if (supportsLocalStorage()) {
3737
+ this.storage = localStorageAdapter;
3738
+ } else {
3739
+ this.memoryStorage = {};
3740
+ this.storage = memoryLocalStorageAdapter(this.memoryStorage);
3741
+ }
3615
3742
  }
3616
3743
  const environment = getEnvironmentFromUrl(baseApiUrl);
3617
3744
  this.iframeDomain = IFRAME_DOMAIN_MAP[environment];
package/package.json CHANGED
@@ -1,10 +1,10 @@
1
1
  {
2
2
  "name": "@dynamic-labs-wallet/browser",
3
- "version": "0.0.246",
3
+ "version": "0.0.248",
4
4
  "license": "Licensed under the Dynamic Labs, Inc. Terms Of Service (https://www.dynamic.xyz/terms-conditions)",
5
5
  "type": "module",
6
6
  "dependencies": {
7
- "@dynamic-labs-wallet/core": "0.0.246",
7
+ "@dynamic-labs-wallet/core": "0.0.248",
8
8
  "@dynamic-labs/logger": "^4.25.3",
9
9
  "@dynamic-labs/sdk-api-core": "^0.0.828",
10
10
  "argon2id": "1.0.1",
package/src/client.d.ts CHANGED
@@ -5,6 +5,24 @@ import { RoomTypeEnum, type SignMessageContext } from '@dynamic-labs/sdk-api-cor
5
5
  import type { ClientInitKeygenResult, ClientKeyShare } from './mpc/types.js';
6
6
  import { type SupportedStorage } from './services/localStorage.js';
7
7
  import { type Room, type ShareDistribution, type WalletBusyOperation, type WalletProperties } from './types.js';
8
+ /**
9
+ * Internal secure storage adapter interface for mobile TEE-backed storage.
10
+ * This is NOT part of the public API and should only be injected by internal React Native integration.
11
+ *
12
+ * Note: chainName is required to avoid storage collisions between different chains
13
+ * that might use the same address format (e.g., EVM and SVM both use hex addresses).
14
+ */
15
+ export interface SecureStorageAdapter {
16
+ getClientKeyShare(chainName: string, accountAddress: string): Promise<ClientKeyShare[]>;
17
+ setClientKeyShare(chainName: string, accountAddress: string, shares: ClientKeyShare[]): Promise<void>;
18
+ }
19
+ /**
20
+ * Internal options for DynamicWalletClient constructor.
21
+ * This is NOT part of the public API.
22
+ */
23
+ export interface DynamicWalletClientInternalOptions {
24
+ secureStorage?: SecureStorageAdapter;
25
+ }
8
26
  export declare class DynamicWalletClient {
9
27
  environmentId: string;
10
28
  storageKey: string;
@@ -15,7 +33,7 @@ export declare class DynamicWalletClient {
15
33
  protected logger: import("@dynamic-labs/logger").Logger;
16
34
  protected apiClient: DynamicApiClient;
17
35
  protected walletMap: Record<string, WalletProperties>;
18
- protected storage: SupportedStorage;
36
+ protected storage: SupportedStorage | undefined;
19
37
  protected memoryStorage: {
20
38
  [key: string]: string;
21
39
  } | null;
@@ -32,7 +50,13 @@ export declare class DynamicWalletClient {
32
50
  protected static roomsInitializing: Record<number, boolean>;
33
51
  protected static walletBusyMap: Record<string, WalletBusyOperation | undefined>;
34
52
  protected static walletBusyPromiseMap: Record<string, Promise<void> | undefined>;
35
- constructor({ environmentId, baseApiUrl, baseMPCRelayApiUrl, storageKey, debug, featureFlags, authMode, authToken, backupServiceAuthToken, sdkVersion, forwardMPCClient, baseClientKeysharesRelayApiUrl, iCloudConfig, }: DynamicWalletClientProps);
53
+ /**
54
+ * Internal secure storage adapter for mobile TEE-backed storage.
55
+ * When set, all key share operations use this instead of localStorage.
56
+ * This is NOT part of the public API.
57
+ */
58
+ private readonly secureStorage?;
59
+ constructor({ environmentId, baseApiUrl, baseMPCRelayApiUrl, storageKey, debug, featureFlags, authMode, authToken, backupServiceAuthToken, sdkVersion, forwardMPCClient, baseClientKeysharesRelayApiUrl, iCloudConfig, }: DynamicWalletClientProps, internalOptions?: DynamicWalletClientInternalOptions);
36
60
  private initializeForwardMPCClient;
37
61
  getWalletBusyOperation(accountAddress: string): WalletBusyOperation | undefined;
38
62
  isWalletBusy(accountAddress: string): boolean;
@@ -124,7 +148,7 @@ export declare class DynamicWalletClient {
124
148
  traceContext?: TraceContext;
125
149
  bitcoinConfig?: BitcoinConfig;
126
150
  }): Promise<import("@dynamic-labs-wallet/core").OpenRoomResponse>;
127
- forwardMPCClientSign({ chainName, message, roomId, keyShare, derivationPath, formattedMessage, dynamicRequestId, isFormatted, traceContext, }: {
151
+ forwardMPCClientSign({ chainName, message, roomId, keyShare, derivationPath, formattedMessage, dynamicRequestId, isFormatted, traceContext, bitcoinConfig, }: {
128
152
  chainName: string;
129
153
  message: string | Uint8Array;
130
154
  roomId: string;
@@ -134,6 +158,7 @@ export declare class DynamicWalletClient {
134
158
  dynamicRequestId: string;
135
159
  isFormatted?: boolean;
136
160
  traceContext?: TraceContext;
161
+ bitcoinConfig?: BitcoinConfig;
137
162
  }): Promise<Uint8Array | EcdsaSignature>;
138
163
  clientSign({ chainName, message, roomId, keyShare, derivationPath, isFormatted, dynamicRequestId, traceContext, bitcoinConfig, }: {
139
164
  chainName: string;
@@ -253,19 +278,29 @@ export declare class DynamicWalletClient {
253
278
  password?: string;
254
279
  }): Promise<string>;
255
280
  /**
256
- * helper function to store encrypted backup by wallet from iframe local storage
281
+ * Helper function to get client key shares from storage.
282
+ * Uses secureStorage when available (mobile), otherwise falls back to localStorage (browser).
257
283
  */
258
- getClientKeySharesFromLocalStorage({ accountAddress, }: {
284
+ getClientKeySharesFromStorage({ accountAddress, chainName, }: {
259
285
  accountAddress: string;
286
+ chainName?: string;
260
287
  }): Promise<ClientKeyShare[]>;
261
288
  /**
262
- * helper function to store encrypted backup by wallet from iframe local storage
289
+ * Helper function to store client key shares in storage.
290
+ * Uses secureStorage when available (mobile), otherwise falls back to localStorage (browser).
263
291
  */
264
- setClientKeySharesToLocalStorage({ accountAddress, clientKeyShares, overwriteOrMerge, }: {
292
+ setClientKeySharesToStorage({ accountAddress, clientKeyShares, overwriteOrMerge, chainName, }: {
265
293
  accountAddress: string;
266
294
  clientKeyShares: ClientKeyShare[];
267
295
  overwriteOrMerge?: 'overwrite' | 'merge';
296
+ chainName?: string;
268
297
  }): Promise<void>;
298
+ /**
299
+ * Ensures that client key shares exist for the given account address.
300
+ * Throws an error if no shares are found.
301
+ * This method enforces share presence before sensitive operations.
302
+ */
303
+ private ensureClientShare;
269
304
  backupSharesWithDistribution({ accountAddress, password, signedSessionId, distribution, preserveDelegatedLocation, }: {
270
305
  accountAddress: string;
271
306
  password?: string;
@@ -1 +1 @@
1
- {"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../../packages/src/client.ts"],"names":[],"mappings":"AACA,OAAO,EAKL,cAAc,EAGd,WAAW,EACX,KAAK,cAAc,EACpB,MAAM,eAAe,CAAC;AACvB,OAAO,EACL,QAAQ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