@exodus/solana-api 3.31.0 → 3.31.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,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.31.1](https://github.com/ExodusMovement/assets/compare/@exodus/solana-api@3.31.0...@exodus/solana-api@3.31.1) (2026-04-29)
7
+
8
+ **Note:** Version bump only for package @exodus/solana-api
9
+
10
+
11
+
12
+
13
+
6
14
  ## [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
15
 
8
16
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@exodus/solana-api",
3
- "version": "3.31.0",
3
+ "version": "3.31.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",
@@ -23,7 +23,7 @@
23
23
  "lint:fix": "yarn lint --fix"
24
24
  },
25
25
  "dependencies": {
26
- "@exodus/asset-json-rpc": "^1.0.0",
26
+ "@exodus/asset-json-rpc": "^2.0.2",
27
27
  "@exodus/asset-lib": "^5.7.0",
28
28
  "@exodus/assets": "^11.0.0",
29
29
  "@exodus/auth-client-base": "^2.2.0",
@@ -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": "e6887b3e8a29de0bdf71693dbcc16160376c183f",
52
+ "gitHead": "4bf6290a71108efdd1e20d48d7898dd7b38aff4d",
53
53
  "bugs": {
54
54
  "url": "https://github.com/ExodusMovement/assets/issues?q=is%3Aissue+is%3Aopen+label%3Asolana-api"
55
55
  },
package/src/fee-payer.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import { createClient as createAuthClient } from '@exodus/auth-client-base'
2
2
  import { signAttached } from '@exodus/crypto/ed25519'
3
- import { fetchival } from '@exodus/fetch'
3
+ import { fetch as exodusFetch, fetchival } from '@exodus/fetch'
4
4
  import {
5
5
  deserializeTransaction,
6
6
  prepareForSigning,
@@ -21,18 +21,30 @@ import { getAuthKeyPair } from './auth.js'
21
21
  *
22
22
  * @param {Object} config - Configuration for the fee payer client
23
23
  * @param {string} config.assetName - The asset from the transaction
24
- * @param {string} config.serviceUrl - The fee payer service URL
24
+ * @param {string} config.feePayerApiUrl - The fee payer service URL
25
25
  * @param {boolean} [config.requireAuthentication=false] - Whether the service requires authentication
26
- * @param {Function} [config.isEligibleForSponsorship] - Eligibility checker function (defaults to allowing all)
26
+ * @param {Object} [config.headers] - Headers to include in fee payer service requests
27
+ * @param {Object} [config.metadata] - Metadata forwarded to the auth client
27
28
  */
28
29
  export const feePayerClientFactory = ({
29
30
  assetName = 'solana', // baseAsset name
30
31
  feePayerApiUrl,
31
32
  requireAuthentication = false,
32
33
  authKeyPair: customAuthKeyPair = null,
34
+ headers: defaultHeaders = {},
35
+ metadata = {},
33
36
  } = {}) => {
34
37
  assert(feePayerApiUrl, 'feePayerApiUrl is required')
35
38
 
39
+ const fetchWithHeaders = (url, options = {}) =>
40
+ exodusFetch(url, {
41
+ ...options,
42
+ headers: {
43
+ ...defaultHeaders,
44
+ ...options.headers,
45
+ },
46
+ })
47
+
36
48
  // Create auth client if authentication is required
37
49
  let authClient = null
38
50
  if (requireAuthentication) {
@@ -45,17 +57,23 @@ export const feePayerClientFactory = ({
45
57
  }
46
58
 
47
59
  authClient = createAuthClient({
60
+ fetch: fetchWithHeaders,
48
61
  config: {
49
62
  keyPair,
50
63
  baseUrl: feePayerApiUrl,
51
64
  authTokenUrl: `${feePayerApiUrl}/auth/token`,
52
65
  authChallengeUrl: `${feePayerApiUrl}/auth/challenge`,
53
66
  },
67
+ metadata,
54
68
  })
55
69
  }
56
70
 
57
71
  const makeSponsorRequest = async ({ encodedTransaction }) => {
58
- const headers = { Accept: 'application/json', 'Content-Type': 'application/json' }
72
+ const headers = {
73
+ ...defaultHeaders,
74
+ Accept: 'application/json',
75
+ 'Content-Type': 'application/json',
76
+ }
59
77
 
60
78
  if (requireAuthentication && authClient) {
61
79
  await authClient._awaitAuthenticated()