@btc-vision/transaction 1.7.24 → 1.7.26

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.
@@ -1,273 +0,0 @@
1
- var S = { d: (t, e) => {
2
- for (var o in e) S.o(e, o) && !S.o(t, o) && Object.defineProperty(t, o, { enumerable: !0, get: e[o] });
3
- }, o: (t, e) => Object.prototype.hasOwnProperty.call(t, e), r: (t) => {
4
- typeof Symbol < "u" && Symbol.toStringTag && Object.defineProperty(t, Symbol.toStringTag, { value: "Module" }), Object.defineProperty(t, "__esModule", { value: !0 });
5
- } }, F = {};
6
- S.r(F), S.d(F, { DebugLevel: () => D, Logger: () => me, version: () => le });
7
- var le = "1.0.7";
8
- function h(t, e) {
9
- t = t.replace("#", "");
10
- var o = parseInt(t, 16), n = Math.round(2.55 * e), i = (o >> 16) + n, a = (o >> 8 & 255) + n, l = (255 & o) + n;
11
- return (16777216 + 65536 * (i < 255 ? i < 1 ? 0 : i : 255) + 256 * (a < 255 ? a < 1 ? 0 : a : 255) + (l < 255 ? l < 1 ? 0 : l : 255)).toString(16).slice(1);
12
- }
13
- const Y = (t = 0) => (e) => `\x1B[${e + t}m`, z = (t = 0) => (e) => `\x1B[${38 + t};5;${e}m`, H = (t = 0) => (e, o, n) => `\x1B[${38 + t};2;${e};${o};${n}m`, s = { modifier: { reset: [0, 0], bold: [1, 22], dim: [2, 22], italic: [3, 23], underline: [4, 24], overline: [53, 55], inverse: [7, 27], hidden: [8, 28], strikethrough: [9, 29] }, color: { black: [30, 39], red: [31, 39], green: [32, 39], yellow: [33, 39], blue: [34, 39], magenta: [35, 39], cyan: [36, 39], white: [37, 39], blackBright: [90, 39], gray: [90, 39], grey: [90, 39], redBright: [91, 39], greenBright: [92, 39], yellowBright: [93, 39], blueBright: [94, 39], magentaBright: [95, 39], cyanBright: [96, 39], whiteBright: [97, 39] }, bgColor: { bgBlack: [40, 49], bgRed: [41, 49], bgGreen: [42, 49], bgYellow: [43, 49], bgBlue: [44, 49], bgMagenta: [45, 49], bgCyan: [46, 49], bgWhite: [47, 49], bgBlackBright: [100, 49], bgGray: [100, 49], bgGrey: [100, 49], bgRedBright: [101, 49], bgGreenBright: [102, 49], bgYellowBright: [103, 49], bgBlueBright: [104, 49], bgMagentaBright: [105, 49], bgCyanBright: [106, 49], bgWhiteBright: [107, 49] } };
14
- Object.keys(s.modifier), Object.keys(s.color), Object.keys(s.bgColor);
15
- const u = (function() {
16
- const t = /* @__PURE__ */ new Map();
17
- for (const [e, o] of Object.entries(s)) {
18
- for (const [n, i] of Object.entries(o)) s[n] = { open: `\x1B[${i[0]}m`, close: `\x1B[${i[1]}m` }, o[n] = s[n], t.set(i[0], i[1]);
19
- Object.defineProperty(s, e, { value: o, enumerable: !1 });
20
- }
21
- return Object.defineProperty(s, "codes", { value: t, enumerable: !1 }), s.color.close = "\x1B[39m", s.bgColor.close = "\x1B[49m", s.color.ansi = Y(), s.color.ansi256 = z(), s.color.ansi16m = H(), s.bgColor.ansi = Y(10), s.bgColor.ansi256 = z(10), s.bgColor.ansi16m = H(10), Object.defineProperties(s, { rgbToAnsi256: { value: (e, o, n) => e === o && o === n ? e < 8 ? 16 : e > 248 ? 231 : Math.round((e - 8) / 247 * 24) + 232 : 16 + 36 * Math.round(e / 255 * 5) + 6 * Math.round(o / 255 * 5) + Math.round(n / 255 * 5), enumerable: !1 }, hexToRgb: { value(e) {
22
- const o = /[a-f\d]{6}|[a-f\d]{3}/i.exec(e.toString(16));
23
- if (!o) return [0, 0, 0];
24
- let [n] = o;
25
- n.length === 3 && (n = [...n].map((a) => a + a).join(""));
26
- const i = Number.parseInt(n, 16);
27
- return [i >> 16 & 255, i >> 8 & 255, 255 & i];
28
- }, enumerable: !1 }, hexToAnsi256: { value: (e) => s.rgbToAnsi256(...s.hexToRgb(e)), enumerable: !1 }, ansi256ToAnsi: { value(e) {
29
- if (e < 8) return 30 + e;
30
- if (e < 16) return e - 8 + 90;
31
- let o, n, i;
32
- if (e >= 232) o = (10 * (e - 232) + 8) / 255, n = o, i = o;
33
- else {
34
- const f = (e -= 16) % 36;
35
- o = Math.floor(e / 36) / 5, n = Math.floor(f / 6) / 5, i = f % 6 / 5;
36
- }
37
- const a = 2 * Math.max(o, n, i);
38
- if (a === 0) return 30;
39
- let l = 30 + (Math.round(i) << 2 | Math.round(n) << 1 | Math.round(o));
40
- return a === 2 && (l += 60), l;
41
- }, enumerable: !1 }, rgbToAnsi: { value: (e, o, n) => s.ansi256ToAnsi(s.rgbToAnsi256(e, o, n)), enumerable: !1 }, hexToAnsi: { value: (e) => s.ansi256ToAnsi(s.hexToAnsi256(e)), enumerable: !1 } }), s;
42
- })(), q = (() => {
43
- if (!("navigator" in globalThis)) return 0;
44
- if (globalThis.navigator.userAgentData) {
45
- const t = navigator.userAgentData.brands.find(({ brand: e }) => e === "Chromium");
46
- if (t && t.version > 93) return 3;
47
- }
48
- return /\b(Chrome|Chromium)\//.test(globalThis.navigator.userAgent) ? 1 : 0;
49
- })(), J = q !== 0 && { level: q }, ce = { stdout: J, stderr: J };
50
- function he(t, e, o) {
51
- let n = t.indexOf(e);
52
- if (n === -1) return t;
53
- const i = e.length;
54
- let a = 0, l = "";
55
- do
56
- l += t.slice(a, n) + e + o, a = n + i, n = t.indexOf(e, a);
57
- while (n !== -1);
58
- return l += t.slice(a), l;
59
- }
60
- const { stdout: K, stderr: Q } = ce, W = /* @__PURE__ */ Symbol("GENERATOR"), p = /* @__PURE__ */ Symbol("STYLER"), x = /* @__PURE__ */ Symbol("IS_EMPTY"), V = ["ansi", "ansi", "ansi256", "ansi16m"], y = /* @__PURE__ */ Object.create(null);
61
- class ue {
62
- constructor(e) {
63
- return ie(e);
64
- }
65
- }
66
- const ie = (t) => {
67
- const e = (...o) => o.join(" ");
68
- return ((o, n = {}) => {
69
- if (n.level && !(Number.isInteger(n.level) && n.level >= 0 && n.level <= 3)) throw new Error("The `level` option should be an integer from 0 to 3");
70
- const i = K ? K.level : 0;
71
- o.level = n.level === void 0 ? i : n.level;
72
- })(e, t), Object.setPrototypeOf(e, v.prototype), e;
73
- };
74
- function v(t) {
75
- return ie(t);
76
- }
77
- Object.setPrototypeOf(v.prototype, Function.prototype);
78
- for (const [t, e] of Object.entries(u)) y[t] = { get() {
79
- const o = j(this, G(e.open, e.close, this[p]), this[x]);
80
- return Object.defineProperty(this, t, { value: o }), o;
81
- } };
82
- y.visible = { get() {
83
- const t = j(this, this[p], !0);
84
- return Object.defineProperty(this, "visible", { value: t }), t;
85
- } };
86
- const I = (t, e, o, ...n) => t === "rgb" ? e === "ansi16m" ? u[o].ansi16m(...n) : e === "ansi256" ? u[o].ansi256(u.rgbToAnsi256(...n)) : u[o].ansi(u.rgbToAnsi(...n)) : t === "hex" ? I("rgb", e, o, ...u.hexToRgb(...n)) : u[o][t](...n), fe = ["rgb", "hex", "ansi256"];
87
- for (const t of fe) y[t] = { get() {
88
- const { level: e } = this;
89
- return function(...o) {
90
- const n = G(I(t, V[e], "color", ...o), u.color.close, this[p]);
91
- return j(this, n, this[x]);
92
- };
93
- } }, y["bg" + t[0].toUpperCase() + t.slice(1)] = { get() {
94
- const { level: e } = this;
95
- return function(...o) {
96
- const n = G(I(t, V[e], "bgColor", ...o), u.bgColor.close, this[p]);
97
- return j(this, n, this[x]);
98
- };
99
- } };
100
- const ge = Object.defineProperties(() => {
101
- }, { ...y, level: { enumerable: !0, get() {
102
- return this[W].level;
103
- }, set(t) {
104
- this[W].level = t;
105
- } } }), G = (t, e, o) => {
106
- let n, i;
107
- return o === void 0 ? (n = t, i = e) : (n = o.openAll + t, i = e + o.closeAll), { open: t, close: e, openAll: n, closeAll: i, parent: o };
108
- }, j = (t, e, o) => {
109
- const n = (...i) => be(n, i.length === 1 ? "" + i[0] : i.join(" "));
110
- return Object.setPrototypeOf(n, ge), n[W] = t, n[p] = e, n[x] = o, n;
111
- }, be = (t, e) => {
112
- if (t.level <= 0 || !e) return t[x] ? "" : e;
113
- let o = t[p];
114
- if (o === void 0) return e;
115
- const { openAll: n, closeAll: i } = o;
116
- if (e.includes("\x1B")) for (; o !== void 0; ) e = he(e, o.close, o.open), o = o.parent;
117
- const a = e.indexOf(`
118
- `);
119
- return a !== -1 && (e = (function(l, f, ae, b) {
120
- let O = 0, T = "";
121
- do {
122
- const U = l[b - 1] === "\r";
123
- T += l.slice(O, U ? b - 1 : b) + f + (U ? `\r
124
- ` : `
125
- `) + ae, O = b + 1, b = l.indexOf(`
126
- `, O);
127
- } while (b !== -1);
128
- return T += l.slice(O), T;
129
- })(e, i, n, a)), n + e + i;
130
- };
131
- function k(t) {
132
- return k = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(e) {
133
- return typeof e;
134
- } : function(e) {
135
- return e && typeof Symbol == "function" && e.constructor === Symbol && e !== Symbol.prototype ? "symbol" : typeof e;
136
- }, k(t);
137
- }
138
- function pe(t, e) {
139
- for (var o = 0; o < e.length; o++) {
140
- var n = e[o];
141
- n.enumerable = n.enumerable || !1, n.configurable = !0, "value" in n && (n.writable = !0), Object.defineProperty(t, re(n.key), n);
142
- }
143
- }
144
- function c(t, e, o) {
145
- (function(n, i) {
146
- if (i.has(n)) throw new TypeError("Cannot initialize the same private elements twice on an object");
147
- })(t, e), e.set(t, o);
148
- }
149
- function m(t, e, o) {
150
- return (e = re(e)) in t ? Object.defineProperty(t, e, { value: o, enumerable: !0, configurable: !0, writable: !0 }) : t[e] = o, t;
151
- }
152
- function re(t) {
153
- var e = (function(o) {
154
- if (k(o) != "object" || !o) return o;
155
- var n = o[Symbol.toPrimitive];
156
- if (n !== void 0) {
157
- var i = n.call(o, "string");
158
- if (k(i) != "object") return i;
159
- throw new TypeError("@@toPrimitive must return a primitive value.");
160
- }
161
- return String(o);
162
- })(t);
163
- return k(e) == "symbol" ? e : e + "";
164
- }
165
- function r(t, e) {
166
- return t.get((function(o, n, i) {
167
- if (typeof o == "function" ? o === n : o.has(n)) return arguments.length < 3 ? n : i;
168
- throw new TypeError("Private element is not present on this object");
169
- })(t, e));
170
- }
171
- Object.defineProperties(v.prototype, y), v(), v({ level: Q ? Q.level : 0 });
172
- var d = /* @__PURE__ */ new WeakMap(), X = /* @__PURE__ */ new WeakMap(), B = /* @__PURE__ */ new WeakMap(), M = /* @__PURE__ */ new WeakMap(), Z = /* @__PURE__ */ new WeakMap(), N = /* @__PURE__ */ new WeakMap(), ee = /* @__PURE__ */ new WeakMap(), A = /* @__PURE__ */ new WeakMap(), te = /* @__PURE__ */ new WeakMap(), E = /* @__PURE__ */ new WeakMap(), w = /* @__PURE__ */ new WeakMap(), P = /* @__PURE__ */ new WeakMap(), C = /* @__PURE__ */ new WeakMap(), g = /* @__PURE__ */ new WeakMap(), oe = /* @__PURE__ */ new WeakMap(), R = /* @__PURE__ */ new WeakMap(), ne = /* @__PURE__ */ new WeakMap(), ye = (function() {
173
- return t = function o() {
174
- var n = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : new ue();
175
- (function(i, a) {
176
- if (!(i instanceof a)) throw new TypeError("Cannot call a class as a function");
177
- })(this, o), m(this, "moduleName", ""), m(this, "logColor", "#00bfff"), m(this, "enableLogs", !0), m(this, "hideLogs", !1), c(this, d, "#ff00ff"), c(this, X, h(r(d, this), 75)), c(this, B, "#9400d3"), c(this, M, h(r(B, this), 15)), c(this, Z, h(r(M, this), 15)), c(this, N, "#7cfc00"), c(this, ee, h(r(N, this), 15)), c(this, A, "#ffdead"), c(this, te, h(r(A, this), 15)), c(this, E, "#ff8c00"), c(this, w, h(r(E, this), 15)), c(this, P, "#ff4500"), c(this, C, h(r(P, this), 15)), c(this, g, "#ffffff"), c(this, oe, h(r(g, this), 15)), c(this, R, "#8b0000"), c(this, ne, h(r(R, this), 15)), m(this, "prefix", ""), this.chalk = n, this.moduleName = this.constructor.name;
178
- }, e = [{ key: "setLogPrefix", value: function(o) {
179
- this.prefix = o;
180
- } }, { key: "getStartPrefix", value: function() {
181
- return this.prefix;
182
- } }, { key: "disable", value: function() {
183
- this.enableLogs = !1;
184
- } }, { key: "enable", value: function() {
185
- this.enableLogs = !0;
186
- } }, { key: "fancyLog", value: function(o, n, i, a, l) {
187
- this.enableLogs && console.log(this.chalk.hex(r(d, this))("".concat(this.getStartPrefix(), "[").concat(this.moduleName, " INFO]: ")) + this.chalk.hex(r(g, this))(o) + " " + this.chalk.hex(r(w, this))(n) + " " + this.chalk.hex(r(g, this))(i) + " " + this.chalk.hex(r(Z, this))(a) + " " + this.chalk.hex(r(g, this))(l));
188
- } }, { key: "log", value: function() {
189
- if (this.enableLogs && !this.hideLogs) {
190
- var o = h(this.logColor, 15);
191
- console.log(this.chalk.hex(this.logColor)("".concat(this.getStartPrefix(), "[").concat(this.moduleName, " LOG]: ")) + this.chalk.hex(o).apply(void 0, arguments));
192
- }
193
- } }, { key: "lightOrangeLog", value: function() {
194
- this.enableLogs && (this.hideLogs || console.log(this.chalk.hex(r(w, this))("".concat(this.getStartPrefix(), "[").concat(this.moduleName, " LOG]: ")) + this.chalk.hex(r(g, this)).apply(void 0, arguments)));
195
- } }, { key: "error", value: function() {
196
- this.enableLogs && console.log(this.chalk.hex(r(P, this))("".concat(this.getStartPrefix(), "[").concat(this.moduleName, " ERROR]: ")) + this.chalk.hex(r(C, this)).apply(void 0, arguments));
197
- } }, { key: "warn", value: function() {
198
- this.enableLogs && console.log(this.chalk.hex(r(E, this))("".concat(this.getStartPrefix(), "[").concat(this.moduleName, " WARN]: ")) + this.chalk.hex(r(w, this)).apply(void 0, arguments));
199
- } }, { key: "debug", value: function() {
200
- this.enableLogs && (this.hideLogs || console.log(this.chalk.hex(r(A, this))("".concat(this.getStartPrefix(), "[").concat(this.moduleName, " DEBUG]: ")) + this.chalk.hex(r(te, this)).apply(void 0, arguments)));
201
- } }, { key: "success", value: function() {
202
- this.enableLogs && (this.hideLogs || console.log(this.chalk.hex(r(N, this))("".concat(this.getStartPrefix(), "[").concat(this.moduleName, " SUCCESS]: ")) + this.chalk.hex(r(ee, this)).apply(void 0, arguments)));
203
- } }, { key: "fail", value: function() {
204
- this.enableLogs && (this.hideLogs || console.log(this.chalk.hex(r(P, this))("".concat(this.getStartPrefix(), "[").concat(this.moduleName, " FAIL]: ")) + this.chalk.hex(r(C, this)).apply(void 0, arguments)));
205
- } }, { key: "debugBright", value: function() {
206
- this.enableLogs && (this.hideLogs || console.log(this.chalk.hex(r(B, this))("".concat(this.getStartPrefix(), "[").concat(this.moduleName, " DEBUG]: ")) + this.chalk.hex(r(M, this)).apply(void 0, arguments)));
207
- } }, { key: "important", value: function() {
208
- this.enableLogs && console.log(this.chalk.hex(r(d, this))("".concat(this.getStartPrefix(), "[").concat(this.moduleName, " IMPORTANT]: ")) + this.chalk.hex(r(X, this)).apply(void 0, arguments));
209
- } }, { key: "panic", value: function() {
210
- this.enableLogs && console.log(this.chalk.hex(r(R, this))("".concat(this.getStartPrefix(), "[").concat(this.moduleName, " HELP PANIC]: ")) + this.chalk.hex(r(ne, this)).apply(void 0, arguments));
211
- } }, { key: "info", value: function() {
212
- this.enableLogs && console.log(this.chalk.hex(r(d, this))("".concat(this.getStartPrefix(), "[").concat(this.moduleName, " INFO]: ")) + this.chalk.hex(r(g, this)).apply(void 0, arguments));
213
- } }, { key: "securityNotice", value: function() {
214
- this.enableLogs && console.log(this.chalk.hex("#22d8e6")("".concat(this.getStartPrefix(), "[").concat(this.moduleName, " SECURITY NOTICE]: ")) + this.chalk.hex("#22e3e6").apply(void 0, arguments));
215
- } }, { key: "traceLog", value: function() {
216
- this.enableLogs && console.log(this.chalk.hex("#ffffff")("".concat(this.getStartPrefix(), "[").concat(this.moduleName, " TRACE LOG]: ")) + this.chalk.hex(r(oe, this)).apply(void 0, arguments));
217
- } }], e && pe(t.prototype, e), Object.defineProperty(t, "prototype", { writable: !1 }), t;
218
- var t, e;
219
- })();
220
- function _(t) {
221
- return _ = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(e) {
222
- return typeof e;
223
- } : function(e) {
224
- return e && typeof Symbol == "function" && e.constructor === Symbol && e !== Symbol.prototype ? "symbol" : typeof e;
225
- }, _(t);
226
- }
227
- function se() {
228
- try {
229
- var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {
230
- }));
231
- } catch {
232
- }
233
- return (se = function() {
234
- return !!t;
235
- })();
236
- }
237
- function L(t) {
238
- return L = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function(e) {
239
- return e.__proto__ || Object.getPrototypeOf(e);
240
- }, L(t);
241
- }
242
- function $(t, e) {
243
- return $ = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function(o, n) {
244
- return o.__proto__ = n, o;
245
- }, $(t, e);
246
- }
247
- var D, me = (function() {
248
- function t() {
249
- return (function(o, n) {
250
- if (!(o instanceof n)) throw new TypeError("Cannot call a class as a function");
251
- })(this, t), (function(o, n, i) {
252
- return n = L(n), (function(a, l) {
253
- if (l && (_(l) == "object" || typeof l == "function")) return l;
254
- if (l !== void 0) throw new TypeError("Derived constructors may only return object or undefined");
255
- return (function(f) {
256
- if (f === void 0) throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
257
- return f;
258
- })(a);
259
- })(o, se() ? Reflect.construct(n, [], L(o).constructor) : n.apply(o, i));
260
- })(this, t);
261
- }
262
- return (function(o, n) {
263
- if (typeof n != "function" && n !== null) throw new TypeError("Super expression must either be null or a function");
264
- o.prototype = Object.create(n && n.prototype, { constructor: { value: o, writable: !0, configurable: !0 } }), Object.defineProperty(o, "prototype", { writable: !1 }), n && $(o, n);
265
- })(t, ye), e = t, Object.defineProperty(e, "prototype", { writable: !1 }), e;
266
- var e;
267
- })();
268
- (function(t) {
269
- t[t.NONE = 0] = "NONE", t[t.ERROR = 1] = "ERROR", t[t.WARN = 2] = "WARN", t[t.INFO = 3] = "INFO", t[t.DEBUG = 4] = "DEBUG", t[t.TRACE = 5] = "TRACE", t[t.ALL = 6] = "ALL";
270
- })(D || (D = {}));
271
- export {
272
- me as i
273
- };