@exodus/solana-lib 3.15.0 → 3.15.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.15.1](https://github.com/ExodusMovement/assets/compare/@exodus/solana-lib@3.15.0...@exodus/solana-lib@3.15.1) (2025-10-30)
7
+
8
+
9
+ ### Bug Fixes
10
+
11
+
12
+ * fix: refactor U&$ toBuffer() (#6810)
13
+
14
+
15
+
6
16
  ## [3.15.0](https://github.com/ExodusMovement/assets/compare/@exodus/solana-lib@3.14.1...@exodus/solana-lib@3.15.0) (2025-10-29)
7
17
 
8
18
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@exodus/solana-lib",
3
- "version": "3.15.0",
3
+ "version": "3.15.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": "c29184f952c3131b60ffe91fd73f778085f00fca"
50
+ "gitHead": "9d712b3aad3011cee863c93accec6a552593bf61"
51
51
  }
@@ -1,8 +1,8 @@
1
1
  import { struct, u8 } from '@exodus/buffer-layout'
2
2
  import * as BufferLayout from '@exodus/buffer-layout'
3
+ import BN from 'bn.js'
3
4
 
4
5
  import { PublicKey, TransactionInstruction } from '../vendor/index.js'
5
- import { U64 } from './spl-token.js'
6
6
 
7
7
  /**
8
8
  * Layout for a 64bit unsigned value
@@ -11,6 +11,8 @@ const u64 = (property = 'uint64') => {
11
11
  return BufferLayout.blob(8, property)
12
12
  }
13
13
 
14
+ const toBufferU64 = (num) => Buffer.from(new BN(num).toArray('le', 8))
15
+
14
16
  // Extracted from https://github.com/solana-labs/solana-program-library/blob/token-js-v0.4.1/token/js/src/extensions/transferFee/instructions.ts
15
17
 
16
18
  export const TOKEN_2022_PROGRAM_ID = new PublicKey('TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb')
@@ -88,9 +90,9 @@ export function createTransferCheckedWithFeeInstruction(
88
90
  {
89
91
  instruction: TokenInstruction.TransferFeeExtension,
90
92
  transferFeeInstruction: TransferFeeInstruction.TransferCheckedWithFee,
91
- amount: new U64(amount.toString()).toBuffer(),
93
+ amount: toBufferU64(amount.toString()),
92
94
  decimals,
93
- fee: new U64(fee).toBuffer(),
95
+ fee: toBufferU64(fee),
94
96
  },
95
97
  data
96
98
  )