@dynamic-labs/waas-sui 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/waas-sui",
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",
@@ -24,15 +24,15 @@
24
24
  "@dynamic-labs-wallet/forward-mpc-client": "0.12.0",
25
25
  "@mysten/sui": "1.45.2",
26
26
  "@mysten/wallet-standard": "0.19.9",
27
- "@dynamic-labs/assert-package-version": "4.91.3",
28
- "@dynamic-labs/logger": "4.91.3",
29
- "@dynamic-labs/rpc-providers": "4.91.3",
30
- "@dynamic-labs/sui-core": "4.91.3",
31
- "@dynamic-labs/types": "4.91.3",
32
- "@dynamic-labs/utils": "4.91.3",
33
- "@dynamic-labs/waas": "4.91.3",
34
- "@dynamic-labs/wallet-book": "4.91.3",
35
- "@dynamic-labs/wallet-connector-core": "4.91.3"
27
+ "@dynamic-labs/assert-package-version": "4.91.4",
28
+ "@dynamic-labs/logger": "4.91.4",
29
+ "@dynamic-labs/rpc-providers": "4.91.4",
30
+ "@dynamic-labs/sui-core": "4.91.4",
31
+ "@dynamic-labs/types": "4.91.4",
32
+ "@dynamic-labs/utils": "4.91.4",
33
+ "@dynamic-labs/waas": "4.91.4",
34
+ "@dynamic-labs/wallet-book": "4.91.4",
35
+ "@dynamic-labs/wallet-connector-core": "4.91.4"
36
36
  },
37
37
  "peerDependencies": {}
38
38
  }
@@ -47,7 +47,7 @@ class DynamicWaasSuiConnector extends waas.withDynamicWaas(suiCore.SuiWalletConn
47
47
  return _tslib.__awaiter(this, void 0, void 0, function* () {
48
48
  const networkId = yield this.getNetwork();
49
49
  if (!networkId) {
50
- throw new utils.DynamicError('Missing network id');
50
+ throw new utils.DynamicError('Missing network id', 'missing_network_id');
51
51
  }
52
52
  switch (networkId) {
53
53
  case '501':
@@ -57,7 +57,7 @@ class DynamicWaasSuiConnector extends waas.withDynamicWaas(suiCore.SuiWalletConn
57
57
  case '503':
58
58
  return 'devnet';
59
59
  default:
60
- throw new utils.DynamicError(`Unsupported network: ${networkId}`);
60
+ throw new utils.DynamicError(`Unsupported network: ${networkId}`, 'unsupported_network');
61
61
  }
62
62
  });
63
63
  }
@@ -68,7 +68,7 @@ class DynamicWaasSuiConnector extends waas.withDynamicWaas(suiCore.SuiWalletConn
68
68
  const networkIdString = networkChainId.toString();
69
69
  const isValidNetwork = this.suiNetworks.some((network) => network.networkId === networkIdString);
70
70
  if (!isValidNetwork) {
71
- throw new utils.DynamicError(`Network ${networkIdString} is not supported`);
71
+ throw new utils.DynamicError(`Network ${networkIdString} is not supported`, 'network_is_not_supported');
72
72
  }
73
73
  this.activeNetworkId = networkIdString;
74
74
  this.emit('chainChange', { chain: networkIdString });
@@ -96,7 +96,7 @@ class DynamicWaasSuiConnector extends waas.withDynamicWaas(suiCore.SuiWalletConn
96
96
  signedSessionId: '',
97
97
  });
98
98
  if (!targetWallet) {
99
- throw new utils.DynamicError('Account not found');
99
+ throw new utils.DynamicError('Account not found', 'account_not_found');
100
100
  }
101
101
  const isWalletActive = walletConnectorCore.isSameAddress(targetWallet.accountAddress, this.activeAccountAddress || '', this.connectedChain);
102
102
  if (!isWalletActive) {
@@ -111,7 +111,7 @@ class DynamicWaasSuiConnector extends waas.withDynamicWaas(suiCore.SuiWalletConn
111
111
  const walletClient = yield this.getWaasWalletClient();
112
112
  const signedSessionId = yield ((_b = this.getSignedSessionId) === null || _b === void 0 ? void 0 : _b.call(this));
113
113
  if (!signedSessionId) {
114
- throw new utils.DynamicError('Signed session ID is required');
114
+ throw new utils.DynamicError('Signed session ID is required', 'signed_session_id_is_required');
115
115
  }
116
116
  yield walletClient.importPrivateKey({
117
117
  authToken: (_c = this.getAuthToken) === null || _c === void 0 ? void 0 : _c.call(this),
@@ -132,7 +132,7 @@ class DynamicWaasSuiConnector extends waas.withDynamicWaas(suiCore.SuiWalletConn
132
132
  }
133
133
  const signedSessionId = yield ((_a = this.getSignedSessionId) === null || _a === void 0 ? void 0 : _a.call(this));
134
134
  if (!signedSessionId) {
135
- throw new utils.DynamicError('Signed session ID is required');
135
+ throw new utils.DynamicError('Signed session ID is required', 'signed_session_id_is_required');
136
136
  }
137
137
  const mfaToken = yield ((_b = this.getMfaToken) === null || _b === void 0 ? void 0 : _b.call(this, {
138
138
  mfaAction: sdkApiCore.MFAAction.WalletWaasSign,
@@ -168,7 +168,7 @@ class DynamicWaasSuiConnector extends waas.withDynamicWaas(suiCore.SuiWalletConn
168
168
  }
169
169
  const signedSessionId = yield ((_a = this.getSignedSessionId) === null || _a === void 0 ? void 0 : _a.call(this));
170
170
  if (!signedSessionId) {
171
- throw new utils.DynamicError('Signed session ID is required');
171
+ throw new utils.DynamicError('Signed session ID is required', 'signed_session_id_is_required');
172
172
  }
173
173
  const mfaToken = yield ((_b = this.getMfaToken) === null || _b === void 0 ? void 0 : _b.call(this, {
174
174
  mfaAction: sdkApiCore.MFAAction.WalletWaasSign,
@@ -267,14 +267,14 @@ class DynamicWaasSuiConnector extends waas.withDynamicWaas(suiCore.SuiWalletConn
267
267
  yield this.validateActiveWallet(from);
268
268
  const suiClient = yield this.getSuiClient();
269
269
  if (!suiClient) {
270
- throw new utils.DynamicError('No Sui client available');
270
+ throw new utils.DynamicError('No Sui client available', 'no_sui_client_available');
271
271
  }
272
272
  return new suiCore.SuiUiTransaction({
273
273
  client: suiClient,
274
274
  from,
275
275
  onSubmit: (transaction) => _tslib.__awaiter(this, void 0, void 0, function* () {
276
276
  if (!this.activeAccountAddress || !transaction) {
277
- throw new utils.DynamicError('No active account address or transaction found');
277
+ throw new utils.DynamicError('No active account address or transaction found', 'no_active_account_address_or_transaction');
278
278
  }
279
279
  const result = yield this.signAndExecuteTransaction(transaction);
280
280
  return result;
@@ -173,7 +173,7 @@ declare const DynamicWaasSuiConnector_base: (abstract new (...args: any[]) => {
173
173
  operation: string;
174
174
  resource: string;
175
175
  fn: (timing: import("dist/packages/waas/utils/instrumentation").InstrumentationTimer) => Promise<T_1>;
176
- context?: Record<string, any> | undefined;
176
+ context?: Record<string, any> | undefined; /** Function used to create transactions in the SDK interface */
177
177
  }): Promise<T_1>;
178
178
  getPrivateBalance(): Promise<{
179
179
  unshielded: Record<string, string>;
@@ -43,7 +43,7 @@ class DynamicWaasSuiConnector extends withDynamicWaas(SuiWalletConnector) {
43
43
  return __awaiter(this, void 0, void 0, function* () {
44
44
  const networkId = yield this.getNetwork();
45
45
  if (!networkId) {
46
- throw new DynamicError('Missing network id');
46
+ throw new DynamicError('Missing network id', 'missing_network_id');
47
47
  }
48
48
  switch (networkId) {
49
49
  case '501':
@@ -53,7 +53,7 @@ class DynamicWaasSuiConnector extends withDynamicWaas(SuiWalletConnector) {
53
53
  case '503':
54
54
  return 'devnet';
55
55
  default:
56
- throw new DynamicError(`Unsupported network: ${networkId}`);
56
+ throw new DynamicError(`Unsupported network: ${networkId}`, 'unsupported_network');
57
57
  }
58
58
  });
59
59
  }
@@ -64,7 +64,7 @@ class DynamicWaasSuiConnector extends withDynamicWaas(SuiWalletConnector) {
64
64
  const networkIdString = networkChainId.toString();
65
65
  const isValidNetwork = this.suiNetworks.some((network) => network.networkId === networkIdString);
66
66
  if (!isValidNetwork) {
67
- throw new DynamicError(`Network ${networkIdString} is not supported`);
67
+ throw new DynamicError(`Network ${networkIdString} is not supported`, 'network_is_not_supported');
68
68
  }
69
69
  this.activeNetworkId = networkIdString;
70
70
  this.emit('chainChange', { chain: networkIdString });
@@ -92,7 +92,7 @@ class DynamicWaasSuiConnector extends withDynamicWaas(SuiWalletConnector) {
92
92
  signedSessionId: '',
93
93
  });
94
94
  if (!targetWallet) {
95
- throw new DynamicError('Account not found');
95
+ throw new DynamicError('Account not found', 'account_not_found');
96
96
  }
97
97
  const isWalletActive = isSameAddress(targetWallet.accountAddress, this.activeAccountAddress || '', this.connectedChain);
98
98
  if (!isWalletActive) {
@@ -107,7 +107,7 @@ class DynamicWaasSuiConnector extends withDynamicWaas(SuiWalletConnector) {
107
107
  const walletClient = yield this.getWaasWalletClient();
108
108
  const signedSessionId = yield ((_b = this.getSignedSessionId) === null || _b === void 0 ? void 0 : _b.call(this));
109
109
  if (!signedSessionId) {
110
- throw new DynamicError('Signed session ID is required');
110
+ throw new DynamicError('Signed session ID is required', 'signed_session_id_is_required');
111
111
  }
112
112
  yield walletClient.importPrivateKey({
113
113
  authToken: (_c = this.getAuthToken) === null || _c === void 0 ? void 0 : _c.call(this),
@@ -128,7 +128,7 @@ class DynamicWaasSuiConnector extends withDynamicWaas(SuiWalletConnector) {
128
128
  }
129
129
  const signedSessionId = yield ((_a = this.getSignedSessionId) === null || _a === void 0 ? void 0 : _a.call(this));
130
130
  if (!signedSessionId) {
131
- throw new DynamicError('Signed session ID is required');
131
+ throw new DynamicError('Signed session ID is required', 'signed_session_id_is_required');
132
132
  }
133
133
  const mfaToken = yield ((_b = this.getMfaToken) === null || _b === void 0 ? void 0 : _b.call(this, {
134
134
  mfaAction: MFAAction.WalletWaasSign,
@@ -164,7 +164,7 @@ class DynamicWaasSuiConnector extends withDynamicWaas(SuiWalletConnector) {
164
164
  }
165
165
  const signedSessionId = yield ((_a = this.getSignedSessionId) === null || _a === void 0 ? void 0 : _a.call(this));
166
166
  if (!signedSessionId) {
167
- throw new DynamicError('Signed session ID is required');
167
+ throw new DynamicError('Signed session ID is required', 'signed_session_id_is_required');
168
168
  }
169
169
  const mfaToken = yield ((_b = this.getMfaToken) === null || _b === void 0 ? void 0 : _b.call(this, {
170
170
  mfaAction: MFAAction.WalletWaasSign,
@@ -263,14 +263,14 @@ class DynamicWaasSuiConnector extends withDynamicWaas(SuiWalletConnector) {
263
263
  yield this.validateActiveWallet(from);
264
264
  const suiClient = yield this.getSuiClient();
265
265
  if (!suiClient) {
266
- throw new DynamicError('No Sui client available');
266
+ throw new DynamicError('No Sui client available', 'no_sui_client_available');
267
267
  }
268
268
  return new SuiUiTransaction({
269
269
  client: suiClient,
270
270
  from,
271
271
  onSubmit: (transaction) => __awaiter(this, void 0, void 0, function* () {
272
272
  if (!this.activeAccountAddress || !transaction) {
273
- throw new DynamicError('No active account address or transaction found');
273
+ throw new DynamicError('No active account address or transaction found', 'no_active_account_address_or_transaction');
274
274
  }
275
275
  const result = yield this.signAndExecuteTransaction(transaction);
276
276
  return result;
@@ -76,7 +76,7 @@ class WaasSuiWallet extends suiCore.SuiWallet {
76
76
  }
77
77
  const activeNetworkName = yield suiWalletConnector.getNetworkName();
78
78
  if (!activeNetworkName) {
79
- throw new utils.DynamicError('Unable to retrieve Sui active network');
79
+ throw new utils.DynamicError('Unable to retrieve Sui active network', 'retrieve_sui_active_network');
80
80
  }
81
81
  return activeNetworkName;
82
82
  });
@@ -72,7 +72,7 @@ class WaasSuiWallet extends SuiWallet {
72
72
  }
73
73
  const activeNetworkName = yield suiWalletConnector.getNetworkName();
74
74
  if (!activeNetworkName) {
75
- throw new DynamicError('Unable to retrieve Sui active network');
75
+ throw new DynamicError('Unable to retrieve Sui active network', 'retrieve_sui_active_network');
76
76
  }
77
77
  return activeNetworkName;
78
78
  });