@atomicfinance/bitcoin-dlc-provider 4.0.2 → 4.1.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.
@@ -28,6 +28,7 @@ import {
28
28
  CreateSignatureHashRequest,
29
29
  CreateSplicedDlcTransactionsRequest,
30
30
  CreateSplicedDlcTransactionsResponse,
31
+ DlcInputInfo,
31
32
  DlcInputInfoRequest,
32
33
  DlcProvider,
33
34
  GetRawDlcFundingInputSignatureRequest,
@@ -37,6 +38,7 @@ import {
37
38
  GetRawRefundTxSignatureRequest,
38
39
  GetRawRefundTxSignatureResponse,
39
40
  Input,
41
+ InputSupplementationMode,
40
42
  Messages,
41
43
  PayoutRequest,
42
44
  SignCetRequest,
@@ -58,10 +60,6 @@ import {
58
60
  VerifyRefundTxSignatureResponse,
59
61
  VerifySignatureRequest,
60
62
  } from '@atomicfinance/types';
61
- import {
62
- DlcInputInfo,
63
- InputSupplementationMode,
64
- } from '@atomicfinance/types/lib/models/Input';
65
63
  import { sleep } from '@atomicfinance/utils';
66
64
  import { Script, Sequence, Tx } from '@node-dlc/bitcoin';
67
65
  import { StreamReader } from '@node-dlc/bufio';
@@ -172,7 +170,7 @@ export default class BitcoinDlcProvider
172
170
  if (targetPubkeys.includes(pubkeyHex)) {
173
171
  return Buffer.from(keyPair.privateKey).toString('hex');
174
172
  }
175
- } catch (error) {
173
+ } catch {
176
174
  continue;
177
175
  }
178
176
  }
@@ -205,7 +203,7 @@ export default class BitcoinDlcProvider
205
203
  }
206
204
  }
207
205
  }
208
- } catch (error) {
206
+ } catch {
209
207
  continue;
210
208
  }
211
209
  }
@@ -2974,10 +2972,10 @@ Payout Group not found even with brute force search',
2974
2972
  dlcAccept.acceptCollateral = acceptCollateralSatoshis;
2975
2973
  dlcAccept.fundingPubkey = fundingPubKey;
2976
2974
  dlcAccept.payoutSpk = payoutSPK;
2977
- dlcAccept.payoutSerialId = dlcAccept.payoutSerialId = payoutSerialId;
2975
+ dlcAccept.payoutSerialId = payoutSerialId;
2978
2976
  dlcAccept.fundingInputs = fundingInputs;
2979
2977
  dlcAccept.changeSpk = changeSPK;
2980
- dlcAccept.changeSerialId = dlcAccept.changeSerialId = changeSerialId;
2978
+ dlcAccept.changeSerialId = changeSerialId;
2981
2979
 
2982
2980
  assert(
2983
2981
  dlcAccept.changeSerialId !== dlcOffer.fundOutputSerialId,
@@ -4439,11 +4437,11 @@ Payout Group not found even with brute force search',
4439
4437
  let txRaw = '';
4440
4438
  try {
4441
4439
  txRaw = await this.getMethod('getRawTransactionByHash')(input.txid);
4442
- } catch (e) {
4440
+ } catch {
4443
4441
  try {
4444
4442
  txRaw = (await this.getMethod('jsonrpc')('gettransaction', input.txid))
4445
4443
  .hex;
4446
- } catch (e) {
4444
+ } catch {
4447
4445
  throw Error(
4448
4446
  `Cannot find tx ${input.txid} in inputToFundingInput using getrawtransactionbyhash or gettransaction`,
4449
4447
  );
package/package.json CHANGED
@@ -1,24 +1,17 @@
1
1
  {
2
2
  "name": "@atomicfinance/bitcoin-dlc-provider",
3
3
  "umdName": "BitcoinDlcProvider",
4
- "version": "4.0.2",
4
+ "version": "4.1.0",
5
5
  "description": "Bitcoin Abstraction Layer Dlc Provider",
6
6
  "author": "Atomic Finance <info@atomic.finance>",
7
7
  "homepage": "",
8
8
  "license": "ISC",
9
9
  "main": "dist/index.js",
10
- "scripts": {
11
- "build": "../../node_modules/.bin/tsc --project tsconfig.json",
12
- "prepublishOnly": "yarn run build",
13
- "test": "yarn run build",
14
- "lint": "../../node_modules/.bin/eslint --ignore-path ../../.eslintignore -c ../../.eslintrc.js .",
15
- "lint:fix": "../../node_modules/.bin/eslint --fix --ignore-path ../../.eslintignore -c ../../.eslintrc.js ."
16
- },
17
10
  "dependencies": {
18
- "@atomicfinance/bitcoin-utils": "4.0.2",
19
- "@atomicfinance/provider": "^4.0.2",
20
- "@atomicfinance/types": "^4.0.2",
21
- "@atomicfinance/utils": "^4.0.2",
11
+ "@atomicfinance/bitcoin-utils": "4.1.0",
12
+ "@atomicfinance/provider": "^4.1.0",
13
+ "@atomicfinance/types": "^4.1.0",
14
+ "@atomicfinance/utils": "^4.1.0",
22
15
  "@node-dlc/bitcoin": "1.1.0",
23
16
  "@node-dlc/bufio": "1.1.0",
24
17
  "@node-dlc/core": "1.1.0",
@@ -36,9 +29,15 @@
36
29
  },
37
30
  "devDependencies": {
38
31
  "@types/lodash": "^4.14.160",
39
- "@types/node": "16.10.3"
32
+ "@types/node": "20.19.10"
40
33
  },
41
34
  "publishConfig": {
42
35
  "access": "public"
36
+ },
37
+ "scripts": {
38
+ "build": "../../node_modules/.bin/tsc --project tsconfig.json",
39
+ "test": "pnpm run build",
40
+ "lint": "../../node_modules/.bin/eslint .",
41
+ "lint:fix": "../../node_modules/.bin/eslint --fix ."
43
42
  }
44
- }
43
+ }