@exodus/solana-api 3.30.12 → 3.31.0

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.31.0](https://github.com/ExodusMovement/assets/compare/@exodus/solana-api@3.30.12...@exodus/solana-api@3.31.0) (2026-04-23)
7
+
8
+
9
+ ### Features
10
+
11
+
12
+ * feat: add passing headers to solana api and wretch (#7846)
13
+
14
+
15
+
6
16
  ## [3.30.12](https://github.com/ExodusMovement/assets/compare/@exodus/solana-api@3.30.10...@exodus/solana-api@3.30.12) (2026-04-17)
7
17
 
8
18
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@exodus/solana-api",
3
- "version": "3.30.12",
3
+ "version": "3.31.0",
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": "b9d3ed1f39f0337b6be02ef90b37e0646ba9c384",
52
+ "gitHead": "e6887b3e8a29de0bdf71693dbcc16160376c183f",
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
@@ -47,7 +47,8 @@ const TX_DETAIL_FETCH_CONCURRENCY = 10
47
47
 
48
48
  // Tokens + SOL api support
49
49
  export class Api {
50
- constructor({ rpcUrl, wsUrl, assets, txsLimit }) {
50
+ constructor({ rpcUrl, wsUrl, assets, txsLimit, headers = {} } = {}) {
51
+ this.headers = headers
51
52
  this.setServer(rpcUrl)
52
53
  this.setTokens(assets)
53
54
  this.tokensToSkip = {}
@@ -73,7 +74,12 @@ export class Api {
73
74
 
74
75
  setServer(rpcUrl) {
75
76
  this.rpcUrl = rpcUrl || RPC_URL
76
- this.api = createApi(this.rpcUrl)
77
+ const options = {}
78
+ if (this.headers) {
79
+ options.headers = this.headers
80
+ }
81
+
82
+ this.api = createApi(this.rpcUrl, options)
77
83
  }
78
84
 
79
85
  setTokens(assets = {}) {