@xchainjs/xchain-bitcoin 2.0.7 → 2.0.9

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/lib/index.esm.js CHANGED
@@ -5,7 +5,7 @@ import { HDKey } from '@scure/bip32';
5
5
  import * as Bitcoin from 'bitcoinjs-lib';
6
6
  import { ECPairFactory } from 'ecpair';
7
7
  import { Client as Client$1 } from '@xchainjs/xchain-utxo';
8
- import accumulative from 'coinselect/accumulative';
8
+ import accumulative from 'coinselect/accumulative.js';
9
9
  import { AssetType } from '@xchainjs/xchain-util';
10
10
  import { SochainProvider, SochainNetwork, HaskoinProvider, HaskoinNetwork, BlockcypherProvider, BlockcypherNetwork, BitgoProvider } from '@xchainjs/xchain-utxo-providers';
11
11
  import AppBtc from '@ledgerhq/hw-app-btc';
@@ -160,7 +160,7 @@ const validateAddress = (address, network) => {
160
160
  Bitcoin.address.toOutputScript(address, btcNetwork(network)); // Try to convert the address to an output script using the specified network
161
161
  return true; // If successful, the address is valid
162
162
  }
163
- catch (error) {
163
+ catch (_error) {
164
164
  return false; // If an error occurs, the address is invalid
165
165
  }
166
166
  };
@@ -503,7 +503,7 @@ class ClientKeystore extends Client {
503
503
  const txId = yield this.roundRobinBroadcastTx(txHex);
504
504
  return txId;
505
505
  }
506
- catch (err) {
506
+ catch (_err) {
507
507
  // If broadcasting fails, return an error message with a link to the explorer
508
508
  const error = `Server error, please check explorer for tx confirmation ${this.explorerProviders[this.network].getExplorerTxUrl(txHash)}`;
509
509
  return error;
package/lib/index.js CHANGED
@@ -7,7 +7,7 @@ var bip32 = require('@scure/bip32');
7
7
  var Bitcoin = require('bitcoinjs-lib');
8
8
  var ecpair = require('ecpair');
9
9
  var xchainUtxo = require('@xchainjs/xchain-utxo');
10
- var accumulative = require('coinselect/accumulative');
10
+ var accumulative = require('coinselect/accumulative.js');
11
11
  var xchainUtil = require('@xchainjs/xchain-util');
12
12
  var xchainUtxoProviders = require('@xchainjs/xchain-utxo-providers');
13
13
  var AppBtc = require('@ledgerhq/hw-app-btc');
@@ -187,7 +187,7 @@ const validateAddress = (address, network) => {
187
187
  Bitcoin__namespace.address.toOutputScript(address, btcNetwork(network)); // Try to convert the address to an output script using the specified network
188
188
  return true; // If successful, the address is valid
189
189
  }
190
- catch (error) {
190
+ catch (_error) {
191
191
  return false; // If an error occurs, the address is invalid
192
192
  }
193
193
  };
@@ -530,7 +530,7 @@ class ClientKeystore extends Client {
530
530
  const txId = yield this.roundRobinBroadcastTx(txHex);
531
531
  return txId;
532
532
  }
533
- catch (err) {
533
+ catch (_err) {
534
534
  // If broadcasting fails, return an error message with a link to the explorer
535
535
  const error = `Server error, please check explorer for tx confirmation ${this.explorerProviders[this.network].getExplorerTxUrl(txHash)}`;
536
536
  return error;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xchainjs/xchain-bitcoin",
3
- "version": "2.0.7",
3
+ "version": "2.0.9",
4
4
  "description": "Custom Bitcoin client and utilities used by XChainJS clients",
5
5
  "keywords": [
6
6
  "XChain",
@@ -29,25 +29,25 @@
29
29
  "build:release": "yarn exec rm -rf release && yarn pack && yarn exec \"mkdir release && tar zxvf package.tgz --directory release && rm package.tgz\"",
30
30
  "test": "jest",
31
31
  "e2e": "jest --config jest.config.e2e.mjs",
32
- "lint": "eslint \"{src,__tests__}/**/*.ts\" --fix --max-warnings 0",
32
+ "lint": "eslint --config ../../eslint.config.mjs \"{src,__tests__}/**/*.ts\" --fix --max-warnings 0",
33
33
  "postversion": "git push --follow-tags"
34
34
  },
35
35
  "dependencies": {
36
36
  "@bitcoin-js/tiny-secp256k1-asmjs": "^2.2.3",
37
37
  "@ledgerhq/hw-app-btc": "^10.9.0",
38
38
  "@scure/bip32": "^1.7.0",
39
- "@xchainjs/xchain-client": "2.0.7",
40
- "@xchainjs/xchain-crypto": "1.0.5",
41
- "@xchainjs/xchain-util": "2.0.4",
42
- "@xchainjs/xchain-utxo": "2.0.7",
43
- "@xchainjs/xchain-utxo-providers": "2.0.7",
39
+ "@xchainjs/xchain-client": "2.0.9",
40
+ "@xchainjs/xchain-crypto": "1.0.6",
41
+ "@xchainjs/xchain-util": "2.0.5",
42
+ "@xchainjs/xchain-utxo": "2.0.9",
43
+ "@xchainjs/xchain-utxo-providers": "2.0.9",
44
44
  "bitcoinjs-lib": "^6.1.7",
45
45
  "coinselect": "3.1.12",
46
46
  "ecpair": "2.1.0"
47
47
  },
48
48
  "devDependencies": {
49
49
  "@ledgerhq/hw-transport-node-hid": "^6.28.6",
50
- "axios": "^1.8.4",
50
+ "axios": "1.12.1",
51
51
  "axios-mock-adapter": "^2.1.0"
52
52
  },
53
53
  "publishConfig": {