@dynamic-labs-wallet/browser 0.0.44 → 0.0.46

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
@@ -104,6 +104,9 @@ const getClientKeyShareBackupInfo = (params)=>{
104
104
  ...uniqueKeyShares
105
105
  ];
106
106
  };
107
+ const timeoutPromise = ({ timeInMs, activity = 'Ceremony' })=>{
108
+ return new Promise((_, reject)=>setTimeout(()=>reject(new Error(`${activity} did not complete in ${timeInMs}ms`)), timeInMs));
109
+ };
107
110
 
108
111
  const PBKDF2_ALGORITHM = 'PBKDF2';
109
112
  const PBKDF2_ITERATIONS = 100000;
@@ -389,13 +392,14 @@ class DynamicWalletClient {
389
392
  };
390
393
  }
391
394
  }
392
- async serverInitializeKeyGen({ chainName, clientKeygenIds, thresholdSignatureScheme, onError }) {
395
+ async serverInitializeKeyGen({ chainName, clientKeygenIds, thresholdSignatureScheme, onError, onCeremonyComplete }) {
393
396
  // Initialize keygen, create room, and create the wallet account on the server
394
397
  const data = await this.apiClient.createWalletAccount({
395
398
  chainName,
396
399
  clientKeygenIds,
397
400
  thresholdSignatureScheme,
398
- onError
401
+ onError,
402
+ onCeremonyComplete
399
403
  });
400
404
  return data;
401
405
  }
@@ -455,7 +459,7 @@ class DynamicWalletClient {
455
459
  clientKeygenResults
456
460
  };
457
461
  }
458
- async keyGen({ chainName, thresholdSignatureScheme, onError }) {
462
+ async keyGen({ chainName, thresholdSignatureScheme, onError, onCeremonyComplete }) {
459
463
  try {
460
464
  const clientKeygenInitResults = await this.clientInitializeKeyGen({
461
465
  chainName,
@@ -465,7 +469,8 @@ class DynamicWalletClient {
465
469
  const { roomId, serverKeygenIds } = await this.serverInitializeKeyGen({
466
470
  chainName,
467
471
  clientKeygenIds,
468
- thresholdSignatureScheme
472
+ thresholdSignatureScheme,
473
+ onCeremonyComplete
469
474
  });
470
475
  const { rawPublicKey, clientKeygenResults: clientKeyShares } = await this.clientKeyGen({
471
476
  chainName,
@@ -651,7 +656,6 @@ class DynamicWalletClient {
651
656
  shareCount: existingClientShareCount,
652
657
  password
653
658
  });
654
- console.log(`Resharing from ${oldThresholdSignatureScheme} to ${newThresholdSignatureScheme}`);
655
659
  const { newClientInitKeygenResults, newClientKeygenIds, existingClientKeygenIds, existingClientKeyShares } = await this.reshareStrategy({
656
660
  chainName,
657
661
  wallet,
@@ -687,8 +691,7 @@ class DynamicWalletClient {
687
691
  ...existingClientKeyShares.map((keyShare)=>mpcSigner.reshareRemainingParty(roomId, newMpcConfig.threshold, keyShare, allPartyKeygenIds))
688
692
  ]);
689
693
  this.walletMap[accountAddress] = _extends({}, this.walletMap[accountAddress], {
690
- clientKeyShares: reshareResults,
691
- clientKeySharesBackupInfo: getClientKeyShareBackupInfo()
694
+ clientKeyShares: reshareResults
692
695
  });
693
696
  await this.storage.setItem(this.storageKey, JSON.stringify(this.walletMap));
694
697
  await this.storeEncryptedBackupByWallet({
@@ -776,7 +779,24 @@ class DynamicWalletClient {
776
779
  const serializedEncryptedKeyShare = Buffer.from(JSON.stringify(encryptedKeyShare)).toString('base64');
777
780
  return serializedEncryptedKeyShare;
778
781
  }
779
- async storeEncryptedBackupByWallet({ accountAddress, password = undefined }) {
782
+ /**
783
+ * Encrypts and stores wallet key shares as backups.
784
+ *
785
+ * This method encrypts all client key shares for a specific wallet and stores them
786
+ * in Dynamic's backend. If Google Drive backup is already configured for this wallet,
787
+ * it will also update the backup in Google Drive.
788
+ *
789
+ * The method performs the following steps:
790
+ * 1. Encrypts all client key shares with the provided password (or environment ID if no password)
791
+ * 2. Stores the encrypted key shares in Dynamic's backend
792
+ * 3. If Google Drive backup exists, updates the backup there as well
793
+ * 4. Updates the local wallet map with the new backup information
794
+ * 5. Persists the updated wallet map to storage
795
+ *
796
+ * @param {Object} params - The parameters for the backup operation
797
+ * @param {string} params.accountAddress - The account address of the wallet to backup
798
+ * @param {string} [params.password] - Optional password for encrypting the key shares
799
+ */ async storeEncryptedBackupByWallet({ accountAddress, password = undefined }) {
780
800
  const encryptedKeyShares = await Promise.all(this.walletMap[accountAddress].clientKeyShares.map((keyShare)=>this.encryptKeyShare({
781
801
  keyShare,
782
802
  password
@@ -786,15 +806,32 @@ class DynamicWalletClient {
786
806
  encryptedKeyShares,
787
807
  passwordEncrypted: Boolean(password) && password !== this.environmentId
788
808
  });
809
+ const hasGoogleDriveBackup = this.walletMap[accountAddress].clientKeySharesBackupInfo.backups[core.BackupLocation.GOOGLE_DRIVE].length > 0;
810
+ if (hasGoogleDriveBackup) {
811
+ var _user_verifiedCredentials_find;
812
+ const user = await this.apiClient.getUser();
813
+ const oauthAccountId = user == null ? void 0 : (_user_verifiedCredentials_find = user.verifiedCredentials.find((credential)=>credential.oauthProvider === 'google')) == null ? void 0 : _user_verifiedCredentials_find.id;
814
+ const googleDriveKeyShareIds = await this.backupKeySharesToGoogleDrive({
815
+ accountAddress,
816
+ password,
817
+ oauthAccountId
818
+ });
819
+ data.keyShares.push({
820
+ backupLocation: core.BackupLocation.GOOGLE_DRIVE,
821
+ id: googleDriveKeyShareIds
822
+ });
823
+ }
824
+ const updatedBackupInfo = getClientKeyShareBackupInfo({
825
+ walletProperties: {
826
+ derivationPath: this.walletMap[accountAddress].derivationPath,
827
+ keyShares: data.keyShares,
828
+ thresholdSignatureScheme: this.walletMap[accountAddress].thresholdSignatureScheme
829
+ }
830
+ });
789
831
  this.walletMap[accountAddress] = _extends({}, this.walletMap[accountAddress], {
790
- clientKeySharesBackupInfo: getClientKeyShareBackupInfo({
791
- walletProperties: {
792
- derivationPath: this.walletMap[accountAddress].derivationPath,
793
- keyShares: data.keyShares,
794
- thresholdSignatureScheme: this.walletMap[accountAddress].thresholdSignatureScheme
795
- }
796
- })
832
+ clientKeySharesBackupInfo: updatedBackupInfo
797
833
  });
834
+ await this.storage.setItem(this.storageKey, JSON.stringify(this.walletMap));
798
835
  return data;
799
836
  }
800
837
  async updatePassword({ accountAddress, existingPassword, newPassword }) {
@@ -873,7 +910,6 @@ class DynamicWalletClient {
873
910
  }
874
911
  async restoreWallets() {
875
912
  const wallets = await this.storage.getItem(this.storageKey);
876
- console.log('local storage wallets', wallets);
877
913
  if (!wallets) {
878
914
  return;
879
915
  }
@@ -920,7 +956,7 @@ class DynamicWalletClient {
920
956
  }
921
957
  };
922
958
  // TODO: handle errors
923
- const [appUpload, personalUpload] = await Promise.all([
959
+ await Promise.all([
924
960
  uploadFileToGoogleDriveAppStorage({
925
961
  accessToken,
926
962
  fileName: fileName != null ? fileName : suggestedFileName,
@@ -932,13 +968,13 @@ class DynamicWalletClient {
932
968
  jsonData: backupData
933
969
  })
934
970
  ]);
935
- await this.apiClient.markKeySharesAsBackedUpGoogleDrive({
971
+ const data = await this.apiClient.markKeySharesAsBackedUpGoogleDrive({
936
972
  walletId: this.walletMap[accountAddress].walletId
937
973
  });
938
- return {
939
- appUpload,
940
- personalUpload
941
- };
974
+ const ids = data.keyShares.map((keyShare)=>keyShare.id);
975
+ this.walletMap[accountAddress].clientKeySharesBackupInfo.backups[core.BackupLocation.GOOGLE_DRIVE] = ids;
976
+ await this.storage.setItem(this.storageKey, JSON.stringify(this.walletMap));
977
+ return ids;
942
978
  }
943
979
  async restoreBackupFromGoogleDrive({ accountAddress, oauthAccountId, name, password }) {
944
980
  await this.getWallet({
@@ -973,7 +1009,7 @@ class DynamicWalletClient {
973
1009
  });
974
1010
  return decryptedKeyShares;
975
1011
  }
976
- async importRawPrivateKey({ chainName, privateKey, thresholdSignatureScheme, onError }) {
1012
+ async importRawPrivateKey({ chainName, privateKey, thresholdSignatureScheme, onError, onCeremonyComplete }) {
977
1013
  const mpcSigner = getMPCSigner({
978
1014
  chainName,
979
1015
  baseRelayUrl: this.baseMPCRelayApiUrl
@@ -987,7 +1023,8 @@ class DynamicWalletClient {
987
1023
  chainName,
988
1024
  clientKeygenIds,
989
1025
  thresholdSignatureScheme,
990
- onError
1026
+ onError,
1027
+ onCeremonyComplete
991
1028
  });
992
1029
  const { threshold } = core.getTSSConfig(thresholdSignatureScheme);
993
1030
  const clientKeygenResults = await Promise.all(clientKeygenInitResults.map(async (currentInit, index)=>{
@@ -1366,6 +1403,7 @@ exports.isBrowser = isBrowser;
1366
1403
  exports.isHexString = isHexString;
1367
1404
  exports.mergeUniqueKeyShares = mergeUniqueKeyShares;
1368
1405
  exports.stringToBytes = stringToBytes;
1406
+ exports.timeoutPromise = timeoutPromise;
1369
1407
  Object.keys(core).forEach(function (k) {
1370
1408
  if (k !== 'default' && !Object.prototype.hasOwnProperty.call(exports, k)) Object.defineProperty(exports, k, {
1371
1409
  enumerable: true,
package/index.esm.js CHANGED
@@ -104,6 +104,9 @@ const getClientKeyShareBackupInfo = (params)=>{
104
104
  ...uniqueKeyShares
105
105
  ];
106
106
  };
107
+ const timeoutPromise = ({ timeInMs, activity = 'Ceremony' })=>{
108
+ return new Promise((_, reject)=>setTimeout(()=>reject(new Error(`${activity} did not complete in ${timeInMs}ms`)), timeInMs));
109
+ };
107
110
 
108
111
  const PBKDF2_ALGORITHM = 'PBKDF2';
109
112
  const PBKDF2_ITERATIONS = 100000;
@@ -389,13 +392,14 @@ class DynamicWalletClient {
389
392
  };
390
393
  }
391
394
  }
392
- async serverInitializeKeyGen({ chainName, clientKeygenIds, thresholdSignatureScheme, onError }) {
395
+ async serverInitializeKeyGen({ chainName, clientKeygenIds, thresholdSignatureScheme, onError, onCeremonyComplete }) {
393
396
  // Initialize keygen, create room, and create the wallet account on the server
394
397
  const data = await this.apiClient.createWalletAccount({
395
398
  chainName,
396
399
  clientKeygenIds,
397
400
  thresholdSignatureScheme,
398
- onError
401
+ onError,
402
+ onCeremonyComplete
399
403
  });
400
404
  return data;
401
405
  }
@@ -455,7 +459,7 @@ class DynamicWalletClient {
455
459
  clientKeygenResults
456
460
  };
457
461
  }
458
- async keyGen({ chainName, thresholdSignatureScheme, onError }) {
462
+ async keyGen({ chainName, thresholdSignatureScheme, onError, onCeremonyComplete }) {
459
463
  try {
460
464
  const clientKeygenInitResults = await this.clientInitializeKeyGen({
461
465
  chainName,
@@ -465,7 +469,8 @@ class DynamicWalletClient {
465
469
  const { roomId, serverKeygenIds } = await this.serverInitializeKeyGen({
466
470
  chainName,
467
471
  clientKeygenIds,
468
- thresholdSignatureScheme
472
+ thresholdSignatureScheme,
473
+ onCeremonyComplete
469
474
  });
470
475
  const { rawPublicKey, clientKeygenResults: clientKeyShares } = await this.clientKeyGen({
471
476
  chainName,
@@ -651,7 +656,6 @@ class DynamicWalletClient {
651
656
  shareCount: existingClientShareCount,
652
657
  password
653
658
  });
654
- console.log(`Resharing from ${oldThresholdSignatureScheme} to ${newThresholdSignatureScheme}`);
655
659
  const { newClientInitKeygenResults, newClientKeygenIds, existingClientKeygenIds, existingClientKeyShares } = await this.reshareStrategy({
656
660
  chainName,
657
661
  wallet,
@@ -687,8 +691,7 @@ class DynamicWalletClient {
687
691
  ...existingClientKeyShares.map((keyShare)=>mpcSigner.reshareRemainingParty(roomId, newMpcConfig.threshold, keyShare, allPartyKeygenIds))
688
692
  ]);
689
693
  this.walletMap[accountAddress] = _extends({}, this.walletMap[accountAddress], {
690
- clientKeyShares: reshareResults,
691
- clientKeySharesBackupInfo: getClientKeyShareBackupInfo()
694
+ clientKeyShares: reshareResults
692
695
  });
693
696
  await this.storage.setItem(this.storageKey, JSON.stringify(this.walletMap));
694
697
  await this.storeEncryptedBackupByWallet({
@@ -776,7 +779,24 @@ class DynamicWalletClient {
776
779
  const serializedEncryptedKeyShare = Buffer.from(JSON.stringify(encryptedKeyShare)).toString('base64');
777
780
  return serializedEncryptedKeyShare;
778
781
  }
779
- async storeEncryptedBackupByWallet({ accountAddress, password = undefined }) {
782
+ /**
783
+ * Encrypts and stores wallet key shares as backups.
784
+ *
785
+ * This method encrypts all client key shares for a specific wallet and stores them
786
+ * in Dynamic's backend. If Google Drive backup is already configured for this wallet,
787
+ * it will also update the backup in Google Drive.
788
+ *
789
+ * The method performs the following steps:
790
+ * 1. Encrypts all client key shares with the provided password (or environment ID if no password)
791
+ * 2. Stores the encrypted key shares in Dynamic's backend
792
+ * 3. If Google Drive backup exists, updates the backup there as well
793
+ * 4. Updates the local wallet map with the new backup information
794
+ * 5. Persists the updated wallet map to storage
795
+ *
796
+ * @param {Object} params - The parameters for the backup operation
797
+ * @param {string} params.accountAddress - The account address of the wallet to backup
798
+ * @param {string} [params.password] - Optional password for encrypting the key shares
799
+ */ async storeEncryptedBackupByWallet({ accountAddress, password = undefined }) {
780
800
  const encryptedKeyShares = await Promise.all(this.walletMap[accountAddress].clientKeyShares.map((keyShare)=>this.encryptKeyShare({
781
801
  keyShare,
782
802
  password
@@ -786,15 +806,32 @@ class DynamicWalletClient {
786
806
  encryptedKeyShares,
787
807
  passwordEncrypted: Boolean(password) && password !== this.environmentId
788
808
  });
809
+ const hasGoogleDriveBackup = this.walletMap[accountAddress].clientKeySharesBackupInfo.backups[BackupLocation.GOOGLE_DRIVE].length > 0;
810
+ if (hasGoogleDriveBackup) {
811
+ var _user_verifiedCredentials_find;
812
+ const user = await this.apiClient.getUser();
813
+ const oauthAccountId = user == null ? void 0 : (_user_verifiedCredentials_find = user.verifiedCredentials.find((credential)=>credential.oauthProvider === 'google')) == null ? void 0 : _user_verifiedCredentials_find.id;
814
+ const googleDriveKeyShareIds = await this.backupKeySharesToGoogleDrive({
815
+ accountAddress,
816
+ password,
817
+ oauthAccountId
818
+ });
819
+ data.keyShares.push({
820
+ backupLocation: BackupLocation.GOOGLE_DRIVE,
821
+ id: googleDriveKeyShareIds
822
+ });
823
+ }
824
+ const updatedBackupInfo = getClientKeyShareBackupInfo({
825
+ walletProperties: {
826
+ derivationPath: this.walletMap[accountAddress].derivationPath,
827
+ keyShares: data.keyShares,
828
+ thresholdSignatureScheme: this.walletMap[accountAddress].thresholdSignatureScheme
829
+ }
830
+ });
789
831
  this.walletMap[accountAddress] = _extends({}, this.walletMap[accountAddress], {
790
- clientKeySharesBackupInfo: getClientKeyShareBackupInfo({
791
- walletProperties: {
792
- derivationPath: this.walletMap[accountAddress].derivationPath,
793
- keyShares: data.keyShares,
794
- thresholdSignatureScheme: this.walletMap[accountAddress].thresholdSignatureScheme
795
- }
796
- })
832
+ clientKeySharesBackupInfo: updatedBackupInfo
797
833
  });
834
+ await this.storage.setItem(this.storageKey, JSON.stringify(this.walletMap));
798
835
  return data;
799
836
  }
800
837
  async updatePassword({ accountAddress, existingPassword, newPassword }) {
@@ -873,7 +910,6 @@ class DynamicWalletClient {
873
910
  }
874
911
  async restoreWallets() {
875
912
  const wallets = await this.storage.getItem(this.storageKey);
876
- console.log('local storage wallets', wallets);
877
913
  if (!wallets) {
878
914
  return;
879
915
  }
@@ -920,7 +956,7 @@ class DynamicWalletClient {
920
956
  }
921
957
  };
922
958
  // TODO: handle errors
923
- const [appUpload, personalUpload] = await Promise.all([
959
+ await Promise.all([
924
960
  uploadFileToGoogleDriveAppStorage({
925
961
  accessToken,
926
962
  fileName: fileName != null ? fileName : suggestedFileName,
@@ -932,13 +968,13 @@ class DynamicWalletClient {
932
968
  jsonData: backupData
933
969
  })
934
970
  ]);
935
- await this.apiClient.markKeySharesAsBackedUpGoogleDrive({
971
+ const data = await this.apiClient.markKeySharesAsBackedUpGoogleDrive({
936
972
  walletId: this.walletMap[accountAddress].walletId
937
973
  });
938
- return {
939
- appUpload,
940
- personalUpload
941
- };
974
+ const ids = data.keyShares.map((keyShare)=>keyShare.id);
975
+ this.walletMap[accountAddress].clientKeySharesBackupInfo.backups[BackupLocation.GOOGLE_DRIVE] = ids;
976
+ await this.storage.setItem(this.storageKey, JSON.stringify(this.walletMap));
977
+ return ids;
942
978
  }
943
979
  async restoreBackupFromGoogleDrive({ accountAddress, oauthAccountId, name, password }) {
944
980
  await this.getWallet({
@@ -973,7 +1009,7 @@ class DynamicWalletClient {
973
1009
  });
974
1010
  return decryptedKeyShares;
975
1011
  }
976
- async importRawPrivateKey({ chainName, privateKey, thresholdSignatureScheme, onError }) {
1012
+ async importRawPrivateKey({ chainName, privateKey, thresholdSignatureScheme, onError, onCeremonyComplete }) {
977
1013
  const mpcSigner = getMPCSigner({
978
1014
  chainName,
979
1015
  baseRelayUrl: this.baseMPCRelayApiUrl
@@ -987,7 +1023,8 @@ class DynamicWalletClient {
987
1023
  chainName,
988
1024
  clientKeygenIds,
989
1025
  thresholdSignatureScheme,
990
- onError
1026
+ onError,
1027
+ onCeremonyComplete
991
1028
  });
992
1029
  const { threshold } = getTSSConfig(thresholdSignatureScheme);
993
1030
  const clientKeygenResults = await Promise.all(clientKeygenInitResults.map(async (currentInit, index)=>{
@@ -1305,4 +1342,4 @@ class DynamicWalletClient {
1305
1342
  }
1306
1343
  }
1307
1344
 
1308
- export { DynamicWalletClient, WalletOperation, base64ToBytes, bytesToBase64, ensureBase64Padding, getClientKeyShareBackupInfo, getClientKeyShareExportFileName, getMPCSignatureScheme, getMPCSigner, isBrowser, isHexString, mergeUniqueKeyShares, stringToBytes };
1345
+ export { DynamicWalletClient, WalletOperation, base64ToBytes, bytesToBase64, ensureBase64Padding, getClientKeyShareBackupInfo, getClientKeyShareExportFileName, getMPCSignatureScheme, getMPCSigner, isBrowser, isHexString, mergeUniqueKeyShares, stringToBytes, timeoutPromise };
package/package.json CHANGED
@@ -1,9 +1,9 @@
1
1
  {
2
2
  "name": "@dynamic-labs-wallet/browser",
3
- "version": "0.0.44",
3
+ "version": "0.0.46",
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.44",
6
+ "@dynamic-labs-wallet/core": "0.0.46",
7
7
  "@dynamic-labs/logger": "^4.5.1"
8
8
  },
9
9
  "files": [
package/src/client.d.ts CHANGED
@@ -22,11 +22,12 @@ export declare class DynamicWalletClient {
22
22
  * Client initialization logic
23
23
  */
24
24
  private _initialize;
25
- serverInitializeKeyGen({ chainName, clientKeygenIds, thresholdSignatureScheme, onError, }: {
25
+ serverInitializeKeyGen({ chainName, clientKeygenIds, thresholdSignatureScheme, onError, onCeremonyComplete, }: {
26
26
  chainName: string;
27
27
  clientKeygenIds: string[];
28
28
  thresholdSignatureScheme: ThresholdSignatureScheme;
29
29
  onError?: (error: Error) => void;
30
+ onCeremonyComplete?: () => void;
30
31
  }): Promise<import("build/core/src/types").KeygenCompleteResponse>;
31
32
  clientInitializeKeyGen({ chainName, thresholdSignatureScheme, }: {
32
33
  chainName: string;
@@ -47,10 +48,11 @@ export declare class DynamicWalletClient {
47
48
  rawPublicKey: EcdsaPublicKey | Uint8Array | undefined;
48
49
  clientKeygenResults: ClientKeyShare[];
49
50
  }>;
50
- keyGen({ chainName, thresholdSignatureScheme, onError, }: {
51
+ keyGen({ chainName, thresholdSignatureScheme, onError, onCeremonyComplete, }: {
51
52
  chainName: string;
52
53
  thresholdSignatureScheme: ThresholdSignatureScheme;
53
54
  onError?: (error: Error) => void;
55
+ onCeremonyComplete?: () => void;
54
56
  }): Promise<{
55
57
  rawPublicKey: EcdsaPublicKey | Uint8Array | undefined;
56
58
  clientKeyShares: ClientKeyShare[];
@@ -131,6 +133,24 @@ export declare class DynamicWalletClient {
131
133
  keyShare: ClientKeyShare;
132
134
  password?: string;
133
135
  }): Promise<string>;
136
+ /**
137
+ * Encrypts and stores wallet key shares as backups.
138
+ *
139
+ * This method encrypts all client key shares for a specific wallet and stores them
140
+ * in Dynamic's backend. If Google Drive backup is already configured for this wallet,
141
+ * it will also update the backup in Google Drive.
142
+ *
143
+ * The method performs the following steps:
144
+ * 1. Encrypts all client key shares with the provided password (or environment ID if no password)
145
+ * 2. Stores the encrypted key shares in Dynamic's backend
146
+ * 3. If Google Drive backup exists, updates the backup there as well
147
+ * 4. Updates the local wallet map with the new backup information
148
+ * 5. Persists the updated wallet map to storage
149
+ *
150
+ * @param {Object} params - The parameters for the backup operation
151
+ * @param {string} params.accountAddress - The account address of the wallet to backup
152
+ * @param {string} [params.password] - Optional password for encrypting the key shares
153
+ */
134
154
  storeEncryptedBackupByWallet({ accountAddress, password, }: {
135
155
  accountAddress: string;
136
156
  password?: string;
@@ -178,21 +198,19 @@ export declare class DynamicWalletClient {
178
198
  fileName?: string;
179
199
  oauthAccountId: string;
180
200
  password?: string;
181
- }): Promise<{
182
- appUpload: any;
183
- personalUpload: any;
184
- }>;
201
+ }): Promise<any>;
185
202
  restoreBackupFromGoogleDrive({ accountAddress, oauthAccountId, name, password, }: {
186
203
  accountAddress: string;
187
204
  oauthAccountId: string;
188
205
  name?: string;
189
206
  password?: string;
190
207
  }): Promise<ClientKeyShare[] | null>;
191
- importRawPrivateKey({ chainName, privateKey, thresholdSignatureScheme, onError, }: {
208
+ importRawPrivateKey({ chainName, privateKey, thresholdSignatureScheme, onError, onCeremonyComplete, }: {
192
209
  chainName: string;
193
210
  privateKey: string;
194
211
  thresholdSignatureScheme: ThresholdSignatureScheme;
195
212
  onError?: (error: Error) => void;
213
+ onCeremonyComplete?: () => void;
196
214
  }): Promise<{
197
215
  rawPublicKey: EcdsaPublicKey | Uint8Array | undefined;
198
216
  clientKeyShares: ClientKeyShare[];
@@ -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,EACf,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,EAEL,wBAAwB,EACxB,gBAAgB,EAChB,kBAAkB,EAClB,gBAAgB,EAChB,eAAe,EAChB,MAAM,SAAS,CAAC;AASjB,qBAAa,mBAAmB;IACvB,aAAa,EAAE,MAAM,CAAC;IACtB,UAAU,EAAE,MAAM,CAAC;IACnB,KAAK,EAAE,O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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;IA+Bd,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;IAgEK,UAAU;CAoCjB"}
package/src/utils.d.ts CHANGED
@@ -21,4 +21,8 @@ export declare const getClientKeyShareBackupInfo: (params?: {
21
21
  * @returns Array of merged unique keyshares
22
22
  */
23
23
  export declare const mergeUniqueKeyShares: (existingKeyShares: ClientKeyShare[], newKeyShares: ClientKeyShare[]) => ClientKeyShare[];
24
+ export declare const timeoutPromise: ({ timeInMs, activity }: {
25
+ timeInMs: number;
26
+ activity?: string;
27
+ }) => Promise<unknown>;
24
28
  //# sourceMappingURL=utils.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../packages/src/utils.ts"],"names":[],"mappings":"AAAA,OAAO,EAAkB,wBAAwB,EAAE,MAAM,2BAA2B,CA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