@bitcoinerlab/descriptors-core 3.1.1 → 3.1.2
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/dist/crypto.js +4 -4
- package/package.json +7 -3
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
|
|
10
|
-
const
|
|
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,
|
|
69
|
+
return (0, sha256_1.sha256)(data);
|
|
70
70
|
}
|
|
71
71
|
function hash160(data) {
|
|
72
|
-
return (0,
|
|
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.
|
|
5
|
+
"version": "3.1.2",
|
|
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:
|
|
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": [
|
|
@@ -140,7 +144,7 @@
|
|
|
140
144
|
},
|
|
141
145
|
"dependencies": {
|
|
142
146
|
"@bitcoinerlab/miniscript": "^2.0.0",
|
|
143
|
-
"@noble/hashes": "^
|
|
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"
|