@dynamic-labs-wallet/browser 1.0.32 → 1.0.33

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 CHANGED
@@ -81,7 +81,7 @@ const getMPCSigner = ({ chainName, baseRelayUrl, bitcoinConfig })=>{
81
81
  }({});
82
82
  /**
83
83
  * Current default version for new encryptions
84
- */ const ENCRYPTION_VERSION_CURRENT = "v3";
84
+ */ const DEFAULT_ENCRYPTION_VERSION = "v2";
85
85
  /**
86
86
  * Algorithm constants
87
87
  */ const PBKDF2_ALGORITHM = 'PBKDF2';
@@ -332,7 +332,7 @@ const KEY_SHARE_DECRYPTION_ERROR = 'Decryption failed.';
332
332
  /**
333
333
  * Encrypts data using the specified encryption version.
334
334
  * Always uses the latest encryption configuration for new encryptions by default.
335
- */ const encryptData = async ({ data, password, version = ENCRYPTION_VERSION_CURRENT, onRawKey })=>{
335
+ */ const encryptData = async ({ data, password, version = DEFAULT_ENCRYPTION_VERSION, onRawKey })=>{
336
336
  const encryptionConfig = getEncryptionConfig(version);
337
337
  try {
338
338
  // Generate a random salt and IV
@@ -1291,8 +1291,8 @@ const createBackupData = ({ encryptedKeyShares, accountAddress, thresholdSignatu
1291
1291
  accountAddress,
1292
1292
  thresholdSignatureScheme,
1293
1293
  hasPassword,
1294
- encryption: getEncryptionMetadataForVersion(ENCRYPTION_VERSION_CURRENT),
1295
- encryptionVersion: ENCRYPTION_VERSION_CURRENT,
1294
+ encryption: getEncryptionMetadataForVersion(DEFAULT_ENCRYPTION_VERSION),
1295
+ encryptionVersion: DEFAULT_ENCRYPTION_VERSION,
1296
1296
  shareCount: encryptedKeyShares.length
1297
1297
  }
1298
1298
  };
@@ -4097,7 +4097,7 @@ class DynamicWalletClient {
4097
4097
  encrypted
4098
4098
  ],
4099
4099
  passwordEncrypted: false,
4100
- encryptionVersion: ENCRYPTION_VERSION_CURRENT,
4100
+ encryptionVersion: DEFAULT_ENCRYPTION_VERSION,
4101
4101
  clientKeyshareBackupGrant,
4102
4102
  signedSessionId: resolvedSignedSessionId,
4103
4103
  dynamicRequestId
@@ -5490,7 +5490,7 @@ class DynamicWalletClient {
5490
5490
  }
5491
5491
  return shares;
5492
5492
  }
5493
- async backupToDynamicBackend({ walletId, clientShares, password, signedSessionId, dynamicRequestId, chainName, bitcoinConfig, isPasswordEncrypted, accountAddress, preEncryptedShares, passwordUpdateBatchId, encryptionVersion = ENCRYPTION_VERSION_CURRENT }) {
5493
+ async backupToDynamicBackend({ walletId, clientShares, password, signedSessionId, dynamicRequestId, chainName, bitcoinConfig, isPasswordEncrypted, accountAddress, preEncryptedShares, passwordUpdateBatchId, encryptionVersion = DEFAULT_ENCRYPTION_VERSION }) {
5494
5494
  var _this_getWalletFromMap;
5495
5495
  const encryptedDynamicShares = preEncryptedShares != null ? preEncryptedShares : await Promise.all(clientShares.map((keyShare)=>this.encryptKeyShare({
5496
5496
  keyShare,
package/index.esm.js CHANGED
@@ -82,7 +82,7 @@ const getMPCSigner = ({ chainName, baseRelayUrl, bitcoinConfig })=>{
82
82
  }({});
83
83
  /**
84
84
  * Current default version for new encryptions
85
- */ const ENCRYPTION_VERSION_CURRENT = "v3";
85
+ */ const DEFAULT_ENCRYPTION_VERSION = "v2";
86
86
  /**
87
87
  * Algorithm constants
88
88
  */ const PBKDF2_ALGORITHM = 'PBKDF2';
@@ -333,7 +333,7 @@ const KEY_SHARE_DECRYPTION_ERROR = 'Decryption failed.';
333
333
  /**
334
334
  * Encrypts data using the specified encryption version.
335
335
  * Always uses the latest encryption configuration for new encryptions by default.
336
- */ const encryptData = async ({ data, password, version = ENCRYPTION_VERSION_CURRENT, onRawKey })=>{
336
+ */ const encryptData = async ({ data, password, version = DEFAULT_ENCRYPTION_VERSION, onRawKey })=>{
337
337
  const encryptionConfig = getEncryptionConfig(version);
338
338
  try {
339
339
  // Generate a random salt and IV
@@ -1292,8 +1292,8 @@ const createBackupData = ({ encryptedKeyShares, accountAddress, thresholdSignatu
1292
1292
  accountAddress,
1293
1293
  thresholdSignatureScheme,
1294
1294
  hasPassword,
1295
- encryption: getEncryptionMetadataForVersion(ENCRYPTION_VERSION_CURRENT),
1296
- encryptionVersion: ENCRYPTION_VERSION_CURRENT,
1295
+ encryption: getEncryptionMetadataForVersion(DEFAULT_ENCRYPTION_VERSION),
1296
+ encryptionVersion: DEFAULT_ENCRYPTION_VERSION,
1297
1297
  shareCount: encryptedKeyShares.length
1298
1298
  }
1299
1299
  };
@@ -4098,7 +4098,7 @@ class DynamicWalletClient {
4098
4098
  encrypted
4099
4099
  ],
4100
4100
  passwordEncrypted: false,
4101
- encryptionVersion: ENCRYPTION_VERSION_CURRENT,
4101
+ encryptionVersion: DEFAULT_ENCRYPTION_VERSION,
4102
4102
  clientKeyshareBackupGrant,
4103
4103
  signedSessionId: resolvedSignedSessionId,
4104
4104
  dynamicRequestId
@@ -5491,7 +5491,7 @@ class DynamicWalletClient {
5491
5491
  }
5492
5492
  return shares;
5493
5493
  }
5494
- async backupToDynamicBackend({ walletId, clientShares, password, signedSessionId, dynamicRequestId, chainName, bitcoinConfig, isPasswordEncrypted, accountAddress, preEncryptedShares, passwordUpdateBatchId, encryptionVersion = ENCRYPTION_VERSION_CURRENT }) {
5494
+ async backupToDynamicBackend({ walletId, clientShares, password, signedSessionId, dynamicRequestId, chainName, bitcoinConfig, isPasswordEncrypted, accountAddress, preEncryptedShares, passwordUpdateBatchId, encryptionVersion = DEFAULT_ENCRYPTION_VERSION }) {
5495
5495
  var _this_getWalletFromMap;
5496
5496
  const encryptedDynamicShares = preEncryptedShares != null ? preEncryptedShares : await Promise.all(clientShares.map((keyShare)=>this.encryptKeyShare({
5497
5497
  keyShare,
package/package.json CHANGED
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "@dynamic-labs-wallet/browser",
3
- "version": "1.0.32",
3
+ "version": "1.0.33",
4
4
  "license": "Licensed under the Dynamic Labs, Inc. Terms Of Service (https://www.dynamic.xyz/terms-conditions)",
5
5
  "type": "module",
6
6
  "dependencies": {
7
- "@dynamic-labs-wallet/core": "1.0.32",
7
+ "@dynamic-labs-wallet/core": "1.0.33",
8
8
  "@dynamic-labs-wallet/forward-mpc-client": "0.12.0",
9
- "@dynamic-labs-wallet/primitives": "1.0.32",
9
+ "@dynamic-labs-wallet/primitives": "1.0.33",
10
10
  "@dynamic-labs/sdk-api-core": "^0.0.984",
11
11
  "argon2id": "1.0.1",
12
12
  "axios": "1.16.0",
@@ -9,7 +9,7 @@ export declare enum EncryptionVersion {
9
9
  /**
10
10
  * Current default version for new encryptions
11
11
  */
12
- export declare const ENCRYPTION_VERSION_CURRENT = EncryptionVersion.V3_ARGON2;
12
+ export declare const DEFAULT_ENCRYPTION_VERSION = EncryptionVersion.V2_PBKDF2;
13
13
  /**
14
14
  * Algorithm constants
15
15
  */