@exodus/bitcoin-plugin 1.25.2 → 1.26.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,30 @@
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.26.1](https://github.com/ExodusMovement/assets/compare/@exodus/bitcoin-plugin@1.26.0...@exodus/bitcoin-plugin@1.26.1) (2024-09-13)
7
+
8
+
9
+ ### Bug Fixes
10
+
11
+ * **BTC:** allow internal pubkey and sort xonly for multisig ([#3634](https://github.com/ExodusMovement/assets/issues/3634)) ([808bf65](https://github.com/ExodusMovement/assets/commit/808bf65f05576e2758bb32ad5654143577db7c38))
12
+
13
+
14
+
15
+ ## [1.26.0](https://github.com/ExodusMovement/assets/compare/@exodus/bitcoin-plugin@1.25.2...@exodus/bitcoin-plugin@1.26.0) (2024-09-11)
16
+
17
+
18
+ ### Features
19
+
20
+ * switch bitcoin to ESM ([#3433](https://github.com/ExodusMovement/assets/issues/3433)) ([8a2740f](https://github.com/ExodusMovement/assets/commit/8a2740f19401777e3333b89a2b7ac15febcb6bb8)), closes [#3286](https://github.com/ExodusMovement/assets/issues/3286)
21
+
22
+
23
+ ### Bug Fixes
24
+
25
+ * **bitcoin-plugin:** unpin key-utils dep ([#3309](https://github.com/ExodusMovement/assets/issues/3309)) ([90bb480](https://github.com/ExodusMovement/assets/commit/90bb4806cef9050f2754bc5aa0f1c09af21536ac))
26
+ * change regtest tests to bitcoin ([#3283](https://github.com/ExodusMovement/assets/issues/3283)) ([c530339](https://github.com/ExodusMovement/assets/commit/c53033980f56681d647d55f1b01e1caaae9420db))
27
+
28
+
29
+
6
30
  ## [1.25.2](https://github.com/ExodusMovement/assets/compare/@exodus/bitcoin-plugin@1.25.1...@exodus/bitcoin-plugin@1.25.2) (2024-08-18)
7
31
 
8
32
 
package/package.json CHANGED
@@ -1,7 +1,8 @@
1
1
  {
2
2
  "name": "@exodus/bitcoin-plugin",
3
- "version": "1.25.2",
3
+ "version": "1.26.1",
4
4
  "description": "Exodus bitcoin-plugin",
5
+ "type": "module",
5
6
  "main": "src/index.js",
6
7
  "files": [
7
8
  "src",
@@ -15,27 +16,24 @@
15
16
  "access": "restricted"
16
17
  },
17
18
  "scripts": {
18
- "test": "run -T exodus-test --jest --esbuild",
19
- "lint": "run -T eslint .",
19
+ "test": "run -T exodus-test --jest",
20
+ "lint": "run -T eslintc .",
20
21
  "lint:fix": "yarn lint --fix"
21
22
  },
22
23
  "dependencies": {
23
- "@exodus/asset-lib": "^4.2.2",
24
- "@exodus/basic-utils": "^2.1.0",
24
+ "@exodus/asset-lib": "^5.0.0",
25
25
  "@exodus/bip32": "^3.1.0",
26
26
  "@exodus/bip44-constants": "^195.0.0",
27
- "@exodus/bitcoin-api": "^2.22.1",
28
- "@exodus/bitcoin-lib": "^2.4.0",
29
- "@exodus/bitcoin-meta": "^1.0.2",
30
- "@exodus/bitcoinjs-lib": "^6.1.5-exodus.2",
27
+ "@exodus/bitcoin-api": "^2.24.0",
28
+ "@exodus/bitcoin-lib": "^2.4.2",
29
+ "@exodus/bitcoin-meta": "^2.0.0",
30
+ "@exodus/bitcoinjs-lib": "^6.1.6",
31
31
  "@exodus/crypto": "^1.0.0-rc.1",
32
32
  "@exodus/fetch": "^1.3.0",
33
- "@exodus/models": "^11.13.0",
33
+ "@exodus/models": "^12.0.1",
34
34
  "@exodus/text-encoding-utf8": "^1.0.2",
35
35
  "@exodus/web3-bitcoin-utils": "^2.1.0",
36
- "bip32-path": "^0.4.2",
37
36
  "coininfo": "^5.1.0",
38
- "create-hash": "^1.2.0",
39
37
  "lodash": "^4.17.21",
40
38
  "minimalistic-assert": "^1.0.1",
41
39
  "ms": "^2.1.3",
@@ -43,15 +41,14 @@
43
41
  },
44
42
  "devDependencies": {
45
43
  "@exodus/assets-testing": "^1.0.0",
46
- "@exodus/bitcoin-meta": "^1.0.2",
47
- "@exodus/bitcoinregtest-meta": "^1.0.1",
48
- "@exodus/bitcointestnet-meta": "^1.0.0",
49
- "@exodus/currency": "^2.3.2",
44
+ "@exodus/bitcoin-meta": "^2.0.0",
45
+ "@exodus/bitcoinregtest-meta": "^2.0.0",
46
+ "@exodus/bitcointestnet-meta": "^2.0.0",
47
+ "@exodus/currency": "^5.0.2",
50
48
  "@exodus/hdkey": "^2.1.0-exodus.0",
51
49
  "@exodus/key-identifier": "^1.1.1",
52
- "@exodus/key-utils": "3.2.1",
50
+ "@exodus/key-utils": "^3.2.1",
53
51
  "@exodus/keychain": "^6.4.0",
54
- "@exodus/nfts-proxy": "^2.10.1",
55
52
  "@exodus/tx-signer": "^2.3.1",
56
53
  "@scure/btc-signer": "^1.1.0",
57
54
  "bip39": "^2.6.0",
@@ -64,5 +61,5 @@
64
61
  "type": "git",
65
62
  "url": "git+https://github.com/ExodusMovement/assets.git"
66
63
  },
67
- "gitHead": "ceb41116fe6afaa75965a0ce9920e379097f2553"
64
+ "gitHead": "111f281ae5c514bb3585740b37a224a9488ea4e2"
68
65
  }
@@ -1,5 +1,7 @@
1
1
  import { WalletAccount } from '@exodus/models'
2
- import { without } from 'lodash'
2
+ import lodash from 'lodash'
3
+
4
+ const { without } = lodash
3
5
 
4
6
  export const ordinals84 = 'ordinals84'
5
7
  export const ordinals86 = 'ordinals86'
@@ -1,4 +1,4 @@
1
- import bip44Constants from '@exodus/bip44-constants/by-ticker'
1
+ import bip44Constants from '@exodus/bip44-constants/by-ticker.js'
2
2
  import {
3
3
  createAccountState,
4
4
  createAndBroadcastTXFactory,
@@ -22,25 +22,25 @@ import {
22
22
  signMessage,
23
23
  signTxFactory,
24
24
  } from '@exodus/bitcoin-api'
25
- import { parseCurrency } from '@exodus/bitcoin-api/src/fee/fee-utils'
25
+ import { parseCurrency } from '@exodus/bitcoin-api/src/fee/fee-utils.js'
26
26
  import { createGetKeyIdentifier } from '@exodus/bitcoin-lib'
27
27
  import * as bitcoinjsLib from '@exodus/bitcoinjs-lib'
28
28
  import { Tx } from '@exodus/models'
29
29
  import _coinInfo from 'coininfo'
30
30
  import assert from 'minimalistic-assert'
31
31
 
32
- import { createGetSupportedPurposes, getDefaultAddressPath } from './compatibility-modes'
33
- import { bitcoinFeeDataFactory } from './fee-data'
34
- import BitcoinFeeMonitor from './fee-monitor'
35
- import { brc20BalancesAndFeeAdapterFactory } from './ordinals/brc-20-balances-and-fee-adapter'
36
- import { brc20ApiClientFactory, DEFAULT_BRC_20_URL } from './ordinals/brc-20-client'
37
- import { createTokenFactory } from './ordinals/create-token-factory'
38
- import { inscriptionsServiceFactory } from './ordinals/inscriptions-service'
39
- import { nftsApiFactory } from './ordinals/nfts'
40
- import { DEFAULT_ORDINAL_CHAIN_INDEX } from './ordinals/ordinals-constants'
41
- import { reloadBrc20TokenBalances } from './ordinals/reload-brc20-token-balances'
42
- import { tickInscriptionIdIndexerFactory } from './ordinals/tick-inscription-id-indexer'
43
- import { createWeb3API } from './web3'
32
+ import { createGetSupportedPurposes, getDefaultAddressPath } from './compatibility-modes.js'
33
+ import { bitcoinFeeDataFactory } from './fee-data.js'
34
+ import BitcoinFeeMonitor from './fee-monitor.js'
35
+ import { brc20BalancesAndFeeAdapterFactory } from './ordinals/brc-20-balances-and-fee-adapter.js'
36
+ import { brc20ApiClientFactory, DEFAULT_BRC_20_URL } from './ordinals/brc-20-client.js'
37
+ import { createTokenFactory } from './ordinals/create-token-factory.js'
38
+ import { inscriptionsServiceFactory } from './ordinals/inscriptions-service.js'
39
+ import { nftsApiFactory } from './ordinals/nfts.js'
40
+ import { DEFAULT_ORDINAL_CHAIN_INDEX } from './ordinals/ordinals-constants.js'
41
+ import { reloadBrc20TokenBalances } from './ordinals/reload-brc20-token-balances.js'
42
+ import { tickInscriptionIdIndexerFactory } from './ordinals/tick-inscription-id-indexer.js'
43
+ import { createWeb3API } from './web3/index.js'
44
44
 
45
45
  const DEFAULT_TICKS_BETWEEN_BRC20_FETCHES = 30
46
46
 
package/src/index.js CHANGED
@@ -1,8 +1,8 @@
1
1
  import { asset } from '@exodus/bitcoin-meta'
2
2
 
3
- import { createBitcoinAssetFactory } from './create-asset'
3
+ import { createBitcoinAssetFactory } from './create-asset.js'
4
4
 
5
- export * from './create-asset' // for bitcoinregtest and bitcointestnet
5
+ export * from './create-asset.js' // for bitcoinregtest and bitcointestnet
6
6
 
7
7
  const apiUrl = 'https://bitcoin.a.exodus.io/insight/'
8
8
  export const createAsset = createBitcoinAssetFactory({ asset, apiUrl })
@@ -3,8 +3,8 @@ import { BumpType } from '@exodus/bitcoin-lib'
3
3
  import { Address, UtxoCollection } from '@exodus/models'
4
4
  import assert from 'minimalistic-assert'
5
5
 
6
- import { brc20Utils } from './brc-20-utils'
7
- import { createBrc20Command } from './create-brc-20-command'
6
+ import { brc20Utils } from './brc-20-utils.js'
7
+ import { createBrc20Command } from './create-brc-20-command.js'
8
8
 
9
9
  export const brc20BalancesAndFeeAdapterFactory = ({
10
10
  assetClientInterface,
@@ -1,7 +1,9 @@
1
1
  import { getOrdinalsUtxos } from '@exodus/bitcoin-api'
2
- import { sumBy } from 'lodash'
2
+ import lodash from 'lodash'
3
3
  import assert from 'minimalistic-assert'
4
4
 
5
+ const { sumBy } = lodash
6
+
5
7
  export const brc20Utils = {
6
8
  getKnownInscriptionIds: ({ asset, accountState }) => {
7
9
  assert(accountState, 'accountState is required')
@@ -1,6 +1,6 @@
1
1
  import assert from 'minimalistic-assert'
2
2
 
3
- import { brc20Utils } from './brc-20-utils'
3
+ import { brc20Utils } from './brc-20-utils.js'
4
4
 
5
5
  export const createBrc20Command = ({ asset, amount, accountState }) => {
6
6
  assert(asset.name !== asset.baseAsset.name, `${asset.name} should be a token!`)
@@ -1,7 +1,7 @@
1
1
  import { getOrdinalsUtxos } from '@exodus/bitcoin-api'
2
2
  import assert from 'minimalistic-assert'
3
3
 
4
- import { xverse49, xverse49NotMerged } from '../compatibility-modes'
4
+ import { xverse49, xverse49NotMerged } from '../compatibility-modes.js'
5
5
 
6
6
  export const getInscriptionAddresses = async ({
7
7
  assetClientInterface: aci,
@@ -1,13 +1,13 @@
1
1
  import { ecc, getECPair, getOrdinalsUtxos, toAsyncSigner, toXOnly } from '@exodus/bitcoin-api'
2
2
  import { getTxSequence } from '@exodus/bitcoin-lib'
3
3
  import * as bitcoinjsLib from '@exodus/bitcoinjs-lib'
4
- import { witnessStackToScriptWitness } from '@exodus/bitcoinjs-lib/src/psbt/psbtutils'
4
+ import { witnessStackToScriptWitness } from '@exodus/bitcoinjs-lib/src/psbt/psbtutils.js'
5
5
  import { randomBytes } from '@exodus/crypto/randomBytes'
6
6
  import { TextEncoder } from '@exodus/text-encoding-utf8'
7
7
  import assert from 'minimalistic-assert'
8
8
  import * as secp256k1 from 'tiny-secp256k1'
9
9
 
10
- import { DEFAULT_BRC20_POSTAGE, DEFAULT_ORDINAL_POSTAGE } from './ordinals-constants'
10
+ import { DEFAULT_BRC20_POSTAGE, DEFAULT_ORDINAL_POSTAGE } from './ordinals-constants.js'
11
11
 
12
12
  const encoder = new TextEncoder()
13
13
  export function createInscriptionScript({ xOnlyPublicKey, inscription }) {
@@ -1,9 +1,11 @@
1
1
  import { getOrdinalAddress, getOrdinalsUtxos, getUtxos, partitionUtxos } from '@exodus/bitcoin-api'
2
- import { isEqual, uniq } from 'lodash'
2
+ import lodash from 'lodash'
3
3
  import assert from 'minimalistic-assert'
4
4
 
5
- import { getInscriptionAddresses } from './get-inscription-addresses'
6
- import { isNftBrc20 } from './nft-utils'
5
+ import { getInscriptionAddresses } from './get-inscription-addresses.js'
6
+ import { isNftBrc20 } from './nft-utils.js'
7
+
8
+ const { isEqual, uniq } = lodash
7
9
 
8
10
  export const nftsApiFactory = ({ ordinalChainIndex, asset, assetClientInterface: aci }) => {
9
11
  assert(asset, 'asset is required')
@@ -1,7 +1,9 @@
1
- import { groupBy, mapValues } from 'lodash'
1
+ import lodash from 'lodash'
2
2
  import assert from 'minimalistic-assert'
3
3
 
4
- import { getInscriptionAddresses } from './get-inscription-addresses'
4
+ import { getInscriptionAddresses } from './get-inscription-addresses.js'
5
+
6
+ const { groupBy, mapValues } = lodash
5
7
 
6
8
  const toTxLog = ({ historyItem, baseAsset, asset }) => {
7
9
  const amount = asset.currency.defaultUnit(historyItem.brc20Amt || 0)
package/src/web3/index.js CHANGED
@@ -1,4 +1,4 @@
1
- import { createSimulateTransactions } from './createSimulateTransactions'
1
+ import { createSimulateTransactions } from './createSimulateTransactions.js'
2
2
 
3
3
  export const createWeb3API = (deps) => {
4
4
  return {