@dynamic-labs/solana-core 4.78.1 → 4.79.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 +12 -0
- package/package.cjs +1 -1
- package/package.js +1 -1
- package/package.json +8 -8
- package/src/utils/createNonNativeTokenTransfer/createNonNativeTokenTransfer.cjs +5 -1
- package/src/utils/createNonNativeTokenTransfer/createNonNativeTokenTransfer.d.ts +1 -1
- package/src/utils/createNonNativeTokenTransfer/createNonNativeTokenTransfer.js +5 -1
- package/src/wallet/SolanaWallet.cjs +1 -1
- package/src/wallet/SolanaWallet.js +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,4 +1,16 @@
|
|
|
1
1
|
|
|
2
|
+
## [4.79.0](https://github.com/dynamic-labs/dynamic-auth/compare/v4.78.1...v4.79.0) (2026-04-30)
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
### Features
|
|
6
|
+
|
|
7
|
+
* **sdk-react-core:** two-layer Google Drive backup access defense [DYNT-754] ([#11069](https://github.com/dynamic-labs/dynamic-auth/issues/11069)) ([1ff8b83](https://github.com/dynamic-labs/dynamic-auth/commit/1ff8b83f9c7ba077c586513a250f6aed114e4b07))
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
### Bug Fixes
|
|
11
|
+
|
|
12
|
+
* **solana-core,sui-core:** prevent RangeError on send balance ([#11071](https://github.com/dynamic-labs/dynamic-auth/issues/11071)) ([21f5f97](https://github.com/dynamic-labs/dynamic-auth/commit/21f5f9724c788053774ce5eaa19f073af9a33d27))
|
|
13
|
+
|
|
2
14
|
### [4.78.1](https://github.com/dynamic-labs/dynamic-auth/compare/v4.78.0...v4.78.1) (2026-04-29)
|
|
3
15
|
|
|
4
16
|
|
package/package.cjs
CHANGED
package/package.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dynamic-labs/solana-core",
|
|
3
|
-
"version": "4.
|
|
3
|
+
"version": "4.79.0",
|
|
4
4
|
"description": "Core package for utilities and types for solana",
|
|
5
5
|
"author": "Dynamic Labs, Inc.",
|
|
6
6
|
"license": "MIT",
|
|
@@ -18,15 +18,15 @@
|
|
|
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.956",
|
|
22
|
+
"@dynamic-labs/utils": "4.79.0",
|
|
22
23
|
"@solana/web3.js": "1.98.1",
|
|
23
24
|
"@solana/spl-token": "0.4.14",
|
|
24
|
-
"@dynamic-labs/assert-package-version": "4.
|
|
25
|
-
"@dynamic-labs/rpc-providers": "4.
|
|
26
|
-
"@dynamic-labs/types": "4.
|
|
27
|
-
"@dynamic-labs/
|
|
28
|
-
"@dynamic-labs/wallet-
|
|
29
|
-
"@dynamic-labs/wallet-connector-core": "4.78.1",
|
|
25
|
+
"@dynamic-labs/assert-package-version": "4.79.0",
|
|
26
|
+
"@dynamic-labs/rpc-providers": "4.79.0",
|
|
27
|
+
"@dynamic-labs/types": "4.79.0",
|
|
28
|
+
"@dynamic-labs/wallet-book": "4.79.0",
|
|
29
|
+
"@dynamic-labs/wallet-connector-core": "4.79.0",
|
|
30
30
|
"eventemitter3": "5.0.1"
|
|
31
31
|
},
|
|
32
32
|
"peerDependencies": {}
|
|
@@ -6,6 +6,7 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
6
6
|
var _tslib = require('../../../_virtual/_tslib.cjs');
|
|
7
7
|
var splToken = require('@solana/spl-token');
|
|
8
8
|
var web3_js = require('@solana/web3.js');
|
|
9
|
+
var utils = require('@dynamic-labs/utils');
|
|
9
10
|
|
|
10
11
|
const createNonNativeTokenTransfer = (_a) => _tslib.__awaiter(void 0, [_a], void 0, function* ({ connection, fromAddress, toAddress, tokenAddress, amount, decimals, blockhash, lastValidBlockHeight, }) {
|
|
11
12
|
var _b, _c;
|
|
@@ -32,7 +33,10 @@ const createNonNativeTokenTransfer = (_a) => _tslib.__awaiter(void 0, [_a], void
|
|
|
32
33
|
instructions.push(splToken.createAssociatedTokenAccountInstruction(fromPublicKey, toTokenAccountPubkey, toPublicKey, tokenPublicKey, tokenProgramId));
|
|
33
34
|
}
|
|
34
35
|
const tokenDecimals = decimals || 0;
|
|
35
|
-
instructions.push(splToken.createTransferCheckedInstruction(fromTokenAccount, tokenPublicKey, toTokenAccountPubkey, fromPublicKey,
|
|
36
|
+
instructions.push(splToken.createTransferCheckedInstruction(fromTokenAccount, tokenPublicKey, toTokenAccountPubkey, fromPublicKey, utils.parseAmountToSmallestUnit({
|
|
37
|
+
amount,
|
|
38
|
+
decimals: tokenDecimals,
|
|
39
|
+
}), tokenDecimals, [], tokenProgramId));
|
|
36
40
|
const transaction = new web3_js.Transaction().add(...instructions);
|
|
37
41
|
transaction.recentBlockhash = blockhash;
|
|
38
42
|
transaction.lastValidBlockHeight = lastValidBlockHeight;
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
import { __awaiter } from '../../../_virtual/_tslib.js';
|
|
3
3
|
import { TOKEN_2022_PROGRAM_ID, TOKEN_PROGRAM_ID, getAssociatedTokenAddress, createAssociatedTokenAccountInstruction, createTransferCheckedInstruction } from '@solana/spl-token';
|
|
4
4
|
import { PublicKey, Transaction } from '@solana/web3.js';
|
|
5
|
+
import { parseAmountToSmallestUnit } from '@dynamic-labs/utils';
|
|
5
6
|
|
|
6
7
|
const createNonNativeTokenTransfer = (_a) => __awaiter(void 0, [_a], void 0, function* ({ connection, fromAddress, toAddress, tokenAddress, amount, decimals, blockhash, lastValidBlockHeight, }) {
|
|
7
8
|
var _b, _c;
|
|
@@ -28,7 +29,10 @@ const createNonNativeTokenTransfer = (_a) => __awaiter(void 0, [_a], void 0, fun
|
|
|
28
29
|
instructions.push(createAssociatedTokenAccountInstruction(fromPublicKey, toTokenAccountPubkey, toPublicKey, tokenPublicKey, tokenProgramId));
|
|
29
30
|
}
|
|
30
31
|
const tokenDecimals = decimals || 0;
|
|
31
|
-
instructions.push(createTransferCheckedInstruction(fromTokenAccount, tokenPublicKey, toTokenAccountPubkey, fromPublicKey,
|
|
32
|
+
instructions.push(createTransferCheckedInstruction(fromTokenAccount, tokenPublicKey, toTokenAccountPubkey, fromPublicKey, parseAmountToSmallestUnit({
|
|
33
|
+
amount,
|
|
34
|
+
decimals: tokenDecimals,
|
|
35
|
+
}), tokenDecimals, [], tokenProgramId));
|
|
32
36
|
const transaction = new Transaction().add(...instructions);
|
|
33
37
|
transaction.recentBlockhash = blockhash;
|
|
34
38
|
transaction.lastValidBlockHeight = lastValidBlockHeight;
|
|
@@ -26,7 +26,7 @@ class SolanaWallet extends walletConnectorCore.Wallet {
|
|
|
26
26
|
const { blockhash, lastValidBlockHeight } = yield connection.getLatestBlockhash('finalized');
|
|
27
27
|
if (token === null || token === void 0 ? void 0 : token.address) {
|
|
28
28
|
transaction = yield createNonNativeTokenTransfer.createNonNativeTokenTransfer({
|
|
29
|
-
amount
|
|
29
|
+
amount,
|
|
30
30
|
blockhash,
|
|
31
31
|
connection,
|
|
32
32
|
decimals: token.decimals,
|
|
@@ -22,7 +22,7 @@ class SolanaWallet extends Wallet {
|
|
|
22
22
|
const { blockhash, lastValidBlockHeight } = yield connection.getLatestBlockhash('finalized');
|
|
23
23
|
if (token === null || token === void 0 ? void 0 : token.address) {
|
|
24
24
|
transaction = yield createNonNativeTokenTransfer({
|
|
25
|
-
amount
|
|
25
|
+
amount,
|
|
26
26
|
blockhash,
|
|
27
27
|
connection,
|
|
28
28
|
decimals: token.decimals,
|