@exodus/bitcoin-plugin 1.32.2 → 1.33.1

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,26 @@
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.33.1](https://github.com/ExodusMovement/assets/compare/@exodus/bitcoin-plugin@1.33.0...@exodus/bitcoin-plugin@1.33.1) (2025-04-21)
7
+
8
+
9
+ ### Bug Fixes
10
+
11
+
12
+ * fix: prevent app crash by adding null checks for toBaseNumber method (#5376)
13
+
14
+
15
+
16
+ ## [1.33.0](https://github.com/ExodusMovement/assets/compare/@exodus/bitcoin-plugin@1.32.2...@exodus/bitcoin-plugin@1.33.0) (2025-04-01)
17
+
18
+
19
+ ### Features
20
+
21
+
22
+ * feat(bitcoin): allow message signing with external signer (#5365)
23
+
24
+
25
+
6
26
  ## [1.32.2](https://github.com/ExodusMovement/assets/compare/@exodus/bitcoin-plugin@1.32.1...@exodus/bitcoin-plugin@1.32.2) (2025-03-19)
7
27
 
8
28
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@exodus/bitcoin-plugin",
3
- "version": "1.32.2",
3
+ "version": "1.33.1",
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.31.1",
26
+ "@exodus/bitcoin-api": "^2.32.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": "f1b6ccb198231db1fb6c9c51a0173967ec4efd1f"
59
+ "gitHead": "16ddf7437ba3b88e9a04d8d44ec6ccf4c52430fe"
60
60
  }
@@ -20,6 +20,7 @@ import {
20
20
  moveFundsFactory,
21
21
  signHardwareFactory,
22
22
  signMessage,
23
+ signMessageWithSigner,
23
24
  signTxFactory,
24
25
  } from '@exodus/bitcoin-api'
25
26
  import { parseCurrency } from '@exodus/bitcoin-api/src/fee/fee-utils.js'
@@ -97,6 +98,7 @@ export const createBitcoinAssetFactory =
97
98
  nfts: ordinalsEnabled,
98
99
  isTestnet,
99
100
  signWithSigner: true,
101
+ signMessageWithSigner: true,
100
102
  supportsCustomFees: true,
101
103
  }
102
104
 
@@ -285,7 +287,7 @@ export const createBitcoinAssetFactory =
285
287
  createFeeMonitor: (args) =>
286
288
  new BitcoinFeeMonitor({ ...args, insight: () => insightClient, assetName: asset.name }),
287
289
  createHistoryMonitor,
288
- customFees: createCustomFeesApi({ baseAsset: asset }),
290
+ customFees: createCustomFeesApi({ baseAsset: asset, feeData }),
289
291
  features,
290
292
  getDefaultAddressPath,
291
293
  getFeeData: () => feeData,
@@ -299,7 +301,8 @@ export const createBitcoinAssetFactory =
299
301
  sendTx,
300
302
  signTx,
301
303
  signHardware,
302
- signMessage,
304
+ signMessage: ({ privateKey, signer, message }) =>
305
+ signer ? signMessageWithSigner({ signer, message }) : signMessage({ privateKey, message }),
303
306
  getFee,
304
307
  moveFunds,
305
308
  nfts,
@@ -1,15 +1,18 @@
1
- export const createCustomFeesApi = ({ baseAsset }) => {
1
+ export const createCustomFeesApi = ({ baseAsset, feeData: defaultFeeData }) => {
2
2
  return {
3
- getRecommendedMinMaxFeeUnitPrices: ({ feeData }) => {
3
+ getRecommendedMinMaxFeeUnitPrices: ({ feeData = defaultFeeData }) => {
4
+ const minFee = feeData.minimumFee.toBaseNumber()
5
+ const fastestFee = feeData.fastestFee.toBaseNumber()
6
+
4
7
  return {
5
- recommended: feeData.fastestFee.toBaseNumber(),
6
- min: feeData.minimumFee.toBaseNumber(),
7
- max: feeData.fastestFee.toBaseNumber() * 3,
8
+ recommended: fastestFee,
9
+ min: minFee,
10
+ max: fastestFee * 3,
8
11
  }
9
12
  },
10
13
  unit: 'sat/byte',
11
- feeUnitPriceToNumber: (feeNumberUnit) => feeNumberUnit.div(1000).toBaseNumber(),
14
+ feeUnitPriceToNumber: (feeNumberUnit) => feeNumberUnit?.div(1000).toBaseNumber() || 0,
12
15
  numberToFeeUnitPrice: (value) => baseAsset.currency.baseUnit(value * 1000),
13
- isEnabled: ({ feeData }) => Boolean(feeData.rbfEnabled),
16
+ isEnabled: ({ feeData = defaultFeeData }) => Boolean(feeData.rbfEnabled),
14
17
  }
15
18
  }