@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 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
@@ -3,6 +3,6 @@
3
3
 
4
4
  Object.defineProperty(exports, '__esModule', { value: true });
5
5
 
6
- var version = "4.78.1";
6
+ var version = "4.79.0";
7
7
 
8
8
  exports.version = version;
package/package.js CHANGED
@@ -1,4 +1,4 @@
1
1
  'use client'
2
- var version = "4.78.1";
2
+ var version = "4.79.0";
3
3
 
4
4
  export { version };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dynamic-labs/solana-core",
3
- "version": "4.78.1",
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.927",
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.78.1",
25
- "@dynamic-labs/rpc-providers": "4.78.1",
26
- "@dynamic-labs/types": "4.78.1",
27
- "@dynamic-labs/utils": "4.78.1",
28
- "@dynamic-labs/wallet-book": "4.78.1",
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, BigInt(Number(amount) * Math.pow(10, tokenDecimals)), tokenDecimals, [], tokenProgramId));
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;
@@ -4,7 +4,7 @@ export declare const createNonNativeTokenTransfer: ({ connection, fromAddress, t
4
4
  fromAddress: string;
5
5
  toAddress: string;
6
6
  tokenAddress: string;
7
- amount: number;
7
+ amount: string;
8
8
  blockhash: string;
9
9
  lastValidBlockHeight: number;
10
10
  decimals?: number;
@@ -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, BigInt(Number(amount) * Math.pow(10, tokenDecimals)), tokenDecimals, [], tokenProgramId));
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: Number(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: Number(amount),
25
+ amount,
26
26
  blockhash,
27
27
  connection,
28
28
  decimals: token.decimals,