@dynamic-labs-wallet/browser 0.0.16 → 0.0.18

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.
Files changed (39) hide show
  1. package/index.cjs.js +194 -68
  2. package/index.esm.js +151 -25
  3. package/node_modules/@internal/core/dist/bip340.js +1 -0
  4. package/node_modules/@internal/core/dist/common.js +1 -0
  5. package/node_modules/@internal/core/dist/ecdsa.js +1 -0
  6. package/node_modules/@internal/core/dist/ed25519.js +1 -0
  7. package/node_modules/@internal/core/dist/index.js +1 -0
  8. package/node_modules/@internal/core/dist/native.js +1 -0
  9. package/node_modules/@internal/core/dist/types.js +1 -0
  10. package/node_modules/@internal/core/package.json +19 -0
  11. package/node_modules/@internal/web/dist/generated/libmpc_executor.js +2 -0
  12. package/node_modules/@internal/web/dist/generated/libmpc_executor_bg.wasm +0 -0
  13. package/node_modules/@internal/web/dist/index.js +1 -0
  14. package/node_modules/@internal/web/package.json +19 -0
  15. package/package.json +11 -5
  16. package/src/client.d.ts +19 -16
  17. package/src/client.d.ts.map +1 -1
  18. package/src/constants.d.ts +8 -0
  19. package/src/constants.d.ts.map +1 -1
  20. package/src/index.d.ts +2 -2
  21. package/src/index.d.ts.map +1 -1
  22. package/src/localStorage.d.ts +32 -0
  23. package/src/localStorage.d.ts.map +1 -0
  24. package/src/logger.d.ts +3 -0
  25. package/src/logger.d.ts.map +1 -0
  26. package/src/mpc/index.d.ts +2 -1
  27. package/src/mpc/index.d.ts.map +1 -1
  28. package/src/mpc/mpc.d.ts +1 -1
  29. package/src/mpc/mpc.d.ts.map +1 -1
  30. package/src/mpc/types.d.ts +2 -2
  31. package/src/mpc/types.d.ts.map +1 -1
  32. package/src/services/localStorage.d.ts +32 -0
  33. package/src/services/localStorage.d.ts.map +1 -0
  34. package/src/services/logger.d.ts +3 -0
  35. package/src/services/logger.d.ts.map +1 -0
  36. package/src/types.d.ts +21 -0
  37. package/src/types.d.ts.map +1 -0
  38. package/src/utils.d.ts +1 -0
  39. package/src/utils.d.ts.map +1 -1
package/index.cjs.js CHANGED
@@ -1,16 +1,28 @@
1
1
  'use strict';
2
2
 
3
3
  var core = require('@dynamic-labs-wallet/core');
4
- var libMpcWeb = require('@dynamic-labs-wallet/lib-mpc-web');
4
+ var web = require('@internal/web');
5
+ var logger$1 = require('@dynamic-labs/logger');
6
+
7
+ function _extends() {
8
+ _extends = Object.assign || function assign(target) {
9
+ for(var i = 1; i < arguments.length; i++){
10
+ var source = arguments[i];
11
+ for(var key in source)if (Object.prototype.hasOwnProperty.call(source, key)) target[key] = source[key];
12
+ }
13
+ return target;
14
+ };
15
+ return _extends.apply(this, arguments);
16
+ }
5
17
 
6
18
  const getMPCSignatureScheme = ({ signingAlgorithm, baseRelayUrl = core.MPC_RELAY_PROD_API_URL })=>{
7
19
  switch(signingAlgorithm){
8
20
  case core.SigningAlgorithm.ECDSA:
9
- return new libMpcWeb.Ecdsa(baseRelayUrl);
21
+ return new web.Ecdsa(baseRelayUrl);
10
22
  case core.SigningAlgorithm.ED25519:
11
- return new libMpcWeb.Ed25519(baseRelayUrl);
23
+ return new web.Ed25519(baseRelayUrl);
12
24
  case core.SigningAlgorithm.BIP340:
13
- return new libMpcWeb.BIP340(baseRelayUrl);
25
+ return new web.BIP340(baseRelayUrl);
14
26
  default:
15
27
  throw new Error(`Unsupported signing algorithm: ${signingAlgorithm}`);
16
28
  }
@@ -24,17 +36,6 @@ const getMPCSigner = ({ chainName, baseRelayUrl })=>{
24
36
  return signatureScheme;
25
37
  };
26
38
 
27
- function _extends() {
28
- _extends = Object.assign || function assign(target) {
29
- for(var i = 1; i < arguments.length; i++){
30
- var source = arguments[i];
31
- for(var key in source)if (Object.prototype.hasOwnProperty.call(source, key)) target[key] = source[key];
32
- }
33
- return target;
34
- };
35
- return _extends.apply(this, arguments);
36
- }
37
-
38
39
  const bytesToBase64 = (arr)=>{
39
40
  return btoa(Array.from(arr, (b)=>String.fromCharCode(b)).join(''));
40
41
  };
@@ -48,6 +49,7 @@ const base64ToBytes = (base64)=>{
48
49
  const ensureBase64Padding = (str)=>{
49
50
  return str.padEnd(Math.ceil(str.length / 4) * 4, '=');
50
51
  };
52
+ const isBrowser = ()=>typeof window !== 'undefined';
51
53
 
52
54
  const getKey = async ({ password, salt })=>{
53
55
  const passwordBytes = stringToBytes(password);
@@ -190,9 +192,108 @@ const downloadFileFromGoogleDrive = async ({ accessToken, name })=>{
190
192
  return fileRawData;
191
193
  };
192
194
 
195
+ const DEFAULT_LOG_LEVEL = 'INFO';
196
+ const STORAGE_KEY = 'dynamic-waas-wallet-client';
193
197
  const BACKUP_FILENAME = 'dynamicWalletSecretBackup.json';
194
198
 
199
+ const localStorageWriteTest = {
200
+ tested: false,
201
+ writable: false
202
+ };
203
+ /**
204
+ * Checks whether localStorage is supported on this browser.
205
+ */ const supportsLocalStorage = ()=>{
206
+ if (!isBrowser()) {
207
+ return false;
208
+ }
209
+ try {
210
+ if (typeof globalThis.localStorage !== 'object') {
211
+ return false;
212
+ }
213
+ } catch (e) {
214
+ // DOM exception when accessing `localStorage`
215
+ return false;
216
+ }
217
+ if (localStorageWriteTest.tested) {
218
+ return localStorageWriteTest.writable;
219
+ }
220
+ const randomKey = `lswt-${Math.random()}${Math.random()}`;
221
+ try {
222
+ globalThis.localStorage.setItem(randomKey, randomKey);
223
+ globalThis.localStorage.removeItem(randomKey);
224
+ localStorageWriteTest.tested = true;
225
+ localStorageWriteTest.writable = true;
226
+ } catch (e) {
227
+ // localStorage can't be written to
228
+ localStorageWriteTest.tested = true;
229
+ localStorageWriteTest.writable = false;
230
+ }
231
+ return localStorageWriteTest.writable;
232
+ };
233
+ /**
234
+ * Provides safe access to the globalThis.localStorage property.
235
+ */ const localStorageAdapter = {
236
+ getItem: (key)=>{
237
+ if (!supportsLocalStorage()) {
238
+ return null;
239
+ }
240
+ return globalThis.localStorage.getItem(key);
241
+ },
242
+ removeItem: (key)=>{
243
+ if (!supportsLocalStorage()) {
244
+ return;
245
+ }
246
+ globalThis.localStorage.removeItem(key);
247
+ },
248
+ setItem: (key, value)=>{
249
+ if (!supportsLocalStorage()) {
250
+ return;
251
+ }
252
+ globalThis.localStorage.setItem(key, value);
253
+ }
254
+ };
255
+ /**
256
+ * Returns a localStorage-like object that stores the key-value pairs in
257
+ * memory.
258
+ */ const memoryLocalStorageAdapter = (store = {})=>({
259
+ getItem: (key)=>store[key] || null,
260
+ removeItem: (key)=>{
261
+ delete store[key];
262
+ },
263
+ setItem: (key, value)=>{
264
+ store[key] = value;
265
+ }
266
+ });
267
+
268
+ const logger = new logger$1.Logger('DynamicWaasWalletClient');
269
+
195
270
  class DynamicWalletClient {
271
+ async initialize() {
272
+ if (this.initializePromise) {
273
+ return await this.initializePromise;
274
+ }
275
+ this.logger.debug('Initializing Dynamic Waas Wallet SDK');
276
+ this.initializePromise = this._initialize();
277
+ const result = await this.initializePromise;
278
+ this.logger.debug('Dynamic Waas Wallet SDK initialized');
279
+ return result;
280
+ }
281
+ /**
282
+ * Client initialization logic
283
+ */ async _initialize() {
284
+ try {
285
+ const initializePromises = [];
286
+ initializePromises.push(this.restoreWallets());
287
+ await Promise.all(initializePromises);
288
+ return {
289
+ error: null
290
+ };
291
+ } catch (error) {
292
+ return {
293
+ error
294
+ };
295
+ }
296
+ }
196
297
  async serverInitializeKeyGen({ chainName, clientKeygenIds, thresholdSignatureScheme }) {
197
298
  // Initilize keygen, create room, and create the wallet account on the server
198
299
  const data = await this.apiClient.createWalletAccount({
@@ -219,9 +320,9 @@ class DynamicWalletClient {
219
320
  });
220
321
  const chainConfig = core.getMPCChainConfig(chainName);
221
322
  let publicKey;
222
- if (mpcSigner instanceof libMpcWeb.Ecdsa) {
323
+ if (mpcSigner instanceof web.Ecdsa) {
223
324
  publicKey = await mpcSigner.derivePubkey(keyShare, new Uint32Array(chainConfig.derivationPath));
224
- } else if (mpcSigner instanceof libMpcWeb.Ed25519) {
325
+ } else if (mpcSigner instanceof web.Ed25519) {
225
326
  publicKey = await mpcSigner.derivePubkey(keyShare, new Uint32Array(chainConfig.derivationPath));
226
327
  }
227
328
  return publicKey;
@@ -280,7 +381,7 @@ class DynamicWalletClient {
280
381
  clientKeyShares
281
382
  };
282
383
  } catch (error) {
283
- console.error('Error creating wallet account', error);
384
+ this.logger.error('Error creating wallet account', error);
284
385
  throw new Error('Error creating wallet account');
285
386
  }
286
387
  }
@@ -305,11 +406,11 @@ class DynamicWalletClient {
305
406
  const derivationPath = new Uint32Array(chainConfig.derivationPath);
306
407
  let formattedMessage;
307
408
  //note: Ecdsa can also be used by bitcoin, but only keccak256 is used by ethereum
308
- if (mpcSigner instanceof libMpcWeb.Ecdsa) {
309
- formattedMessage = libMpcWeb.MessageHash.keccak256(message);
310
- } else if (mpcSigner instanceof libMpcWeb.Ed25519 && typeof message === 'string') {
409
+ if (mpcSigner instanceof web.Ecdsa) {
410
+ formattedMessage = web.MessageHash.keccak256(message);
411
+ } else if (mpcSigner instanceof web.Ed25519 && typeof message === 'string') {
311
412
  formattedMessage = new TextEncoder().encode(message);
312
- } else if (mpcSigner instanceof libMpcWeb.BIP340 && typeof message === 'string') {
413
+ } else if (mpcSigner instanceof web.BIP340 && typeof message === 'string') {
313
414
  formattedMessage = new TextEncoder().encode(message);
314
415
  } else {
315
416
  throw new Error('Unsupported signer type');
@@ -317,7 +418,7 @@ class DynamicWalletClient {
317
418
  const signature = await mpcSigner.sign(roomId, keyShare, formattedMessage, derivationPath);
318
419
  return signature;
319
420
  } catch (error) {
320
- console.error('Error in clientSign:', error);
421
+ this.logger.error('Error in clientSign:', error);
321
422
  throw error;
322
423
  }
323
424
  }
@@ -325,6 +426,7 @@ class DynamicWalletClient {
325
426
  const wallet = await this.getWallet({
326
427
  accountAddress
327
428
  });
429
+ this.logger.debug('signing wallet', wallet);
328
430
  // Perform the server sign
329
431
  const data = await this.serverSign({
330
432
  walletId: wallet.walletId,
@@ -412,8 +514,8 @@ class DynamicWalletClient {
412
514
  data.serverKeygenId,
413
515
  newPartyInitKeygenId
414
516
  ];
415
- console.log('newClientPrimaryKeygenIds', newClientPrimaryKeygenIds);
416
- console.log('clientSecondaryKeygenIds', clientSecondaryKeygenIds);
517
+ this.logger.debug('newClientPrimaryKeygenIds', newClientPrimaryKeygenIds);
518
+ this.logger.debug('clientSecondaryKeygenIds', clientSecondaryKeygenIds);
417
519
  const keygenResults = await Promise.all([
418
520
  mpcSigner.reshareNewParty(roomId, mpcConfig.threshold, mpcConfig.threshold, newPartyInitKeygen, newClientPrimaryKeygenIds),
419
521
  mpcSigner.reshareRemainingParty(roomId, mpcConfig.threshold, wallet.clientKeyShares[1], clientSecondaryKeygenIds)
@@ -443,11 +545,11 @@ class DynamicWalletClient {
443
545
  }
444
546
  const derivationPath = new Uint32Array(chainConfig.derivationPath);
445
547
  let derivedPrivateKey;
446
- if (mpcSigner instanceof libMpcWeb.Ecdsa) {
548
+ if (mpcSigner instanceof web.Ecdsa) {
447
549
  derivedPrivateKey = await mpcSigner.derivePrivateKeyFromXpriv(keyExportRaw, derivationPath);
448
- } else if (mpcSigner instanceof libMpcWeb.Ed25519) {
550
+ } else if (mpcSigner instanceof web.Ed25519) {
449
551
  derivedPrivateKey = keyExportRaw;
450
- } else if (mpcSigner instanceof libMpcWeb.BIP340) {
552
+ } else if (mpcSigner instanceof web.BIP340) {
451
553
  derivedPrivateKey = await mpcSigner.derivePrivateKeyFromXpriv(keyExportRaw, derivationPath);
452
554
  }
453
555
  return {
@@ -464,7 +566,7 @@ class DynamicWalletClient {
464
566
  baseRelayUrl: this.baseMPCRelayApiUrl
465
567
  });
466
568
  const walletKeyShares = keyShares.map((keyShare)=>{
467
- return mpcSigner instanceof libMpcWeb.Ecdsa ? new libMpcWeb.EcdsaKeygenResult(keyShare.pubkey, keyShare.secretShare) : mpcSigner instanceof libMpcWeb.Ed25519 ? new libMpcWeb.Ed25519KeygenResult(keyShare.pubkey, keyShare.secretShare) : new libMpcWeb.BIP340KeygenResult(keyShare.pubkey, keyShare.secretShare);
569
+ return mpcSigner instanceof web.Ecdsa ? new web.EcdsaKeygenResult(keyShare.pubkey, keyShare.secretShare) : mpcSigner instanceof web.Ed25519 ? new web.Ed25519KeygenResult(keyShare.pubkey, keyShare.secretShare) : new web.BIP340KeygenResult(keyShare.pubkey, keyShare.secretShare);
468
570
  });
469
571
  const keyExportRaw = await mpcSigner.offlineExportFullPrivateKey(walletKeyShares);
470
572
  if (!keyExportRaw) {
@@ -473,11 +575,11 @@ class DynamicWalletClient {
473
575
  const chainConfig = core.getMPCChainConfig(chainName);
474
576
  const derivationPath = new Uint32Array(chainConfig.derivationPath);
475
577
  let derivedPrivateKey;
476
- if (mpcSigner instanceof libMpcWeb.Ecdsa) {
578
+ if (mpcSigner instanceof web.Ecdsa) {
477
579
  derivedPrivateKey = await mpcSigner.derivePrivateKeyFromXpriv(keyExportRaw, derivationPath);
478
- } else if (mpcSigner instanceof libMpcWeb.Ed25519) {
580
+ } else if (mpcSigner instanceof web.Ed25519) {
479
581
  derivedPrivateKey = keyExportRaw;
480
- } else if (mpcSigner instanceof libMpcWeb.BIP340) {
582
+ } else if (mpcSigner instanceof web.BIP340) {
481
583
  derivedPrivateKey = await mpcSigner.derivePrivateKeyFromXpriv(keyExportRaw, derivationPath);
482
584
  }
483
585
  return {
@@ -542,18 +644,27 @@ class DynamicWalletClient {
542
644
  });
543
645
  return decryptedKeyShares;
544
646
  }
545
- restoreBackupShare({ walletId, accountAddress, chainName, keyShare, thresholdSignatureScheme }) {
647
+ async restoreWallets() {
648
+ const wallets = await this.storage.getItem(this.storageKey);
649
+ console.log('local storage wallets', wallets);
650
+ if (!wallets) {
651
+ return;
652
+ }
653
+ this.walletMap = JSON.parse(wallets);
654
+ }
655
+ async restoreBackupShare({ walletId, accountAddress, chainName, keyShare, thresholdSignatureScheme }) {
546
656
  var _this_walletMap_accountAddress;
547
657
  this.walletMap[accountAddress] = {
548
658
  walletId,
549
659
  chainName,
550
660
  accountAddress,
551
661
  clientKeyShares: [
552
- ...((_this_walletMap_accountAddress = this.walletMap[accountAddress]) == null ? undefined : _this_walletMap_accountAddress.clientKeyShares) || [],
662
+ ...((_this_walletMap_accountAddress = this.walletMap[accountAddress]) == null ? void 0 : _this_walletMap_accountAddress.clientKeyShares) || [],
553
663
  keyShare
554
664
  ],
555
665
  thresholdSignatureScheme
556
666
  };
667
+ await this.storage.setItem(this.storageKey, JSON.stringify(this.walletMap));
557
668
  }
558
669
  async backupFileToGoogleDrive({ oauthAccountId, fileName = BACKUP_FILENAME, jsonData, password }) {
559
670
  const encryptedKeyShare = await this.encryptKeyShare({
@@ -656,17 +767,18 @@ class DynamicWalletClient {
656
767
  } else {
657
768
  var _user_verifiedCredentials;
658
769
  const user = await this.apiClient.getUser();
659
- const wallet = (_user_verifiedCredentials = user.verifiedCredentials) == null ? undefined : _user_verifiedCredentials.find((vc)=>vc.address === accountAddress);
770
+ const wallet = (_user_verifiedCredentials = user.verifiedCredentials) == null ? void 0 : _user_verifiedCredentials.find((vc)=>vc.address === accountAddress);
771
+ this.logger.debug('need to restore wallet', wallet);
660
772
  console.log('need to restore wallet', wallet);
661
773
  const clientShares = wallet.walletProperties.keyShares.filter((ks)=>ks.backupLocation === 'dynamic');
662
- console.log('clientShares', clientShares);
774
+ this.logger.debug('clientShares', clientShares);
663
775
  // restore backup
664
776
  const decryptedKeyShares = await this.recoverEncryptedBackupByWallet({
665
777
  accountAddress,
666
778
  password: this.environmentId
667
779
  });
668
780
  //todo: check to see if their are other backups ie google drive, etc
669
- console.log('recovery decryptedKeyShares', decryptedKeyShares);
781
+ this.logger.debug('recovery decryptedKeyShares', decryptedKeyShares);
670
782
  }
671
783
  }
672
784
  const walletCount = Object.keys(this.walletMap).length;
@@ -686,7 +798,7 @@ class DynamicWalletClient {
686
798
  async getWallets() {
687
799
  var _user_verifiedCredentials;
688
800
  const user = await this.apiClient.getUser();
689
- const waasWallets = (_user_verifiedCredentials = user.verifiedCredentials) == null ? undefined : _user_verifiedCredentials.filter((vc)=>vc.walletName === 'dynamicwaas');
801
+ const waasWallets = (_user_verifiedCredentials = user.verifiedCredentials) == null ? void 0 : _user_verifiedCredentials.filter((vc)=>vc.walletName === 'dynamicwaas');
690
802
  const wallets = waasWallets.map((vc)=>({
691
803
  walletId: vc.id,
692
804
  chainName: vc.chain,
@@ -704,74 +816,88 @@ class DynamicWalletClient {
704
816
  }, {});
705
817
  return wallets;
706
818
  }
707
- constructor({ environmentId, authToken, baseApiUrl, baseMPCRelayApiUrl }){
819
+ constructor({ environmentId, authToken, baseApiUrl, baseMPCRelayApiUrl, storageKey, debug }){
820
+ this.initializePromise = null;
821
+ this.logger = logger;
708
822
  this.walletMap = {} // todo: store in session storage
709
823
  ;
824
+ this.memoryStorage = null;
710
825
  this.environmentId = environmentId;
826
+ this.storageKey = `${STORAGE_KEY}-${storageKey != null ? storageKey : environmentId}`;
711
827
  this.baseMPCRelayApiUrl = baseMPCRelayApiUrl;
712
828
  this.apiClient = new core.DynamicApiClient({
713
829
  environmentId,
714
830
  authToken,
715
831
  baseApiUrl
716
832
  });
717
- this.getWallets();
833
+ this.debug = Boolean(debug);
834
+ this.logger.setLogLevel(this.debug ? 'DEBUG' : DEFAULT_LOG_LEVEL);
835
+ // setup storage
836
+ if (supportsLocalStorage()) {
837
+ this.storage = localStorageAdapter;
838
+ } else {
839
+ this.memoryStorage = {};
840
+ this.storage = memoryLocalStorageAdapter(this.memoryStorage);
841
+ }
842
+ // initialize the client
843
+ this.initialize();
718
844
  }
719
845
  }
720
846
 
721
847
  Object.defineProperty(exports, "BIP340", {
722
- enumerable: true,
723
- get: function () { return libMpcWeb.BIP340; }
848
+ enumerable: true,
849
+ get: function () { return web.BIP340; }
724
850
  });
725
851
  Object.defineProperty(exports, "BIP340InitKeygenResult", {
726
- enumerable: true,
727
- get: function () { return libMpcWeb.BIP340InitKeygenResult; }
852
+ enumerable: true,
853
+ get: function () { return web.BIP340InitKeygenResult; }
728
854
  });
729
855
  Object.defineProperty(exports, "BIP340KeygenResult", {
730
- enumerable: true,
731
- get: function () { return libMpcWeb.BIP340KeygenResult; }
856
+ enumerable: true,
857
+ get: function () { return web.BIP340KeygenResult; }
732
858
  });
733
859
  Object.defineProperty(exports, "Ecdsa", {
734
- enumerable: true,
735
- get: function () { return libMpcWeb.Ecdsa; }
860
+ enumerable: true,
861
+ get: function () { return web.Ecdsa; }
736
862
  });
737
863
  Object.defineProperty(exports, "EcdsaInitKeygenResult", {
738
- enumerable: true,
739
- get: function () { return libMpcWeb.EcdsaInitKeygenResult; }
864
+ enumerable: true,
865
+ get: function () { return web.EcdsaInitKeygenResult; }
740
866
  });
741
867
  Object.defineProperty(exports, "EcdsaKeygenResult", {
742
- enumerable: true,
743
- get: function () { return libMpcWeb.EcdsaKeygenResult; }
868
+ enumerable: true,
869
+ get: function () { return web.EcdsaKeygenResult; }
744
870
  });
745
871
  Object.defineProperty(exports, "EcdsaPublicKey", {
746
- enumerable: true,
747
- get: function () { return libMpcWeb.EcdsaPublicKey; }
872
+ enumerable: true,
873
+ get: function () { return web.EcdsaPublicKey; }
748
874
  });
749
875
  Object.defineProperty(exports, "EcdsaSignature", {
750
- enumerable: true,
751
- get: function () { return libMpcWeb.EcdsaSignature; }
876
+ enumerable: true,
877
+ get: function () { return web.EcdsaSignature; }
752
878
  });
753
879
  Object.defineProperty(exports, "Ed25519", {
754
- enumerable: true,
755
- get: function () { return libMpcWeb.Ed25519; }
880
+ enumerable: true,
881
+ get: function () { return web.Ed25519; }
756
882
  });
757
883
  Object.defineProperty(exports, "Ed25519InitKeygenResult", {
758
- enumerable: true,
759
- get: function () { return libMpcWeb.Ed25519InitKeygenResult; }
884
+ enumerable: true,
885
+ get: function () { return web.Ed25519InitKeygenResult; }
760
886
  });
761
887
  Object.defineProperty(exports, "Ed25519KeygenResult", {
762
- enumerable: true,
763
- get: function () { return libMpcWeb.Ed25519KeygenResult; }
888
+ enumerable: true,
889
+ get: function () { return web.Ed25519KeygenResult; }
764
890
  });
765
891
  Object.defineProperty(exports, "MessageHash", {
766
- enumerable: true,
767
- get: function () { return libMpcWeb.MessageHash; }
892
+ enumerable: true,
893
+ get: function () { return web.MessageHash; }
768
894
  });
769
895
  exports.DynamicWalletClient = DynamicWalletClient;
770
896
  exports.getMPCSignatureScheme = getMPCSignatureScheme;
771
897
  exports.getMPCSigner = getMPCSigner;
772
898
  Object.keys(core).forEach(function (k) {
773
- if (k !== 'default' && !Object.prototype.hasOwnProperty.call(exports, k)) Object.defineProperty(exports, k, {
774
- enumerable: true,
775
- get: function () { return core[k]; }
776
- });
899
+ if (k !== 'default' && !Object.prototype.hasOwnProperty.call(exports, k)) Object.defineProperty(exports, k, {
900
+ enumerable: true,
901
+ get: function () { return core[k]; }
902
+ });
777
903
  });