@dynamic-labs-wallet/browser-wallet-client 0.0.0-beta.154.9 → 0.0.0-beta.164.2

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
@@ -46,20 +46,18 @@ const setupMessageTransportBridge = (messageTransport$1, iframe, iframeOrigin)=>
46
46
  };
47
47
 
48
48
  class iframeMessageHandler {
49
- async getWallets() {
50
- return this.requestChannel.request('getWallets');
49
+ async getWallets(request) {
50
+ return this.requestChannel.request('getWallets', request);
51
51
  }
52
- async getWallet({ accountAddress, walletOperation }) {
52
+ async getWallet({ chainName, accountAddress, walletOperation }) {
53
53
  return this.requestChannel.request('getWallet', {
54
+ chainName,
54
55
  accountAddress,
55
56
  walletOperation
56
57
  });
57
58
  }
58
- async createWalletAccount(thresholdSignatureScheme, password) {
59
- return this.requestChannel.request('createWalletAccount', {
60
- thresholdSignatureScheme,
61
- password
62
- });
59
+ async createWalletAccount(request) {
60
+ return this.requestChannel.request('createWalletAccount', request);
63
61
  }
64
62
  async requiresPasswordForOperation(request) {
65
63
  return this.requestChannel.request('requiresPasswordForOperation', request);
@@ -125,10 +123,10 @@ class DynamicWalletClient {
125
123
  * this is called on class construction time
126
124
  * @returns {Promise<void>} that resolves when the iframe is loaded and the message transport and iframe storage are initialized
127
125
  */ initializeIframeCommunication() {
128
- if (!this.iframeLoadPromise) {
129
- this.iframeLoadPromise = this.doInitializeIframeCommunication();
126
+ if (!DynamicWalletClient.iframeLoadPromise) {
127
+ DynamicWalletClient.iframeLoadPromise = this.doInitializeIframeCommunication();
130
128
  }
131
- return this.iframeLoadPromise;
129
+ return DynamicWalletClient.iframeLoadPromise;
132
130
  }
133
131
  /**
134
132
  * initialize the iframe communication by awaiting the iframe load promise
@@ -136,8 +134,6 @@ class DynamicWalletClient {
136
134
  */ async doInitializeIframeCommunication() {
137
135
  try {
138
136
  await this.loadIframe();
139
- this.initializeMessageTransport();
140
- await this.initAuthToken();
141
137
  } catch (error) {
142
138
  this.logger.error('Error initializing iframe:', error);
143
139
  throw error;
@@ -145,7 +141,8 @@ class DynamicWalletClient {
145
141
  }
146
142
  /**
147
143
  * initialize the message transport after iframe is successfully loaded
148
- */ initializeMessageTransport() {
144
+ */ async initializeMessageTransport() {
145
+ await this.initializeIframeCommunication();
149
146
  const transport = messageTransport.applyDefaultMessageOrigin({
150
147
  defaultOrigin: 'host',
151
148
  messageTransport: messageTransport.createMessageTransport()
@@ -156,6 +153,7 @@ class DynamicWalletClient {
156
153
  }
157
154
  setupMessageTransportBridge(this.messageTransport, this.iframe, this.iframeDomain);
158
155
  this.iframeMessageHandler = new iframeMessageHandler(this.messageTransport);
156
+ await this.initAuthToken();
159
157
  }
160
158
  /**
161
159
  * securely exchange the auth token with iframe securely
@@ -170,8 +168,21 @@ class DynamicWalletClient {
170
168
  throw new Error('Failed to establish secure token exchange: ' + error);
171
169
  }
172
170
  }
173
- loadIframe() {
174
- return new Promise((resolve, reject)=>{
171
+ async loadIframe() {
172
+ // If the iframe is already loaded, just assign and resolve
173
+ if (DynamicWalletClient.sharedIframe) {
174
+ this.iframe = DynamicWalletClient.sharedIframe;
175
+ DynamicWalletClient.iframeInstanceCount++;
176
+ return Promise.resolve();
177
+ }
178
+ // If a load is in progress, wait for it, then assign
179
+ if (DynamicWalletClient.iframeLoadPromise) {
180
+ return DynamicWalletClient.iframeLoadPromise.then(()=>{
181
+ this.iframe = DynamicWalletClient.sharedIframe;
182
+ DynamicWalletClient.iframeInstanceCount++;
183
+ });
184
+ }
185
+ DynamicWalletClient.iframeLoadPromise = new Promise((resolve, reject)=>{
175
186
  const iframe = document.createElement('iframe');
176
187
  const iframeTimeoutId = setTimeout(()=>{
177
188
  reject(new Error('Iframe load timeout'));
@@ -193,15 +204,16 @@ class DynamicWalletClient {
193
204
  hostOrigin: window.location.origin,
194
205
  environmentId: this.environmentId,
195
206
  baseApiUrl: this.baseApiUrl,
196
- baseMPCRelayApiUrl: this.baseMPCRelayApiUrl,
197
- chain: this.chainName
207
+ baseMPCRelayApiUrl: this.baseMPCRelayApiUrl
198
208
  });
199
209
  iframe.src = `${this.iframeDomain}/waas-v1/${this.environmentId}?${params.toString()}`;
200
210
  this.logger.debug('Creating iframe with src:', iframe.src);
201
211
  document.body.appendChild(iframe);
202
212
  iframe.onload = ()=>{
203
213
  clearTimeout(iframeTimeoutId);
214
+ DynamicWalletClient.sharedIframe = iframe;
204
215
  this.iframe = iframe;
216
+ DynamicWalletClient.iframeInstanceCount++;
205
217
  resolve();
206
218
  };
207
219
  iframe.onerror = (error)=>{
@@ -210,6 +222,7 @@ class DynamicWalletClient {
210
222
  reject(new Error('Failed to load iframe'));
211
223
  };
212
224
  });
225
+ return DynamicWalletClient.iframeLoadPromise;
213
226
  }
214
227
  /**
215
228
  * Load an iframe for a specific container
@@ -285,11 +298,13 @@ class DynamicWalletClient {
285
298
  }
286
299
  }
287
300
  async getWallets() {
288
- await this.initializeIframeCommunication();
301
+ await this.initializeMessageTransport();
289
302
  if (!this.iframeMessageHandler) {
290
303
  throw new Error('Iframe message handler not initialized');
291
304
  }
292
- return this.iframeMessageHandler.getWallets();
305
+ return this.iframeMessageHandler.getWallets({
306
+ chainName: this.chainName
307
+ });
293
308
  }
294
309
  async getWallet({ accountAddress, walletOperation = core.WalletOperation.NO_OPERATION }) {
295
310
  await this.initializeIframeCommunication();
@@ -297,6 +312,7 @@ class DynamicWalletClient {
297
312
  throw new Error('Iframe message handler not initialized');
298
313
  }
299
314
  return this.iframeMessageHandler.getWallet({
315
+ chainName: this.chainName,
300
316
  accountAddress,
301
317
  walletOperation
302
318
  });
@@ -306,7 +322,11 @@ class DynamicWalletClient {
306
322
  if (!this.iframeMessageHandler) {
307
323
  throw new Error('Iframe message handler not initialized');
308
324
  }
309
- return this.iframeMessageHandler.createWalletAccount(thresholdSignatureScheme, password);
325
+ return this.iframeMessageHandler.createWalletAccount({
326
+ chainName: this.chainName,
327
+ thresholdSignatureScheme,
328
+ password
329
+ });
310
330
  }
311
331
  async requiresPasswordForOperation({ accountAddress, walletOperation = core.WalletOperation.REACH_THRESHOLD }) {
312
332
  await this.initializeIframeCommunication();
@@ -314,6 +334,7 @@ class DynamicWalletClient {
314
334
  throw new Error('Iframe message handler not initialized');
315
335
  }
316
336
  return this.iframeMessageHandler.requiresPasswordForOperation({
337
+ chainName: this.chainName,
317
338
  accountAddress,
318
339
  walletOperation
319
340
  });
@@ -324,6 +345,7 @@ class DynamicWalletClient {
324
345
  throw new Error('Iframe message handler not initialized');
325
346
  }
326
347
  return this.iframeMessageHandler.isPasswordEncrypted({
348
+ chainName: this.chainName,
327
349
  accountAddress
328
350
  });
329
351
  }
@@ -333,6 +355,7 @@ class DynamicWalletClient {
333
355
  throw new Error('Iframe message handler not initialized');
334
356
  }
335
357
  return this.iframeMessageHandler.signMessage({
358
+ chainName: this.chainName,
336
359
  message,
337
360
  accountAddress,
338
361
  password
@@ -344,6 +367,7 @@ class DynamicWalletClient {
344
367
  throw new Error('Iframe message handler not initialized');
345
368
  }
346
369
  return this.iframeMessageHandler.signRawMessage({
370
+ chainName: this.chainName,
347
371
  message,
348
372
  accountAddress,
349
373
  password
@@ -365,6 +389,7 @@ class DynamicWalletClient {
365
389
  throw new Error('Iframe message handler not initialized');
366
390
  }
367
391
  return this.iframeMessageHandler.signTransaction({
392
+ chainName: this.chainName,
368
393
  senderAddress,
369
394
  transaction,
370
395
  password
@@ -385,6 +410,7 @@ class DynamicWalletClient {
385
410
  throw new Error('Failed to initialize iframe handler with display functionality');
386
411
  }
387
412
  return iframeDisplay.restoreBackupFromGoogleDrive({
413
+ chainName: this.chainName,
388
414
  accountAddress,
389
415
  password
390
416
  });
@@ -394,7 +420,11 @@ class DynamicWalletClient {
394
420
  if (!this.iframeMessageHandler) {
395
421
  throw new Error('Iframe message handler not initialized');
396
422
  }
397
- return this.iframeMessageHandler.refreshWalletAccountShares(request);
423
+ return this.iframeMessageHandler.refreshWalletAccountShares({
424
+ chainName: this.chainName,
425
+ accountAddress: request.accountAddress,
426
+ password: request.password
427
+ });
398
428
  }
399
429
  async reshare(request) {
400
430
  await this.initializeIframeCommunication();
@@ -411,6 +441,7 @@ class DynamicWalletClient {
411
441
  throw new Error('Failed to initialize iframe handler with display functionality');
412
442
  }
413
443
  return iframeDisplay.exportPrivateKey({
444
+ chainName: this.chainName,
414
445
  accountAddress,
415
446
  password
416
447
  });
@@ -421,6 +452,7 @@ class DynamicWalletClient {
421
452
  throw new Error('Iframe message handler not initialized');
422
453
  }
423
454
  return this.iframeMessageHandler.verifyPassword({
455
+ chainName: this.chainName,
424
456
  accountAddress,
425
457
  password,
426
458
  walletOperation
@@ -432,6 +464,7 @@ class DynamicWalletClient {
432
464
  throw new Error('Iframe message handler not initialized');
433
465
  }
434
466
  return this.iframeMessageHandler.updatePassword({
467
+ chainName: this.chainName,
435
468
  accountAddress,
436
469
  existingPassword,
437
470
  newPassword
@@ -454,6 +487,7 @@ class DynamicWalletClient {
454
487
  throw new Error('Iframe message handler not initialized');
455
488
  }
456
489
  return this.iframeMessageHandler.exportClientKeyshares({
490
+ chainName: this.chainName,
457
491
  accountAddress,
458
492
  password
459
493
  });
@@ -472,16 +506,27 @@ class DynamicWalletClient {
472
506
  const argsBuffer = new TextEncoder().encode(serializedArgs);
473
507
  const base64Args = Buffer.from(argsBuffer).toString('base64');
474
508
  return this.iframeMessageHandler.offlineExportPrivateKey({
509
+ chainName: this.chainName,
475
510
  base64Args
476
511
  });
477
512
  }
513
+ cleanup() {
514
+ if (this.iframe) {
515
+ DynamicWalletClient.iframeInstanceCount--;
516
+ if (DynamicWalletClient.iframeInstanceCount === 0) {
517
+ document.body.removeChild(DynamicWalletClient.sharedIframe);
518
+ DynamicWalletClient.sharedIframe = null;
519
+ DynamicWalletClient.iframeLoadPromise = null;
520
+ }
521
+ this.iframe = null;
522
+ }
523
+ }
478
524
  constructor({ environmentId, authToken, baseApiUrl, baseMPCRelayApiUrl, chainName, debug }){
479
525
  this.logger = logger;
480
526
  this.instanceId = null;
481
527
  this.iframeDomain = null;
482
528
  this.messageTransport = null;
483
529
  this.iframeMessageHandler = null;
484
- this.iframeLoadPromise = null;
485
530
  this.iframe = null;
486
531
  this.environmentId = environmentId;
487
532
  this.authToken = authToken;
@@ -498,6 +543,9 @@ class DynamicWalletClient {
498
543
  this.initialize();
499
544
  }
500
545
  }
546
+ DynamicWalletClient.iframeLoadPromise = null;
547
+ DynamicWalletClient.sharedIframe = null;
548
+ DynamicWalletClient.iframeInstanceCount = 0;
501
549
 
502
550
  Object.defineProperty(exports, "MPC_RELAY_PREPROD_API_URL", {
503
551
  enumerable: true,
package/index.esm.js CHANGED
@@ -45,20 +45,18 @@ const setupMessageTransportBridge = (messageTransport, iframe, iframeOrigin)=>{
45
45
  };
46
46
 
47
47
  class iframeMessageHandler {
48
- async getWallets() {
49
- return this.requestChannel.request('getWallets');
48
+ async getWallets(request) {
49
+ return this.requestChannel.request('getWallets', request);
50
50
  }
51
- async getWallet({ accountAddress, walletOperation }) {
51
+ async getWallet({ chainName, accountAddress, walletOperation }) {
52
52
  return this.requestChannel.request('getWallet', {
53
+ chainName,
53
54
  accountAddress,
54
55
  walletOperation
55
56
  });
56
57
  }
57
- async createWalletAccount(thresholdSignatureScheme, password) {
58
- return this.requestChannel.request('createWalletAccount', {
59
- thresholdSignatureScheme,
60
- password
61
- });
58
+ async createWalletAccount(request) {
59
+ return this.requestChannel.request('createWalletAccount', request);
62
60
  }
63
61
  async requiresPasswordForOperation(request) {
64
62
  return this.requestChannel.request('requiresPasswordForOperation', request);
@@ -124,10 +122,10 @@ class DynamicWalletClient {
124
122
  * this is called on class construction time
125
123
  * @returns {Promise<void>} that resolves when the iframe is loaded and the message transport and iframe storage are initialized
126
124
  */ initializeIframeCommunication() {
127
- if (!this.iframeLoadPromise) {
128
- this.iframeLoadPromise = this.doInitializeIframeCommunication();
125
+ if (!DynamicWalletClient.iframeLoadPromise) {
126
+ DynamicWalletClient.iframeLoadPromise = this.doInitializeIframeCommunication();
129
127
  }
130
- return this.iframeLoadPromise;
128
+ return DynamicWalletClient.iframeLoadPromise;
131
129
  }
132
130
  /**
133
131
  * initialize the iframe communication by awaiting the iframe load promise
@@ -135,8 +133,6 @@ class DynamicWalletClient {
135
133
  */ async doInitializeIframeCommunication() {
136
134
  try {
137
135
  await this.loadIframe();
138
- this.initializeMessageTransport();
139
- await this.initAuthToken();
140
136
  } catch (error) {
141
137
  this.logger.error('Error initializing iframe:', error);
142
138
  throw error;
@@ -144,7 +140,8 @@ class DynamicWalletClient {
144
140
  }
145
141
  /**
146
142
  * initialize the message transport after iframe is successfully loaded
147
- */ initializeMessageTransport() {
143
+ */ async initializeMessageTransport() {
144
+ await this.initializeIframeCommunication();
148
145
  const transport = applyDefaultMessageOrigin({
149
146
  defaultOrigin: 'host',
150
147
  messageTransport: createMessageTransport()
@@ -155,6 +152,7 @@ class DynamicWalletClient {
155
152
  }
156
153
  setupMessageTransportBridge(this.messageTransport, this.iframe, this.iframeDomain);
157
154
  this.iframeMessageHandler = new iframeMessageHandler(this.messageTransport);
155
+ await this.initAuthToken();
158
156
  }
159
157
  /**
160
158
  * securely exchange the auth token with iframe securely
@@ -169,8 +167,21 @@ class DynamicWalletClient {
169
167
  throw new Error('Failed to establish secure token exchange: ' + error);
170
168
  }
171
169
  }
172
- loadIframe() {
173
- return new Promise((resolve, reject)=>{
170
+ async loadIframe() {
171
+ // If the iframe is already loaded, just assign and resolve
172
+ if (DynamicWalletClient.sharedIframe) {
173
+ this.iframe = DynamicWalletClient.sharedIframe;
174
+ DynamicWalletClient.iframeInstanceCount++;
175
+ return Promise.resolve();
176
+ }
177
+ // If a load is in progress, wait for it, then assign
178
+ if (DynamicWalletClient.iframeLoadPromise) {
179
+ return DynamicWalletClient.iframeLoadPromise.then(()=>{
180
+ this.iframe = DynamicWalletClient.sharedIframe;
181
+ DynamicWalletClient.iframeInstanceCount++;
182
+ });
183
+ }
184
+ DynamicWalletClient.iframeLoadPromise = new Promise((resolve, reject)=>{
174
185
  const iframe = document.createElement('iframe');
175
186
  const iframeTimeoutId = setTimeout(()=>{
176
187
  reject(new Error('Iframe load timeout'));
@@ -192,15 +203,16 @@ class DynamicWalletClient {
192
203
  hostOrigin: window.location.origin,
193
204
  environmentId: this.environmentId,
194
205
  baseApiUrl: this.baseApiUrl,
195
- baseMPCRelayApiUrl: this.baseMPCRelayApiUrl,
196
- chain: this.chainName
206
+ baseMPCRelayApiUrl: this.baseMPCRelayApiUrl
197
207
  });
198
208
  iframe.src = `${this.iframeDomain}/waas-v1/${this.environmentId}?${params.toString()}`;
199
209
  this.logger.debug('Creating iframe with src:', iframe.src);
200
210
  document.body.appendChild(iframe);
201
211
  iframe.onload = ()=>{
202
212
  clearTimeout(iframeTimeoutId);
213
+ DynamicWalletClient.sharedIframe = iframe;
203
214
  this.iframe = iframe;
215
+ DynamicWalletClient.iframeInstanceCount++;
204
216
  resolve();
205
217
  };
206
218
  iframe.onerror = (error)=>{
@@ -209,6 +221,7 @@ class DynamicWalletClient {
209
221
  reject(new Error('Failed to load iframe'));
210
222
  };
211
223
  });
224
+ return DynamicWalletClient.iframeLoadPromise;
212
225
  }
213
226
  /**
214
227
  * Load an iframe for a specific container
@@ -284,11 +297,13 @@ class DynamicWalletClient {
284
297
  }
285
298
  }
286
299
  async getWallets() {
287
- await this.initializeIframeCommunication();
300
+ await this.initializeMessageTransport();
288
301
  if (!this.iframeMessageHandler) {
289
302
  throw new Error('Iframe message handler not initialized');
290
303
  }
291
- return this.iframeMessageHandler.getWallets();
304
+ return this.iframeMessageHandler.getWallets({
305
+ chainName: this.chainName
306
+ });
292
307
  }
293
308
  async getWallet({ accountAddress, walletOperation = WalletOperation.NO_OPERATION }) {
294
309
  await this.initializeIframeCommunication();
@@ -296,6 +311,7 @@ class DynamicWalletClient {
296
311
  throw new Error('Iframe message handler not initialized');
297
312
  }
298
313
  return this.iframeMessageHandler.getWallet({
314
+ chainName: this.chainName,
299
315
  accountAddress,
300
316
  walletOperation
301
317
  });
@@ -305,7 +321,11 @@ class DynamicWalletClient {
305
321
  if (!this.iframeMessageHandler) {
306
322
  throw new Error('Iframe message handler not initialized');
307
323
  }
308
- return this.iframeMessageHandler.createWalletAccount(thresholdSignatureScheme, password);
324
+ return this.iframeMessageHandler.createWalletAccount({
325
+ chainName: this.chainName,
326
+ thresholdSignatureScheme,
327
+ password
328
+ });
309
329
  }
310
330
  async requiresPasswordForOperation({ accountAddress, walletOperation = WalletOperation.REACH_THRESHOLD }) {
311
331
  await this.initializeIframeCommunication();
@@ -313,6 +333,7 @@ class DynamicWalletClient {
313
333
  throw new Error('Iframe message handler not initialized');
314
334
  }
315
335
  return this.iframeMessageHandler.requiresPasswordForOperation({
336
+ chainName: this.chainName,
316
337
  accountAddress,
317
338
  walletOperation
318
339
  });
@@ -323,6 +344,7 @@ class DynamicWalletClient {
323
344
  throw new Error('Iframe message handler not initialized');
324
345
  }
325
346
  return this.iframeMessageHandler.isPasswordEncrypted({
347
+ chainName: this.chainName,
326
348
  accountAddress
327
349
  });
328
350
  }
@@ -332,6 +354,7 @@ class DynamicWalletClient {
332
354
  throw new Error('Iframe message handler not initialized');
333
355
  }
334
356
  return this.iframeMessageHandler.signMessage({
357
+ chainName: this.chainName,
335
358
  message,
336
359
  accountAddress,
337
360
  password
@@ -343,6 +366,7 @@ class DynamicWalletClient {
343
366
  throw new Error('Iframe message handler not initialized');
344
367
  }
345
368
  return this.iframeMessageHandler.signRawMessage({
369
+ chainName: this.chainName,
346
370
  message,
347
371
  accountAddress,
348
372
  password
@@ -364,6 +388,7 @@ class DynamicWalletClient {
364
388
  throw new Error('Iframe message handler not initialized');
365
389
  }
366
390
  return this.iframeMessageHandler.signTransaction({
391
+ chainName: this.chainName,
367
392
  senderAddress,
368
393
  transaction,
369
394
  password
@@ -384,6 +409,7 @@ class DynamicWalletClient {
384
409
  throw new Error('Failed to initialize iframe handler with display functionality');
385
410
  }
386
411
  return iframeDisplay.restoreBackupFromGoogleDrive({
412
+ chainName: this.chainName,
387
413
  accountAddress,
388
414
  password
389
415
  });
@@ -393,7 +419,11 @@ class DynamicWalletClient {
393
419
  if (!this.iframeMessageHandler) {
394
420
  throw new Error('Iframe message handler not initialized');
395
421
  }
396
- return this.iframeMessageHandler.refreshWalletAccountShares(request);
422
+ return this.iframeMessageHandler.refreshWalletAccountShares({
423
+ chainName: this.chainName,
424
+ accountAddress: request.accountAddress,
425
+ password: request.password
426
+ });
397
427
  }
398
428
  async reshare(request) {
399
429
  await this.initializeIframeCommunication();
@@ -410,6 +440,7 @@ class DynamicWalletClient {
410
440
  throw new Error('Failed to initialize iframe handler with display functionality');
411
441
  }
412
442
  return iframeDisplay.exportPrivateKey({
443
+ chainName: this.chainName,
413
444
  accountAddress,
414
445
  password
415
446
  });
@@ -420,6 +451,7 @@ class DynamicWalletClient {
420
451
  throw new Error('Iframe message handler not initialized');
421
452
  }
422
453
  return this.iframeMessageHandler.verifyPassword({
454
+ chainName: this.chainName,
423
455
  accountAddress,
424
456
  password,
425
457
  walletOperation
@@ -431,6 +463,7 @@ class DynamicWalletClient {
431
463
  throw new Error('Iframe message handler not initialized');
432
464
  }
433
465
  return this.iframeMessageHandler.updatePassword({
466
+ chainName: this.chainName,
434
467
  accountAddress,
435
468
  existingPassword,
436
469
  newPassword
@@ -453,6 +486,7 @@ class DynamicWalletClient {
453
486
  throw new Error('Iframe message handler not initialized');
454
487
  }
455
488
  return this.iframeMessageHandler.exportClientKeyshares({
489
+ chainName: this.chainName,
456
490
  accountAddress,
457
491
  password
458
492
  });
@@ -471,16 +505,27 @@ class DynamicWalletClient {
471
505
  const argsBuffer = new TextEncoder().encode(serializedArgs);
472
506
  const base64Args = Buffer.from(argsBuffer).toString('base64');
473
507
  return this.iframeMessageHandler.offlineExportPrivateKey({
508
+ chainName: this.chainName,
474
509
  base64Args
475
510
  });
476
511
  }
512
+ cleanup() {
513
+ if (this.iframe) {
514
+ DynamicWalletClient.iframeInstanceCount--;
515
+ if (DynamicWalletClient.iframeInstanceCount === 0) {
516
+ document.body.removeChild(DynamicWalletClient.sharedIframe);
517
+ DynamicWalletClient.sharedIframe = null;
518
+ DynamicWalletClient.iframeLoadPromise = null;
519
+ }
520
+ this.iframe = null;
521
+ }
522
+ }
477
523
  constructor({ environmentId, authToken, baseApiUrl, baseMPCRelayApiUrl, chainName, debug }){
478
524
  this.logger = logger;
479
525
  this.instanceId = null;
480
526
  this.iframeDomain = null;
481
527
  this.messageTransport = null;
482
528
  this.iframeMessageHandler = null;
483
- this.iframeLoadPromise = null;
484
529
  this.iframe = null;
485
530
  this.environmentId = environmentId;
486
531
  this.authToken = authToken;
@@ -497,5 +542,8 @@ class DynamicWalletClient {
497
542
  this.initialize();
498
543
  }
499
544
  }
545
+ DynamicWalletClient.iframeLoadPromise = null;
546
+ DynamicWalletClient.sharedIframe = null;
547
+ DynamicWalletClient.iframeInstanceCount = 0;
500
548
 
501
549
  export { DynamicWalletClient };
package/package.json CHANGED
@@ -1,9 +1,9 @@
1
1
  {
2
2
  "name": "@dynamic-labs-wallet/browser-wallet-client",
3
- "version": "0.0.0-beta.154.9",
3
+ "version": "0.0.0-beta.164.2",
4
4
  "license": "MIT",
5
5
  "dependencies": {
6
- "@dynamic-labs-wallet/core": "0.0.0-beta.154.9",
6
+ "@dynamic-labs-wallet/core": "0.0.0-beta.164.2",
7
7
  "@dynamic-labs/message-transport": "^4.9.9",
8
8
  "@dynamic-labs/logger": "^4.9.9",
9
9
  "@noble/hashes": "1.7.1"
@@ -14,9 +14,11 @@ export declare class DynamicWalletClient {
14
14
  baseMPCRelayApiUrl: string;
15
15
  protected messageTransport: MessageTransportWithDefaultOrigin | null;
16
16
  protected iframeMessageHandler: iframeMessageHandler | null;
17
- private iframeLoadPromise;
17
+ private static iframeLoadPromise;
18
18
  protected iframe: HTMLIFrameElement | null;
19
19
  private debug;
20
+ private static sharedIframe;
21
+ private static iframeInstanceCount;
20
22
  constructor({ environmentId, authToken, baseApiUrl, baseMPCRelayApiUrl, chainName, debug, }: {
21
23
  environmentId: string;
22
24
  authToken: string;
@@ -117,5 +119,6 @@ export declare class DynamicWalletClient {
117
119
  keyShares: (EcdsaKeygenResult | Ed25519KeygenResult)[];
118
120
  derivationPath?: string;
119
121
  }): Promise<OfflineExportPrivateKeyResponse>;
122
+ cleanup(): void;
120
123
  }
121
124
  //# sourceMappingURL=client.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../../src/client/client.ts"],"names":[],"mappings":"AAAA,OAAO,EAGL,KAAK,iCAAiC,EACvC,MAAM,iCAAiC,CAAC;AAEzC,OAAO,EAAE,oBAAoB,EAAE,MAAM,kCAAkC,CAAC;AAExE,OAAO,KAAK,EACV,wBAAwB,EACxB,iBAAiB,EACjB,2BAA2B,EAC3B,mCAAmC,EACnC,kBAAkB,EAClB,0BAA0B,EAC1B,mCAAmC,EACnC,iCAAiC,EACjC,cAAc,EACd,qBAAqB,EACrB,qBAAqB,EACrB,uBAAuB,EACvB,4BAA4B,EAC5B,+BAA+B,EAC/B,qBAAqB,EACtB,MAAM,2BAA2B,CAAC;AACnC,OAAO,EAGL,eAAe,EAChB,MAAM,2BAA2B,CAAC;AACnC,OAAO,EAAE,iBAAiB,EAAE,mBAAmB,EAAE,MAAM,eAAe,CAAC;AAEvE,qBAAa,mBAAmB;IAC9B,SAAS,CAAC,SAAS,EAAE,MAAM,CAAC;IAC5B,SAAS,CAAC,MAAM,wCAAU;IACnB,UAAU,EAAE,MAAM,GAAG,IAAI,CAAQ;IACjC,YAAY,EAAE,MAAM,GAAG,IAAI,CAAQ;IACnC,aAAa,EAAE,MAAM,CAAC;IACtB,SAAS,EAAE,MAAM,CAAC;IAClB,UAAU,EAAE,MAAM,CAAC;IACnB,kBAAkB,EAAE,MAAM,CAAC;IAClC,SAAS,CAAC,gBAAgB,EAAE,iCAAiC,GAAG,IAAI,CAAQ;IAC5E,SAAS,CAAC,oBAAoB,EAAE,oBAAoB,GAAG,IAAI,CAAQ;IACnE,OAAO,CAAC,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,CAAC,EAAE,MAAM,CAAC;KACnB,GAAG,OAAO,CAAC,IAAI,CAAC;IAiBX,0BAA0B,CAC9B,OAAO,EAAE,iCAAiC,GACzC,OAAO,CAAC,IAAI,CAAC;IAaV,OAAO,CAAC,OAAO,EAAE,cAAc,GAAG,OAAO,CAAC,IAAI,CAAC;IAS/C,gBAAgB,CAAC,EACrB,cAAc,EACd,gBAAgB,EAChB,QAAQ,GACT,EAAE;QACD,cAAc,EAAE,MAAM,CAAC;QACvB,gBAAgB,EAAE,WAAW,CAAC;QAC9B,QAAQ,CAAC,EAAE,MAAM,CAAC;KACnB,GAAG,OAAO,CAAC,IAAI,CAAC;IAiBX,cAAc,CAAC,EACnB,cAAc,EACd,QAAQ,EACR,eAA8C,GAC/C,EAAE,qBAAqB,GAAG,OAAO,CAAC,IAAI,CAAC;IAclC,cAAc,CAAC,EACnB,cAAc,EACd,gBAAgB,EAChB,WAAW,GACZ,EAAE,qBAAqB,GAAG,OAAO,CAAC,IAAI,CAAC;IAclC,gBAAgB,CAAC,EACrB,UAAU,EACV,SAAS,EACT,wBAAwB,GACzB,EAAE,uBAAuB,GAAG,OAAO,CAAC,2BAA2B,CAAC;IAa3D,qBAAqB,CAAC,EAC1B,cAAc,EACd,QAAQ,GACT,EAAE,4BAA4B,GAAG,OAAO,CAAC,IAAI,CAAC;IAazC,uBAAuB,CAAC,EAC5B,SAAS,EACT,cAAc,GACf,EAAE;QACD,SAAS,EAAE,CAAC,iBAAiB,GAAG,mBAAmB,CAAC,EAAE,CAAC;QACvD,cAAc,CAAC,EAAE,MAAM,CAAC;KACzB,GAAG,OAAO,CAAC,+BAA+B,CAAC;IAqBrC,OAAO;CAWf"}
@@ -1,14 +1,15 @@
1
1
  import { type MessageTransportWithDefaultOrigin, type RequestChannel } from '@dynamic-labs/message-transport';
2
- import type { ThresholdSignatureScheme, IframeRequestMessages, WalletOperation, GetWalletResponse, CreateWalletAccountResponse, SignMessageRequest, RequiresPasswordForOperationRequest, SignTransactionRequest, IsPasswordEncryptedRequest, BackupKeySharesToGoogleDriveRequest, RestoreBackupFromGoogleDriveRequest, RefreshWalletAccountSharesRequest, ReshareRequest, ExportPrivateKeyRequest, VerifyPasswordRequest, UpdatePasswordRequest, ImportPrivateKeyRequest, ExportClientKeysharesRequest, OfflineExportPrivateKeyRequest, OfflineExportPrivateKeyResponse, SignRawMessageRequest } from '@dynamic-labs-wallet/core';
2
+ import type { IframeRequestMessages, WalletOperation, GetWalletResponse, CreateWalletAccountResponse, SignMessageRequest, RequiresPasswordForOperationRequest, SignTransactionRequest, IsPasswordEncryptedRequest, BackupKeySharesToGoogleDriveRequest, RestoreBackupFromGoogleDriveRequest, RefreshWalletAccountSharesRequest, ReshareRequest, ExportPrivateKeyRequest, VerifyPasswordRequest, UpdatePasswordRequest, ImportPrivateKeyRequest, ExportClientKeysharesRequest, OfflineExportPrivateKeyRequest, OfflineExportPrivateKeyResponse, SignRawMessageRequest, GetWalletsRequest, CreateWalletAccountRequest } from '@dynamic-labs-wallet/core';
3
3
  export declare class iframeMessageHandler {
4
4
  requestChannel: RequestChannel<IframeRequestMessages>;
5
5
  constructor(messageTransport: MessageTransportWithDefaultOrigin);
6
- getWallets(): Promise<GetWalletResponse[]>;
7
- getWallet({ accountAddress, walletOperation, }: {
6
+ getWallets(request: GetWalletsRequest): Promise<GetWalletResponse[]>;
7
+ getWallet({ chainName, accountAddress, walletOperation, }: {
8
+ chainName: string;
8
9
  accountAddress: string;
9
10
  walletOperation: WalletOperation;
10
11
  }): Promise<GetWalletResponse>;
11
- createWalletAccount(thresholdSignatureScheme: ThresholdSignatureScheme, password?: string): Promise<CreateWalletAccountResponse>;
12
+ createWalletAccount(request: CreateWalletAccountRequest): Promise<CreateWalletAccountResponse>;
12
13
  requiresPasswordForOperation(request: RequiresPasswordForOperationRequest): Promise<boolean>;
13
14
  signMessage(request: SignMessageRequest): Promise<string>;
14
15
  signRawMessage(request: SignRawMessageRequest): Promise<string>;
@@ -1 +1 @@
1
- {"version":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