@bitcoinerlab/descriptors 2.3.2 → 2.3.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/dist/index.js +24 -0
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -26,6 +26,30 @@ var __importStar = (this && this.__importStar) || function (mod) {
|
|
|
26
26
|
};
|
|
27
27
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
28
28
|
exports.ledger = exports.scriptExpressions = exports.keyExpressionLedger = exports.keyExpressionBIP32 = exports.finalizePsbt = exports.signers = exports.checksum = exports.DescriptorsFactory = void 0;
|
|
29
|
+
// Some dependencies (like hash-base) assume process.version exists.
|
|
30
|
+
// In React Native / Hermes, process is defined but version is not.
|
|
31
|
+
// Note: we only polyfill if process already exists but is incomplete.
|
|
32
|
+
// The user is responsible for providing the process polyfill; this is just
|
|
33
|
+
// a small patch for environments (like Hermes) with partial implementations.
|
|
34
|
+
//
|
|
35
|
+
// More information: https://github.com/browserify/hash-base/issues/21#issuecomment-3476608003
|
|
36
|
+
const g = typeof globalThis !== 'undefined'
|
|
37
|
+
? globalThis
|
|
38
|
+
: typeof global !== 'undefined'
|
|
39
|
+
? global
|
|
40
|
+
: {};
|
|
41
|
+
if (typeof g.process !== 'undefined' &&
|
|
42
|
+
typeof g.process.version === 'undefined') {
|
|
43
|
+
const isDev = g['__DEV__'] === true ||
|
|
44
|
+
g.process?.env?.['NODE_ENV'] === 'development';
|
|
45
|
+
if (isDev) {
|
|
46
|
+
//only WARN while developing
|
|
47
|
+
console.warn(`[bitcoinerlab/descriptors] Polyfilled process.version (missing in this non-Node environment).
|
|
48
|
+
Learn more: https://github.com/bitcoinerlab/descriptors/blob/main/src/index.ts#L4`);
|
|
49
|
+
}
|
|
50
|
+
// @ts-expect-error Polyfill for environments missing process.version
|
|
51
|
+
global.process.version = '';
|
|
52
|
+
}
|
|
29
53
|
var descriptors_1 = require("./descriptors");
|
|
30
54
|
Object.defineProperty(exports, "DescriptorsFactory", { enumerable: true, get: function () { return descriptors_1.DescriptorsFactory; } });
|
|
31
55
|
var checksum_1 = require("./checksum");
|
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "@bitcoinerlab/descriptors",
|
|
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.",
|
|
4
4
|
"homepage": "https://github.com/bitcoinerlab/descriptors",
|
|
5
|
-
"version": "2.3.
|
|
5
|
+
"version": "2.3.3",
|
|
6
6
|
"author": "Jose-Luis Landabaso",
|
|
7
7
|
"license": "MIT",
|
|
8
8
|
"repository": {
|