@dynamic-labs/sui-core 4.37.2 → 4.39.0

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,27 @@
1
1
 
2
+ ## [4.39.0](https://github.com/dynamic-labs/dynamic-auth/compare/v4.38.0...v4.39.0) (2025-10-17)
3
+
4
+
5
+ ### Features
6
+
7
+ * add crypto.com as an onramp option in deposit ([#9580](https://github.com/dynamic-labs/dynamic-auth/issues/9580)) ([4988acc](https://github.com/dynamic-labs/dynamic-auth/commit/4988accfeafa5556297ad6e9873073e30c504c7f)), closes [#3](https://github.com/dynamic-labs/dynamic-auth/issues/3)
8
+ * add sui non-native token sending thru dynamic widget ([#9715](https://github.com/dynamic-labs/dynamic-auth/issues/9715)) ([9d9ea3b](https://github.com/dynamic-labs/dynamic-auth/commit/9d9ea3b233706766516b89d725a52d63cceb01f6))
9
+
10
+ ## [4.38.0](https://github.com/dynamic-labs/dynamic-auth/compare/v4.37.2...v4.38.0) (2025-10-14)
11
+
12
+
13
+ ### Features
14
+
15
+ * add client.ui.updateUser.show method to update user with dynamic ui ([#9702](https://github.com/dynamic-labs/dynamic-auth/issues/9702)) ([9554e98](https://github.com/dynamic-labs/dynamic-auth/commit/9554e98eadf3f801a5ebe8b22493a87cc87b8178))
16
+ * add locale to react-native client ([#9698](https://github.com/dynamic-labs/dynamic-auth/issues/9698)) ([fe577fc](https://github.com/dynamic-labs/dynamic-auth/commit/fe577fccd3cc92e5153f66f401357035bb5baec3))
17
+ * add updateUser to react-native client ([#9701](https://github.com/dynamic-labs/dynamic-auth/issues/9701)) ([124fbf7](https://github.com/dynamic-labs/dynamic-auth/commit/124fbf7a350bfa6404e65def7b436686d38847ed))
18
+
19
+
20
+ ### Bug Fixes
21
+
22
+ * notes and trigger ([#9697](https://github.com/dynamic-labs/dynamic-auth/issues/9697)) ([5d24a77](https://github.com/dynamic-labs/dynamic-auth/commit/5d24a77faa8030434bc7dd0f35986984bc2576d5))
23
+ * **zerodev-extension:** allow zerodev kernel client to send user operation ([#9706](https://github.com/dynamic-labs/dynamic-auth/issues/9706)) ([b57afc9](https://github.com/dynamic-labs/dynamic-auth/commit/b57afc9f378d6b2423ca46faec5f6b2861d3cbf6))
24
+
2
25
  ### [4.37.2](https://github.com/dynamic-labs/dynamic-auth/compare/v4.37.1...v4.37.2) (2025-10-13)
3
26
 
4
27
 
package/package.cjs CHANGED
@@ -3,6 +3,6 @@
3
3
 
4
4
  Object.defineProperty(exports, '__esModule', { value: true });
5
5
 
6
- var version = "4.37.2";
6
+ var version = "4.39.0";
7
7
 
8
8
  exports.version = version;
package/package.js CHANGED
@@ -1,4 +1,4 @@
1
1
  'use client'
2
- var version = "4.37.2";
2
+ var version = "4.39.0";
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.37.2",
3
+ "version": "4.39.0",
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",
@@ -18,17 +18,17 @@
18
18
  },
19
19
  "homepage": "https://www.dynamic.xyz/",
20
20
  "dependencies": {
21
- "@dynamic-labs/sdk-api-core": "0.0.805",
21
+ "@dynamic-labs/sdk-api-core": "0.0.809",
22
22
  "@mysten/wallet-standard": "0.13.29",
23
23
  "@mysten/sui": "1.24.0",
24
24
  "text-encoding": "0.7.0",
25
- "@dynamic-labs/assert-package-version": "4.37.2",
26
- "@dynamic-labs/logger": "4.37.2",
27
- "@dynamic-labs/rpc-providers": "4.37.2",
28
- "@dynamic-labs/types": "4.37.2",
29
- "@dynamic-labs/utils": "4.37.2",
30
- "@dynamic-labs/wallet-book": "4.37.2",
31
- "@dynamic-labs/wallet-connector-core": "4.37.2"
25
+ "@dynamic-labs/assert-package-version": "4.39.0",
26
+ "@dynamic-labs/logger": "4.39.0",
27
+ "@dynamic-labs/rpc-providers": "4.39.0",
28
+ "@dynamic-labs/types": "4.39.0",
29
+ "@dynamic-labs/utils": "4.39.0",
30
+ "@dynamic-labs/wallet-book": "4.39.0",
31
+ "@dynamic-labs/wallet-connector-core": "4.39.0"
32
32
  },
33
33
  "peerDependencies": {}
34
34
  }
@@ -96,17 +96,33 @@ class SuiUiTransaction {
96
96
  }
97
97
  createTransaction() {
98
98
  return _tslib.__awaiter(this, void 0, void 0, function* () {
99
- const { value, to } = this;
99
+ const { value, to, nonNativeAddress, nonNativeValue } = this;
100
100
  if (!to) {
101
101
  throw new Error('Destination is required');
102
102
  }
103
- if (!value) {
103
+ if (!value && !nonNativeValue) {
104
104
  return undefined;
105
105
  }
106
106
  const sendTransaction = new transactions.Transaction();
107
107
  sendTransaction.setSender(this.from);
108
- const [coin] = sendTransaction.splitCoins(sendTransaction.gas, [value]);
109
- sendTransaction.transferObjects([coin], to);
108
+ let coin = undefined;
109
+ if (nonNativeAddress && nonNativeValue) {
110
+ const { data: coins } = yield this.client.getCoins({
111
+ coinType: nonNativeAddress,
112
+ owner: this.from,
113
+ });
114
+ if (coins.length === 0) {
115
+ throw new Error('Token not found');
116
+ }
117
+ [coin] = sendTransaction.splitCoins(coins[0].coinObjectId, [
118
+ nonNativeValue,
119
+ ]);
120
+ sendTransaction.transferObjects([coin], to);
121
+ }
122
+ if (value) {
123
+ [coin] = sendTransaction.splitCoins(sendTransaction.gas, [value]);
124
+ sendTransaction.transferObjects([coin], to);
125
+ }
110
126
  return sendTransaction;
111
127
  });
112
128
  }
@@ -92,17 +92,33 @@ class SuiUiTransaction {
92
92
  }
93
93
  createTransaction() {
94
94
  return __awaiter(this, void 0, void 0, function* () {
95
- const { value, to } = this;
95
+ const { value, to, nonNativeAddress, nonNativeValue } = this;
96
96
  if (!to) {
97
97
  throw new Error('Destination is required');
98
98
  }
99
- if (!value) {
99
+ if (!value && !nonNativeValue) {
100
100
  return undefined;
101
101
  }
102
102
  const sendTransaction = new Transaction();
103
103
  sendTransaction.setSender(this.from);
104
- const [coin] = sendTransaction.splitCoins(sendTransaction.gas, [value]);
105
- sendTransaction.transferObjects([coin], to);
104
+ let coin = undefined;
105
+ if (nonNativeAddress && nonNativeValue) {
106
+ const { data: coins } = yield this.client.getCoins({
107
+ coinType: nonNativeAddress,
108
+ owner: this.from,
109
+ });
110
+ if (coins.length === 0) {
111
+ throw new Error('Token not found');
112
+ }
113
+ [coin] = sendTransaction.splitCoins(coins[0].coinObjectId, [
114
+ nonNativeValue,
115
+ ]);
116
+ sendTransaction.transferObjects([coin], to);
117
+ }
118
+ if (value) {
119
+ [coin] = sendTransaction.splitCoins(sendTransaction.gas, [value]);
120
+ sendTransaction.transferObjects([coin], to);
121
+ }
106
122
  return sendTransaction;
107
123
  });
108
124
  }