@exodus/bitcoin-plugin 1.23.0 → 1.25.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,24 @@
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.25.0](https://github.com/ExodusMovement/assets/compare/@exodus/bitcoin-plugin@1.24.0...@exodus/bitcoin-plugin@1.25.0) (2024-08-12)
7
+
8
+
9
+ ### Features
10
+
11
+ * bitcoin-likes plugin default export ([#3148](https://github.com/ExodusMovement/assets/issues/3148)) ([68460e1](https://github.com/ExodusMovement/assets/commit/68460e15fae473c96c1d4239449524fe6fd5658d))
12
+
13
+
14
+
15
+ ## [1.24.0](https://github.com/ExodusMovement/assets/compare/@exodus/bitcoin-plugin@1.23.0...@exodus/bitcoin-plugin@1.24.0) (2024-08-08)
16
+
17
+
18
+ ### Features
19
+
20
+ * move ME BTC monitor to the ME codebase ([#3118](https://github.com/ExodusMovement/assets/issues/3118)) ([2610e96](https://github.com/ExodusMovement/assets/commit/2610e966f5d078e6b9d87a08c4d86ad090400583))
21
+
22
+
23
+
6
24
  ## [1.23.0](https://github.com/ExodusMovement/assets/compare/@exodus/bitcoin-plugin@1.22.3...@exodus/bitcoin-plugin@1.23.0) (2024-08-08)
7
25
 
8
26
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@exodus/bitcoin-plugin",
3
- "version": "1.23.0",
3
+ "version": "1.25.0",
4
4
  "description": "Exodus bitcoin-plugin",
5
5
  "main": "src/index.js",
6
6
  "files": [
@@ -24,7 +24,7 @@
24
24
  "@exodus/basic-utils": "^2.1.0",
25
25
  "@exodus/bip32": "^3.1.0",
26
26
  "@exodus/bip44-constants": "^195.0.0",
27
- "@exodus/bitcoin-api": "^2.21.4",
27
+ "@exodus/bitcoin-api": "^2.22.0",
28
28
  "@exodus/bitcoin-lib": "^2.4.0",
29
29
  "@exodus/bitcoin-meta": "^1.0.2",
30
30
  "@exodus/bitcoinjs-lib": "^6.1.5-exodus.2",
@@ -64,5 +64,5 @@
64
64
  "type": "git",
65
65
  "url": "git+https://github.com/ExodusMovement/assets.git"
66
66
  },
67
- "gitHead": "9b0d4001b6844a054276211057b066b470b4ebca"
67
+ "gitHead": "98a9c6a1e556dd978988b48ece03d0c430049123"
68
68
  }
@@ -6,7 +6,6 @@ import {
6
6
  createBtcLikeAddress,
7
7
  createBtcLikeKeys,
8
8
  createEncodeMultisigContract,
9
- createMagicEdenBitcoinMonitor,
10
9
  createPrepareForSigning,
11
10
  createPsbtToUnsignedTx,
12
11
  getAddressesFromPrivateKeyFactory,
@@ -45,11 +44,6 @@ import { createWeb3API } from './web3'
45
44
 
46
45
  const DEFAULT_TICKS_BETWEEN_BRC20_FETCHES = 30
47
46
 
48
- const MonitorType = {
49
- DEFAULT: 'default',
50
- ME: 'meMonitor',
51
- }
52
-
53
47
  export const createBitcoinAssetFactory =
54
48
  ({ asset, apiUrl: defaultApiUrl, coinInfoNetwork, isTestnet = false }) =>
55
49
  (
@@ -71,7 +65,6 @@ export const createBitcoinAssetFactory =
71
65
  omitSupportedPurposes = [],
72
66
  defaultOutputType = 'P2WSH',
73
67
  changeAddressType = 'P2WPKH',
74
- monitorType = MonitorType.DEFAULT,
75
68
  } = Object.create(null),
76
69
  } = Object.create(null)
77
70
  ) => {
@@ -233,7 +226,6 @@ export const createBitcoinAssetFactory =
233
226
  asset,
234
227
  ordinalsEnabled,
235
228
  brc20Enabled,
236
- isMagicEdenFungibleBalancesEnabled: monitorType === MonitorType.ME,
237
229
  })
238
230
 
239
231
  const nfts = ordinalsEnabled
@@ -245,9 +237,8 @@ export const createBitcoinAssetFactory =
245
237
  : {}
246
238
 
247
239
  const createHistoryMonitor = (args) => {
248
- const createMonitor =
249
- monitorType === MonitorType.ME ? createMagicEdenBitcoinMonitor : createBitcoinMonitor
250
- const monitor = createMonitor({
240
+ const monitor = createBitcoinMonitor({
241
+ assetClientInterface,
251
242
  insightClient,
252
243
  ordinalsEnabled,
253
244
  ordinalChainIndex,
@@ -256,7 +247,6 @@ export const createBitcoinAssetFactory =
256
247
  refreshGapLimit,
257
248
  ...args,
258
249
  })
259
- const assetClientInterface = args.assetClientInterface
260
250
 
261
251
  if (brc20Enabled) {
262
252
  monitor.addHook('after-tick', async ({ walletAccount }) => {
@@ -402,5 +392,25 @@ export const createBitcoinAssetFactory =
402
392
  encodeMultisigContract,
403
393
  psbtToUnsignedTx,
404
394
  }
405
- return overrideCallback({ asset: fullAsset })
395
+
396
+ return overrideCallback({
397
+ asset: fullAsset,
398
+ config: {
399
+ apiUrl: customApiUrl || defaultApiUrl,
400
+ allowUnconfirmedRbfEnabledUtxos,
401
+ ordinalChainIndex,
402
+ ordinalsEnabled,
403
+ brc20Enabled,
404
+ brc20Url,
405
+ brc20TickInterval,
406
+ gapLimit,
407
+ refreshGapLimit,
408
+ feeDataCustomValues,
409
+ utxosDescendingOrder,
410
+ omitSupportedPurposes,
411
+ defaultOutputType,
412
+ changeAddressType,
413
+ },
414
+ insightClient,
415
+ })
406
416
  }
package/src/index.js CHANGED
@@ -6,3 +6,5 @@ export * from './create-asset' // for bitcoinregtest and bitcointestnet
6
6
 
7
7
  const apiUrl = 'https://bitcoin.a.exodus.io/insight/'
8
8
  export const createAsset = createBitcoinAssetFactory({ asset, apiUrl })
9
+ const assetPlugin = { createAsset }
10
+ export default assetPlugin