@exodus/solana-api 3.16.0 → 3.17.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 +20 -0
- package/package.json +3 -2
- package/src/create-unsigned-tx-for-send.js +16 -13
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,26 @@
|
|
|
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.17.1](https://github.com/ExodusMovement/assets/compare/@exodus/solana-api@3.17.0...@exodus/solana-api@3.17.1) (2025-04-11)
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
### Bug Fixes
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
* fix(solana): don't estimate without fee payer if one is provided (#5435)
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
## [3.17.0](https://github.com/ExodusMovement/assets/compare/@exodus/solana-api@3.16.0...@exodus/solana-api@3.17.0) (2025-04-09)
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
### Features
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
* feat: demote batch of Solana tokens (#5411)
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
|
|
6
26
|
## [3.16.0](https://github.com/ExodusMovement/assets/compare/@exodus/solana-api@3.15.1...@exodus/solana-api@3.16.0) (2025-04-08)
|
|
7
27
|
|
|
8
28
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@exodus/solana-api",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.17.1",
|
|
4
4
|
"description": "Transaction monitors, fee monitors, RPC with the blockchain node, and other networking code for Solana",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "src/index.js",
|
|
@@ -43,10 +43,11 @@
|
|
|
43
43
|
"url-join": "^4.0.0"
|
|
44
44
|
},
|
|
45
45
|
"devDependencies": {
|
|
46
|
+
"@exodus/asset": "^2.0.2",
|
|
46
47
|
"@exodus/assets-testing": "^1.0.0",
|
|
47
48
|
"@exodus/solana-web3.js": "^1.63.1-exodus.9-rc3"
|
|
48
49
|
},
|
|
49
|
-
"gitHead": "
|
|
50
|
+
"gitHead": "f0b2b4a3a3dab9be7d36f6d4118c50204c25f40e",
|
|
50
51
|
"bugs": {
|
|
51
52
|
"url": "https://github.com/ExodusMovement/assets/issues?q=is%3Aissue+is%3Aopen+label%3Asolana-api"
|
|
52
53
|
},
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { fetchival } from '@exodus/fetch'
|
|
1
2
|
import {
|
|
2
3
|
createUnsignedTx,
|
|
3
4
|
deserializeTransaction,
|
|
@@ -159,9 +160,17 @@ export const createUnsignedTxForSend = async ({
|
|
|
159
160
|
return 150 + CU_FOR_COMPUTE_BUDGET_INSTRUCTIONS
|
|
160
161
|
}
|
|
161
162
|
|
|
162
|
-
const transactionForFeeEstimation =
|
|
163
|
+
const transactionForFeeEstimation = await maybeAddFeePayer({
|
|
164
|
+
unsignedTx,
|
|
165
|
+
feePayerApiUrl,
|
|
166
|
+
assetName: asset.baseAsset.name,
|
|
167
|
+
})
|
|
168
|
+
const message = transactionForFeeEstimation.txMeta.usedFeePayer
|
|
169
|
+
? deserializeTransaction(transactionForFeeEstimation.txData.transactionBuffer).message
|
|
170
|
+
: prepareForSigning(transactionForFeeEstimation).message
|
|
171
|
+
|
|
163
172
|
const { unitsConsumed, err } = await api.simulateUnsignedTransaction({
|
|
164
|
-
message
|
|
173
|
+
message,
|
|
165
174
|
})
|
|
166
175
|
if (err) throw new Error(JSON.stringify(err))
|
|
167
176
|
return unitsConsumed + CU_FOR_COMPUTE_BUDGET_INSTRUCTIONS
|
|
@@ -215,7 +224,6 @@ export const createUnsignedTxForSend = async ({
|
|
|
215
224
|
unsignedTx,
|
|
216
225
|
feePayerApiUrl,
|
|
217
226
|
assetName: asset.baseAsset.name,
|
|
218
|
-
useFeePayer,
|
|
219
227
|
})
|
|
220
228
|
}
|
|
221
229
|
|
|
@@ -247,17 +255,12 @@ export const maybeAddFeePayer = async ({ unsignedTx, feePayerApiUrl, assetName }
|
|
|
247
255
|
try {
|
|
248
256
|
const unsignedTxVersionedTransaction = prepareForSigning(unsignedTx)
|
|
249
257
|
|
|
250
|
-
const
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
body: JSON.stringify({
|
|
256
|
-
assetName,
|
|
257
|
-
transaction: Buffer.from(unsignedTxVersionedTransaction.serialize()).toString('base64'),
|
|
258
|
-
}),
|
|
258
|
+
const { transaction: newTransactionString } = await fetchival(
|
|
259
|
+
new URL(feePayerApiUrl).toString()
|
|
260
|
+
).post({
|
|
261
|
+
assetName,
|
|
262
|
+
transaction: Buffer.from(unsignedTxVersionedTransaction.serialize()).toString('base64'),
|
|
259
263
|
})
|
|
260
|
-
const { transaction: newTransactionString } = await newTransactionResponse.json()
|
|
261
264
|
|
|
262
265
|
const newTransactionBuffer = Buffer.from(newTransactionString, 'base64')
|
|
263
266
|
const newTransaction = deserializeTransaction(newTransactionBuffer)
|