@exodus/bitcoin-plugin 2.10.3 → 2.11.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,22 @@
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
+ ## [2.11.0](https://github.com/ExodusMovement/assets/compare/@exodus/bitcoin-plugin@2.10.3...@exodus/bitcoin-plugin@2.11.0) (2026-05-18)
7
+
8
+
9
+ ### Features
10
+
11
+
12
+ * feat: add init time mempool WS URL support (#8045)
13
+
14
+
15
+ ### Bug Fixes
16
+
17
+
18
+ * fix: split mempool reads from clarity broadcast (#8094)
19
+
20
+
21
+
6
22
  ## [2.10.3](https://github.com/ExodusMovement/assets/compare/@exodus/bitcoin-plugin@2.10.2...@exodus/bitcoin-plugin@2.10.3) (2026-05-06)
7
23
 
8
24
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@exodus/bitcoin-plugin",
3
- "version": "2.10.3",
3
+ "version": "2.11.0",
4
4
  "description": "Bitcoin plugin for Exodus SDK powered wallets",
5
5
  "type": "module",
6
6
  "main": "src/index.js",
@@ -25,7 +25,7 @@
25
25
  "@exodus/asset-lib": "^5.0.0",
26
26
  "@exodus/assets": "^11.6.0",
27
27
  "@exodus/bip44-constants": "^195.0.0",
28
- "@exodus/bitcoin-api": "^4.14.5",
28
+ "@exodus/bitcoin-api": "^4.15.0",
29
29
  "@exodus/bitcoin-lib": "^2.4.2",
30
30
  "@exodus/bitcoin-meta": "^2.0.1",
31
31
  "@exodus/bitcoinjs": "^2.0.0",
@@ -59,5 +59,5 @@
59
59
  "type": "git",
60
60
  "url": "git+https://github.com/ExodusMovement/assets.git"
61
61
  },
62
- "gitHead": "60ac6048908a68decc912c51dc4d187d6a56b11f"
62
+ "gitHead": "266396ec25f5aa6ce87887d0df7f0e882e83f1aa"
63
63
  }
@@ -46,6 +46,8 @@ const assertMonitorConfig = ({
46
46
  monitorType,
47
47
  apiUrl,
48
48
  mempoolApiUrl,
49
+ clarityApiUrl,
50
+ mempoolWsUrl,
49
51
  configMinFeeRate,
50
52
  maxTrackedAddresses,
51
53
  }) => {
@@ -54,21 +56,24 @@ const assertMonitorConfig = ({
54
56
  'monitorType must be either insight or mempool'
55
57
  )
56
58
 
57
- assert(apiUrl, 'apiUrl is required')
58
59
  if (monitorType === 'mempool') {
59
60
  assert(mempoolApiUrl, 'mempoolApiUrl is required when monitorType is mempool')
60
- }
61
+ assert(clarityApiUrl, 'clarityApiUrl is required when monitorType is mempool')
62
+ assert(mempoolWsUrl, 'mempoolWsUrl is required when monitorType is mempool')
61
63
 
62
- assert(
63
- typeof configMinFeeRate === 'number' &&
64
- Number.isFinite(configMinFeeRate) &&
65
- configMinFeeRate >= 0,
66
- 'configMinFeeRate must be a finite number greater than or equal to 0'
67
- )
68
- assert(
69
- Number.isInteger(maxTrackedAddresses) && maxTrackedAddresses > 0,
70
- 'maxTrackedAddresses must be a positive integer'
71
- )
64
+ assert(
65
+ typeof configMinFeeRate === 'number' &&
66
+ Number.isFinite(configMinFeeRate) &&
67
+ configMinFeeRate >= 0,
68
+ 'configMinFeeRate must be a finite number greater than or equal to 0'
69
+ )
70
+ assert(
71
+ Number.isInteger(maxTrackedAddresses) && maxTrackedAddresses > 0,
72
+ 'maxTrackedAddresses must be a positive integer'
73
+ )
74
+ } else {
75
+ assert(apiUrl, 'apiUrl is required')
76
+ }
72
77
  }
73
78
 
74
79
  export const createBitcoinAssetFactory =
@@ -76,6 +81,8 @@ export const createBitcoinAssetFactory =
76
81
  asset,
77
82
  apiUrl: defaultApiUrl,
78
83
  mempoolApiUrl: defaultMempoolApiUrl,
84
+ mempoolWsUrl: defaultMempoolWsUrl,
85
+ clarityApiUrl: defaultClarityApiUrl,
79
86
  coinInfoNetwork,
80
87
  isTestnet = false,
81
88
  }) =>
@@ -85,6 +92,8 @@ export const createBitcoinAssetFactory =
85
92
  config: {
86
93
  apiUrl: customApiUrl,
87
94
  mempoolApiUrl: customMempoolApiUrl,
95
+ mempoolWsUrl: customMempoolWsUrl,
96
+ clarityApiUrl: customClarityApiUrl,
88
97
  allowUnconfirmedRbfEnabledUtxos = false,
89
98
  ordinalChainIndex = DEFAULT_ORDINAL_CHAIN_INDEX,
90
99
  ordinalsEnabled = false,
@@ -104,6 +113,8 @@ export const createBitcoinAssetFactory =
104
113
  }) => {
105
114
  const apiUrl = customApiUrl || defaultApiUrl
106
115
  const mempoolApiUrl = customMempoolApiUrl || defaultMempoolApiUrl
116
+ const mempoolWsUrl = customMempoolWsUrl || defaultMempoolWsUrl
117
+ const clarityApiUrl = customClarityApiUrl || defaultClarityApiUrl
107
118
  assert(assetClientInterface, 'assetClientInterface is required')
108
119
  assert(asset, 'asset is required')
109
120
  assert(typeof ordinalChainIndex === 'number', 'ordinalChainIndex must be a number')
@@ -116,6 +127,8 @@ export const createBitcoinAssetFactory =
116
127
  monitorType,
117
128
  apiUrl,
118
129
  mempoolApiUrl,
130
+ clarityApiUrl,
131
+ mempoolWsUrl,
119
132
  configMinFeeRate,
120
133
  maxTrackedAddresses,
121
134
  })
@@ -127,8 +140,8 @@ export const createBitcoinAssetFactory =
127
140
  const insightClient =
128
141
  monitorType === 'mempool'
129
142
  ? new MempoolRestClient({
130
- baseURL: mempoolApiUrl,
131
- insightBaseURL: apiUrl,
143
+ mempoolBaseURL: mempoolApiUrl,
144
+ clarityBaseURL: clarityApiUrl,
132
145
  configMinFeeRate,
133
146
  })
134
147
  : new InsightAPIClient(apiUrl)
@@ -263,6 +276,8 @@ export const createBitcoinAssetFactory =
263
276
  extraChainIndexEnabled,
264
277
  apiUrl,
265
278
  mempoolApiUrl,
279
+ mempoolWsUrl,
280
+ clarityApiUrl,
266
281
  monitorType,
267
282
  maxTrackedAddresses,
268
283
  gapLimit,
@@ -379,8 +394,10 @@ export const createBitcoinAssetFactory =
379
394
  return overrideCallback({
380
395
  asset: fullAsset,
381
396
  config: {
382
- apiUrl: customApiUrl || defaultApiUrl,
383
- mempoolApiUrl: customMempoolApiUrl || defaultMempoolApiUrl,
397
+ apiUrl,
398
+ mempoolApiUrl,
399
+ mempoolWsUrl,
400
+ clarityApiUrl,
384
401
  monitorType,
385
402
  configMinFeeRate,
386
403
  maxTrackedAddresses,
package/src/index.js CHANGED
@@ -5,7 +5,15 @@ import { createBitcoinAssetFactory } from './create-asset.js'
5
5
  export * from './create-asset.js' // for bitcoinregtest and bitcointestnet
6
6
 
7
7
  const apiUrl = 'https://bitcoin.a.exodus.io/insight/'
8
- const mempoolApiUrl = 'https://exodus.mempool.space/'
9
- export const createAsset = createBitcoinAssetFactory({ asset, apiUrl, mempoolApiUrl })
8
+ const mempoolApiUrl = 'https://assets-gateway-clarity-api.a.exodus.io/assets/bitcoinmempool/'
9
+ const mempoolWsUrl = 'wss://bitcoin-mempoolspace-wss.a.exodus.io/api/v1/ws'
10
+ const clarityApiUrl = 'https://assets-gateway-clarity-api.a.exodus.io/assets/bitcoin/insight/'
11
+ export const createAsset = createBitcoinAssetFactory({
12
+ asset,
13
+ apiUrl,
14
+ mempoolApiUrl,
15
+ mempoolWsUrl,
16
+ clarityApiUrl,
17
+ })
10
18
  const assetPlugin = { createAsset }
11
19
  export default assetPlugin