@exodus/solana-api 3.30.5 → 3.30.6

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,14 @@
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.30.6](https://github.com/ExodusMovement/assets/compare/@exodus/solana-api@3.30.5...@exodus/solana-api@3.30.6) (2026-03-30)
7
+
8
+ **Note:** Version bump only for package @exodus/solana-api
9
+
10
+
11
+
12
+
13
+
6
14
  ## [3.30.5](https://github.com/ExodusMovement/assets/compare/@exodus/solana-api@3.30.4...@exodus/solana-api@3.30.5) (2026-03-27)
7
15
 
8
16
  **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.30.5",
3
+ "version": "3.30.6",
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",
@@ -33,7 +33,7 @@
33
33
  "@exodus/fetch": "^1.7.3",
34
34
  "@exodus/models": "^13.0.0",
35
35
  "@exodus/simple-retry": "^0.0.6",
36
- "@exodus/solana-lib": "^3.22.2",
36
+ "@exodus/solana-lib": "^3.22.3",
37
37
  "@exodus/solana-meta": "^2.0.2",
38
38
  "@exodus/timer": "^1.1.1",
39
39
  "debug": "^4.1.1",
@@ -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": "07a8157aec179f656835db50568127788d4b91b6",
52
+ "gitHead": "0d8639ef50e192df1f302f0ac7ff378d919cc536",
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
@@ -12,9 +12,10 @@ import {
12
12
  findAssociatedTokenAddress,
13
13
  getMetadataAccount,
14
14
  getTransactionSimulationParams,
15
+ isSystemProgram,
16
+ isTokenProgram,
15
17
  SOL_DECIMAL,
16
18
  STAKE_PROGRAM_ID,
17
- SYSTEM_PROGRAM_ID,
18
19
  TOKEN_2022_PROGRAM_ID,
19
20
  TOKEN_PROGRAM_ID,
20
21
  } from '@exodus/solana-lib'
@@ -455,11 +456,7 @@ export class Api {
455
456
  const value = accountInfo || (await this.getAccountInfo(address))
456
457
  const owner = value?.owner // program owner
457
458
  if (!owner) return false // not initialized account (or purged)
458
- return ![
459
- SYSTEM_PROGRAM_ID.toBase58(),
460
- TOKEN_PROGRAM_ID.toBase58(),
461
- TOKEN_2022_PROGRAM_ID.toBase58(),
462
- ].includes(owner)
459
+ return !(isSystemProgram(owner) || isTokenProgram(owner))
463
460
  }
464
461
 
465
462
  async fetchValidatedDelegation({ delegatedAddress, expectedDelegate }) {
@@ -552,7 +549,7 @@ export class Api {
552
549
  lamports: value.lamports,
553
550
  }
554
551
 
555
- if (account.owner === SYSTEM_PROGRAM_ID.toBase58()) return 'solana'
552
+ if (isSystemProgram(account.owner)) return 'solana'
556
553
  if (account.owner === TOKEN_PROGRAM_ID.toBase58()) return 'token'
557
554
  if (account.owner === TOKEN_2022_PROGRAM_ID.toBase58()) return 'token-2022'
558
555
  return null
@@ -1,7 +1,7 @@
1
1
  import { memoizeLruCache } from '@exodus/asset-lib'
2
2
  import { isNil, memoize, omitBy } from '@exodus/basic-utils'
3
3
  import wretch from '@exodus/fetch/wretch'
4
- import { SYSTEM_PROGRAM_ID, TOKEN_2022_PROGRAM_ID, TOKEN_PROGRAM_ID } from '@exodus/solana-lib'
4
+ import { isSystemProgram, isTokenProgram, TOKEN_PROGRAM_ID } from '@exodus/solana-lib'
5
5
  import ms from 'ms'
6
6
  import urljoin from 'url-join'
7
7
 
@@ -205,11 +205,7 @@ export class ClarityApi extends RpcApi {
205
205
  const value = accountInfo || (await this.getAccountInfo(address))
206
206
  const owner = value?.owner // program owner
207
207
  if (!owner) return false // not initialized account (or purged)
208
- return ![
209
- SYSTEM_PROGRAM_ID.toBase58(),
210
- TOKEN_PROGRAM_ID.toBase58(),
211
- TOKEN_2022_PROGRAM_ID.toBase58(),
212
- ].includes(owner)
208
+ return !(isSystemProgram(owner) || isTokenProgram(owner))
213
209
  }
214
210
 
215
211
  ataOwnershipChangedCached = memoizeLruCache(
package/src/rpc-api.js CHANGED
@@ -10,8 +10,9 @@ import {
10
10
  findAssociatedTokenAddress,
11
11
  getMetadataAccount,
12
12
  getTransactionSimulationParams,
13
+ isSystemProgram,
14
+ isTokenProgram,
13
15
  SOL_DECIMAL,
14
- SYSTEM_PROGRAM_ID as SYSTEM_PROGRAM_ID_KEY,
15
16
  TOKEN_2022_PROGRAM_ID as TOKEN_2022_PROGRAM_ID_KEY,
16
17
  TOKEN_PROGRAM_ID as TOKEN_PROGRAM_ID_KEY,
17
18
  } from '@exodus/solana-lib'
@@ -24,8 +25,7 @@ import {
24
25
  fetchValidatedDelegation as _fetchValidatedDelegation,
25
26
  } from './tx-log/delegation-utils.js'
26
27
 
27
- const [SYSTEM_PROGRAM_ID, TOKEN_PROGRAM_ID, TOKEN_2022_PROGRAM_ID] = [
28
- SYSTEM_PROGRAM_ID_KEY.toBase58(),
28
+ const [TOKEN_PROGRAM_ID, TOKEN_2022_PROGRAM_ID] = [
29
29
  TOKEN_PROGRAM_ID_KEY.toBase58(),
30
30
  TOKEN_2022_PROGRAM_ID_KEY.toBase58(),
31
31
  ]
@@ -217,7 +217,7 @@ export class RpcApi {
217
217
 
218
218
  async isSpl(address) {
219
219
  const { owner } = await this.getAccountInfo(address)
220
- return [TOKEN_PROGRAM_ID, TOKEN_2022_PROGRAM_ID].includes(owner)
220
+ return isTokenProgram(owner)
221
221
  }
222
222
 
223
223
  async getRawAccountInfo({ address, encoding = 'jsonParsed' }) {
@@ -292,7 +292,7 @@ export class RpcApi {
292
292
  lamports: value.lamports,
293
293
  }
294
294
 
295
- if (account.owner === SYSTEM_PROGRAM_ID) return 'solana'
295
+ if (isSystemProgram(account.owner)) return 'solana'
296
296
  if (account.owner === TOKEN_PROGRAM_ID) return 'token'
297
297
  if (account.owner === TOKEN_2022_PROGRAM_ID) return 'token-2022'
298
298
  return null
package/src/ws-api.js CHANGED
@@ -1,4 +1,5 @@
1
1
  import {
2
+ isSystemProgram,
2
3
  isTokenProgram,
3
4
  PublicKey,
4
5
  Token,
@@ -392,8 +393,7 @@ export class WsApi {
392
393
  */
393
394
  parseAccountNotification({ address, walletAccount, tokenAccountsByOwner, result }) {
394
395
  const value = result?.value ?? result // support both { context, value } and flat result
395
- const isSolAccount = value.owner === '11111111111111111111111111111111' // System Program
396
- if (isSolAccount) {
396
+ if (isSystemProgram(value.owner)) {
397
397
  // SOL balance changed
398
398
  const amount = value.lamports
399
399
  return { solAddress: address, amount }