@dynamic-labs/sui-core 4.38.0 → 4.40.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,25 @@
|
|
|
1
1
|
|
|
2
|
+
## [4.40.0](https://github.com/dynamic-labs/dynamic-auth/compare/v4.39.0...v4.40.0) (2025-10-22)
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
### Features
|
|
6
|
+
|
|
7
|
+
* add Wallet Connect Solana as a wallet option ([#9719](https://github.com/dynamic-labs/dynamic-auth/issues/9719)) ([ece5f6b](https://github.com/dynamic-labs/dynamic-auth/commit/ece5f6b36c1fbefdf05cf8203fe0fee0b2e8ed3d))
|
|
8
|
+
* make updates to crypto.com onramp flow ([#9746](https://github.com/dynamic-labs/dynamic-auth/issues/9746)) ([22040d2](https://github.com/dynamic-labs/dynamic-auth/commit/22040d28d0d66b84f5c3be9bed4cfce7f1978944))
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
### Bug Fixes
|
|
12
|
+
|
|
13
|
+
* return undefined if json payload is undefined in parse token ([#9750](https://github.com/dynamic-labs/dynamic-auth/issues/9750)) ([5751198](https://github.com/dynamic-labs/dynamic-auth/commit/575119867c93f89062e96e30c02b128161fb9675))
|
|
14
|
+
|
|
15
|
+
## [4.39.0](https://github.com/dynamic-labs/dynamic-auth/compare/v4.38.0...v4.39.0) (2025-10-17)
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
### Features
|
|
19
|
+
|
|
20
|
+
* 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)
|
|
21
|
+
* 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))
|
|
22
|
+
|
|
2
23
|
## [4.38.0](https://github.com/dynamic-labs/dynamic-auth/compare/v4.37.2...v4.38.0) (2025-10-14)
|
|
3
24
|
|
|
4
25
|
|
package/package.cjs
CHANGED
package/package.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dynamic-labs/sui-core",
|
|
3
|
-
"version": "4.
|
|
3
|
+
"version": "4.40.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.
|
|
21
|
+
"@dynamic-labs/sdk-api-core": "0.0.813",
|
|
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.
|
|
26
|
-
"@dynamic-labs/logger": "4.
|
|
27
|
-
"@dynamic-labs/rpc-providers": "4.
|
|
28
|
-
"@dynamic-labs/types": "4.
|
|
29
|
-
"@dynamic-labs/utils": "4.
|
|
30
|
-
"@dynamic-labs/wallet-book": "4.
|
|
31
|
-
"@dynamic-labs/wallet-connector-core": "4.
|
|
25
|
+
"@dynamic-labs/assert-package-version": "4.40.0",
|
|
26
|
+
"@dynamic-labs/logger": "4.40.0",
|
|
27
|
+
"@dynamic-labs/rpc-providers": "4.40.0",
|
|
28
|
+
"@dynamic-labs/types": "4.40.0",
|
|
29
|
+
"@dynamic-labs/utils": "4.40.0",
|
|
30
|
+
"@dynamic-labs/wallet-book": "4.40.0",
|
|
31
|
+
"@dynamic-labs/wallet-connector-core": "4.40.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
|
-
|
|
109
|
-
|
|
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
|
-
|
|
105
|
-
|
|
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
|
}
|