@exodus/bitcoin-plugin 1.35.1 → 2.1.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,28 @@
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.1.0](https://github.com/ExodusMovement/assets/compare/@exodus/bitcoin-plugin@2.0.0...@exodus/bitcoin-plugin@2.1.0) (2025-07-16)
7
+
8
+
9
+ ### Features
10
+
11
+
12
+ * feat: move send validation to each asset plugin (#6076)
13
+
14
+
15
+
16
+ ## [2.0.0](https://github.com/ExodusMovement/assets/compare/@exodus/bitcoin-plugin@1.35.1...@exodus/bitcoin-plugin@2.0.0) (2025-07-11)
17
+
18
+
19
+ ### ⚠ BREAKING CHANGES
20
+
21
+ * remove deprecated asset.getSpendableBalance and asset.getAvailableBalance (#6013)
22
+
23
+
24
+ * refactor!: remove deprecated asset.getSpendableBalance and asset.getAvailableBalance (#6013)
25
+
26
+
27
+
6
28
  ## [1.35.1](https://github.com/ExodusMovement/assets/compare/@exodus/bitcoin-plugin@1.35.0...@exodus/bitcoin-plugin@1.35.1) (2025-07-04)
7
29
 
8
30
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@exodus/bitcoin-plugin",
3
- "version": "1.35.1",
3
+ "version": "2.1.0",
4
4
  "description": "Bitcoin plugin for Exodus SDK powered wallets",
5
5
  "type": "module",
6
6
  "main": "src/index.js",
@@ -23,7 +23,7 @@
23
23
  "dependencies": {
24
24
  "@exodus/asset-lib": "^5.0.0",
25
25
  "@exodus/bip44-constants": "^195.0.0",
26
- "@exodus/bitcoin-api": "^2.34.1",
26
+ "@exodus/bitcoin-api": "^3.2.0",
27
27
  "@exodus/bitcoin-lib": "^2.4.2",
28
28
  "@exodus/bitcoin-meta": "^2.0.1",
29
29
  "@exodus/bitcoinjs": "^1.1.0",
@@ -56,5 +56,5 @@
56
56
  "type": "git",
57
57
  "url": "git+https://github.com/ExodusMovement/assets.git"
58
58
  },
59
- "gitHead": "5257fdf0f08e1c8f22849ed6c190f083f4393efb"
59
+ "gitHead": "c12ad495a49f457bc0941e6b568b608e2a6a4250"
60
60
  }
@@ -19,6 +19,7 @@ import {
19
19
  InsightAPIClient,
20
20
  isValidInscription,
21
21
  moveFundsFactory,
22
+ sendValidations,
22
23
  signHardwareFactory,
23
24
  signMessage,
24
25
  signMessageWithSigner,
@@ -105,7 +106,7 @@ export const createBitcoinAssetFactory =
105
106
  addressApi: address,
106
107
  })
107
108
 
108
- const { getFee, getAvailableBalance, canBumpTx, getSpendableBalance } = new GetFeeResolver({
109
+ const { getFee, canBumpTx } = new GetFeeResolver({
109
110
  getFeeEstimator,
110
111
  allowUnconfirmedRbfEnabledUtxos,
111
112
  utxosDescendingOrder,
@@ -117,7 +118,7 @@ export const createBitcoinAssetFactory =
117
118
  overrideDefaults: feeDataCustomValues,
118
119
  })
119
120
 
120
- const getBalances = getBalancesFactory({ feeData, getSpendableBalance })
121
+ const getBalances = getBalancesFactory({ feeData, allowUnconfirmedRbfEnabledUtxos })
121
122
 
122
123
  const baseGetPrepareSendTx = getPrepareSendTransaction({
123
124
  getFeeEstimator,
@@ -244,40 +245,45 @@ export const createBitcoinAssetFactory =
244
245
  const encodeMultisigContract = createEncodeMultisigContract({ network: coinInfo.toBitcoinJS() })
245
246
  const psbtToUnsignedTx = createPsbtToUnsignedTx({ assetClientInterface, assetName: asset.name })
246
247
 
248
+ const signMessageApi = ({ privateKey, signer, message }) =>
249
+ signer ? signMessageWithSigner({ signer, message }) : signMessage({ privateKey, message })
250
+ const web3 = createWeb3API({
251
+ assetClientInterface,
252
+ baseAssetName: asset.name,
253
+ currency: asset.currency,
254
+ insightClient,
255
+ prepareForSigning,
256
+ })
257
+ const createFeeMonitor = (args) =>
258
+ new BitcoinFeeMonitor({ ...args, insight: () => insightClient, assetName: asset.name })
259
+
247
260
  const api = {
248
- getActivityTxs,
249
261
  addressHasHistory,
250
- defaultAddressPath: 'm/0/0', // deprecated
251
262
  broadcastTx: (...args) => insightClient.broadcastTx(...args),
252
- createFeeMonitor: (args) =>
253
- new BitcoinFeeMonitor({ ...args, insight: () => insightClient, assetName: asset.name }),
263
+ createAccountState: () => accountStateClass,
264
+ createFeeMonitor,
254
265
  createHistoryMonitor,
255
266
  customFees: createCustomFeesApi({ baseAsset: asset, feeData }),
267
+ defaultAddressPath: 'm/0/0', // deprecated
256
268
  features,
269
+ getActivityTxs,
270
+ getBalanceForAddress,
271
+ getBalances,
257
272
  getDefaultAddressPath,
273
+ getFee,
258
274
  getFeeData: () => feeData,
259
- getBalances,
260
- getBalanceForAddress,
261
275
  getKeyIdentifier,
276
+ getSendValidations: () => sendValidations,
262
277
  getSupportedPurposes: createGetSupportedPurposes({ omitPurposes: omitSupportedPurposes }),
263
278
  hasFeature: (feature) => !!features[feature], // @deprecated use api.features instead
264
- createAccountState: () => accountStateClass,
279
+ moveFunds,
280
+ nfts,
265
281
  privateKeyEncodingDefinition: { encoding: 'wif', version: [coinInfo.versions.private] },
266
282
  sendTx,
267
- signTx,
268
283
  signHardware,
269
- signMessage: ({ privateKey, signer, message }) =>
270
- signer ? signMessageWithSigner({ signer, message }) : signMessage({ privateKey, message }),
271
- getFee,
272
- moveFunds,
273
- nfts,
274
- web3: createWeb3API({
275
- assetClientInterface,
276
- baseAssetName: asset.name,
277
- currency: asset.currency,
278
- insightClient,
279
- prepareForSigning,
280
- }),
284
+ signMessage: signMessageApi,
285
+ signTx,
286
+ web3,
281
287
  }
282
288
 
283
289
  const fullAsset = {
@@ -292,8 +298,6 @@ export const createBitcoinAssetFactory =
292
298
  useMultipleAddresses: multipleAddresses, // @deprecated use api.features.multipleAddresses instead
293
299
  insightClient,
294
300
  canBumpTx,
295
- getAvailableBalance,
296
- getSpendableBalance,
297
301
  prepareSendTx: baseGetPrepareSendTx,
298
302
  createBatchTx,
299
303
  encodeMultisigContract,