@lydianpay/sdk-web 3.13.1 → 3.15.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.
@@ -0,0 +1,264 @@
1
+ var c = {}, K;
2
+ function Z() {
3
+ if (K) return c;
4
+ K = 1, Object.defineProperty(c, "__esModule", { value: !0 }), c.toBig = c.shrSL = c.shrSH = c.rotrSL = c.rotrSH = c.rotrBL = c.rotrBH = c.rotr32L = c.rotr32H = c.rotlSL = c.rotlSH = c.rotlBL = c.rotlBH = c.add5L = c.add5H = c.add4L = c.add4H = c.add3L = c.add3H = void 0, c.add = C, c.fromBig = L, c.split = b;
5
+ const e = /* @__PURE__ */ BigInt(2 ** 32 - 1), h = /* @__PURE__ */ BigInt(32);
6
+ function L(r, i = !1) {
7
+ return i ? { h: Number(r & e), l: Number(r >> h & e) } : { h: Number(r >> h & e) | 0, l: Number(r & e) | 0 };
8
+ }
9
+ function b(r, i = !1) {
10
+ const o = r.length;
11
+ let s = new Uint32Array(o), d = new Uint32Array(o);
12
+ for (let g = 0; g < o; g++) {
13
+ const { h: M, l: N } = L(r[g], i);
14
+ [s[g], d[g]] = [M, N];
15
+ }
16
+ return [s, d];
17
+ }
18
+ const w = (r, i) => BigInt(r >>> 0) << h | BigInt(i >>> 0);
19
+ c.toBig = w;
20
+ const E = (r, i, o) => r >>> o;
21
+ c.shrSH = E;
22
+ const U = (r, i, o) => r << 32 - o | i >>> o;
23
+ c.shrSL = U;
24
+ const _ = (r, i, o) => r >>> o | i << 32 - o;
25
+ c.rotrSH = _;
26
+ const O = (r, i, o) => r << 32 - o | i >>> o;
27
+ c.rotrSL = O;
28
+ const T = (r, i, o) => r << 64 - o | i >>> o - 32;
29
+ c.rotrBH = T;
30
+ const k = (r, i, o) => r >>> o - 32 | i << 64 - o;
31
+ c.rotrBL = k;
32
+ const I = (r, i) => i;
33
+ c.rotr32H = I;
34
+ const v = (r, i) => r;
35
+ c.rotr32L = v;
36
+ const j = (r, i, o) => r << o | i >>> 32 - o;
37
+ c.rotlSH = j;
38
+ const B = (r, i, o) => i << o | r >>> 32 - o;
39
+ c.rotlSL = B;
40
+ const H = (r, i, o) => i << o - 32 | r >>> 64 - o;
41
+ c.rotlBH = H;
42
+ const p = (r, i, o) => r << o - 32 | i >>> 64 - o;
43
+ c.rotlBL = p;
44
+ function C(r, i, o, s) {
45
+ const d = (i >>> 0) + (s >>> 0);
46
+ return { h: r + o + (d / 2 ** 32 | 0) | 0, l: d | 0 };
47
+ }
48
+ const V = (r, i, o) => (r >>> 0) + (i >>> 0) + (o >>> 0);
49
+ c.add3L = V;
50
+ const y = (r, i, o, s) => i + o + s + (r / 2 ** 32 | 0) | 0;
51
+ c.add3H = y;
52
+ const m = (r, i, o, s) => (r >>> 0) + (i >>> 0) + (o >>> 0) + (s >>> 0);
53
+ c.add4L = m;
54
+ const q = (r, i, o, s, d) => i + o + s + d + (r / 2 ** 32 | 0) | 0;
55
+ c.add4H = q;
56
+ const F = (r, i, o, s, d) => (r >>> 0) + (i >>> 0) + (o >>> 0) + (s >>> 0) + (d >>> 0);
57
+ c.add5L = F;
58
+ const R = (r, i, o, s, d, g) => i + o + s + d + g + (r / 2 ** 32 | 0) | 0;
59
+ c.add5H = R;
60
+ const S = {
61
+ fromBig: L,
62
+ split: b,
63
+ toBig: w,
64
+ shrSH: E,
65
+ shrSL: U,
66
+ rotrSH: _,
67
+ rotrSL: O,
68
+ rotrBH: T,
69
+ rotrBL: k,
70
+ rotr32H: I,
71
+ rotr32L: v,
72
+ rotlSH: j,
73
+ rotlSL: B,
74
+ rotlBH: H,
75
+ rotlBL: p,
76
+ add: C,
77
+ add3L: V,
78
+ add3H: y,
79
+ add4L: m,
80
+ add4H: q,
81
+ add5H: R,
82
+ add5L: F
83
+ };
84
+ return c.default = S, c;
85
+ }
86
+ var D = {}, A = {}, z;
87
+ function Y() {
88
+ return z || (z = 1, Object.defineProperty(A, "__esModule", { value: !0 }), A.crypto = void 0, A.crypto = typeof globalThis == "object" && "crypto" in globalThis ? globalThis.crypto : void 0), A;
89
+ }
90
+ var G;
91
+ function $() {
92
+ return G || (G = 1, (function(e) {
93
+ /*! noble-hashes - MIT License (c) 2022 Paul Miller (paulmillr.com) */
94
+ Object.defineProperty(e, "__esModule", { value: !0 }), e.wrapXOFConstructorWithOpts = e.wrapConstructorWithOpts = e.wrapConstructor = e.Hash = e.nextTick = e.swap32IfBE = e.byteSwapIfBE = e.swap8IfBE = e.isLE = void 0, e.isBytes = L, e.anumber = b, e.abytes = w, e.ahash = E, e.aexists = U, e.aoutput = _, e.u8 = O, e.u32 = T, e.clean = k, e.createView = I, e.rotr = v, e.rotl = j, e.byteSwap = B, e.byteSwap32 = H, e.bytesToHex = V, e.hexToBytes = q, e.asyncLoop = R, e.utf8ToBytes = S, e.bytesToUtf8 = r, e.toBytes = i, e.kdfInputToBytes = o, e.concatBytes = s, e.checkOpts = d, e.createHasher = M, e.createOptHasher = N, e.createXOFer = W, e.randomBytes = J;
95
+ const h = /* @__PURE__ */ Y();
96
+ function L(t) {
97
+ return t instanceof Uint8Array || ArrayBuffer.isView(t) && t.constructor.name === "Uint8Array";
98
+ }
99
+ function b(t) {
100
+ if (!Number.isSafeInteger(t) || t < 0)
101
+ throw new Error("positive integer expected, got " + t);
102
+ }
103
+ function w(t, ...n) {
104
+ if (!L(t))
105
+ throw new Error("Uint8Array expected");
106
+ if (n.length > 0 && !n.includes(t.length))
107
+ throw new Error("Uint8Array expected of length " + n + ", got length=" + t.length);
108
+ }
109
+ function E(t) {
110
+ if (typeof t != "function" || typeof t.create != "function")
111
+ throw new Error("Hash should be wrapped by utils.createHasher");
112
+ b(t.outputLen), b(t.blockLen);
113
+ }
114
+ function U(t, n = !0) {
115
+ if (t.destroyed)
116
+ throw new Error("Hash instance has been destroyed");
117
+ if (n && t.finished)
118
+ throw new Error("Hash#digest() has already been called");
119
+ }
120
+ function _(t, n) {
121
+ w(t);
122
+ const u = n.outputLen;
123
+ if (t.length < u)
124
+ throw new Error("digestInto() expects output buffer of length at least " + u);
125
+ }
126
+ function O(t) {
127
+ return new Uint8Array(t.buffer, t.byteOffset, t.byteLength);
128
+ }
129
+ function T(t) {
130
+ return new Uint32Array(t.buffer, t.byteOffset, Math.floor(t.byteLength / 4));
131
+ }
132
+ function k(...t) {
133
+ for (let n = 0; n < t.length; n++)
134
+ t[n].fill(0);
135
+ }
136
+ function I(t) {
137
+ return new DataView(t.buffer, t.byteOffset, t.byteLength);
138
+ }
139
+ function v(t, n) {
140
+ return t << 32 - n | t >>> n;
141
+ }
142
+ function j(t, n) {
143
+ return t << n | t >>> 32 - n >>> 0;
144
+ }
145
+ e.isLE = new Uint8Array(new Uint32Array([287454020]).buffer)[0] === 68;
146
+ function B(t) {
147
+ return t << 24 & 4278190080 | t << 8 & 16711680 | t >>> 8 & 65280 | t >>> 24 & 255;
148
+ }
149
+ e.swap8IfBE = e.isLE ? (t) => t : (t) => B(t), e.byteSwapIfBE = e.swap8IfBE;
150
+ function H(t) {
151
+ for (let n = 0; n < t.length; n++)
152
+ t[n] = B(t[n]);
153
+ return t;
154
+ }
155
+ e.swap32IfBE = e.isLE ? (t) => t : H;
156
+ const p = /* @ts-ignore */ typeof Uint8Array.from([]).toHex == "function" && typeof Uint8Array.fromHex == "function", C = /* @__PURE__ */ Array.from({ length: 256 }, (t, n) => n.toString(16).padStart(2, "0"));
157
+ function V(t) {
158
+ if (w(t), p)
159
+ return t.toHex();
160
+ let n = "";
161
+ for (let u = 0; u < t.length; u++)
162
+ n += C[t[u]];
163
+ return n;
164
+ }
165
+ const y = { _0: 48, _9: 57, A: 65, F: 70, a: 97, f: 102 };
166
+ function m(t) {
167
+ if (t >= y._0 && t <= y._9)
168
+ return t - y._0;
169
+ if (t >= y.A && t <= y.F)
170
+ return t - (y.A - 10);
171
+ if (t >= y.a && t <= y.f)
172
+ return t - (y.a - 10);
173
+ }
174
+ function q(t) {
175
+ if (typeof t != "string")
176
+ throw new Error("hex string expected, got " + typeof t);
177
+ if (p)
178
+ return Uint8Array.fromHex(t);
179
+ const n = t.length, u = n / 2;
180
+ if (n % 2)
181
+ throw new Error("hex string expected, got unpadded hex of length " + n);
182
+ const f = new Uint8Array(u);
183
+ for (let a = 0, l = 0; a < u; a++, l += 2) {
184
+ const X = m(t.charCodeAt(l)), P = m(t.charCodeAt(l + 1));
185
+ if (X === void 0 || P === void 0) {
186
+ const Q = t[l] + t[l + 1];
187
+ throw new Error('hex string expected, got non-hex character "' + Q + '" at index ' + l);
188
+ }
189
+ f[a] = X * 16 + P;
190
+ }
191
+ return f;
192
+ }
193
+ const F = async () => {
194
+ };
195
+ e.nextTick = F;
196
+ async function R(t, n, u) {
197
+ let f = Date.now();
198
+ for (let a = 0; a < t; a++) {
199
+ u(a);
200
+ const l = Date.now() - f;
201
+ l >= 0 && l < n || (await (0, e.nextTick)(), f += l);
202
+ }
203
+ }
204
+ function S(t) {
205
+ if (typeof t != "string")
206
+ throw new Error("string expected");
207
+ return new Uint8Array(new TextEncoder().encode(t));
208
+ }
209
+ function r(t) {
210
+ return new TextDecoder().decode(t);
211
+ }
212
+ function i(t) {
213
+ return typeof t == "string" && (t = S(t)), w(t), t;
214
+ }
215
+ function o(t) {
216
+ return typeof t == "string" && (t = S(t)), w(t), t;
217
+ }
218
+ function s(...t) {
219
+ let n = 0;
220
+ for (let f = 0; f < t.length; f++) {
221
+ const a = t[f];
222
+ w(a), n += a.length;
223
+ }
224
+ const u = new Uint8Array(n);
225
+ for (let f = 0, a = 0; f < t.length; f++) {
226
+ const l = t[f];
227
+ u.set(l, a), a += l.length;
228
+ }
229
+ return u;
230
+ }
231
+ function d(t, n) {
232
+ if (n !== void 0 && {}.toString.call(n) !== "[object Object]")
233
+ throw new Error("options should be object or undefined");
234
+ return Object.assign(t, n);
235
+ }
236
+ class g {
237
+ }
238
+ e.Hash = g;
239
+ function M(t) {
240
+ const n = (f) => t().update(i(f)).digest(), u = t();
241
+ return n.outputLen = u.outputLen, n.blockLen = u.blockLen, n.create = () => t(), n;
242
+ }
243
+ function N(t) {
244
+ const n = (f, a) => t(a).update(i(f)).digest(), u = t({});
245
+ return n.outputLen = u.outputLen, n.blockLen = u.blockLen, n.create = (f) => t(f), n;
246
+ }
247
+ function W(t) {
248
+ const n = (f, a) => t(a).update(i(f)).digest(), u = t({});
249
+ return n.outputLen = u.outputLen, n.blockLen = u.blockLen, n.create = (f) => t(f), n;
250
+ }
251
+ e.wrapConstructor = M, e.wrapConstructorWithOpts = N, e.wrapXOFConstructorWithOpts = W;
252
+ function J(t = 32) {
253
+ if (h.crypto && typeof h.crypto.getRandomValues == "function")
254
+ return h.crypto.getRandomValues(new Uint8Array(t));
255
+ if (h.crypto && typeof h.crypto.randomBytes == "function")
256
+ return Uint8Array.from(h.crypto.randomBytes(t));
257
+ throw new Error("crypto.getRandomValues must be defined");
258
+ }
259
+ })(D)), D;
260
+ }
261
+ export {
262
+ $ as a,
263
+ Z as r
264
+ };
package/dist/lydian.js CHANGED
@@ -1 +1 @@
1
- import "./chunks/index-BsBqHeHy.js";
1
+ import "./chunks/index-BNr7lH3k.js";