@exodus/solana-api 3.27.1 → 3.27.2
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 +10 -0
- package/package.json +2 -2
- package/src/api.js +2 -6
- package/src/txs-utils.js +9 -0
- package/src/ws-api.js +2 -6
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.27.2](https://github.com/ExodusMovement/assets/compare/@exodus/solana-api@3.27.1...@exodus/solana-api@3.27.2) (2026-01-12)
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
### Bug Fixes
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
* fix: check SOL token txs signers (#7247)
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
|
|
6
16
|
## [3.27.1](https://github.com/ExodusMovement/assets/compare/@exodus/solana-api@3.27.0...@exodus/solana-api@3.27.1) (2026-01-09)
|
|
7
17
|
|
|
8
18
|
**Note:** Version bump only for package @exodus/solana-api
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@exodus/solana-api",
|
|
3
|
-
"version": "3.27.
|
|
3
|
+
"version": "3.27.2",
|
|
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",
|
|
@@ -49,7 +49,7 @@
|
|
|
49
49
|
"@exodus/assets-testing": "^1.0.0",
|
|
50
50
|
"@exodus/solana-web3.js": "^1.63.1-exodus.9-rc3"
|
|
51
51
|
},
|
|
52
|
-
"gitHead": "
|
|
52
|
+
"gitHead": "f12ac3b153051649bd7c8c3f23fb3653c1ec5a55",
|
|
53
53
|
"bugs": {
|
|
54
54
|
"url": "https://github.com/ExodusMovement/assets/issues?q=is%3Aissue+is%3Aopen+label%3Asolana-api"
|
|
55
55
|
},
|
package/src/api.js
CHANGED
|
@@ -22,6 +22,7 @@ import urljoin from 'url-join'
|
|
|
22
22
|
|
|
23
23
|
import { getStakeActivation } from './get-stake-activation/index.js'
|
|
24
24
|
import { parseTransaction } from './tx-parser.js'
|
|
25
|
+
import { isSolAddressPoisoningTx } from './txs-utils.js'
|
|
25
26
|
|
|
26
27
|
const createApi = createApiCJS.default || createApiCJS
|
|
27
28
|
|
|
@@ -232,12 +233,7 @@ export class Api {
|
|
|
232
233
|
})
|
|
233
234
|
|
|
234
235
|
if (!parsedTx.from && parsedTx.tokenTxs?.length === 0 && !includeUnparsed) return // cannot parse it
|
|
235
|
-
if (
|
|
236
|
-
!parsedTx.ownerIsFeePayer &&
|
|
237
|
-
parsedTx.error &&
|
|
238
|
-
parsedTx.from === address &&
|
|
239
|
-
!parsedTx.signers.includes(address)
|
|
240
|
-
) {
|
|
236
|
+
if (isSolAddressPoisoningTx({ parsedTx, address })) {
|
|
241
237
|
return
|
|
242
238
|
} // skip address poisoning txs attempts.
|
|
243
239
|
|
package/src/txs-utils.js
CHANGED
|
@@ -23,3 +23,12 @@ export const isSolTransferInstruction = ({ program, type }) =>
|
|
|
23
23
|
|
|
24
24
|
export const isSplMintInstruction = ({ program, type }) =>
|
|
25
25
|
program === 'spl-token' && MINT_INSTRUCTION_TYPES.has(type)
|
|
26
|
+
|
|
27
|
+
export const isSolAddressPoisoningTx = ({ parsedTx, address }) => {
|
|
28
|
+
return (
|
|
29
|
+
!parsedTx.ownerIsFeePayer &&
|
|
30
|
+
parsedTx.error &&
|
|
31
|
+
(parsedTx.from === address || parsedTx?.tokenTxs?.some((tx) => tx.from === address)) && // send tx
|
|
32
|
+
!parsedTx.signers.includes(address)
|
|
33
|
+
)
|
|
34
|
+
}
|
package/src/ws-api.js
CHANGED
|
@@ -3,6 +3,7 @@ import lodash from 'lodash'
|
|
|
3
3
|
|
|
4
4
|
import { Connection } from './connection.js'
|
|
5
5
|
import { parseTransaction } from './tx-parser.js'
|
|
6
|
+
import { isSolAddressPoisoningTx } from './txs-utils.js'
|
|
6
7
|
|
|
7
8
|
// Helius Advanced WebSocket
|
|
8
9
|
const WS_ENDPOINT = 'wss://solana-helius-wss.a.exodus.io/ws' // pointing to: wss://atlas-mainnet.helius-rpc.com/?api-key=<API_KEY>
|
|
@@ -150,12 +151,7 @@ export class WsApi {
|
|
|
150
151
|
const timestamp = Date.now() // the notification event has no blockTime
|
|
151
152
|
|
|
152
153
|
if (!parsedTx.from && parsedTx.tokenTxs?.length === 0) return { logItemsByAsset: {} } // cannot parse it
|
|
153
|
-
if (
|
|
154
|
-
!parsedTx.ownerIsFeePayer &&
|
|
155
|
-
parsedTx.error &&
|
|
156
|
-
parsedTx.from === address &&
|
|
157
|
-
!parsedTx.signers.includes(address)
|
|
158
|
-
) {
|
|
154
|
+
if (isSolAddressPoisoningTx({ parsedTx, address })) {
|
|
159
155
|
return { logItemsByAsset: {} } // skip address poisoning txs attempts.
|
|
160
156
|
}
|
|
161
157
|
|