@exodus/solana-plugin 1.35.0 → 1.36.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
+ ## [1.36.0](https://github.com/ExodusMovement/assets/compare/@exodus/solana-plugin@1.35.0...@exodus/solana-plugin@1.36.0) (2026-03-12)
7
+
8
+
9
+ ### Features
10
+
11
+
12
+ * feat: persist security checks in account state and formalize asset.api.securityChecks API (#7537)
13
+
14
+
15
+
6
16
  ## [1.35.0](https://github.com/ExodusMovement/assets/compare/@exodus/solana-plugin@1.34.0...@exodus/solana-plugin@1.35.0) (2026-03-10)
7
17
 
8
18
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@exodus/solana-plugin",
3
- "version": "1.35.0",
3
+ "version": "1.36.0",
4
4
  "description": "Solana plugin for Exodus SDK powered wallets.",
5
5
  "type": "module",
6
6
  "main": "src/index.js",
@@ -44,5 +44,5 @@
44
44
  "type": "git",
45
45
  "url": "git+https://github.com/ExodusMovement/assets.git"
46
46
  },
47
- "gitHead": "0076335abe2f542d07cc23704104c106ed38d5f3"
47
+ "gitHead": "bdd3658f4f045809a360f53f0fd2027293c00de8"
48
48
  }
@@ -1,6 +1,22 @@
1
1
  import { SolanaClarityMonitor, SolanaMonitor, SolanaWebsocketMonitor } from '@exodus/solana-api'
2
2
  import assert from 'minimalistic-assert'
3
3
 
4
+ export const securityChecks = ({ accountState }) => {
5
+ if (accountState?.ownerChanged) {
6
+ return {
7
+ isSecure: false,
8
+ type: 'LOST_PERMISSIONS',
9
+ reason: 'Account owner changed.',
10
+ }
11
+ }
12
+
13
+ return {
14
+ isSecure: true,
15
+ type: null,
16
+ reason: null,
17
+ }
18
+ }
19
+
4
20
  export const createHistoryMonitorFactory = ({
5
21
  monitorType,
6
22
  assetClientInterface,
@@ -30,7 +30,7 @@ import {
30
30
  } from '@exodus/solana-lib'
31
31
  import ms from 'ms'
32
32
 
33
- import { createHistoryMonitorFactory } from './create-asset-utils.js'
33
+ import { createHistoryMonitorFactory, securityChecks } from './create-asset-utils.js'
34
34
  import { createGetBalanceForAddress } from './get-balance-for-address.js'
35
35
  import sendValidationsFactory from './send-validations.js'
36
36
  import { createWeb3API } from './web3/index.js'
@@ -44,7 +44,7 @@ export const createSolanaAssetFactory =
44
44
  ({
45
45
  assetClientInterface,
46
46
  config: {
47
- monitorType = 'rpc', // 'rpc' | 'clarity'
47
+ monitorType = 'ws-clarity', // 'rpc' | 'clarity' | 'ws-clarity'
48
48
  stakingFeatureAvailable = true,
49
49
  includeUnparsed = false,
50
50
  allowSendingAll = true,
@@ -227,7 +227,7 @@ export const createSolanaAssetFactory =
227
227
  addressHasHistory: (...args) => defaultApi.addressHasHistory(...args),
228
228
  broadcastTx: (...args) => defaultApi.broadcastTransaction(...args),
229
229
  createAccountState: () => SolanaAccountState,
230
- hasLostPermission: ({ accountState }) => Boolean(accountState?.ownerChanged),
230
+ securityChecks,
231
231
  createHistoryMonitor,
232
232
  createToken: (tokenDef) =>
233
233
  tokenDef.isBuiltIn ? createToken(tokenDef) : createCustomToken(tokenDef),