@exodus/bitcoin-plugin 1.29.1 → 1.30.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 +22 -0
- package/README.md +3 -0
- package/package.json +4 -4
- package/src/create-asset.js +4 -0
- package/src/custom-fees.js +15 -0
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
|
+
## [1.30.0](https://github.com/ExodusMovement/assets/compare/@exodus/bitcoin-plugin@1.29.2...@exodus/bitcoin-plugin@1.30.0) (2024-12-09)
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
### Features
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
* feat: customFees api (#4653)
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
## [1.29.2](https://github.com/ExodusMovement/assets/compare/@exodus/bitcoin-plugin@1.29.1...@exodus/bitcoin-plugin@1.29.2) (2024-12-04)
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
### Bug Fixes
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
* fix: bitcoin use utxo.derivationPath path to resolve purpose (#4541)
|
|
23
|
+
|
|
24
|
+
* fix: fetch and require raw txs for segwit inputs (#4399)
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
|
|
6
28
|
## [1.29.1](https://github.com/ExodusMovement/assets/compare/@exodus/bitcoin-plugin@1.29.0...@exodus/bitcoin-plugin@1.29.1) (2024-10-31)
|
|
7
29
|
|
|
8
30
|
|
package/README.md
ADDED
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@exodus/bitcoin-plugin",
|
|
3
|
-
"version": "1.
|
|
4
|
-
"description": "Exodus
|
|
3
|
+
"version": "1.30.0",
|
|
4
|
+
"description": "Bitcoin plugin for Exodus SDK powered wallets",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "src/index.js",
|
|
7
7
|
"files": [
|
|
@@ -42,7 +42,7 @@
|
|
|
42
42
|
"@exodus/bip32": "^3.3.0",
|
|
43
43
|
"@exodus/bitcoinregtest-meta": "^2.0.0",
|
|
44
44
|
"@exodus/bitcointestnet-meta": "^2.0.0",
|
|
45
|
-
"@exodus/currency": "^
|
|
45
|
+
"@exodus/currency": "^6.0.1",
|
|
46
46
|
"@exodus/key-identifier": "^1.3.0",
|
|
47
47
|
"@exodus/key-utils": "^3.7.0",
|
|
48
48
|
"@exodus/keychain": "^7.3.0",
|
|
@@ -58,5 +58,5 @@
|
|
|
58
58
|
"type": "git",
|
|
59
59
|
"url": "git+https://github.com/ExodusMovement/assets.git"
|
|
60
60
|
},
|
|
61
|
-
"gitHead": "
|
|
61
|
+
"gitHead": "4d505ee7d024c0ae961e2d95e6408b0b251a7d89"
|
|
62
62
|
}
|
package/src/create-asset.js
CHANGED
|
@@ -30,6 +30,7 @@ import _coinInfo from 'coininfo'
|
|
|
30
30
|
import assert from 'minimalistic-assert'
|
|
31
31
|
|
|
32
32
|
import { createGetSupportedPurposes, getDefaultAddressPath } from './compatibility-modes.js'
|
|
33
|
+
import { createCustomFeesApi } from './custom-fees.js'
|
|
33
34
|
import { bitcoinFeeDataFactory } from './fee-data.js'
|
|
34
35
|
import BitcoinFeeMonitor from './fee-monitor.js'
|
|
35
36
|
import { brc20BalancesAndFeeAdapterFactory } from './ordinals/brc-20-balances-and-fee-adapter.js'
|
|
@@ -111,6 +112,7 @@ export const createBitcoinAssetFactory =
|
|
|
111
112
|
customTokens: brc20Enabled,
|
|
112
113
|
isTestnet,
|
|
113
114
|
signWithSigner: true,
|
|
115
|
+
supportsCustomFees: true,
|
|
114
116
|
}
|
|
115
117
|
|
|
116
118
|
const getFeeEstimator = getFeeEstimatorFactory({
|
|
@@ -351,6 +353,7 @@ export const createBitcoinAssetFactory =
|
|
|
351
353
|
createFeeMonitor: (args) =>
|
|
352
354
|
new BitcoinFeeMonitor({ ...args, insight: () => insightClient, assetName: asset.name }),
|
|
353
355
|
createHistoryMonitor,
|
|
356
|
+
customFees: createCustomFeesApi({ baseAsset: asset }),
|
|
354
357
|
features,
|
|
355
358
|
getDefaultAddressPath,
|
|
356
359
|
getFeeData: () => feeData,
|
|
@@ -360,6 +363,7 @@ export const createBitcoinAssetFactory =
|
|
|
360
363
|
getSupportedPurposes: createGetSupportedPurposes({ omitPurposes: omitSupportedPurposes }),
|
|
361
364
|
hasFeature: (feature) => !!features[feature], // @deprecated use api.features instead
|
|
362
365
|
createAccountState: () => accountStateClass,
|
|
366
|
+
privateKeyEncodingDefinition: { encoding: 'wif', version: [coinInfo.versions.private] },
|
|
363
367
|
sendTx,
|
|
364
368
|
signTx,
|
|
365
369
|
signHardware,
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
export const createCustomFeesApi = ({ baseAsset }) => {
|
|
2
|
+
return {
|
|
3
|
+
getRecommendedMinMaxFeeUnitPrices: ({ feeData }) => {
|
|
4
|
+
return {
|
|
5
|
+
recommended: feeData.fastestFee.toBaseNumber(),
|
|
6
|
+
min: feeData.minimumFee.toBaseNumber(),
|
|
7
|
+
max: feeData.fastestFee.toBaseNumber() * 3,
|
|
8
|
+
}
|
|
9
|
+
},
|
|
10
|
+
unit: 'sat/byte',
|
|
11
|
+
feeUnitPriceToNumber: (feeNumberUnit) => feeNumberUnit.div(1000).toBaseNumber(),
|
|
12
|
+
numberToFeeUnitPrice: (value) => baseAsset.currency.baseUnit(value * 1000),
|
|
13
|
+
isEnabled: ({ feeData }) => Boolean(feeData.rbfEnabled),
|
|
14
|
+
}
|
|
15
|
+
}
|