@exodus/solana-lib 3.18.0 → 3.18.1

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
@@ -3,6 +3,16 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
+ ## [3.18.1](https://github.com/ExodusMovement/assets/compare/@exodus/solana-lib@3.18.0...@exodus/solana-lib@3.18.1) (2025-12-15)
7
+
8
+
9
+ ### Bug Fixes
10
+
11
+
12
+ * fix: check SOL transactionBuffer type (#7111)
13
+
14
+
15
+
6
16
  ## [3.18.0](https://github.com/ExodusMovement/assets/compare/@exodus/solana-lib@3.15.3...@exodus/solana-lib@3.18.0) (2025-11-26)
7
17
 
8
18
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@exodus/solana-lib",
3
- "version": "3.18.0",
3
+ "version": "3.18.1",
4
4
  "description": "Solana utils, such as for cryptography, address encoding/decoding, transaction building, etc.",
5
5
  "type": "module",
6
6
  "main": "src/index.js",
@@ -47,5 +47,5 @@
47
47
  "type": "git",
48
48
  "url": "git+https://github.com/ExodusMovement/assets.git"
49
49
  },
50
- "gitHead": "4c60cc2d7f07229295b801d9f67a336d314711a0"
50
+ "gitHead": "76314e6813c7b8c01a3c852cac1228be3820356d"
51
51
  }
package/src/tx/common.js CHANGED
@@ -1,5 +1,6 @@
1
1
  import { VersionedTransaction } from '@exodus/solana-web3.js'
2
2
  import base58 from 'bs58'
3
+ import assert from 'minimalistic-assert'
3
4
 
4
5
  export function isVersionedTransaction(tx) {
5
6
  return Number.isInteger(tx.version)
@@ -14,6 +15,7 @@ export function transactionToBase58(tx) {
14
15
  }
15
16
 
16
17
  export function deserializeTransaction(tx) {
18
+ assert(tx instanceof Uint8Array, 'tx must be a Buffer or Uint8Array')
17
19
  return VersionedTransaction.deserialize(tx)
18
20
  }
19
21
 
@@ -1,6 +1,7 @@
1
1
  import { isNumberUnit } from '@exodus/currency'
2
2
  import { VersionedTransaction } from '@exodus/solana-web3.js'
3
3
  import BN from 'bn.js'
4
+ import assert from 'minimalistic-assert'
4
5
 
5
6
  import { createMetaplexTransferTransaction } from '../helpers/metaplex-transfer.js'
6
7
  import Transaction from '../transaction.js'
@@ -42,6 +43,10 @@ export function prepareForSigning(unsignedTx, { checkBalances = true } = {}) {
42
43
 
43
44
  // Recreate a Web3.js Transaction instance if the buffer provided.
44
45
  if (transactionBuffer) {
46
+ assert(
47
+ unsignedTx.txData.transactionBuffer instanceof Uint8Array,
48
+ 'transactionBuffer must be a Buffer or Uint8Array'
49
+ )
45
50
  return deserializeTransactionBytes(transactionBuffer)
46
51
  }
47
52