@exodus/bitcoin-plugin 1.21.0 → 1.21.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,14 @@
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.21.1](https://github.com/ExodusMovement/assets/compare/@exodus/bitcoin-plugin@1.21.0...@exodus/bitcoin-plugin@1.21.1) (2024-07-15)
7
+
8
+ **Note:** Version bump only for package @exodus/bitcoin-plugin
9
+
10
+
11
+
12
+
13
+
6
14
  ## [1.21.0](https://github.com/ExodusMovement/assets/compare/@exodus/bitcoin-plugin@1.20.0...@exodus/bitcoin-plugin@1.21.0) (2024-07-09)
7
15
 
8
16
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@exodus/bitcoin-plugin",
3
- "version": "1.21.0",
3
+ "version": "1.21.1",
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": "^1.1.2",
26
26
  "@exodus/bip44-constants": "^195.0.0",
27
- "@exodus/bitcoin-api": "^2.20.0",
27
+ "@exodus/bitcoin-api": "^2.20.1",
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": "0dc141fc6a249ac051a5ca591d46cbc81096a4f3"
67
+ "gitHead": "e1354557f99e81651fad1b25a4f72183587324b6"
68
68
  }
@@ -8,6 +8,7 @@ import {
8
8
  createAccountState,
9
9
  createAndBroadcastTXFactory,
10
10
  createBitcoinMonitor,
11
+ createMagicEdenBitcoinMonitor,
11
12
  createBtcLikeAddress,
12
13
  createBtcLikeKeys,
13
14
  getAddressesFromPrivateKeyFactory,
@@ -42,6 +43,11 @@ import { createWeb3API } from './web3'
42
43
 
43
44
  const DEFAULT_TICKS_BETWEEN_BRC20_FETCHES = 30
44
45
 
46
+ const MonitorType = {
47
+ DEFAULT: 'default',
48
+ ME: 'meMonitor',
49
+ }
50
+
45
51
  export const createBitcoinAssetFactory =
46
52
  ({ asset, apiUrl: defaultApiUrl, coinInfoNetwork, isTestnet = false }) =>
47
53
  (
@@ -63,6 +69,7 @@ export const createBitcoinAssetFactory =
63
69
  omitSupportedPurposes = [],
64
70
  defaultOutputType = 'P2WSH',
65
71
  changeAddressType = 'P2WPKH',
72
+ monitorType = MonitorType.DEFAULT,
66
73
  } = Object.create(null),
67
74
  } = Object.create(null)
68
75
  ) => {
@@ -220,7 +227,12 @@ export const createBitcoinAssetFactory =
220
227
  }),
221
228
  })
222
229
 
223
- const accountStateClass = createAccountState({ asset, ordinalsEnabled, brc20Enabled })
230
+ const accountStateClass = createAccountState({
231
+ asset,
232
+ ordinalsEnabled,
233
+ brc20Enabled,
234
+ isMagicEdenFungibleBalancesEnabled: monitorType === MonitorType.ME,
235
+ })
224
236
 
225
237
  const nfts = ordinalsEnabled
226
238
  ? nftsApiFactory({ ordinalChainIndex, asset, assetClientInterface })
@@ -231,7 +243,9 @@ export const createBitcoinAssetFactory =
231
243
  : {}
232
244
 
233
245
  const createHistoryMonitor = (args) => {
234
- const monitor = createBitcoinMonitor({
246
+ const createMonitor =
247
+ monitorType === MonitorType.ME ? createMagicEdenBitcoinMonitor : createBitcoinMonitor
248
+ const monitor = createMonitor({
235
249
  insightClient,
236
250
  ordinalsEnabled,
237
251
  ordinalChainIndex,