@bitcoinerlab/descriptors-core 3.1.1 → 3.1.3

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/README.md CHANGED
@@ -358,7 +358,7 @@ const output = new Output({
358
358
  <summary>Click to see the scure variant</summary>
359
359
 
360
360
  ```javascript
361
- import { randomBytes } from '@noble/hashes/utils.js';
361
+ import { randomBytes } from '@noble/hashes/utils';
362
362
  import { HDKey, Output, keyExpressionBIP32 } from '@bitcoinerlab/descriptors-scure';
363
363
 
364
364
  const masterNode = HDKey.fromMasterSeed(randomBytes(32));
package/dist/crypto.js CHANGED
@@ -6,8 +6,8 @@ Object.defineProperty(exports, "__esModule", { value: true });
6
6
  exports.sha256 = sha256;
7
7
  exports.hash160 = hash160;
8
8
  exports.taggedHash = taggedHash;
9
- const legacy_js_1 = require("@noble/hashes/legacy.js");
10
- const sha2_js_1 = require("@noble/hashes/sha2.js");
9
+ const ripemd160_1 = require("@noble/hashes/ripemd160");
10
+ const sha256_1 = require("@noble/hashes/sha256");
11
11
  const uint8array_tools_1 = require("uint8array-tools");
12
12
  const TAGGED_HASH_PREFIXES = {
13
13
  'BIP0340/challenge': Uint8Array.from([
@@ -66,10 +66,10 @@ const TAGGED_HASH_PREFIXES = {
66
66
  ])
67
67
  };
68
68
  function sha256(data) {
69
- return (0, sha2_js_1.sha256)(data);
69
+ return (0, sha256_1.sha256)(data);
70
70
  }
71
71
  function hash160(data) {
72
- return (0, legacy_js_1.ripemd160)(sha256(data));
72
+ return (0, ripemd160_1.ripemd160)(sha256(data));
73
73
  }
74
74
  function taggedHash(tag, data) {
75
75
  const prefix = TAGGED_HASH_PREFIXES[tag];
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@bitcoinerlab/descriptors-core",
3
3
  "description": "This library parses and creates Bitcoin Miniscript Descriptors and generates Partially Signed Bitcoin Transactions (PSBTs). It provides PSBT finalizers and signers for single-signature, BIP32 and Hardware Wallets, with explicit backend wiring for advanced use cases.",
4
4
  "homepage": "https://github.com/bitcoinerlab/descriptors",
5
- "version": "3.1.1",
5
+ "version": "3.1.3",
6
6
  "author": "Jose-Luis Landabaso",
7
7
  "license": "MIT",
8
8
  "repository": {
@@ -21,6 +21,9 @@
21
21
  "bugs": {
22
22
  "url": "https://github.com/bitcoinerlab/descriptors/issues"
23
23
  },
24
+ "engines": {
25
+ "node": ">=20.19.0"
26
+ },
24
27
  "main": "dist/index.js",
25
28
  "types": "dist/index.d.ts",
26
29
  "exports": {
@@ -69,7 +72,8 @@
69
72
  "test:matrix": "npm run test:unit && npm run test:unit:scure && npm run test:scure-adapter && npm run test:integration:soft && npm run test:integration:soft:scure",
70
73
  "test": "npm run lint && npm run build && npm run test:matrix",
71
74
  "test:ledger": "npm run lint && npm run build && echo \"\n\n\" && npm run test:integration:ledger:scure && echo \"\n\n\" && npm run test:integration:ledger",
72
- "publish:all": "npm whoami && npm publish --access public && (cd ./packages/descriptors && npm publish --access public) && (cd ./packages/descriptors-scure && npm publish --access public)",
75
+ "publish:check": "npm whoami && node ./scripts/check-publish-versions.js",
76
+ "publish:all": "npm run publish:check && npm publish --access public && (cd ./packages/descriptors && npm publish --access public) && (cd ./packages/descriptors-scure && npm publish --access public)",
73
77
  "prepublishOnly": "npm run test && echo \"\n\n\" && npm run test:integration:ledger:scure && echo \"\n\n\" && npm run test:integration:ledger"
74
78
  },
75
79
  "files": [
@@ -83,7 +87,7 @@
83
87
  "@scure/base": "^2.0.0",
84
88
  "@scure/bip32": "^2.0.1",
85
89
  "@scure/btc-signer": "^2.0.1",
86
- "@ledgerhq/ledger-bitcoin": "^0.3.0"
90
+ "@ledgerhq/ledger-bitcoin": "^0.3.1"
87
91
  },
88
92
  "peerDependenciesMeta": {
89
93
  "@ledgerhq/ledger-bitcoin": {
@@ -118,7 +122,7 @@
118
122
  "@bitcoinerlab/miniscript-policies": "^1.0.0",
119
123
  "@bitcoinerlab/secp256k1": "^1.2.0",
120
124
  "@ledgerhq/hw-transport-node-hid": "^6.30.0",
121
- "@ledgerhq/ledger-bitcoin": "^0.3.0",
125
+ "@ledgerhq/ledger-bitcoin": "^0.3.1",
122
126
  "@noble/curves": "^2.0.1",
123
127
  "@scure/base": "^2.0.0",
124
128
  "@scure/bip32": "^2.0.1",
@@ -140,7 +144,7 @@
140
144
  },
141
145
  "dependencies": {
142
146
  "@bitcoinerlab/miniscript": "^2.0.0",
143
- "@noble/hashes": "^2.0.1",
147
+ "@noble/hashes": "^1.8.0",
144
148
  "lodash.memoize": "^4.1.2",
145
149
  "uint8array-tools": "^0.0.9",
146
150
  "varuint-bitcoin": "^2.0.0"