@dynamic-labs/aptos 4.91.3 → 4.91.4

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/CHANGELOG.md CHANGED
@@ -1,4 +1,12 @@
1
1
 
2
+ ### [4.91.4](https://github.com/dynamic-labs/dynamic-auth/compare/v4.91.3...v4.91.4) (2026-07-01)
3
+
4
+
5
+ ### Bug Fixes
6
+
7
+ * conditionally use /op/ route for AA transactions based on block explorer support ([#11628](https://github.com/dynamic-labs/dynamic-auth/issues/11628)) ([95822dc](https://github.com/dynamic-labs/dynamic-auth/commit/95822dc0edbcd739afe870f0b3881555fdb17eb6))
8
+ * require error codes in all SDK error classes ([#11761](https://github.com/dynamic-labs/dynamic-auth/issues/11761)) ([5744811](https://github.com/dynamic-labs/dynamic-auth/commit/5744811efdd1e415aaf51eec5b3300b323ec1347))
9
+
2
10
  ### [4.91.3](https://github.com/dynamic-labs/dynamic-auth/compare/v4.91.2...v4.91.3) (2026-06-30)
3
11
 
4
12
 
package/package.cjs CHANGED
@@ -3,6 +3,6 @@
3
3
 
4
4
  Object.defineProperty(exports, '__esModule', { value: true });
5
5
 
6
- var version = "4.91.3";
6
+ var version = "4.91.4";
7
7
 
8
8
  exports.version = version;
package/package.js CHANGED
@@ -1,4 +1,4 @@
1
1
  'use client'
2
- var version = "4.91.3";
2
+ var version = "4.91.4";
3
3
 
4
4
  export { version };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dynamic-labs/aptos",
3
- "version": "4.91.3",
3
+ "version": "4.91.4",
4
4
  "description": "A React SDK for implementing wallet web3 authentication and authorization to your website.",
5
5
  "author": "Dynamic Labs, Inc.",
6
6
  "license": "MIT",
@@ -20,14 +20,14 @@
20
20
  "dependencies": {
21
21
  "@aptos-labs/ts-sdk": "5.1.1",
22
22
  "@aptos-labs/wallet-standard": "0.5.2",
23
- "@dynamic-labs/assert-package-version": "4.91.3",
23
+ "@dynamic-labs/assert-package-version": "4.91.4",
24
24
  "@wallet-standard/core": "1.1.1",
25
25
  "@wallet-standard/features": "1.0.3",
26
- "@dynamic-labs/logger": "4.91.3",
27
- "@dynamic-labs/types": "4.91.3",
28
- "@dynamic-labs/utils": "4.91.3",
29
- "@dynamic-labs/wallet-book": "4.91.3",
30
- "@dynamic-labs/wallet-connector-core": "4.91.3"
26
+ "@dynamic-labs/logger": "4.91.4",
27
+ "@dynamic-labs/types": "4.91.4",
28
+ "@dynamic-labs/utils": "4.91.4",
29
+ "@dynamic-labs/wallet-book": "4.91.4",
30
+ "@dynamic-labs/wallet-connector-core": "4.91.4"
31
31
  },
32
32
  "peerDependencies": {}
33
33
  }
@@ -72,7 +72,7 @@ class AptosWalletConnector extends walletConnectorCore.WalletConnectorBase {
72
72
  catch (error) {
73
73
  this.logger.error('[connect] Connection failed:', error);
74
74
  if (!silent) {
75
- throw new utils.DynamicError('Failed to connect to Aptos wallet');
75
+ throw new utils.DynamicError('Failed to connect to Aptos wallet', 'connect_to_aptos_wallet');
76
76
  }
77
77
  }
78
78
  finally {
@@ -141,7 +141,7 @@ class AptosWalletConnector extends walletConnectorCore.WalletConnectorBase {
141
141
  }
142
142
  catch (error) {
143
143
  this.logger.error('[signAndSubmitTransaction] Error:', error);
144
- throw new utils.DynamicError('Failed to sign and submit transaction');
144
+ throw new utils.DynamicError('Failed to sign and submit transaction', 'sign_and_submit_transaction');
145
145
  }
146
146
  });
147
147
  }
@@ -230,14 +230,14 @@ class AptosWalletConnector extends walletConnectorCore.WalletConnectorBase {
230
230
  yield this.validateActiveWallet(from);
231
231
  const aptosClient = yield this.getAptosClient();
232
232
  if (!aptosClient) {
233
- throw new utils.DynamicError('No Aptos client available');
233
+ throw new utils.DynamicError('No Aptos client available', 'no_aptos_client_available');
234
234
  }
235
235
  return new AptosUiTransaction.AptosUiTransaction({
236
236
  client: aptosClient,
237
237
  from,
238
238
  onSubmit: (transaction) => _tslib.__awaiter(this, void 0, void 0, function* () {
239
239
  if (!transaction) {
240
- throw new utils.DynamicError('Transaction must be provided');
240
+ throw new utils.DynamicError('Transaction must be provided', 'transaction_must_be_provided');
241
241
  }
242
242
  const result = yield this.signAndSubmitTransaction(transaction);
243
243
  return result;
@@ -68,7 +68,7 @@ class AptosWalletConnector extends WalletConnectorBase {
68
68
  catch (error) {
69
69
  this.logger.error('[connect] Connection failed:', error);
70
70
  if (!silent) {
71
- throw new DynamicError('Failed to connect to Aptos wallet');
71
+ throw new DynamicError('Failed to connect to Aptos wallet', 'connect_to_aptos_wallet');
72
72
  }
73
73
  }
74
74
  finally {
@@ -137,7 +137,7 @@ class AptosWalletConnector extends WalletConnectorBase {
137
137
  }
138
138
  catch (error) {
139
139
  this.logger.error('[signAndSubmitTransaction] Error:', error);
140
- throw new DynamicError('Failed to sign and submit transaction');
140
+ throw new DynamicError('Failed to sign and submit transaction', 'sign_and_submit_transaction');
141
141
  }
142
142
  });
143
143
  }
@@ -226,14 +226,14 @@ class AptosWalletConnector extends WalletConnectorBase {
226
226
  yield this.validateActiveWallet(from);
227
227
  const aptosClient = yield this.getAptosClient();
228
228
  if (!aptosClient) {
229
- throw new DynamicError('No Aptos client available');
229
+ throw new DynamicError('No Aptos client available', 'no_aptos_client_available');
230
230
  }
231
231
  return new AptosUiTransaction({
232
232
  client: aptosClient,
233
233
  from,
234
234
  onSubmit: (transaction) => __awaiter(this, void 0, void 0, function* () {
235
235
  if (!transaction) {
236
- throw new DynamicError('Transaction must be provided');
236
+ throw new DynamicError('Transaction must be provided', 'transaction_must_be_provided');
237
237
  }
238
238
  const result = yield this.signAndSubmitTransaction(transaction);
239
239
  return result;
@@ -26,10 +26,10 @@ var utils = require('@dynamic-labs/utils');
26
26
  */
27
27
  const assertProvider = (provider) => {
28
28
  if (!provider) {
29
- throw new utils.DynamicError('No wallet provider available');
29
+ throw new utils.DynamicError('No wallet provider available', 'no_wallet_provider_available');
30
30
  }
31
31
  if (!provider.features) {
32
- throw new utils.DynamicError('Wallet provider does not support AIP-62 wallet standard');
32
+ throw new utils.DynamicError('Wallet provider does not support AIP-62 wallet standard', 'wallet_provider_does_not_support_aip62');
33
33
  }
34
34
  };
35
35
 
@@ -22,10 +22,10 @@ import { DynamicError } from '@dynamic-labs/utils';
22
22
  */
23
23
  const assertProvider = (provider) => {
24
24
  if (!provider) {
25
- throw new DynamicError('No wallet provider available');
25
+ throw new DynamicError('No wallet provider available', 'no_wallet_provider_available');
26
26
  }
27
27
  if (!provider.features) {
28
- throw new DynamicError('Wallet provider does not support AIP-62 wallet standard');
28
+ throw new DynamicError('Wallet provider does not support AIP-62 wallet standard', 'wallet_provider_does_not_support_aip62');
29
29
  }
30
30
  };
31
31
 
@@ -43,17 +43,17 @@ var utils = require('@dynamic-labs/utils');
43
43
  const invokeWalletMethod = (provider, featureName, methodName, ...args) => _tslib.__awaiter(void 0, void 0, void 0, function* () {
44
44
  // Check if provider has features
45
45
  if (!provider.features) {
46
- throw new utils.DynamicError(`Feature ${featureName} not supported by wallet`);
46
+ throw new utils.DynamicError(`Feature ${featureName} not supported by wallet`, 'feature_not_supported_by_wallet');
47
47
  }
48
48
  // Get the wallet-standard feature
49
49
  const feature = provider.features[featureName];
50
50
  if (!feature || typeof feature !== 'object') {
51
- throw new utils.DynamicError(`Feature ${featureName} not supported by wallet`);
51
+ throw new utils.DynamicError(`Feature ${featureName} not supported by wallet`, 'feature_not_supported_by_wallet');
52
52
  }
53
53
  // Get the method from the feature
54
54
  const method = feature[methodName];
55
55
  if (typeof method !== 'function') {
56
- throw new utils.DynamicError(`Method ${methodName} not available in feature ${featureName}`);
56
+ throw new utils.DynamicError(`Method ${methodName} not available in feature ${featureName}`, 'method_not_available_in_feature');
57
57
  }
58
58
  return method(...args);
59
59
  });
@@ -39,17 +39,17 @@ import { DynamicError } from '@dynamic-labs/utils';
39
39
  const invokeWalletMethod = (provider, featureName, methodName, ...args) => __awaiter(void 0, void 0, void 0, function* () {
40
40
  // Check if provider has features
41
41
  if (!provider.features) {
42
- throw new DynamicError(`Feature ${featureName} not supported by wallet`);
42
+ throw new DynamicError(`Feature ${featureName} not supported by wallet`, 'feature_not_supported_by_wallet');
43
43
  }
44
44
  // Get the wallet-standard feature
45
45
  const feature = provider.features[featureName];
46
46
  if (!feature || typeof feature !== 'object') {
47
- throw new DynamicError(`Feature ${featureName} not supported by wallet`);
47
+ throw new DynamicError(`Feature ${featureName} not supported by wallet`, 'feature_not_supported_by_wallet');
48
48
  }
49
49
  // Get the method from the feature
50
50
  const method = feature[methodName];
51
51
  if (typeof method !== 'function') {
52
- throw new DynamicError(`Method ${methodName} not available in feature ${featureName}`);
52
+ throw new DynamicError(`Method ${methodName} not available in feature ${featureName}`, 'method_not_available_in_feature');
53
53
  }
54
54
  return method(...args);
55
55
  });
@@ -32,9 +32,9 @@ const parseConnectionResult = (result) => {
32
32
  }
33
33
  // If it's a rejected response, throw appropriate error
34
34
  if (isUserResponse(result) && result.status === walletStandard.UserResponseStatus.REJECTED) {
35
- throw new utils.DynamicError('User rejected connection request');
35
+ throw new utils.DynamicError('User rejected connection request', 'user_rejected_connection_request');
36
36
  }
37
- throw new utils.DynamicError('Invalid wallet-standard connection response');
37
+ throw new utils.DynamicError('Invalid wallet-standard connection response', 'invalid_walletstandard_connection_response');
38
38
  };
39
39
 
40
40
  exports.parseConnectionResult = parseConnectionResult;
@@ -28,9 +28,9 @@ const parseConnectionResult = (result) => {
28
28
  }
29
29
  // If it's a rejected response, throw appropriate error
30
30
  if (isUserResponse(result) && result.status === UserResponseStatus.REJECTED) {
31
- throw new DynamicError('User rejected connection request');
31
+ throw new DynamicError('User rejected connection request', 'user_rejected_connection_request');
32
32
  }
33
- throw new DynamicError('Invalid wallet-standard connection response');
33
+ throw new DynamicError('Invalid wallet-standard connection response', 'invalid_walletstandard_connection_response');
34
34
  };
35
35
 
36
36
  export { parseConnectionResult };
@@ -45,9 +45,9 @@ const parseTransactionResponse = (response) => {
45
45
  // If it's a rejected response, throw appropriate error
46
46
  if (isUserResponseWithHash(response) &&
47
47
  response.status === walletStandard.UserResponseStatus.REJECTED) {
48
- throw new utils.DynamicError('User rejected transaction');
48
+ throw new utils.DynamicError('User rejected transaction', 'user_rejected_transaction');
49
49
  }
50
- throw new utils.DynamicError('Invalid wallet-standard transaction response');
50
+ throw new utils.DynamicError('Invalid wallet-standard transaction response', 'invalid_walletstandard_transaction_response');
51
51
  };
52
52
 
53
53
  exports.parseTransactionResponse = parseTransactionResponse;
@@ -41,9 +41,9 @@ const parseTransactionResponse = (response) => {
41
41
  // If it's a rejected response, throw appropriate error
42
42
  if (isUserResponseWithHash(response) &&
43
43
  response.status === UserResponseStatus.REJECTED) {
44
- throw new DynamicError('User rejected transaction');
44
+ throw new DynamicError('User rejected transaction', 'user_rejected_transaction');
45
45
  }
46
- throw new DynamicError('Invalid wallet-standard transaction response');
46
+ throw new DynamicError('Invalid wallet-standard transaction response', 'invalid_walletstandard_transaction_response');
47
47
  };
48
48
 
49
49
  export { parseTransactionResponse };