@dynamic-labs/sui-core 4.91.3 → 4.91.5

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,21 @@
1
1
 
2
+ ### [4.91.5](https://github.com/dynamic-labs/dynamic-auth/compare/v4.91.4...v4.91.5) (2026-07-02)
3
+
4
+
5
+ ### Bug Fixes
6
+
7
+ * revoke WaaS signed-session callback on client rebuild to stop iOS nonce race ([#11766](https://github.com/dynamic-labs/dynamic-auth/issues/11766)) ([c895b5d](https://github.com/dynamic-labs/dynamic-auth/commit/c895b5d0987d62a9f5597741dbeae0ec7fedfe5b))
8
+ * **sdk-react-core:** allow sendOneTimeCode to target non-primary chain wallets ([#11777](https://github.com/dynamic-labs/dynamic-auth/issues/11777)) ([63f82af](https://github.com/dynamic-labs/dynamic-auth/commit/63f82af7c52be595bc2948ec88ee9c919ac9275a))
9
+ * **webview-controller:** resolve post-login wallet race in Viem and ZeroDev controllers ([#11774](https://github.com/dynamic-labs/dynamic-auth/issues/11774)) ([95ed26e](https://github.com/dynamic-labs/dynamic-auth/commit/95ed26eee09d9aff5a5af6517ab7e1360ef5f337))
10
+
11
+ ### [4.91.4](https://github.com/dynamic-labs/dynamic-auth/compare/v4.91.3...v4.91.4) (2026-07-01)
12
+
13
+
14
+ ### Bug Fixes
15
+
16
+ * 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))
17
+ * 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))
18
+
2
19
  ### [4.91.3](https://github.com/dynamic-labs/dynamic-auth/compare/v4.91.2...v4.91.3) (2026-06-30)
3
20
 
4
21
 
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.5";
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.5";
3
3
 
4
4
  export { version };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dynamic-labs/sui-core",
3
- "version": "4.91.3",
3
+ "version": "4.91.5",
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",
@@ -19,16 +19,16 @@
19
19
  "homepage": "https://www.dynamic.xyz/",
20
20
  "dependencies": {
21
21
  "@dynamic-labs/sdk-api-core": "0.0.1046",
22
- "@dynamic-labs/utils": "4.91.3",
22
+ "@dynamic-labs/utils": "4.91.5",
23
23
  "@mysten/wallet-standard": "0.19.9",
24
24
  "@mysten/sui": "1.45.2",
25
25
  "text-encoding": "0.7.0",
26
- "@dynamic-labs/assert-package-version": "4.91.3",
27
- "@dynamic-labs/logger": "4.91.3",
28
- "@dynamic-labs/rpc-providers": "4.91.3",
29
- "@dynamic-labs/types": "4.91.3",
30
- "@dynamic-labs/wallet-book": "4.91.3",
31
- "@dynamic-labs/wallet-connector-core": "4.91.3"
26
+ "@dynamic-labs/assert-package-version": "4.91.5",
27
+ "@dynamic-labs/logger": "4.91.5",
28
+ "@dynamic-labs/rpc-providers": "4.91.5",
29
+ "@dynamic-labs/types": "4.91.5",
30
+ "@dynamic-labs/wallet-book": "4.91.5",
31
+ "@dynamic-labs/wallet-connector-core": "4.91.5"
32
32
  },
33
33
  "peerDependencies": {}
34
34
  }
@@ -57,7 +57,7 @@ class SuiWalletConnector extends walletConnectorCore.WalletConnectorBase {
57
57
  if (silent) {
58
58
  return;
59
59
  }
60
- throw new utils.DynamicError('Wallet does not support standard:connect');
60
+ throw new utils.DynamicError('Wallet does not support standard:connect', 'wallet_does_not_support_standardconnect');
61
61
  }
62
62
  // Start connecting
63
63
  this.isConnecting = true;
@@ -76,7 +76,7 @@ class SuiWalletConnector extends walletConnectorCore.WalletConnectorBase {
76
76
  if (silent) {
77
77
  return;
78
78
  }
79
- throw new utils.DynamicError('Connection failed');
79
+ throw new utils.DynamicError('Connection failed', 'connection_failed');
80
80
  }
81
81
  finally {
82
82
  this.isConnecting = false;
@@ -114,7 +114,7 @@ class SuiWalletConnector extends walletConnectorCore.WalletConnectorBase {
114
114
  }
115
115
  yield this.connect();
116
116
  if (!this.getPrimaryAccount()) {
117
- throw new utils.DynamicError(`[${this.name}] [getAddress] No account found`);
117
+ throw new utils.DynamicError(`[${this.name}] [getAddress] No account found`, 'getaddress_no_account_found');
118
118
  }
119
119
  return (_a = this.getPrimaryAccount()) === null || _a === void 0 ? void 0 : _a.address;
120
120
  });
@@ -253,10 +253,10 @@ class SuiWalletConnector extends walletConnectorCore.WalletConnectorBase {
253
253
  this.logger.debug(`[${this.name}] [signMessage] called, attempting to sign a message`);
254
254
  const signFeature = (_a = this.getFeatures()) === null || _a === void 0 ? void 0 : _a['sui:signPersonalMessage'];
255
255
  if (!signFeature) {
256
- throw new utils.DynamicError('Wallet does not support sui:signPersonalMessage');
256
+ throw new utils.DynamicError('Wallet does not support sui:signPersonalMessage', 'wallet_does_not_support_suisignpersonalmessage');
257
257
  }
258
258
  if (!this.getPrimaryAccount()) {
259
- throw new utils.DynamicError('[signMessage] No account found');
259
+ throw new utils.DynamicError('[signMessage] No account found', 'signmessage_no_account_found');
260
260
  }
261
261
  let output;
262
262
  try {
@@ -267,10 +267,10 @@ class SuiWalletConnector extends walletConnectorCore.WalletConnectorBase {
267
267
  }
268
268
  catch (error) {
269
269
  this.logger.error(error);
270
- throw new utils.DynamicError('An error occured during signing');
270
+ throw new utils.DynamicError('An error occured during signing', 'an_error_occured_during_signing');
271
271
  }
272
272
  if (!output || !output.signature) {
273
- throw new utils.DynamicError('[signMessage] Failed to sign message');
273
+ throw new utils.DynamicError('[signMessage] Failed to sign message', 'signmessage_failed_to_sign_message');
274
274
  }
275
275
  this.logger.debug(`[${this.name}] [signMessage] Signed message: ${output.signature}`);
276
276
  return output.signature;
@@ -287,14 +287,14 @@ class SuiWalletConnector extends walletConnectorCore.WalletConnectorBase {
287
287
  yield this.validateActiveWallet(from);
288
288
  const suiClient = yield this.getSuiClient();
289
289
  if (!suiClient) {
290
- throw new utils.DynamicError('No Sui client available');
290
+ throw new utils.DynamicError('No Sui client available', 'no_sui_client_available');
291
291
  }
292
292
  return new SuiUiTransaction.SuiUiTransaction({
293
293
  client: suiClient,
294
294
  from,
295
295
  onSubmit: (transaction) => _tslib.__awaiter(this, void 0, void 0, function* () {
296
296
  if (!transaction) {
297
- throw new utils.DynamicError('Transaction must be provided');
297
+ throw new utils.DynamicError('Transaction must be provided', 'transaction_must_be_provided');
298
298
  }
299
299
  const result = yield this.signAndExecuteTransactionFeature({
300
300
  transaction,
@@ -328,7 +328,7 @@ class SuiWalletConnector extends walletConnectorCore.WalletConnectorBase {
328
328
  yield this.wallet.disconnect();
329
329
  return;
330
330
  }
331
- throw new utils.DynamicError('Wallet does not support disconnect');
331
+ throw new utils.DynamicError('Wallet does not support disconnect', 'wallet_does_not_support_disconnect');
332
332
  });
333
333
  }
334
334
  getEnabledNetworks() {
@@ -338,7 +338,7 @@ class SuiWalletConnector extends walletConnectorCore.WalletConnectorBase {
338
338
  return _tslib.__awaiter(this, arguments, void 0, function* ({ transaction, legacyOptions, }) {
339
339
  var _b, _c;
340
340
  if (!this.getPrimaryAccount()) {
341
- throw new utils.DynamicError('No account found');
341
+ throw new utils.DynamicError('No account found', 'no_account_found');
342
342
  }
343
343
  const features = this.getFeatures();
344
344
  const signAndExecuteTransactionFeature = features === null || features === void 0 ? void 0 : features['sui:signAndExecuteTransaction'];
@@ -351,7 +351,7 @@ class SuiWalletConnector extends walletConnectorCore.WalletConnectorBase {
351
351
  }
352
352
  const signAndExecuteTransactionBlockFeature = features === null || features === void 0 ? void 0 : features['sui:signAndExecuteTransactionBlock'];
353
353
  if (!signAndExecuteTransactionBlockFeature) {
354
- throw new utils.DynamicError('Wallet does not support sui:signAndExecuteTransaction or sui:signAndExecuteTransactionBlock');
354
+ throw new utils.DynamicError('Wallet does not support sui:signAndExecuteTransaction or sui:signAndExecuteTransactionBlock', 'wallet_does_not_support_suisignandexecutetransaction_or');
355
355
  }
356
356
  const result = yield signAndExecuteTransactionBlockFeature.signAndExecuteTransactionBlock({
357
357
  account: this.getPrimaryAccount(),
@@ -367,7 +367,7 @@ class SuiWalletConnector extends walletConnectorCore.WalletConnectorBase {
367
367
  return _tslib.__awaiter(this, arguments, void 0, function* ({ transaction, }) {
368
368
  var _b, _c;
369
369
  if (!this.getPrimaryAccount()) {
370
- throw new utils.DynamicError('No account found');
370
+ throw new utils.DynamicError('No account found', 'no_account_found');
371
371
  }
372
372
  const features = this.getFeatures();
373
373
  const signTransactionFeature = features === null || features === void 0 ? void 0 : features['sui:signTransaction'];
@@ -380,7 +380,7 @@ class SuiWalletConnector extends walletConnectorCore.WalletConnectorBase {
380
380
  }
381
381
  const signTransactionBlockFeature = features === null || features === void 0 ? void 0 : features['sui:signTransactionBlock'];
382
382
  if (!signTransactionBlockFeature) {
383
- throw new utils.DynamicError('Wallet does not support sui:signTransaction or sui:signTransactionBlock');
383
+ throw new utils.DynamicError('Wallet does not support sui:signTransaction or sui:signTransactionBlock', 'wallet_does_not_support_suisigntransaction_or');
384
384
  }
385
385
  const result = yield signTransactionBlockFeature.signTransactionBlock({
386
386
  account: this.getPrimaryAccount(),
@@ -53,7 +53,7 @@ class SuiWalletConnector extends WalletConnectorBase {
53
53
  if (silent) {
54
54
  return;
55
55
  }
56
- throw new DynamicError('Wallet does not support standard:connect');
56
+ throw new DynamicError('Wallet does not support standard:connect', 'wallet_does_not_support_standardconnect');
57
57
  }
58
58
  // Start connecting
59
59
  this.isConnecting = true;
@@ -72,7 +72,7 @@ class SuiWalletConnector extends WalletConnectorBase {
72
72
  if (silent) {
73
73
  return;
74
74
  }
75
- throw new DynamicError('Connection failed');
75
+ throw new DynamicError('Connection failed', 'connection_failed');
76
76
  }
77
77
  finally {
78
78
  this.isConnecting = false;
@@ -110,7 +110,7 @@ class SuiWalletConnector extends WalletConnectorBase {
110
110
  }
111
111
  yield this.connect();
112
112
  if (!this.getPrimaryAccount()) {
113
- throw new DynamicError(`[${this.name}] [getAddress] No account found`);
113
+ throw new DynamicError(`[${this.name}] [getAddress] No account found`, 'getaddress_no_account_found');
114
114
  }
115
115
  return (_a = this.getPrimaryAccount()) === null || _a === void 0 ? void 0 : _a.address;
116
116
  });
@@ -249,10 +249,10 @@ class SuiWalletConnector extends WalletConnectorBase {
249
249
  this.logger.debug(`[${this.name}] [signMessage] called, attempting to sign a message`);
250
250
  const signFeature = (_a = this.getFeatures()) === null || _a === void 0 ? void 0 : _a['sui:signPersonalMessage'];
251
251
  if (!signFeature) {
252
- throw new DynamicError('Wallet does not support sui:signPersonalMessage');
252
+ throw new DynamicError('Wallet does not support sui:signPersonalMessage', 'wallet_does_not_support_suisignpersonalmessage');
253
253
  }
254
254
  if (!this.getPrimaryAccount()) {
255
- throw new DynamicError('[signMessage] No account found');
255
+ throw new DynamicError('[signMessage] No account found', 'signmessage_no_account_found');
256
256
  }
257
257
  let output;
258
258
  try {
@@ -263,10 +263,10 @@ class SuiWalletConnector extends WalletConnectorBase {
263
263
  }
264
264
  catch (error) {
265
265
  this.logger.error(error);
266
- throw new DynamicError('An error occured during signing');
266
+ throw new DynamicError('An error occured during signing', 'an_error_occured_during_signing');
267
267
  }
268
268
  if (!output || !output.signature) {
269
- throw new DynamicError('[signMessage] Failed to sign message');
269
+ throw new DynamicError('[signMessage] Failed to sign message', 'signmessage_failed_to_sign_message');
270
270
  }
271
271
  this.logger.debug(`[${this.name}] [signMessage] Signed message: ${output.signature}`);
272
272
  return output.signature;
@@ -283,14 +283,14 @@ class SuiWalletConnector extends WalletConnectorBase {
283
283
  yield this.validateActiveWallet(from);
284
284
  const suiClient = yield this.getSuiClient();
285
285
  if (!suiClient) {
286
- throw new DynamicError('No Sui client available');
286
+ throw new DynamicError('No Sui client available', 'no_sui_client_available');
287
287
  }
288
288
  return new SuiUiTransaction({
289
289
  client: suiClient,
290
290
  from,
291
291
  onSubmit: (transaction) => __awaiter(this, void 0, void 0, function* () {
292
292
  if (!transaction) {
293
- throw new DynamicError('Transaction must be provided');
293
+ throw new DynamicError('Transaction must be provided', 'transaction_must_be_provided');
294
294
  }
295
295
  const result = yield this.signAndExecuteTransactionFeature({
296
296
  transaction,
@@ -324,7 +324,7 @@ class SuiWalletConnector extends WalletConnectorBase {
324
324
  yield this.wallet.disconnect();
325
325
  return;
326
326
  }
327
- throw new DynamicError('Wallet does not support disconnect');
327
+ throw new DynamicError('Wallet does not support disconnect', 'wallet_does_not_support_disconnect');
328
328
  });
329
329
  }
330
330
  getEnabledNetworks() {
@@ -334,7 +334,7 @@ class SuiWalletConnector extends WalletConnectorBase {
334
334
  return __awaiter(this, arguments, void 0, function* ({ transaction, legacyOptions, }) {
335
335
  var _b, _c;
336
336
  if (!this.getPrimaryAccount()) {
337
- throw new DynamicError('No account found');
337
+ throw new DynamicError('No account found', 'no_account_found');
338
338
  }
339
339
  const features = this.getFeatures();
340
340
  const signAndExecuteTransactionFeature = features === null || features === void 0 ? void 0 : features['sui:signAndExecuteTransaction'];
@@ -347,7 +347,7 @@ class SuiWalletConnector extends WalletConnectorBase {
347
347
  }
348
348
  const signAndExecuteTransactionBlockFeature = features === null || features === void 0 ? void 0 : features['sui:signAndExecuteTransactionBlock'];
349
349
  if (!signAndExecuteTransactionBlockFeature) {
350
- throw new DynamicError('Wallet does not support sui:signAndExecuteTransaction or sui:signAndExecuteTransactionBlock');
350
+ throw new DynamicError('Wallet does not support sui:signAndExecuteTransaction or sui:signAndExecuteTransactionBlock', 'wallet_does_not_support_suisignandexecutetransaction_or');
351
351
  }
352
352
  const result = yield signAndExecuteTransactionBlockFeature.signAndExecuteTransactionBlock({
353
353
  account: this.getPrimaryAccount(),
@@ -363,7 +363,7 @@ class SuiWalletConnector extends WalletConnectorBase {
363
363
  return __awaiter(this, arguments, void 0, function* ({ transaction, }) {
364
364
  var _b, _c;
365
365
  if (!this.getPrimaryAccount()) {
366
- throw new DynamicError('No account found');
366
+ throw new DynamicError('No account found', 'no_account_found');
367
367
  }
368
368
  const features = this.getFeatures();
369
369
  const signTransactionFeature = features === null || features === void 0 ? void 0 : features['sui:signTransaction'];
@@ -376,7 +376,7 @@ class SuiWalletConnector extends WalletConnectorBase {
376
376
  }
377
377
  const signTransactionBlockFeature = features === null || features === void 0 ? void 0 : features['sui:signTransactionBlock'];
378
378
  if (!signTransactionBlockFeature) {
379
- throw new DynamicError('Wallet does not support sui:signTransaction or sui:signTransactionBlock');
379
+ throw new DynamicError('Wallet does not support sui:signTransaction or sui:signTransactionBlock', 'wallet_does_not_support_suisigntransaction_or');
380
380
  }
381
381
  const result = yield signTransactionBlockFeature.signTransactionBlock({
382
382
  account: this.getPrimaryAccount(),
@@ -101,7 +101,7 @@ class Slush extends injected.Injected {
101
101
  if (silent) {
102
102
  return;
103
103
  }
104
- throw new utils.DynamicError('Wallet does not support standard:connect');
104
+ throw new utils.DynamicError('Wallet does not support standard:connect', 'wallet_does_not_support_standardconnect');
105
105
  }
106
106
  // Start connecting
107
107
  this.isConnecting = true;
@@ -138,7 +138,7 @@ class Slush extends injected.Injected {
138
138
  if (silent) {
139
139
  return;
140
140
  }
141
- throw new utils.DynamicError('Connection failed');
141
+ throw new utils.DynamicError('Connection failed', 'connection_failed');
142
142
  }
143
143
  finally {
144
144
  this.isConnecting = false;
@@ -184,7 +184,7 @@ class Slush extends injected.Injected {
184
184
  newAddresses,
185
185
  });
186
186
  if (newAddresses.length === 0) {
187
- throw new utils.DynamicError('No account found');
187
+ throw new utils.DynamicError('No account found', 'no_account_found');
188
188
  }
189
189
  return newAddresses[0];
190
190
  });
@@ -265,7 +265,7 @@ class Slush extends injected.Injected {
265
265
  });
266
266
  return _tslib.__awaiter(this, void 0, void 0, function* () {
267
267
  if (this.accounts.length === 0) {
268
- throw new utils.DynamicError('No account connected');
268
+ throw new utils.DynamicError('No account connected', 'no_account_connected');
269
269
  }
270
270
  yield this.setPrimaryAccountAddress(from);
271
271
  return _super.createUiTransaction.call(this, from);
@@ -97,7 +97,7 @@ class Slush extends Injected {
97
97
  if (silent) {
98
98
  return;
99
99
  }
100
- throw new DynamicError('Wallet does not support standard:connect');
100
+ throw new DynamicError('Wallet does not support standard:connect', 'wallet_does_not_support_standardconnect');
101
101
  }
102
102
  // Start connecting
103
103
  this.isConnecting = true;
@@ -134,7 +134,7 @@ class Slush extends Injected {
134
134
  if (silent) {
135
135
  return;
136
136
  }
137
- throw new DynamicError('Connection failed');
137
+ throw new DynamicError('Connection failed', 'connection_failed');
138
138
  }
139
139
  finally {
140
140
  this.isConnecting = false;
@@ -180,7 +180,7 @@ class Slush extends Injected {
180
180
  newAddresses,
181
181
  });
182
182
  if (newAddresses.length === 0) {
183
- throw new DynamicError('No account found');
183
+ throw new DynamicError('No account found', 'no_account_found');
184
184
  }
185
185
  return newAddresses[0];
186
186
  });
@@ -261,7 +261,7 @@ class Slush extends Injected {
261
261
  });
262
262
  return __awaiter(this, void 0, void 0, function* () {
263
263
  if (this.accounts.length === 0) {
264
- throw new DynamicError('No account connected');
264
+ throw new DynamicError('No account connected', 'no_account_connected');
265
265
  }
266
266
  yield this.setPrimaryAccountAddress(from);
267
267
  return _super.createUiTransaction.call(this, from);