@exodus/solana-plugin 1.10.1 → 1.12.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 ADDED
@@ -0,0 +1,232 @@
1
+ # Change Log
2
+
3
+ All notable changes to this project will be documented in this file.
4
+ See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
+
6
+ ## [1.12.0](https://github.com/ExodusMovement/assets/compare/@exodus/solana-plugin@1.11.0...@exodus/solana-plugin@1.12.0) (2024-06-14)
7
+
8
+
9
+ ### Features
10
+
11
+ * **solana-plugin:** supply `assetClientInterface` to web3 simulation ([#2567](https://github.com/ExodusMovement/assets/issues/2567)) ([984d429](https://github.com/ExodusMovement/assets/commit/984d429e0479afe7d11eb4d780718e04e7c29794))
12
+
13
+
14
+
15
+ ## [1.11.0](https://github.com/ExodusMovement/assets/compare/@exodus/solana-plugin@1.10.1...@exodus/solana-plugin@1.11.0) (2024-06-13)
16
+
17
+
18
+ ### Features
19
+
20
+ * use ME API for SOL fungible assets ([#2490](https://github.com/ExodusMovement/assets/issues/2490)) ([8234222](https://github.com/ExodusMovement/assets/commit/82342222f57949da4d7128f7f92baf6a0bc1781e))
21
+
22
+
23
+
24
+ ## [1.10.1](https://github.com/ExodusMovement/assets/compare/@exodus/solana-plugin@1.10.0...@exodus/solana-plugin@1.10.1) (2024-06-06)
25
+
26
+ **Note:** Version bump only for package @exodus/solana-plugin
27
+
28
+
29
+
30
+
31
+
32
+ ## [1.10.0](https://github.com/ExodusMovement/assets/compare/@exodus/solana-plugin@1.9.2...@exodus/solana-plugin@1.10.0) (2024-05-31)
33
+
34
+
35
+ ### Features
36
+
37
+ * **solana-plugin:** handle transaction buffers in simulation API ([#2457](https://github.com/ExodusMovement/assets/issues/2457)) ([3ce6786](https://github.com/ExodusMovement/assets/commit/3ce6786415331afd93c536e3a605d15e39d1dc86))
38
+
39
+
40
+
41
+ ## [1.9.2](https://github.com/ExodusMovement/assets/compare/@exodus/solana-plugin@1.9.1...@exodus/solana-plugin@1.9.2) (2024-05-28)
42
+
43
+ **Note:** Version bump only for package @exodus/solana-plugin
44
+
45
+
46
+
47
+
48
+
49
+ ## [1.9.1](https://github.com/ExodusMovement/assets/compare/@exodus/solana-plugin@1.9.0...@exodus/solana-plugin@1.9.1) (2024-05-15)
50
+
51
+
52
+ ### Bug Fixes
53
+
54
+ * **solana-plugin:** supply a proper Web3 Transaction instance to simulation ([#2288](https://github.com/ExodusMovement/assets/issues/2288)) ([5316cc0](https://github.com/ExodusMovement/assets/commit/5316cc0ce23643da8e9926adfd8e0db904b704e4))
55
+
56
+
57
+
58
+ ## [1.9.0](https://github.com/ExodusMovement/assets/compare/@exodus/solana-plugin@1.8.1...@exodus/solana-plugin@1.9.0) (2024-05-14)
59
+
60
+
61
+ ### Features
62
+
63
+ * **solana-plugin:** add `web3.simulateTransaction` API ([#2274](https://github.com/ExodusMovement/assets/issues/2274)) ([14cae55](https://github.com/ExodusMovement/assets/commit/14cae556087cf7b19e20172caa556aca5af86da9))
64
+
65
+
66
+
67
+ ## [1.8.1](https://github.com/ExodusMovement/assets/compare/@exodus/solana-plugin@1.8.0...@exodus/solana-plugin@1.8.1) (2024-05-08)
68
+
69
+
70
+ ### Bug Fixes
71
+
72
+ * assertion should check for api ([#2158](https://github.com/ExodusMovement/assets/issues/2158)) ([824d576](https://github.com/ExodusMovement/assets/commit/824d576a305ee5daad37c5fe2737606bdc66893b))
73
+ * provide `assetName` to createGetKeyIdentifier ([#2191](https://github.com/ExodusMovement/assets/issues/2191)) ([55e5171](https://github.com/ExodusMovement/assets/commit/55e5171b142fd72ff88b645f02f0ad358b93ccf8))
74
+
75
+
76
+
77
+ ## [1.8.0](https://github.com/ExodusMovement/assets/compare/@exodus/solana-plugin@1.7.3...@exodus/solana-plugin@1.8.0) (2024-04-24)
78
+
79
+
80
+ ### Features
81
+
82
+ * solana api.getBalanceForAddress ([#2149](https://github.com/ExodusMovement/assets/issues/2149)) ([02e8c82](https://github.com/ExodusMovement/assets/commit/02e8c82cbf94a3fc0567f85e4eab7cd9a2b0f5d0))
83
+ * support external signer for solana message signing ([#2151](https://github.com/ExodusMovement/assets/issues/2151)) ([a58921c](https://github.com/ExodusMovement/assets/commit/a58921c6d2020fd67a99dc4c17129c04e346eb8b))
84
+
85
+
86
+
87
+ ## [1.7.3](https://github.com/ExodusMovement/assets/compare/@exodus/solana-plugin@1.7.2...@exodus/solana-plugin@1.7.3) (2024-04-22)
88
+
89
+ **Note:** Version bump only for package @exodus/solana-plugin
90
+
91
+
92
+
93
+
94
+
95
+ ## [1.7.2](https://github.com/ExodusMovement/assets/compare/@exodus/solana-plugin@1.7.1...@exodus/solana-plugin@1.7.2) (2024-04-18)
96
+
97
+
98
+ ### Bug Fixes
99
+
100
+ * use default feeData ([#2123](https://github.com/ExodusMovement/assets/issues/2123)) ([bd89bdf](https://github.com/ExodusMovement/assets/commit/bd89bdf24b2abcaa8356ece10b9c3be36f944638))
101
+
102
+
103
+
104
+ ## [1.7.1](https://github.com/ExodusMovement/assets/compare/@exodus/solana-plugin@1.7.0...@exodus/solana-plugin@1.7.1) (2024-04-12)
105
+
106
+ **Note:** Version bump only for package @exodus/solana-plugin
107
+
108
+
109
+
110
+
111
+
112
+ ## [1.7.0](https://github.com/ExodusMovement/assets/compare/@exodus/solana-plugin@1.6.0...@exodus/solana-plugin@1.7.0) (2024-04-08)
113
+
114
+
115
+ ### Features
116
+
117
+ * **solana:** add signMessage ([#1980](https://github.com/ExodusMovement/assets/issues/1980)) ([fd0b28c](https://github.com/ExodusMovement/assets/commit/fd0b28ce0c86249ec8a5d32ee0a3e542513c6d47))
118
+
119
+
120
+
121
+ ## [1.6.0](https://github.com/ExodusMovement/assets/compare/@exodus/solana-plugin@1.5.0...@exodus/solana-plugin@1.6.0) (2024-04-04)
122
+
123
+
124
+ ### Features
125
+
126
+ * add support for external signer for Solana ([#1952](https://github.com/ExodusMovement/assets/issues/1952)) ([70424fe](https://github.com/ExodusMovement/assets/commit/70424fe54c4bcf6be897a182761746b1e02475f3))
127
+
128
+
129
+
130
+ ## [1.5.0](https://github.com/ExodusMovement/assets/compare/@exodus/solana-plugin@1.4.1...@exodus/solana-plugin@1.5.0) (2024-03-25)
131
+
132
+
133
+ ### Features
134
+
135
+ * add isTestnet flag ([#1887](https://github.com/ExodusMovement/assets/issues/1887)) ([7f6ac2b](https://github.com/ExodusMovement/assets/commit/7f6ac2ba9ce6a402214a60cf90888a37d1faac02))
136
+
137
+
138
+ ### Bug Fixes
139
+
140
+ * add missing default address path ([#1883](https://github.com/ExodusMovement/assets/issues/1883)) ([ccab640](https://github.com/ExodusMovement/assets/commit/ccab640e30baba5886922b4842017db9152d3c4c))
141
+
142
+
143
+
144
+ ## [1.4.1](https://github.com/ExodusMovement/assets/compare/@exodus/solana-plugin@1.4.0...@exodus/solana-plugin@1.4.1) (2024-03-25)
145
+
146
+
147
+ ### Bug Fixes
148
+
149
+ * **bitcoin-plugin:** force solana bip44 constant ([#1880](https://github.com/ExodusMovement/assets/issues/1880)) ([90162e1](https://github.com/ExodusMovement/assets/commit/90162e19f51c9030a9f50fa9d901aa1d191b3acb))
150
+
151
+
152
+
153
+ ## [1.4.0](https://github.com/ExodusMovement/assets/compare/@exodus/solana-plugin@1.3.1...@exodus/solana-plugin@1.4.0) (2024-03-22)
154
+
155
+
156
+ ### Features
157
+
158
+ * disable custom tokens for solana testnets ([#1873](https://github.com/ExodusMovement/assets/issues/1873)) ([1bb1217](https://github.com/ExodusMovement/assets/commit/1bb1217b18955e7f822461cbd4f510090c5baf33))
159
+ * **solana-plugin:** show aci as available ([#1868](https://github.com/ExodusMovement/assets/issues/1868)) ([efdba12](https://github.com/ExodusMovement/assets/commit/efdba1280503b7c642949bc17f720ddc8393ad1e))
160
+
161
+
162
+
163
+ ## [1.3.1](https://github.com/ExodusMovement/assets/compare/@exodus/solana-plugin@1.3.0...@exodus/solana-plugin@1.3.1) (2024-03-22)
164
+
165
+
166
+ ### Bug Fixes
167
+
168
+ * **solana-plugin:** hardcoded solana get ([#1866](https://github.com/ExodusMovement/assets/issues/1866)) ([e7b9575](https://github.com/ExodusMovement/assets/commit/e7b957577bd5498f11857f4e7021f03c3630d42d))
169
+
170
+
171
+
172
+ # [1.3.0](https://github.com/ExodusMovement/assets/compare/@exodus/solana-plugin@1.2.0...@exodus/solana-plugin@1.3.0) (2024-03-21)
173
+
174
+
175
+ ### Bug Fixes
176
+
177
+ * add getSupportedPurposes ([#1812](https://github.com/ExodusMovement/assets/issues/1812)) ([5082c47](https://github.com/ExodusMovement/assets/commit/5082c470efbc021a0c7aa39ad4958b284e55a306))
178
+
179
+
180
+ ### Features
181
+
182
+ * **solana-plugin:** use account state factory ([#1833](https://github.com/ExodusMovement/assets/issues/1833)) ([ce99a3f](https://github.com/ExodusMovement/assets/commit/ce99a3fca5c1cbd1c555bcf55eef8853cd111b05))
183
+ * **solana-plugin:** use new solana-lib api ([#1811](https://github.com/ExodusMovement/assets/issues/1811)) ([4e889b1](https://github.com/ExodusMovement/assets/commit/4e889b123b18d4e05e173c37e905fc5b9e137ec2))
184
+
185
+
186
+
187
+
188
+
189
+ # [1.2.0](https://github.com/ExodusMovement/assets/compare/@exodus/solana-plugin@1.1.0...@exodus/solana-plugin@1.2.0) (2024-03-18)
190
+
191
+
192
+ ### Bug Fixes
193
+
194
+ * pass in txsLimit to solana monitor ([#1792](https://github.com/ExodusMovement/assets/issues/1792)) ([7283048](https://github.com/ExodusMovement/assets/commit/7283048c56b239a690064d14ff9b4d0228c078a9))
195
+
196
+
197
+ ### Features
198
+
199
+ * solana monitor history refactor to use fewer transaction rpc calls ([#1559](https://github.com/ExodusMovement/assets/issues/1559)) ([8933aa6](https://github.com/ExodusMovement/assets/commit/8933aa61d712faf9665de87bdc1a1c5cabd2d403))
200
+
201
+
202
+
203
+
204
+
205
+ # [1.1.0](https://github.com/ExodusMovement/assets/compare/@exodus/solana-plugin@1.0.11...@exodus/solana-plugin@1.1.0) (2024-03-11)
206
+
207
+
208
+ ### Features
209
+
210
+ * allow default number values to be configurable ([#1703](https://github.com/ExodusMovement/assets/issues/1703)) ([6a35567](https://github.com/ExodusMovement/assets/commit/6a355672d805d1618e6a1d34f9aae851d5812b3a))
211
+
212
+
213
+
214
+
215
+
216
+ ## [1.0.11](https://github.com/ExodusMovement/assets/compare/@exodus/solana-plugin@1.0.10...@exodus/solana-plugin@1.0.11) (2024-03-07)
217
+
218
+
219
+ ### Bug Fixes
220
+
221
+ * access solana staking state from mem ([#1679](https://github.com/ExodusMovement/assets/issues/1679)) ([eaae7a6](https://github.com/ExodusMovement/assets/commit/eaae7a61f5ff40e7486c7183afb2f676f728047d))
222
+
223
+
224
+
225
+
226
+
227
+ ## [1.0.10](https://github.com/ExodusMovement/assets/compare/@exodus/solana-plugin@1.0.9...@exodus/solana-plugin@1.0.10) (2024-03-06)
228
+
229
+
230
+ ### Bug Fixes
231
+
232
+ * **solana-plugin:** pass feeData as args ([#1676](https://github.com/ExodusMovement/assets/issues/1676)) ([04998b7](https://github.com/ExodusMovement/assets/commit/04998b703218319e06c87358ba7d5ad8b862ea92))
package/package.json CHANGED
@@ -1,35 +1,43 @@
1
1
  {
2
2
  "name": "@exodus/solana-plugin",
3
- "version": "1.10.1",
3
+ "version": "1.12.0",
4
4
  "description": "Exodus internal Solana asset plugin",
5
5
  "main": "src/index.js",
6
6
  "files": [
7
7
  "src",
8
+ "CHANGELOG.md",
8
9
  "!src/**/__tests__"
9
10
  ],
10
11
  "author": "Exodus Movement, Inc.",
11
12
  "license": "UNLICENSED",
12
- "homepage": "https://github.com/ExodusMovement/assets",
13
+ "homepage": "https://github.com/ExodusMovement/assets/tree/master/solana/solana-plugin",
13
14
  "publishConfig": {
14
15
  "access": "restricted"
15
16
  },
16
17
  "scripts": {
17
18
  "test": "run -T jest",
18
- "lint": "run -T eslint ./src",
19
+ "lint": "run -T eslint .",
19
20
  "lint:fix": "yarn lint --fix"
20
21
  },
21
22
  "dependencies": {
22
23
  "@exodus/assets": "^9.0.1",
23
24
  "@exodus/bip44-constants": "^195.0.0",
24
- "@exodus/solana-api": "^3.6.1",
25
+ "@exodus/solana-api": "^3.7.0",
25
26
  "@exodus/solana-lib": "^3.4.2",
26
27
  "@exodus/solana-meta": "^1.0.7",
27
- "@exodus/web3-solana-utils": "^1.65.0",
28
+ "@exodus/web3-solana-utils": "^2.0.0",
28
29
  "minimalistic-assert": "^1.0.1",
29
30
  "ms": "^2.1.3"
30
31
  },
31
32
  "devDependencies": {
32
33
  "@exodus/assets-testing": "^1.0.0"
33
34
  },
34
- "gitHead": "9d24eb58422692fc1acdcb834061d02b2632801d"
35
+ "bugs": {
36
+ "url": "https://github.com/ExodusMovement/assets/issues?q=is%3Aissue+is%3Aopen+label%3Asolana-plugin"
37
+ },
38
+ "repository": {
39
+ "type": "git",
40
+ "url": "git+https://github.com/ExodusMovement/assets.git"
41
+ },
42
+ "gitHead": "29edcfbe1dccc1dae0d797aba45490d912f36de3"
35
43
  }
@@ -26,11 +26,17 @@ import {
26
26
  } from '@exodus/solana-api'
27
27
  import { createGetBalanceForAddress } from './get-balance-for-address'
28
28
  import { createWeb3API } from './web3'
29
+ import { MeSolanaMonitor } from '@exodus/solana-api/src/tx-log/me-solana-monitor'
29
30
 
30
31
  const DEFAULT_ACCOUNT_RESERVE = 0.01
31
32
  const DEFAULT_LOW_BALANCE = 0.01
32
33
  const DEFAULT_MIN_STAKING_AMOUNT = 0.01
33
34
 
35
+ const MonitorType = {
36
+ DEFAULT: 'default',
37
+ ME: 'meMonitor',
38
+ }
39
+
34
40
  export const createSolanaAssetFactory =
35
41
  ({ assetList, serverApi, isTestnet = false }) =>
36
42
  ({
@@ -46,6 +52,7 @@ export const createSolanaAssetFactory =
46
52
  ticksBetweenStakeFetches,
47
53
  txsLimit,
48
54
  signWithSigner = true,
55
+ monitorType = MonitorType.DEFAULT,
49
56
  } = {},
50
57
  overrideCallback = ({ asset }) => asset,
51
58
  } = {}) => {
@@ -132,15 +139,25 @@ export const createSolanaAssetFactory =
132
139
  createAccountState: () => SolanaAccountState,
133
140
  createFeeMonitor: (args) => new SolanaFeeMonitor({ ...args, api: serverApi }),
134
141
  createHistoryMonitor: (args) =>
135
- new SolanaMonitor({
136
- interval: monitorInterval,
137
- ticksBetweenHistoryFetches,
138
- ticksBetweenStakeFetches,
139
- includeUnparsed,
140
- api: serverApi,
141
- txsLimit,
142
- ...args,
143
- }),
142
+ monitorType === MonitorType.ME
143
+ ? new MeSolanaMonitor({
144
+ interval: monitorInterval,
145
+ ticksBetweenHistoryFetches,
146
+ ticksBetweenStakeFetches,
147
+ includeUnparsed,
148
+ api: serverApi,
149
+ txsLimit,
150
+ ...args,
151
+ })
152
+ : new SolanaMonitor({
153
+ interval: monitorInterval,
154
+ ticksBetweenHistoryFetches,
155
+ ticksBetweenStakeFetches,
156
+ includeUnparsed,
157
+ api: serverApi,
158
+ txsLimit,
159
+ ...args,
160
+ }),
144
161
  createToken: (tokenDef) =>
145
162
  tokenDef.isBuiltIn ? createToken(tokenDef) : createCustomToken(tokenDef),
146
163
  defaultAddressPath,
@@ -173,8 +190,9 @@ export const createSolanaAssetFactory =
173
190
  validateAssetId: isValidAddress,
174
191
  web3: createWeb3API({
175
192
  asset: base,
176
- prepareForSigning,
193
+ assetClientInterface,
177
194
  fillTransactionWithEmptySignatureSlot,
195
+ prepareForSigning,
178
196
  }),
179
197
  }
180
198
 
@@ -7,17 +7,19 @@ import {
7
7
  // This function accepts either a list of transactions created by a wallet (unsignedTxs) or a web3 transaction (transactionBuffers).
8
8
  export const createSimulateTransactions = ({
9
9
  asset,
10
- prepareForSigning,
10
+ assetClientInterface,
11
11
  fillTransactionWithEmptySignatureSlot,
12
+ prepareForSigning,
12
13
  }) => {
13
14
  assert(asset, '"asset" should be passed.')
15
+ assert(assetClientInterface, '"assetClientInterface" should be passed.')
14
16
  assert(prepareForSigning, '"prepareForSigning" should be passed.')
15
17
  assert(
16
18
  fillTransactionWithEmptySignatureSlot,
17
19
  '"fillTransactionWithEmptySignatureSlot" should be passed.'
18
20
  )
19
21
 
20
- const simulateSolanaTransactions = createSimulateSolanaTransactions()
22
+ const simulateSolanaTransactions = createSimulateSolanaTransactions({ assetClientInterface })
21
23
 
22
24
  return function simulateTransactions({ transactionBuffers, unsignedTxs, ...restParameters }) {
23
25
  if (unsignedTxs) {