@exodus/solana-plugin 1.39.2 → 1.39.3

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
+ ## [1.39.3](https://github.com/ExodusMovement/assets/compare/@exodus/solana-plugin@1.39.2...@exodus/solana-plugin@1.39.3) (2026-06-18)
7
+
8
+ **Note:** Version bump only for package @exodus/solana-plugin
9
+
10
+
11
+
12
+
13
+
6
14
  ## [1.39.2](https://github.com/ExodusMovement/assets/compare/@exodus/solana-plugin@1.39.1...@exodus/solana-plugin@1.39.2) (2026-05-29)
7
15
 
8
16
  **Note:** Version bump only for package @exodus/solana-plugin
package/README.md CHANGED
@@ -28,7 +28,6 @@ import ms from 'ms'
28
28
 
29
29
  const DEFAULT_ACCOUNT_RESERVE = 0.01
30
30
  const DEFAULT_LOW_BALANCE = 0.01
31
- const DEFAULT_MIN_STAKING_AMOUNT = 0.01
32
31
 
33
32
  const asset = createAsset({
34
33
  assetClientInterface,
@@ -39,7 +38,6 @@ const asset = createAsset({
39
38
  shouldUpdateBalanceBeforeHistory: true,
40
39
  defaultAccountReserve: DEFAULT_ACCOUNT_RESERVE,
41
40
  defaultLowBalance: DEFAULT_LOW_BALANCE,
42
- defaultMinStakingAmount: DEFAULT_MIN_STAKING_AMOUNT,
43
41
  ticksBetweenHistoryFetches,
44
42
  ticksBetweenStakeFetches,
45
43
  txsLimit,
@@ -66,7 +64,6 @@ Creates a factory function for creating Solana assets.
66
64
  - `shouldUpdateBalanceBeforeHistory` (Boolean): Indicates if we should update balance independently from history.
67
65
  - `defaultAccountReserve` (Number): Default reserve amount for accounts.
68
66
  - `defaultLowBalance` (Number): Default low balance threshold.
69
- - `defaultMinStakingAmount` (Number): Default minimum staking amount.
70
67
  - `ticksBetweenHistoryFetches` (Number): Number of ticks between history fetches.
71
68
  - `ticksBetweenStakeFetches` (Number): Number of ticks between stake fetches.
72
69
  - `txsLimit` (Number): Limit for the number of transactions.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@exodus/solana-plugin",
3
- "version": "1.39.2",
3
+ "version": "1.39.3",
4
4
  "description": "Solana plugin for Exodus SDK powered wallets.",
5
5
  "type": "module",
6
6
  "main": "src/index.js",
@@ -28,8 +28,8 @@
28
28
  "@exodus/bip44-constants": "^195.0.0",
29
29
  "@exodus/i18n-dummy": "^1.0.0",
30
30
  "@exodus/send-validation-model": "^1.0.0",
31
- "@exodus/solana-api": "^3.34.2",
32
- "@exodus/solana-lib": "^3.24.0",
31
+ "@exodus/solana-api": "^3.35.2",
32
+ "@exodus/solana-lib": "^3.25.0",
33
33
  "@exodus/solana-meta": "^2.9.0",
34
34
  "@exodus/web3-solana-utils": "^2.9.0",
35
35
  "minimalistic-assert": "^1.0.1",
@@ -45,5 +45,5 @@
45
45
  "type": "git",
46
46
  "url": "git+https://github.com/ExodusMovement/assets.git"
47
47
  },
48
- "gitHead": "7665ead52972d791302200cca2d33dfb247d58d8"
48
+ "gitHead": "4405d203c9da98ac38c4daf8854dddde749814a9"
49
49
  }
@@ -7,6 +7,7 @@ import {
7
7
  createAccountState,
8
8
  createAndBroadcastTXFactory,
9
9
  createInitAgentWalletFactory,
10
+ createRecoverNestedAccountsFactory,
10
11
  createTokenDelegationFactory,
11
12
  createTxFactory,
12
13
  feePayerClientFactory,
@@ -40,7 +41,19 @@ import { createWeb3API } from './web3/index.js'
40
41
 
41
42
  const DEFAULT_ACCOUNT_RESERVE = 0
42
43
  const DEFAULT_LOW_BALANCE = 0.01
43
- const DEFAULT_MIN_STAKING_AMOUNT = 0.01
44
+ const STAKE_ACCOUNT_SIZE = 200
45
+
46
+ const normalizePositiveIntegerLamports = (value, errorMessage) => {
47
+ if (typeof value === 'number' && Number.isInteger(value) && value > 0) {
48
+ return String(value)
49
+ }
50
+
51
+ if (typeof value === 'string' && /^[1-9]\d*$/.test(value)) {
52
+ return value
53
+ }
54
+
55
+ throw new Error(errorMessage)
56
+ }
44
57
 
45
58
  export const createSolanaAssetFactory =
46
59
  ({ assetList, rpcUrl, isTestnet = false }) =>
@@ -55,7 +68,6 @@ export const createSolanaAssetFactory =
55
68
  shouldUpdateBalanceBeforeHistory = true,
56
69
  defaultAccountReserve = DEFAULT_ACCOUNT_RESERVE,
57
70
  defaultLowBalance = DEFAULT_LOW_BALANCE,
58
- defaultMinStakingAmount = DEFAULT_MIN_STAKING_AMOUNT,
59
71
  ticksBetweenHistoryFetches,
60
72
  ticksBetweenStakeFetches,
61
73
  txsLimit,
@@ -82,10 +94,6 @@ export const createSolanaAssetFactory =
82
94
 
83
95
  const lowBalance = base.currency.defaultUnit(defaultLowBalance ?? DEFAULT_LOW_BALANCE)
84
96
 
85
- const MIN_STAKING_AMOUNT = base.currency.defaultUnit(
86
- defaultMinStakingAmount ?? DEFAULT_MIN_STAKING_AMOUNT
87
- )
88
-
89
97
  const address = {
90
98
  validate: isValidAddress,
91
99
  }
@@ -181,6 +189,24 @@ export const createSolanaAssetFactory =
181
189
 
182
190
  const assetStakingApi = {
183
191
  ...stakingApi,
192
+ getMinimumDelegation: async () => {
193
+ const [minimumDelegation, stakeAccountRent] = await Promise.all([
194
+ defaultApi.getStakeMinimumDelegation(),
195
+ defaultApi.getMinimumBalanceForRentExemption(STAKE_ACCOUNT_SIZE),
196
+ ])
197
+ const minimumDelegationLamports = normalizePositiveIntegerLamports(
198
+ minimumDelegation,
199
+ 'Invalid Solana stake minimum delegation'
200
+ )
201
+ const stakeAccountRentLamports = normalizePositiveIntegerLamports(
202
+ stakeAccountRent,
203
+ 'Invalid Solana stake account rent'
204
+ )
205
+
206
+ return base.currency
207
+ .baseUnit(minimumDelegationLamports)
208
+ .add(base.currency.baseUnit(stakeAccountRentLamports))
209
+ },
184
210
  isStaking: ({ accountState }) => accountState.stakingInfo.isDelegating,
185
211
  }
186
212
 
@@ -226,6 +252,13 @@ export const createSolanaAssetFactory =
226
252
  assetClientInterface,
227
253
  })
228
254
 
255
+ const recoverNestedAccounts = createRecoverNestedAccountsFactory({
256
+ api: rpcApi,
257
+ assetClientInterface,
258
+ baseAssetName,
259
+ sendTx,
260
+ })
261
+
229
262
  const createHistoryMonitor = createHistoryMonitorFactory({
230
263
  monitorType: resolvedMonitorType,
231
264
  assetClientInterface,
@@ -256,7 +289,10 @@ export const createSolanaAssetFactory =
256
289
  getBalances,
257
290
  getDefaultAddressPath: () => defaultAddressPath,
258
291
  getFee,
259
- getFeeAsync,
292
+ getFeeAsync: async (...args) => {
293
+ const { unsignedTx, ...rest } = await getFeeAsync(...args)
294
+ return rest
295
+ },
260
296
  getFeeData: () => feeData,
261
297
  getKeyIdentifier,
262
298
  getSendValidations: () => sendValidations,
@@ -296,9 +332,10 @@ export const createSolanaAssetFactory =
296
332
  approveDelegation,
297
333
  bip44,
298
334
  accountReserve,
335
+ findRecoverableNestedAccounts: recoverNestedAccounts.findRecoverableNestedAccounts,
299
336
  initAgentWallet,
300
337
  lowBalance,
301
- MIN_STAKING_AMOUNT,
338
+ recoverNestedAccountFunds: recoverNestedAccounts.recoverNestedAccountFunds,
302
339
  revokeDelegation,
303
340
  serverApi: defaultApi,
304
341
  }
@@ -312,7 +349,6 @@ export const createSolanaAssetFactory =
312
349
  shouldUpdateBalanceBeforeHistory,
313
350
  defaultAccountReserve,
314
351
  defaultLowBalance,
315
- defaultMinStakingAmount,
316
352
  ticksBetweenHistoryFetches,
317
353
  ticksBetweenStakeFetches,
318
354
  txsLimit,