@dynamic-labs-wallet/browser 0.0.25 → 0.0.27

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
@@ -50,6 +50,12 @@ const ensureBase64Padding = (str)=>{
50
50
  return str.padEnd(Math.ceil(str.length / 4) * 4, '=');
51
51
  };
52
52
  const isBrowser = ()=>typeof window !== 'undefined';
53
+ const isHexString = (str)=>{
54
+ // Remove 0x prefix if present
55
+ const hex = str.startsWith('0x') ? str.slice(2) : str;
56
+ // Check if string contains only hex characters
57
+ return /^[0-9A-Fa-f]+$/.test(hex);
58
+ };
53
59
 
54
60
  const getKey = async ({ password, salt })=>{
55
61
  const passwordBytes = stringToBytes(password);
@@ -314,17 +320,18 @@ class DynamicWalletClient {
314
320
  const keygenInitResults = await Promise.all(Array(clientThreshold).fill(null).map(()=>mpcSigner.initKeygen()));
315
321
  return keygenInitResults;
316
322
  }
317
- async derivePublicKey({ chainName, keyShare }) {
323
+ async derivePublicKey({ chainName, keyShare, imported = false }) {
318
324
  const mpcSigner = getMPCSigner({
319
325
  chainName,
320
326
  baseRelayUrl: this.baseMPCRelayApiUrl
321
327
  });
322
328
  const chainConfig = core.getMPCChainConfig(chainName);
329
+ const derivationPath = imported ? undefined : new Uint32Array(chainConfig.derivationPath);
323
330
  let publicKey;
324
331
  if (mpcSigner instanceof web.Ecdsa) {
325
- publicKey = await mpcSigner.derivePubkey(keyShare, new Uint32Array(chainConfig.derivationPath));
332
+ publicKey = await mpcSigner.derivePubkey(keyShare, derivationPath);
326
333
  } else if (mpcSigner instanceof web.Ed25519) {
327
- publicKey = await mpcSigner.derivePubkey(keyShare, new Uint32Array(chainConfig.derivationPath));
334
+ publicKey = await mpcSigner.derivePubkey(keyShare, derivationPath);
328
335
  }
329
336
  return publicKey;
330
337
  }
@@ -351,7 +358,8 @@ class DynamicWalletClient {
351
358
  const [clientKeygenResult] = clientKeygenResults;
352
359
  const rawPublicKey = await this.derivePublicKey({
353
360
  chainName,
354
- keyShare: clientKeygenResult
361
+ keyShare: clientKeygenResult,
362
+ imported: false
355
363
  });
356
364
  return {
357
365
  rawPublicKey,
@@ -397,20 +405,28 @@ class DynamicWalletClient {
397
405
  });
398
406
  return data;
399
407
  }
400
- async clientSign({ chainName, message, roomId, keyShare }) {
408
+ async clientSign({ chainName, message, roomId, keyShare, imported = false }) {
401
409
  try {
402
410
  const chainConfig = core.getMPCChainConfig(chainName);
403
411
  const mpcSigner = getMPCSigner({
404
412
  chainName,
405
413
  baseRelayUrl: this.baseMPCRelayApiUrl
406
414
  });
407
- const derivationPath = new Uint32Array(chainConfig.derivationPath);
415
+ const derivationPath = imported ? undefined : new Uint32Array(chainConfig.derivationPath);
408
416
  let formattedMessage;
409
417
  //note: Ecdsa can also be used by bitcoin, but only keccak256 is used by ethereum
410
418
  if (mpcSigner instanceof web.Ecdsa) {
411
419
  formattedMessage = web.MessageHash.keccak256(message);
412
- } else if (mpcSigner instanceof web.Ed25519 && typeof message === 'string') {
413
- formattedMessage = new TextEncoder().encode(message);
420
+ } else if (mpcSigner instanceof web.Ed25519) {
421
+ if (typeof message === 'string') {
422
+ if (!isHexString(message)) {
423
+ formattedMessage = Buffer.from(message).toString('hex');
424
+ } else {
425
+ formattedMessage = Buffer.from(message, 'hex');
426
+ }
427
+ } else {
428
+ formattedMessage = message;
429
+ }
414
430
  } else if (mpcSigner instanceof web.BIP340 && typeof message === 'string') {
415
431
  formattedMessage = new TextEncoder().encode(message);
416
432
  } else {
@@ -423,7 +439,8 @@ class DynamicWalletClient {
423
439
  throw error;
424
440
  }
425
441
  }
426
- async sign({ accountAddress, message, chainName }) {
442
+ //todo: need to modify with imported flag
443
+ async sign({ accountAddress, message, chainName, imported = false }) {
427
444
  const wallet = await this.getWallet({
428
445
  accountAddress
429
446
  });
@@ -438,7 +455,8 @@ class DynamicWalletClient {
438
455
  chainName,
439
456
  message,
440
457
  roomId: data.roomId,
441
- keyShare: wallet.clientKeyShares[0]
458
+ keyShare: wallet.clientKeyShares[0],
459
+ imported
442
460
  });
443
461
  return signature;
444
462
  }
@@ -762,24 +780,28 @@ class DynamicWalletClient {
762
780
  thresholdSignatureScheme
763
781
  });
764
782
  const { threshold } = core.getTSSConfig(thresholdSignatureScheme);
765
- const clientKeygenResults = await Promise.all(clientKeygenInitResults.map((currentInit, index)=>{
783
+ const clientKeygenResults = await Promise.all(clientKeygenInitResults.map(async (currentInit, index)=>{
766
784
  const otherClientKeygenIds = clientKeygenInitResults.filter((init)=>init.keygenId !== currentInit.keygenId).map((init)=>init.keygenId);
767
785
  if (index === 0) {
768
- return mpcSigner.importPrivateKeyImporter(roomId, threshold, privateKey, currentInit, [
786
+ const otherKeyGenIds = [
769
787
  ...serverKeygenIds,
770
788
  ...otherClientKeygenIds
771
- ]);
789
+ ];
790
+ const importerKeygenResult = await mpcSigner.importPrivateKeyImporter(roomId, threshold, privateKey, currentInit, otherKeyGenIds);
791
+ return importerKeygenResult;
772
792
  } else {
773
- return mpcSigner.importPrivateKeyRecipient(roomId, threshold, currentInit, [
793
+ const recipientKeygenResult = await mpcSigner.importPrivateKeyRecipient(roomId, threshold, currentInit, [
774
794
  ...serverKeygenIds,
775
795
  ...otherClientKeygenIds
776
796
  ]);
797
+ return recipientKeygenResult;
777
798
  }
778
799
  }));
779
800
  const [clientKeygenResult] = clientKeygenResults;
780
801
  const rawPublicKey = await this.derivePublicKey({
781
802
  chainName,
782
- keyShare: clientKeygenResult
803
+ keyShare: clientKeygenResult,
804
+ imported: true
783
805
  });
784
806
  return {
785
807
  rawPublicKey,
@@ -817,7 +839,7 @@ class DynamicWalletClient {
817
839
  var _user_verifiedCredentials;
818
840
  this.logger.debug('Wallet needs to be restored', this.walletMap[accountAddress]);
819
841
  const user = await this.apiClient.getUser();
820
- const wallet = (_user_verifiedCredentials = user.verifiedCredentials) == null ? void 0 : _user_verifiedCredentials.find((vc)=>vc.address === accountAddress);
842
+ const wallet = (_user_verifiedCredentials = user.verifiedCredentials) == null ? void 0 : _user_verifiedCredentials.find((vc)=>vc.address.toLowerCase() === accountAddress.toLowerCase());
821
843
  this.logger.debug('Restoring wallet', wallet);
822
844
  const clientShares = wallet.walletProperties.keyShares.filter((ks)=>ks.backupLocation === 'dynamic');
823
845
  this.logger.debug('clientShares', clientShares);
@@ -861,12 +883,13 @@ class DynamicWalletClient {
861
883
  accountAddress: vc.address
862
884
  }));
863
885
  this.walletMap = wallets.reduce((acc, wallet)=>{
886
+ var _acc_wallet_accountAddress, _acc_wallet_accountAddress1;
864
887
  acc[wallet.accountAddress] = {
865
888
  walletId: wallet.walletId,
866
889
  chainName: wallet.chainName,
867
890
  accountAddress: wallet.accountAddress,
868
- clientKeyShares: [],
869
- thresholdSignatureScheme: undefined
891
+ clientKeyShares: ((_acc_wallet_accountAddress = acc[wallet.accountAddress]) == null ? void 0 : _acc_wallet_accountAddress.clientKeyShares) || [],
892
+ thresholdSignatureScheme: ((_acc_wallet_accountAddress1 = acc[wallet.accountAddress]) == null ? void 0 : _acc_wallet_accountAddress1.thresholdSignatureScheme) || undefined
870
893
  };
871
894
  return acc;
872
895
  }, {});
package/index.esm.js CHANGED
@@ -50,6 +50,12 @@ const ensureBase64Padding = (str)=>{
50
50
  return str.padEnd(Math.ceil(str.length / 4) * 4, '=');
51
51
  };
52
52
  const isBrowser = ()=>typeof window !== 'undefined';
53
+ const isHexString = (str)=>{
54
+ // Remove 0x prefix if present
55
+ const hex = str.startsWith('0x') ? str.slice(2) : str;
56
+ // Check if string contains only hex characters
57
+ return /^[0-9A-Fa-f]+$/.test(hex);
58
+ };
53
59
 
54
60
  const getKey = async ({ password, salt })=>{
55
61
  const passwordBytes = stringToBytes(password);
@@ -314,17 +320,18 @@ class DynamicWalletClient {
314
320
  const keygenInitResults = await Promise.all(Array(clientThreshold).fill(null).map(()=>mpcSigner.initKeygen()));
315
321
  return keygenInitResults;
316
322
  }
317
- async derivePublicKey({ chainName, keyShare }) {
323
+ async derivePublicKey({ chainName, keyShare, imported = false }) {
318
324
  const mpcSigner = getMPCSigner({
319
325
  chainName,
320
326
  baseRelayUrl: this.baseMPCRelayApiUrl
321
327
  });
322
328
  const chainConfig = getMPCChainConfig(chainName);
329
+ const derivationPath = imported ? undefined : new Uint32Array(chainConfig.derivationPath);
323
330
  let publicKey;
324
331
  if (mpcSigner instanceof Ecdsa) {
325
- publicKey = await mpcSigner.derivePubkey(keyShare, new Uint32Array(chainConfig.derivationPath));
332
+ publicKey = await mpcSigner.derivePubkey(keyShare, derivationPath);
326
333
  } else if (mpcSigner instanceof Ed25519) {
327
- publicKey = await mpcSigner.derivePubkey(keyShare, new Uint32Array(chainConfig.derivationPath));
334
+ publicKey = await mpcSigner.derivePubkey(keyShare, derivationPath);
328
335
  }
329
336
  return publicKey;
330
337
  }
@@ -351,7 +358,8 @@ class DynamicWalletClient {
351
358
  const [clientKeygenResult] = clientKeygenResults;
352
359
  const rawPublicKey = await this.derivePublicKey({
353
360
  chainName,
354
- keyShare: clientKeygenResult
361
+ keyShare: clientKeygenResult,
362
+ imported: false
355
363
  });
356
364
  return {
357
365
  rawPublicKey,
@@ -397,20 +405,28 @@ class DynamicWalletClient {
397
405
  });
398
406
  return data;
399
407
  }
400
- async clientSign({ chainName, message, roomId, keyShare }) {
408
+ async clientSign({ chainName, message, roomId, keyShare, imported = false }) {
401
409
  try {
402
410
  const chainConfig = getMPCChainConfig(chainName);
403
411
  const mpcSigner = getMPCSigner({
404
412
  chainName,
405
413
  baseRelayUrl: this.baseMPCRelayApiUrl
406
414
  });
407
- const derivationPath = new Uint32Array(chainConfig.derivationPath);
415
+ const derivationPath = imported ? undefined : new Uint32Array(chainConfig.derivationPath);
408
416
  let formattedMessage;
409
417
  //note: Ecdsa can also be used by bitcoin, but only keccak256 is used by ethereum
410
418
  if (mpcSigner instanceof Ecdsa) {
411
419
  formattedMessage = MessageHash.keccak256(message);
412
- } else if (mpcSigner instanceof Ed25519 && typeof message === 'string') {
413
- formattedMessage = new TextEncoder().encode(message);
420
+ } else if (mpcSigner instanceof Ed25519) {
421
+ if (typeof message === 'string') {
422
+ if (!isHexString(message)) {
423
+ formattedMessage = Buffer.from(message).toString('hex');
424
+ } else {
425
+ formattedMessage = Buffer.from(message, 'hex');
426
+ }
427
+ } else {
428
+ formattedMessage = message;
429
+ }
414
430
  } else if (mpcSigner instanceof BIP340 && typeof message === 'string') {
415
431
  formattedMessage = new TextEncoder().encode(message);
416
432
  } else {
@@ -423,7 +439,8 @@ class DynamicWalletClient {
423
439
  throw error;
424
440
  }
425
441
  }
426
- async sign({ accountAddress, message, chainName }) {
442
+ //todo: need to modify with imported flag
443
+ async sign({ accountAddress, message, chainName, imported = false }) {
427
444
  const wallet = await this.getWallet({
428
445
  accountAddress
429
446
  });
@@ -438,7 +455,8 @@ class DynamicWalletClient {
438
455
  chainName,
439
456
  message,
440
457
  roomId: data.roomId,
441
- keyShare: wallet.clientKeyShares[0]
458
+ keyShare: wallet.clientKeyShares[0],
459
+ imported
442
460
  });
443
461
  return signature;
444
462
  }
@@ -762,24 +780,28 @@ class DynamicWalletClient {
762
780
  thresholdSignatureScheme
763
781
  });
764
782
  const { threshold } = getTSSConfig(thresholdSignatureScheme);
765
- const clientKeygenResults = await Promise.all(clientKeygenInitResults.map((currentInit, index)=>{
783
+ const clientKeygenResults = await Promise.all(clientKeygenInitResults.map(async (currentInit, index)=>{
766
784
  const otherClientKeygenIds = clientKeygenInitResults.filter((init)=>init.keygenId !== currentInit.keygenId).map((init)=>init.keygenId);
767
785
  if (index === 0) {
768
- return mpcSigner.importPrivateKeyImporter(roomId, threshold, privateKey, currentInit, [
786
+ const otherKeyGenIds = [
769
787
  ...serverKeygenIds,
770
788
  ...otherClientKeygenIds
771
- ]);
789
+ ];
790
+ const importerKeygenResult = await mpcSigner.importPrivateKeyImporter(roomId, threshold, privateKey, currentInit, otherKeyGenIds);
791
+ return importerKeygenResult;
772
792
  } else {
773
- return mpcSigner.importPrivateKeyRecipient(roomId, threshold, currentInit, [
793
+ const recipientKeygenResult = await mpcSigner.importPrivateKeyRecipient(roomId, threshold, currentInit, [
774
794
  ...serverKeygenIds,
775
795
  ...otherClientKeygenIds
776
796
  ]);
797
+ return recipientKeygenResult;
777
798
  }
778
799
  }));
779
800
  const [clientKeygenResult] = clientKeygenResults;
780
801
  const rawPublicKey = await this.derivePublicKey({
781
802
  chainName,
782
- keyShare: clientKeygenResult
803
+ keyShare: clientKeygenResult,
804
+ imported: true
783
805
  });
784
806
  return {
785
807
  rawPublicKey,
@@ -817,7 +839,7 @@ class DynamicWalletClient {
817
839
  var _user_verifiedCredentials;
818
840
  this.logger.debug('Wallet needs to be restored', this.walletMap[accountAddress]);
819
841
  const user = await this.apiClient.getUser();
820
- const wallet = (_user_verifiedCredentials = user.verifiedCredentials) == null ? void 0 : _user_verifiedCredentials.find((vc)=>vc.address === accountAddress);
842
+ const wallet = (_user_verifiedCredentials = user.verifiedCredentials) == null ? void 0 : _user_verifiedCredentials.find((vc)=>vc.address.toLowerCase() === accountAddress.toLowerCase());
821
843
  this.logger.debug('Restoring wallet', wallet);
822
844
  const clientShares = wallet.walletProperties.keyShares.filter((ks)=>ks.backupLocation === 'dynamic');
823
845
  this.logger.debug('clientShares', clientShares);
@@ -861,12 +883,13 @@ class DynamicWalletClient {
861
883
  accountAddress: vc.address
862
884
  }));
863
885
  this.walletMap = wallets.reduce((acc, wallet)=>{
886
+ var _acc_wallet_accountAddress, _acc_wallet_accountAddress1;
864
887
  acc[wallet.accountAddress] = {
865
888
  walletId: wallet.walletId,
866
889
  chainName: wallet.chainName,
867
890
  accountAddress: wallet.accountAddress,
868
- clientKeyShares: [],
869
- thresholdSignatureScheme: undefined
891
+ clientKeyShares: ((_acc_wallet_accountAddress = acc[wallet.accountAddress]) == null ? void 0 : _acc_wallet_accountAddress.clientKeyShares) || [],
892
+ thresholdSignatureScheme: ((_acc_wallet_accountAddress1 = acc[wallet.accountAddress]) == null ? void 0 : _acc_wallet_accountAddress1.thresholdSignatureScheme) || undefined
870
893
  };
871
894
  return acc;
872
895
  }, {});
@@ -0,0 +1,41 @@
1
+ SOFTWARE DEVELOPMENT KIT (SDK) END USER LICENSE AGREEMENT
2
+
3
+ This Software Development Kit (SDK) End User License Agreement (the "Agreement") governs your use of the SDK with which this Agreement is provided, solely as embedded within the Product (as defined below) and distributed by a company which signed an agreement and received a proprietary license from the Licensor (as defined below) ("Approved Distributor"). By using the Product containing the SDK or otherwise downloading, accessing or running the SDK, you ("Licensee" or “you”) acknowledge that you have read, understood, and agree to be bound by the terms and conditions of this Agreement.
4
+
5
+ IF YOU DO NOT AGREE TO THE TERMS OF THIS AGREEMENT, OR HAVE NOT ENTERED INTO AN AGREEMENT WITH AN APPROVED DISTRIBUTER, YOU MUST IMMEDIATELY CEASE ALL USE OF THE SDK AND DELETE ANY COPIES OF IT FROM ANY OF YOUR SYSTEMS AND DEVICES.
6
+ Sodot Labs Ltd., an Israeli company with its principal place of business at 2 Kaplan St., Tel Aviv, Israel ("Licensor"), has developed the SDK.
7
+
8
+ WHEREAS, the SDK is embedded in the Wallet (the "Product") distributed by Aprroved Distributor;
9
+
10
+ WHEREAS, Licensee has entered into an agreement with an Approved Distributor to use the Product (the “Product Agreement”); and
11
+
12
+ WHEREAS, in connection with License entering into the Product Agreement, Licensee wishes to use the SDK as incorporated in the Product;
13
+
14
+ NOW, THEREFORE, in consideration of the mutual promises and covenants contained herein, and other good and valuable consideration, the receipt and sufficiency of which are hereby acknowledged, the parties agree as follows:
15
+
16
+ IMPORTANT NOTICE: YOU ACKNOWLEDGE THAT USING DIGITAL ASSETS AND BLOCKCHAIN-BASED SOLUTIONS, NETWORKS AND PROTOCOLS MAY INVOLVE SERIOUS RISKS. IT IS YOUR DUTY TO LEARN ABOUT ALL THESE RISKS. CUSTOMER ACKNOWLEDGES AND AGREES THAT THE SDK PROVIDES ACCESS TO MATHEMATICAL COMPUTATIONS USING CRYPTOGRAPHY IN ORDER TO ENABLE PARTIES TO JOINTLY COMPUTE A FUNCTION OVER DIFFERENT INPUTS. THE IMPLEMENTATION OF SUCH COMPUTATIONS IS MADE BY YOU AT YOUR SOLE RESPONSIBILITY. LICENSOR DOES NOT PROVIDE ANY CUSTODY OR SIMILAR SERVICES FOR STORING DIGITAL ASSETS OR ANY KEYS RELATING TO DIGITAL ASSETS. YOU ARE SOLELY RESPONSIBLE FOR THE SAFEKEEPING OF YOUR DIGITAL ASSETS.
17
+ YOU ASSUME ALL RISKS ASSOCIATED WITH USING THE SDK. YOU ACKNOWLEDGE AND AGREE THAT THE LICENSOR WOULD NOT ALLOW YOU TO USE THE SDK IN THE ABSENCE OF YOU AGREEING TO THE DISCLAIMERS AND LIMITATIONS OF LIABILITY CONTAINED HEREIN, AND THEY ARE OF THE ESSENCE OF THIS AGREEMENT.
18
+
19
+ 1. Grant of License: Subject to the terms and conditions of this Agreement, Licensor grants Licensee a non-exclusive, non-transferable, non-sublicensable, revocable, limited license to use the SDK solely as embedded within the Product and exclusively in conjunction with the Product's intended functionality. Your use of the SDK will additionally be in strict compliance with the terms and conditions of the Product Agreement. This license is granted to you solely because you entered into a Product Agreement with the Aprroved Distributor, and in order to enable you to use the SDK within the Product. The license is not stand-alone and does not grant Licensee any right to use the SDK independently of the Product.
20
+
21
+ 2. Restrictions: Licensee shall not: (a) copy, modify, adapt, translate, create derivative works of, reverse engineer, decompile, disassemble, or otherwise attempt to derive the source code of the SDK; (b) distribute, sublicense, rent, lease, loan, or otherwise transfer the SDK or any portion thereof to any third party; (c) use the SDK for any purpose other than as expressly permitted in Section 1; (d) remove, alter, or obscure any proprietary notices or legends included in the SDK; or (e) use the SDK to develop any product or service that competes with the SDK or any other product or service offered by Licensor.
22
+
23
+ 3. Ownership: Licensor retains all ownership and intellectual property rights in and to the SDK, including but not limited to all copyrights, patents, trademarks, trade secrets, and other proprietary rights. Licensee acknowledges that the SDK is a valuable trade secret of Licensor and agrees to protect the confidentiality of the SDK.
24
+
25
+ 4. Disclaimer of Warranties: THE SDK IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND, WHETHER EXPRESS, IMPLIED, STATUTORY, OR OTHERWISE. LICENSOR EXPRESSLY DISCLAIMS ALL WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, NON-INFRINGEMENT, AND ACCURACY OR THAT OTHERWISE ARISE FROM A COURSE OF PERFORMANCE OR DEALING, OR USAGE OF TRADE, ALL OF WHICH ARE HEREBY DISCLAIMED BY LICENSOR. LICENSOR DOES NOT WARRANT THAT THE SDK WILL MEET LICENSEE'S REQUIREMENTS OR THAT THE OPERATION OF THE SDK WILL BE UNINTERRUPTED OR ERROR-FREE.
26
+ IN ADDITION, LICENSOR DOES NOT MAKE ANY REPRESENTATION, WARRANTY, GUARANTEE OR CONDITION REGARDING THE EFFECTIVENESS, USEFULNESS, RELIABILITY, AVAILABILITY, TIMELINESS, ACCURACY, OR COMPLETENESS OF THE SDK; THAT LICENSEE’S USE OF, OR RELIANCE UPON, THE SDK WILL MEET ANY REQUIRMENTS OR EXPECTATIONS; THAT THE SDK WILL BE UNINTERRUPTED, SECURE, ERROR-FREE OR VIRUS-FREE, OR THAT DEFECTS IN THE SDK WILL BE CORRECTED; OR REGARDING THE SATISFACTION OF, OR COMPLIANCE WITH, ANY GOVERNMENT REGULATIONS OR STANDARDS.
27
+
28
+ 5. Limitation of Liability:
29
+ - THE SDK IS BEING MADE AVAILABLE TO YOU BY THE APPROVED DISTRIBUTOR, NOT BY THE LICENSOR. LICENSOR'S OBLIGATIONS WITH RESPECT TO THE SDK ARE SOLELY TO THE APPROVED DISTRIBUTOR. LICENSOR SHALL HAVE NO LIABILITY WHATSOEVER TO LICENSEE, WHETHER IN CONTRACT, TORT (INCLUDING NEGLIGENCE), STRICT LIABILITY, OR OTHERWISE, ARISING OUT OF OR IN CONNECTION WITH THE SDK, THE PRODUCT, OR THIS AGREEMENT.
30
+ - IN NO EVENT SHALL LICENSOR BE LIABLE TO LICENSEE FOR ANY INDIRECT, INCIDENTAL, SPECIAL, CONSEQUENTIAL, PUNITIVE, OR EXEMPLARY DAMAGES, LOST PROFITS, LOST DATA, OR BUSINESS INTERRUPTION, EVEN IF LICENSOR HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
31
+ - ANY AND ALL CLAIMS, DISPUTES, OR CAUSES OF ACTION LICENSEE MAY HAVE RELATING TO THE SDK OR THE PRODUCT SHALL BE BROUGHT SOLELY AGAINST THE APPROVED DISTRIBUTOR, AND LICENSEE HEREBY IRREVOCABLY WAIVES ANY AND ALL CLAIMS AGAINST LICENSOR.
32
+
33
+ 6. Term and Termination: This Agreement shall commence on the date hereof and shall continue in effect until terminated. This Agreement shall automatically terminate upon termination of Licensee's use of the Product or of the Product Agreement. Licensor may terminate this Agreement immediately upon written notice to Licensee if Licensee breaches any provision of this Agreement.
34
+
35
+ 7. Governing Law; Jurisdiction: This Agreement shall be governed by and construed in accordance with the laws of the State of Israel, without regard to its conflict of laws principles. Licensee hereby irrevocably submits to the non-exclusive jurisdiction of the courts located in Tel Aviv, Israel with respect to any matter relating to this Agreement and the SDK.
36
+
37
+ 8. Entire Agreement: This Agreement constitutes the entire agreement between the parties with respect to the subject matter hereof and supersedes all prior and contemporaneous agreements and understandings, whether written or oral, relating to such subject matter.
38
+
39
+ 9. Severability: If any provision of this Agreement is held to be invalid, illegal, or unenforceable for any reason, such invalidity, illegality, or unenforceability shall not affect any other provision of this Agreement, and the invalid, illegal, or unenforceable provision shall be deemed modified to the extent necessary to make it valid, legal, and enforceable. If such modification is not possible, the invalid, illegal, or unenforceable provision shall be severed from this Agreement, and the remaining provisions shall remain in full force and effect.
40
+
41
+ BY USING THE PRODUCT AND/OR THE SDK, YOU ACKNOWLEDGE THAT YOU HAVE READ, UNDERSTOOD, AND AGREE TO BE BOUND BY THE TERMS AND CONDITIONS OF THIS AGREEMENT.
@@ -0,0 +1,3 @@
1
+ {
2
+ "license": "SEE LICENSE IN LICENSE.md"
3
+ }
@@ -0,0 +1,41 @@
1
+ SOFTWARE DEVELOPMENT KIT (SDK) END USER LICENSE AGREEMENT
2
+
3
+ This Software Development Kit (SDK) End User License Agreement (the "Agreement") governs your use of the SDK with which this Agreement is provided, solely as embedded within the Product (as defined below) and distributed by a company which signed an agreement and received a proprietary license from the Licensor (as defined below) ("Approved Distributor"). By using the Product containing the SDK or otherwise downloading, accessing or running the SDK, you ("Licensee" or “you”) acknowledge that you have read, understood, and agree to be bound by the terms and conditions of this Agreement.
4
+
5
+ IF YOU DO NOT AGREE TO THE TERMS OF THIS AGREEMENT, OR HAVE NOT ENTERED INTO AN AGREEMENT WITH AN APPROVED DISTRIBUTER, YOU MUST IMMEDIATELY CEASE ALL USE OF THE SDK AND DELETE ANY COPIES OF IT FROM ANY OF YOUR SYSTEMS AND DEVICES.
6
+ Sodot Labs Ltd., an Israeli company with its principal place of business at 2 Kaplan St., Tel Aviv, Israel ("Licensor"), has developed the SDK.
7
+
8
+ WHEREAS, the SDK is embedded in the Wallet (the "Product") distributed by Aprroved Distributor;
9
+
10
+ WHEREAS, Licensee has entered into an agreement with an Approved Distributor to use the Product (the “Product Agreement”); and
11
+
12
+ WHEREAS, in connection with License entering into the Product Agreement, Licensee wishes to use the SDK as incorporated in the Product;
13
+
14
+ NOW, THEREFORE, in consideration of the mutual promises and covenants contained herein, and other good and valuable consideration, the receipt and sufficiency of which are hereby acknowledged, the parties agree as follows:
15
+
16
+ IMPORTANT NOTICE: YOU ACKNOWLEDGE THAT USING DIGITAL ASSETS AND BLOCKCHAIN-BASED SOLUTIONS, NETWORKS AND PROTOCOLS MAY INVOLVE SERIOUS RISKS. IT IS YOUR DUTY TO LEARN ABOUT ALL THESE RISKS. CUSTOMER ACKNOWLEDGES AND AGREES THAT THE SDK PROVIDES ACCESS TO MATHEMATICAL COMPUTATIONS USING CRYPTOGRAPHY IN ORDER TO ENABLE PARTIES TO JOINTLY COMPUTE A FUNCTION OVER DIFFERENT INPUTS. THE IMPLEMENTATION OF SUCH COMPUTATIONS IS MADE BY YOU AT YOUR SOLE RESPONSIBILITY. LICENSOR DOES NOT PROVIDE ANY CUSTODY OR SIMILAR SERVICES FOR STORING DIGITAL ASSETS OR ANY KEYS RELATING TO DIGITAL ASSETS. YOU ARE SOLELY RESPONSIBLE FOR THE SAFEKEEPING OF YOUR DIGITAL ASSETS.
17
+ YOU ASSUME ALL RISKS ASSOCIATED WITH USING THE SDK. YOU ACKNOWLEDGE AND AGREE THAT THE LICENSOR WOULD NOT ALLOW YOU TO USE THE SDK IN THE ABSENCE OF YOU AGREEING TO THE DISCLAIMERS AND LIMITATIONS OF LIABILITY CONTAINED HEREIN, AND THEY ARE OF THE ESSENCE OF THIS AGREEMENT.
18
+
19
+ 1. Grant of License: Subject to the terms and conditions of this Agreement, Licensor grants Licensee a non-exclusive, non-transferable, non-sublicensable, revocable, limited license to use the SDK solely as embedded within the Product and exclusively in conjunction with the Product's intended functionality. Your use of the SDK will additionally be in strict compliance with the terms and conditions of the Product Agreement. This license is granted to you solely because you entered into a Product Agreement with the Aprroved Distributor, and in order to enable you to use the SDK within the Product. The license is not stand-alone and does not grant Licensee any right to use the SDK independently of the Product.
20
+
21
+ 2. Restrictions: Licensee shall not: (a) copy, modify, adapt, translate, create derivative works of, reverse engineer, decompile, disassemble, or otherwise attempt to derive the source code of the SDK; (b) distribute, sublicense, rent, lease, loan, or otherwise transfer the SDK or any portion thereof to any third party; (c) use the SDK for any purpose other than as expressly permitted in Section 1; (d) remove, alter, or obscure any proprietary notices or legends included in the SDK; or (e) use the SDK to develop any product or service that competes with the SDK or any other product or service offered by Licensor.
22
+
23
+ 3. Ownership: Licensor retains all ownership and intellectual property rights in and to the SDK, including but not limited to all copyrights, patents, trademarks, trade secrets, and other proprietary rights. Licensee acknowledges that the SDK is a valuable trade secret of Licensor and agrees to protect the confidentiality of the SDK.
24
+
25
+ 4. Disclaimer of Warranties: THE SDK IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND, WHETHER EXPRESS, IMPLIED, STATUTORY, OR OTHERWISE. LICENSOR EXPRESSLY DISCLAIMS ALL WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, NON-INFRINGEMENT, AND ACCURACY OR THAT OTHERWISE ARISE FROM A COURSE OF PERFORMANCE OR DEALING, OR USAGE OF TRADE, ALL OF WHICH ARE HEREBY DISCLAIMED BY LICENSOR. LICENSOR DOES NOT WARRANT THAT THE SDK WILL MEET LICENSEE'S REQUIREMENTS OR THAT THE OPERATION OF THE SDK WILL BE UNINTERRUPTED OR ERROR-FREE.
26
+ IN ADDITION, LICENSOR DOES NOT MAKE ANY REPRESENTATION, WARRANTY, GUARANTEE OR CONDITION REGARDING THE EFFECTIVENESS, USEFULNESS, RELIABILITY, AVAILABILITY, TIMELINESS, ACCURACY, OR COMPLETENESS OF THE SDK; THAT LICENSEE’S USE OF, OR RELIANCE UPON, THE SDK WILL MEET ANY REQUIRMENTS OR EXPECTATIONS; THAT THE SDK WILL BE UNINTERRUPTED, SECURE, ERROR-FREE OR VIRUS-FREE, OR THAT DEFECTS IN THE SDK WILL BE CORRECTED; OR REGARDING THE SATISFACTION OF, OR COMPLIANCE WITH, ANY GOVERNMENT REGULATIONS OR STANDARDS.
27
+
28
+ 5. Limitation of Liability:
29
+ - THE SDK IS BEING MADE AVAILABLE TO YOU BY THE APPROVED DISTRIBUTOR, NOT BY THE LICENSOR. LICENSOR'S OBLIGATIONS WITH RESPECT TO THE SDK ARE SOLELY TO THE APPROVED DISTRIBUTOR. LICENSOR SHALL HAVE NO LIABILITY WHATSOEVER TO LICENSEE, WHETHER IN CONTRACT, TORT (INCLUDING NEGLIGENCE), STRICT LIABILITY, OR OTHERWISE, ARISING OUT OF OR IN CONNECTION WITH THE SDK, THE PRODUCT, OR THIS AGREEMENT.
30
+ - IN NO EVENT SHALL LICENSOR BE LIABLE TO LICENSEE FOR ANY INDIRECT, INCIDENTAL, SPECIAL, CONSEQUENTIAL, PUNITIVE, OR EXEMPLARY DAMAGES, LOST PROFITS, LOST DATA, OR BUSINESS INTERRUPTION, EVEN IF LICENSOR HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
31
+ - ANY AND ALL CLAIMS, DISPUTES, OR CAUSES OF ACTION LICENSEE MAY HAVE RELATING TO THE SDK OR THE PRODUCT SHALL BE BROUGHT SOLELY AGAINST THE APPROVED DISTRIBUTOR, AND LICENSEE HEREBY IRREVOCABLY WAIVES ANY AND ALL CLAIMS AGAINST LICENSOR.
32
+
33
+ 6. Term and Termination: This Agreement shall commence on the date hereof and shall continue in effect until terminated. This Agreement shall automatically terminate upon termination of Licensee's use of the Product or of the Product Agreement. Licensor may terminate this Agreement immediately upon written notice to Licensee if Licensee breaches any provision of this Agreement.
34
+
35
+ 7. Governing Law; Jurisdiction: This Agreement shall be governed by and construed in accordance with the laws of the State of Israel, without regard to its conflict of laws principles. Licensee hereby irrevocably submits to the non-exclusive jurisdiction of the courts located in Tel Aviv, Israel with respect to any matter relating to this Agreement and the SDK.
36
+
37
+ 8. Entire Agreement: This Agreement constitutes the entire agreement between the parties with respect to the subject matter hereof and supersedes all prior and contemporaneous agreements and understandings, whether written or oral, relating to such subject matter.
38
+
39
+ 9. Severability: If any provision of this Agreement is held to be invalid, illegal, or unenforceable for any reason, such invalidity, illegality, or unenforceability shall not affect any other provision of this Agreement, and the invalid, illegal, or unenforceable provision shall be deemed modified to the extent necessary to make it valid, legal, and enforceable. If such modification is not possible, the invalid, illegal, or unenforceable provision shall be severed from this Agreement, and the remaining provisions shall remain in full force and effect.
40
+
41
+ BY USING THE PRODUCT AND/OR THE SDK, YOU ACKNOWLEDGE THAT YOU HAVE READ, UNDERSTOOD, AND AGREE TO BE BOUND BY THE TERMS AND CONDITIONS OF THIS AGREEMENT.
@@ -0,0 +1,3 @@
1
+ {
2
+ "license": "SEE LICENSE IN LICENSE.md"
3
+ }
package/package.json CHANGED
@@ -1,8 +1,8 @@
1
1
  {
2
2
  "name": "@dynamic-labs-wallet/browser",
3
- "version": "0.0.25",
3
+ "version": "0.0.27",
4
4
  "dependencies": {
5
- "@dynamic-labs-wallet/core": "0.0.25",
5
+ "@dynamic-labs-wallet/core": "0.0.27",
6
6
  "@dynamic-labs/logger": "^4.5.1"
7
7
  },
8
8
  "files": [
package/src/client.d.ts CHANGED
@@ -31,9 +31,10 @@ export declare class DynamicWalletClient {
31
31
  chainName: string;
32
32
  thresholdSignatureScheme: ThresholdSignatureScheme;
33
33
  }): Promise<ClientInitKeygenResult[]>;
34
- derivePublicKey({ chainName, keyShare, }: {
34
+ derivePublicKey({ chainName, keyShare, imported, }: {
35
35
  chainName: string;
36
36
  keyShare: ClientKeyShare;
37
+ imported: boolean;
37
38
  }): Promise<EcdsaPublicKey | Uint8Array | undefined>;
38
39
  clientKeyGen({ chainName, roomId, serverKeygenIds, clientKeygenInitResults, thresholdSignatureScheme, }: {
39
40
  chainName: string;
@@ -56,16 +57,18 @@ export declare class DynamicWalletClient {
56
57
  walletId: string;
57
58
  message: string | Uint8Array;
58
59
  }): Promise<any>;
59
- clientSign({ chainName, message, roomId, keyShare, }: {
60
+ clientSign({ chainName, message, roomId, keyShare, imported, }: {
60
61
  chainName: string;
61
62
  message: string | Uint8Array;
62
63
  roomId: string;
63
64
  keyShare: ClientKeyShare;
65
+ imported?: boolean;
64
66
  }): Promise<Uint8Array | EcdsaSignature>;
65
- sign({ accountAddress, message, chainName, }: {
67
+ sign({ accountAddress, message, chainName, imported, }: {
66
68
  accountAddress?: string;
67
69
  message: string | Uint8Array;
68
70
  chainName: string;
71
+ imported?: boolean;
69
72
  }): Promise<Uint8Array | EcdsaSignature>;
70
73
  refreshWalletAccountShares({ accountAddress, chainName, }: {
71
74
  accountAddress: string;
@@ -1 +1 @@
1
- {"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../../packages/src/client.ts"],"names":[],"mappings":"AAAA,OAAO,EAGL,wBAAwB,EACxB,gBAAg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AAC;KACnB;IAsBK,4BAA4B,CAAC,EACjC,cAAc,EACd,IAAsB,EACtB,QAAQ,GACT,EAAE;QACD,cAAc,EAAE,MAAM,CAAC;QACvB,IAAI,CAAC,EAAE,MAAM,CAAC;QACd,QAAQ,CAAC,EAAE,MAAM,CAAC;KACnB,GAAG,OAAO,CAAC,cAAc,EAAE,GAAG,IAAI,CAAC;IA2B9B,mBAAmB,CAAC,EACxB,SAAS,EACT,UAAU,EACV,wBAAwB,GACzB,EAAE;QACD,SAAS,EAAE,MAAM,CAAC;QAClB,UAAU,EAAE,MAAM,CAAC;QACnB,wBAAwB,EAAE,wBAAwB,CAAC;KACpD,GAAG,OAAO,CAAC;QACV,YAAY,EAAE,cAAc,GAAG,UAAU,GAAG,SAAS,CAAC;QACtD,eAAe,EAAE,cAAc,EAAE,CAAC;KACnC,CAAC;IAkEI,qBAAqB,CAAC,EAAE,cAAc,EAAE,EAAE;QAAE,cAAc,CAAC,EAAE,MAAM,CAAA;KAAE;IAarE,kBAAkB,CAAC,EAAE,cAAc,EAAE,EAAE;QAAE,cAAc,CAAC,EAAE,MAAM,CAAA;KAAE;IAKlE,SAAS,CAAC,EAAE,cAAc,EAAE,EAAE;QAAE,cAAc,CAAC,EAAE,MAAM,CAAA;KAAE;IA6DzD,UAAU;CA0BjB"}
package/src/utils.d.ts CHANGED
@@ -3,4 +3,5 @@ export declare const stringToBytes: (str: string) => Uint8Array;
3
3
  export declare const base64ToBytes: (base64: string) => Uint8Array;
4
4
  export declare const ensureBase64Padding: (str: string) => string;
5
5
  export declare const isBrowser: () => boolean;
6
+ export declare const isHexString: (str: string) => boolean;
6
7
  //# sourceMappingURL=utils.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../packages/src/utils.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,aAAa,QAAS,UAAU,WAE5C,CAAC;AAEF,eAAO,MAAM,aAAa,QAAS,MAAM,eAExC,CAAC;AAEF,eAAO,MAAM,aAAa,WAAY,MAAM,eAE3C,CAAC;AAGF,eAAO,MAAM,mBAAmB,QAAS,MAAM,KAAG,MAEjD,CAAC;AAEF,eAAO,MAAM,SAAS,eAAsC,CAAC"}
1
+ {"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../packages/src/utils.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,aAAa,QAAS,UAAU,WAE5C,CAAC;AAEF,eAAO,MAAM,aAAa,QAAS,MAAM,eAExC,CAAC;AAEF,eAAO,MAAM,aAAa,WAAY,MAAM,eAE3C,CAAC;AAGF,eAAO,MAAM,mBAAmB,QAAS,MAAM,KAAG,MAEjD,CAAC;AAEF,eAAO,MAAM,SAAS,eAAsC,CAAC;AAE7D,eAAO,MAAM,WAAW,QAAS,MAAM,YAKtC,CAAC"}