@exodus/bitcoin-api 2.22.1 → 2.23.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,25 @@
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
+ ## [2.23.0](https://github.com/ExodusMovement/assets/compare/@exodus/bitcoin-api@2.22.1...@exodus/bitcoin-api@2.23.0) (2024-09-11)
7
+
8
+
9
+ ### Features
10
+
11
+ * 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)
12
+
13
+
14
+ ### Bug Fixes
15
+
16
+ * **bitcoin-api:** add a missing exodus/bip32 dep ([#3457](https://github.com/ExodusMovement/assets/issues/3457)) ([d8b3499](https://github.com/ExodusMovement/assets/commit/d8b34998c78a55d56cdf787c4805e363336efd2d))
17
+
18
+
19
+ ### Reverts
20
+
21
+ * Revert "test(bitcoin-api): use dynamic import( instead of dynamic require( in createSignTestCases (#3286)" (#3300) ([92065cc](https://github.com/ExodusMovement/assets/commit/92065cc44a1ad02fe2330742810679f3594300bf)), closes [#3286](https://github.com/ExodusMovement/assets/issues/3286) [#3300](https://github.com/ExodusMovement/assets/issues/3300)
22
+
23
+
24
+
6
25
  ## [2.22.1](https://github.com/ExodusMovement/assets/compare/@exodus/bitcoin-api@2.22.0...@exodus/bitcoin-api@2.22.1) (2024-08-18)
7
26
 
8
27
 
package/package.json CHANGED
@@ -1,7 +1,8 @@
1
1
  {
2
2
  "name": "@exodus/bitcoin-api",
3
- "version": "2.22.1",
3
+ "version": "2.23.0",
4
4
  "description": "Exodus bitcoin-api",
5
+ "type": "module",
5
6
  "main": "src/index.js",
6
7
  "files": [
7
8
  "src",
@@ -14,23 +15,22 @@
14
15
  "access": "restricted"
15
16
  },
16
17
  "scripts": {
17
- "test": "run -T exodus-test --jest --esbuild",
18
- "lint": "run -T eslint .",
18
+ "test": "run -T exodus-test --jest",
19
+ "lint": "run -T eslintc .",
19
20
  "lint:fix": "yarn lint --fix"
20
21
  },
21
22
  "dependencies": {
22
- "@exodus/asset-lib": "^4.1.0",
23
- "@exodus/basic-utils": "^2.1.0",
24
- "@exodus/bip322-js": "^1.1.0-exodus.6",
23
+ "@exodus/asset-lib": "^5.0.0",
24
+ "@exodus/basic-utils": "^3.0.1",
25
+ "@exodus/bip32": "^3.1.0",
26
+ "@exodus/bip322-js": "^1.1.0",
25
27
  "@exodus/bip44-constants": "^195.0.0",
26
- "@exodus/bitcoin-lib": "^2.4.1",
27
- "@exodus/bitcoinjs-lib": "^6.1.5-exodus.2",
28
- "@exodus/currency": "^2.3.2",
29
- "@exodus/fetch": "^1.3.0",
28
+ "@exodus/bitcoin-lib": "^2.4.2",
29
+ "@exodus/bitcoinjs-lib": "^6.1.6",
30
+ "@exodus/currency": "^5.0.2",
30
31
  "@exodus/key-identifier": "^1.1.1",
31
- "@exodus/models": "^11.0.0",
32
+ "@exodus/models": "^12.0.1",
32
33
  "@exodus/simple-retry": "^0.0.6",
33
- "@exodus/timer": "^1.1.1",
34
34
  "bech32": "^1.1.3",
35
35
  "bip32-path": "^0.4.2",
36
36
  "bn.js": "^4.12.0",
@@ -44,19 +44,14 @@
44
44
  "ms": "^2.1.1",
45
45
  "secp256k1": "^3.0.1",
46
46
  "socket.io-client": "^2.1.1",
47
- "tiny-secp256k1": "^1.1.3",
48
47
  "url-join": "^4.0.0",
49
48
  "varuint-bitcoin": "^1.1.0",
50
49
  "wif": "^2.0.6"
51
50
  },
52
51
  "devDependencies": {
53
52
  "@exodus/assets-testing": "^1.0.0",
54
- "@exodus/bitcoin-meta": "^1.0.2",
55
- "@scure/base": "^1.1.3",
56
- "@scure/btc-signer": "^1.1.0",
57
- "bigi": "^1.4.2",
58
- "jest-when": "^3.5.1",
59
- "safe-buffer": "^5.2.1"
53
+ "@exodus/bitcoin-meta": "^2.0.0",
54
+ "jest-when": "^3.5.1"
60
55
  },
61
56
  "bugs": {
62
57
  "url": "https://github.com/ExodusMovement/assets/issues?q=is%3Aissue+is%3Aopen+label%3Abitcoin-api"
@@ -66,5 +61,5 @@
66
61
  "type": "git",
67
62
  "url": "git+https://github.com/ExodusMovement/assets.git"
68
63
  },
69
- "gitHead": "ceb41116fe6afaa75965a0ce9920e379097f2553"
64
+ "gitHead": "e9a0341b6e59b226e46b0e802ea1240c55724f68"
70
65
  }
package/src/balances.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import assert from 'minimalistic-assert'
2
2
 
3
- import { getUtxos } from './utxos-utils'
3
+ import { getUtxos } from './utxos-utils.js'
4
4
 
5
5
  // known issue!! fee data is static here!
6
6
  // Hydra's balances's module does not provide it when calling asset.api.getBalances
@@ -1,6 +1,6 @@
1
- import ECPairFactory from 'ecpair'
1
+ import { ECPairFactory } from 'ecpair'
2
2
 
3
- import { ecc } from './ecc'
3
+ import { ecc } from './ecc/index.js'
4
4
 
5
5
  let ECPair
6
6
 
@@ -1,3 +1,3 @@
1
- export * from './ecc'
2
- export { scriptClassify } from './script-classify'
3
- export * from './ec-pair'
1
+ export * from './ecc/index.js'
2
+ export { scriptClassify } from './script-classify/index.js'
3
+ export * from './ec-pair.js'
@@ -1,9 +1,11 @@
1
1
  import * as bitcoinjsOriginal from '@exodus/bitcoinjs-lib'
2
2
  import * as bech32 from 'bech32'
3
3
  import bs58check from 'bs58check'
4
- import { identity, pickBy } from 'lodash'
4
+ import lodash from 'lodash'
5
5
  import assert from 'minimalistic-assert'
6
6
 
7
+ const { identity, pickBy } = lodash
8
+
7
9
  export const createBtcLikeAddress = ({
8
10
  versions,
9
11
  coinInfo,
@@ -1,14 +1,16 @@
1
1
  import * as defaultBitcoinjsLib from '@exodus/bitcoinjs-lib'
2
2
  import * as bech32 from 'bech32'
3
3
  import bs58check from 'bs58check'
4
- import { identity, pickBy } from 'lodash'
4
+ import lodash from 'lodash'
5
5
  import assert from 'minimalistic-assert'
6
6
  import secp256k1 from 'secp256k1'
7
7
  import wif from 'wif'
8
8
 
9
- import { ecc } from './bitcoinjs-lib/ecc'
10
- import { toXOnly } from './bitcoinjs-lib/ecc-utils'
11
- import { hash160 } from './hash-utils'
9
+ import { ecc } from './bitcoinjs-lib/ecc/index.js'
10
+ import { toXOnly } from './bitcoinjs-lib/ecc-utils.js'
11
+ import { hash160 } from './hash-utils.js'
12
+
13
+ const { identity, pickBy } = lodash
12
14
 
13
15
  export const publicKeyToHashFactory = (p2pkh) => (publicKey) => {
14
16
  const payload = Buffer.concat([Buffer.from([p2pkh]), hash160(publicKey)])
@@ -1,3 +1,3 @@
1
1
  // back compatibility. Use @exodus/bip44-constants/by-ticker instead
2
2
 
3
- export { default } from '@exodus/bip44-constants/by-ticker'
3
+ export { default } from '@exodus/bip44-constants/by-ticker.js'
@@ -1,10 +1,10 @@
1
1
  import { BumpType } from '@exodus/bitcoin-lib'
2
2
  import assert from 'minimalistic-assert'
3
3
 
4
- import { findUnconfirmedSentRbfTxs } from '../tx-utils'
5
- import { getUnconfirmedTxAncestorMap } from '../unconfirmed-ancestor-data'
6
- import { getUsableUtxos, getUtxos } from '../utxos-utils'
7
- import { selectUtxos } from './utxo-selector'
4
+ import { findUnconfirmedSentRbfTxs } from '../tx-utils.js'
5
+ import { getUnconfirmedTxAncestorMap } from '../unconfirmed-ancestor-data.js'
6
+ import { getUsableUtxos, getUtxos } from '../utxos-utils.js'
7
+ import { selectUtxos } from './utxo-selector.js'
8
8
 
9
9
  export const ASSET_NAMES = ['bitcoin', 'bitcoinregtest', 'bitcointestnet']
10
10
 
@@ -2,9 +2,9 @@ import { UtxoCollection } from '@exodus/models'
2
2
  import assert from 'minimalistic-assert'
3
3
  import * as varuint from 'varuint-bitcoin'
4
4
 
5
- import { scriptClassify } from '../bitcoinjs-lib'
6
- import createDefaultFeeEstimator, { isHex } from './fee-utils'
7
- import { scriptClassifierFactory } from './script-classifier'
5
+ import { scriptClassify } from '../bitcoinjs-lib/index.js'
6
+ import createDefaultFeeEstimator, { isHex } from './fee-utils.js'
7
+ import { scriptClassifierFactory } from './script-classifier.js'
8
8
 
9
9
  const { P2PKH, P2SH, P2WPKH, P2WSH, P2TR } = scriptClassify.types
10
10
 
@@ -2,7 +2,7 @@ import { isNumberUnit, UnitType } from '@exodus/currency'
2
2
  import { UtxoCollection } from '@exodus/models'
3
3
  import assert from 'minimalistic-assert'
4
4
 
5
- import { resolveExtraFeeOfTx } from '../unconfirmed-ancestor-data'
5
+ import { resolveExtraFeeOfTx } from '../unconfirmed-ancestor-data.js'
6
6
 
7
7
  export const isHex = (s) => typeof s === 'string' && /[\da-f]*/.test(s.toLowerCase())
8
8
 
@@ -1,16 +1,16 @@
1
1
  import assert from 'minimalistic-assert'
2
2
 
3
- import { findUnconfirmedSentRbfTxs } from '../tx-utils'
4
- import { getUnconfirmedTxAncestorMap } from '../unconfirmed-ancestor-data'
3
+ import { findUnconfirmedSentRbfTxs } from '../tx-utils.js'
4
+ import { getUnconfirmedTxAncestorMap } from '../unconfirmed-ancestor-data.js'
5
5
  import {
6
6
  getInscriptionIds,
7
7
  getOrdinalsUtxos,
8
8
  getTransferOrdinalsUtxos,
9
9
  getUsableUtxos,
10
10
  getUtxos,
11
- } from '../utxos-utils'
12
- import { canBumpTx } from './can-bump-tx'
13
- import { getUtxosData } from './utxo-selector'
11
+ } from '../utxos-utils.js'
12
+ import { canBumpTx } from './can-bump-tx.js'
13
+ import { getUtxosData } from './utxo-selector.js'
14
14
 
15
15
  export class GetFeeResolver {
16
16
  #getFeeEstimator
package/src/fee/index.js CHANGED
@@ -1,2 +1,2 @@
1
- export * from './get-fee-resolver'
2
- export { default as getFeeEstimatorFactory } from './fee-estimator'
1
+ export * from './get-fee-resolver.js'
2
+ export { default as getFeeEstimatorFactory } from './fee-estimator.js'
@@ -2,7 +2,7 @@ import { memoizeLruCache } from '@exodus/asset-lib'
2
2
  import createHash from 'create-hash'
3
3
  import assert from 'minimalistic-assert'
4
4
 
5
- import { scriptClassify } from '../bitcoinjs-lib'
5
+ import { scriptClassify } from '../bitcoinjs-lib/index.js'
6
6
 
7
7
  const { P2PKH, P2SH, P2WPKH, P2WSH, P2TR } = scriptClassify.types
8
8
 
@@ -1,10 +1,12 @@
1
1
  import NumberUnit from '@exodus/currency'
2
2
  import { UtxoCollection } from '@exodus/models'
3
- import { sortBy } from 'lodash'
3
+ import lodash from 'lodash'
4
4
  import assert from 'minimalistic-assert'
5
5
 
6
- import { getConfirmedOrRfbDisabledUtxos, getConfirmedUtxos } from '../utxos-utils'
7
- import { getExtraFee } from './fee-utils'
6
+ import { getConfirmedOrRfbDisabledUtxos, getConfirmedUtxos } from '../utxos-utils.js'
7
+ import { getExtraFee } from './fee-utils.js'
8
+
9
+ const { sortBy } = lodash
8
10
 
9
11
  const MIN_RELAY_FEE = 1000
10
12
 
package/src/index.js CHANGED
@@ -1,25 +1,25 @@
1
- export * from './account-state'
2
- export * from './balances'
3
- export * from './btc-address'
4
- export * from './btc-like-address'
5
- export * from './btc-like-keys'
6
- export * from './bitcoinjs-lib'
7
- export { default as InsightAPIClient } from './insight-api-client'
8
- export { default as InsightWSClient } from './insight-api-client/ws'
9
- export { default as bip44Constants } from './constants/bip44'
10
- export * from './tx-send'
11
- export * from './tx-sign'
12
- export * from './fee'
13
- export * from './utxos-utils'
14
- export * from './tx-log'
15
- export * from './unconfirmed-ancestor-data'
16
- export * from './parse-unsigned-tx'
17
- export { getCreateBatchTransaction } from './tx-send/batch-tx'
18
- export { createPsbtToUnsignedTx } from './psbt-utils'
19
- export * from './insight-api-client/util'
20
- export * from './move-funds'
21
- export { createEncodeMultisigContract } from './multisig-address'
22
- export { toAsyncSigner } from './tx-sign/taproot'
23
- export { toXOnly } from './bitcoinjs-lib/ecc-utils'
24
- export * from './ordinals-utils'
25
- export { signMessage } from './sign-message'
1
+ export * from './account-state.js'
2
+ export * from './balances.js'
3
+ export * from './btc-address.js'
4
+ export * from './btc-like-address.js'
5
+ export * from './btc-like-keys.js'
6
+ export * from './bitcoinjs-lib/index.js'
7
+ export { default as InsightAPIClient } from './insight-api-client/index.js'
8
+ export { default as InsightWSClient } from './insight-api-client/ws.js'
9
+ export { default as bip44Constants } from './constants/bip44.js'
10
+ export * from './tx-send/index.js'
11
+ export * from './tx-sign/index.js'
12
+ export * from './fee/index.js'
13
+ export * from './utxos-utils.js'
14
+ export * from './tx-log/index.js'
15
+ export * from './unconfirmed-ancestor-data.js'
16
+ export * from './parse-unsigned-tx.js'
17
+ export { getCreateBatchTransaction } from './tx-send/batch-tx.js'
18
+ export { createPsbtToUnsignedTx } from './psbt-utils.js'
19
+ export * from './insight-api-client/util.js'
20
+ export * from './move-funds.js'
21
+ export { createEncodeMultisigContract } from './multisig-address.js'
22
+ export { toAsyncSigner } from './tx-sign/taproot.js'
23
+ export { toXOnly } from './bitcoinjs-lib/ecc-utils.js'
24
+ export * from './ordinals-utils.js'
25
+ export { signMessage } from './sign-message.js'
@@ -1,9 +1,10 @@
1
- import { fetch } from '@exodus/fetch'
2
1
  import { retry } from '@exodus/simple-retry'
3
2
  import delay from 'delay'
4
- import { isEmpty } from 'lodash'
3
+ import lodash from 'lodash'
5
4
  import urlJoin from 'url-join'
6
5
 
6
+ const { isEmpty } = lodash
7
+
7
8
  const getTextFromResponse = async (response) => {
8
9
  try {
9
10
  const responseBody = await response.text()
@@ -1,6 +1,8 @@
1
- import { groupBy, sortBy } from 'lodash'
1
+ import lodash from 'lodash'
2
2
  import assert from 'minimalistic-assert'
3
3
 
4
+ const { groupBy, sortBy } = lodash
5
+
4
6
  // return first to last (ALSO FILTERS)
5
7
  // we need to do this because Insight often returns the blocktime as time and many
6
8
  // txs may fall inside the same block, but if one is an input to other, it should preceed
package/src/move-funds.js CHANGED
@@ -3,7 +3,7 @@ import assert from 'minimalistic-assert'
3
3
  import secp256k1 from 'secp256k1'
4
4
  import wif from 'wif'
5
5
 
6
- import { createInputs, createOutput, getNonWitnessTxs } from './tx-send'
6
+ import { createInputs, createOutput, getNonWitnessTxs } from './tx-send/index.js'
7
7
 
8
8
  const isValidPrivateKey = (privateKey) => {
9
9
  try {
@@ -1,7 +1,7 @@
1
1
  import * as defaultBitcoinjsLib from '@exodus/bitcoinjs-lib'
2
2
 
3
- import { ecc as defaultEcc } from './bitcoinjs-lib/ecc'
4
- import { toXOnly } from './bitcoinjs-lib/ecc-utils'
3
+ import { ecc as defaultEcc } from './bitcoinjs-lib/ecc/index.js'
4
+ import { toXOnly } from './bitcoinjs-lib/ecc-utils.js'
5
5
 
6
6
  // Key to use when key path spending is disabled https://github.com/bitcoin/bips/blob/master/bip-0341.mediawiki#constructing-and-spending-taproot-outputs
7
7
  const DUMMY_TAPROOT_PUBKEY = Buffer.from(
@@ -1,13 +1,15 @@
1
1
  import { Address, UtxoCollection } from '@exodus/models'
2
- import { compact, isEqual, uniq } from 'lodash'
2
+ import lodash from 'lodash'
3
3
  import assert from 'minimalistic-assert'
4
4
  import ms from 'ms'
5
5
 
6
- import { isChangeAddress, isReceiveAddress } from '../address-utils'
7
- import { orderTxs } from '../insight-api-client/util'
8
- import { getOrdinalAddress } from '../ordinals-utils'
9
- import { getOrdinalsUtxos, getUtxos, partitionUtxos } from '../utxos-utils'
10
- import { indexOrdinalUnconfirmedTx } from './ordinals-indexer-utils'
6
+ import { isChangeAddress, isReceiveAddress } from '../address-utils.js'
7
+ import { orderTxs } from '../insight-api-client/util.js'
8
+ import { getOrdinalAddress } from '../ordinals-utils.js'
9
+ import { getOrdinalsUtxos, getUtxos, partitionUtxos } from '../utxos-utils.js'
10
+ import { indexOrdinalUnconfirmedTx } from './ordinals-indexer-utils.js'
11
+
12
+ const { compact, isEqual, uniq } = lodash
11
13
 
12
14
  // Time to check whether to drop a sent tx
13
15
  const SENT_TIME_TO_DROP = ms('2m')
@@ -1,13 +1,15 @@
1
1
  import { BaseMonitor } from '@exodus/asset-lib'
2
2
  import delay from 'delay'
3
- import { isEmpty, isEqual, pickBy } from 'lodash'
3
+ import lodash from 'lodash'
4
4
  import assert from 'minimalistic-assert'
5
5
  import ms from 'ms'
6
6
 
7
- import { normalizeInsightConfig, toWSUrl } from '../insight-api-client/util'
8
- import InsightWSClient from '../insight-api-client/ws'
9
- import { resolveUnconfirmedAncestorData } from '../unconfirmed-ancestor-data'
10
- import { BitcoinMonitorScanner } from './bitcoin-monitor-scanner'
7
+ import { normalizeInsightConfig, toWSUrl } from '../insight-api-client/util.js'
8
+ import InsightWSClient from '../insight-api-client/ws.js'
9
+ import { resolveUnconfirmedAncestorData } from '../unconfirmed-ancestor-data.js'
10
+ import { BitcoinMonitorScanner } from './bitcoin-monitor-scanner.js'
11
+
12
+ const { isEmpty, isEqual, pickBy } = lodash
11
13
 
12
14
  // NOTE: this is a frankenstein mashup of Exodus desktop
13
15
  // assets-refresh/insight action + Neo monitor
@@ -1,2 +1,2 @@
1
- export * from './bitcoin-monitor'
2
- export * from './bitcoin-monitor-scanner'
1
+ export * from './bitcoin-monitor.js'
2
+ export * from './bitcoin-monitor-scanner.js'
@@ -1,5 +1,7 @@
1
1
  import { memoizeLruCache } from '@exodus/asset-lib'
2
- import { cloneDeep } from 'lodash'
2
+ import lodash from 'lodash'
3
+
4
+ const { cloneDeep } = lodash
3
5
 
4
6
  export const indexOutputs = ({ tx, currency }) => {
5
7
  const inscriptions = []
@@ -1,14 +1,12 @@
1
- // eslint-disable-next-line @exodus/import/no-extraneous-dependencies
2
1
  import BIP32 from '@exodus/bip32'
3
2
  import { Psbt } from '@exodus/bitcoinjs-lib'
4
3
  import BipPath from 'bip32-path'
5
- // Using this notation so it can be mocked by jest
6
- import doShuffle from 'lodash/shuffle'
4
+ import lodash from 'lodash' // mockable in tests
7
5
  import assert from 'minimalistic-assert'
8
6
 
9
- import { selectUtxos } from '../fee/utxo-selector'
10
- import { getUnconfirmedTxAncestorMap } from '../unconfirmed-ancestor-data'
11
- import { getUsableUtxos, getUtxos } from '../utxos-utils'
7
+ import { selectUtxos } from '../fee/utxo-selector.js'
8
+ import { getUnconfirmedTxAncestorMap } from '../unconfirmed-ancestor-data.js'
9
+ import { getUsableUtxos, getUtxos } from '../utxos-utils.js'
12
10
 
13
11
  const DUST_VALUES = {
14
12
  P2WPKH: 294,
@@ -65,7 +63,7 @@ export const getCreateBatchTransaction = ({
65
63
 
66
64
  const psbt = new Psbt({ network: asset.coinInfo.toBitcoinJS() })
67
65
 
68
- for (const utxo of doShuffle(selectedUtxos.toArray())) {
66
+ for (const utxo of lodash.shuffle(selectedUtxos.toArray())) {
69
67
  const path = addressPathsMap[utxo.address]
70
68
  if (!path) {
71
69
  throw new Error(`Path missing for input address ${utxo.address}`)
@@ -153,7 +151,7 @@ export const getCreateBatchTransaction = ({
153
151
  recipients.push(output)
154
152
  }
155
153
 
156
- for (const recipient of doShuffle(recipients)) {
154
+ for (const recipient of lodash.shuffle(recipients)) {
157
155
  psbt.addOutput({
158
156
  address: recipient.address,
159
157
  value: parseInt(recipient.amount.toBaseString(), 10),
@@ -5,21 +5,21 @@ import { retry } from '@exodus/simple-retry'
5
5
  import lodash from 'lodash'
6
6
  import assert from 'minimalistic-assert'
7
7
 
8
- import { parseCurrency } from '../fee/fee-utils'
9
- import { selectUtxos } from '../fee/utxo-selector'
10
- import { findUnconfirmedSentRbfTxs } from '../tx-utils'
11
- import { getUnconfirmedTxAncestorMap } from '../unconfirmed-ancestor-data'
8
+ import { parseCurrency } from '../fee/fee-utils.js'
9
+ import { selectUtxos } from '../fee/utxo-selector.js'
10
+ import { findUnconfirmedSentRbfTxs } from '../tx-utils.js'
11
+ import { getUnconfirmedTxAncestorMap } from '../unconfirmed-ancestor-data.js'
12
12
  import {
13
13
  getInscriptionIds,
14
14
  getOrdinalsUtxos,
15
15
  getTransferOrdinalsUtxos,
16
16
  getUsableUtxos,
17
17
  getUtxos,
18
- } from '../utxos-utils'
18
+ } from '../utxos-utils.js'
19
19
  import {
20
20
  createInputs as dogecoinCreateInputs,
21
21
  createOutput as dogecoinCreateOutput,
22
- } from './dogecoin'
22
+ } from './dogecoin.js'
23
23
 
24
24
  const ASSETS_SUPPORTED_BIP_174 = new Set([
25
25
  'bitcoin',
@@ -5,7 +5,7 @@ import lodash from 'lodash'
5
5
  import assert from 'minimalistic-assert'
6
6
  import secp256k1 from 'secp256k1'
7
7
 
8
- import { getECPair } from '../bitcoinjs-lib'
8
+ import { getECPair } from '../bitcoinjs-lib/index.js'
9
9
 
10
10
  const ECPair = getECPair()
11
11
 
@@ -1,9 +1,9 @@
1
1
  import { payments, Transaction } from '@exodus/bitcoinjs-lib'
2
- import * as bip371 from '@exodus/bitcoinjs-lib/src/psbt/bip371'
2
+ import * as bip371 from '@exodus/bitcoinjs-lib/src/psbt/bip371.js'
3
3
 
4
- import { toXOnly } from '../bitcoinjs-lib/ecc-utils'
5
- import { createGetKeyWithMetadata } from './create-get-key-and-purpose'
6
- import { toAsyncBufferSigner, toAsyncSigner } from './taproot'
4
+ import { toXOnly } from '../bitcoinjs-lib/ecc-utils.js'
5
+ import { createGetKeyWithMetadata } from './create-get-key-and-purpose.js'
6
+ import { toAsyncBufferSigner, toAsyncSigner } from './taproot.js'
7
7
 
8
8
  export function createSignWithWallet({
9
9
  signer,
@@ -1,8 +1,8 @@
1
1
  import assert from 'minimalistic-assert'
2
2
 
3
- import { extractTransaction } from './common'
4
- import { createSignWithWallet } from './create-sign-with-wallet'
5
- import { createPrepareForSigning } from './default-prepare-for-signing'
3
+ import { extractTransaction } from './common.js'
4
+ import { createSignWithWallet } from './create-sign-with-wallet.js'
5
+ import { createPrepareForSigning } from './default-prepare-for-signing.js'
6
6
 
7
7
  export const signTxFactory = ({
8
8
  assetName,
@@ -1,7 +1,7 @@
1
1
  import assert from 'minimalistic-assert'
2
2
 
3
- import { extractTransaction } from './common'
4
- import { createPrepareForSigning } from './default-prepare-for-signing'
3
+ import { extractTransaction } from './common.js'
4
+ import { createPrepareForSigning } from './default-prepare-for-signing.js'
5
5
 
6
6
  export const signHardwareFactory = ({ assetName, resolvePurpose, keys, coinInfo }) => {
7
7
  assert(assetName, 'assetName is required')
@@ -1,4 +1,4 @@
1
- export { signTxFactory } from './default-create-tx'
2
- export { serializeTx } from './common'
3
- export { signHardwareFactory } from './default-sign-hardware'
4
- export { createPrepareForSigning } from './default-prepare-for-signing'
1
+ export { signTxFactory } from './default-create-tx.js'
2
+ export { serializeTx } from './common.js'
3
+ export { signHardwareFactory } from './default-sign-hardware.js'
4
+ export { createPrepareForSigning } from './default-prepare-for-signing.js'
@@ -1,8 +1,8 @@
1
1
  import { crypto } from '@exodus/bitcoinjs-lib'
2
2
  import assert from 'minimalistic-assert'
3
3
 
4
- import { getECPair } from '../bitcoinjs-lib'
5
- import { ecc } from '../bitcoinjs-lib/ecc'
4
+ import { ecc } from '../bitcoinjs-lib/ecc/index.js'
5
+ import { getECPair } from '../bitcoinjs-lib/index.js'
6
6
  import defaultEntropy from './default-entropy.cjs'
7
7
 
8
8
  const ECPair = getECPair()
package/src/tx-utils.js CHANGED
@@ -1,4 +1,4 @@
1
- import { resolveExtraFeeOfTx } from './unconfirmed-ancestor-data'
1
+ import { resolveExtraFeeOfTx } from './unconfirmed-ancestor-data.js'
2
2
 
3
3
  export const findUnconfirmedSentRbfTxs = (txSet) =>
4
4
  [...txSet].filter(
@@ -2,7 +2,7 @@
2
2
  import { UtxoCollection } from '@exodus/models'
3
3
  import assert from 'minimalistic-assert'
4
4
 
5
- import { findLargeUnconfirmedTxs } from './tx-utils'
5
+ import { findLargeUnconfirmedTxs } from './tx-utils.js'
6
6
 
7
7
  const MAX_ORDINAL_VALUE_POSTAGE = 10_000
8
8