@monerium/sdk 2.0.9 → 2.0.12

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.es.js CHANGED
@@ -1,170 +1,84 @@
1
- var ie = Object.defineProperty;
2
- var oe = (e, t, i) =>
1
+ var sr = Object.defineProperty;
2
+ var ar = (e, t, i) =>
3
3
  t in e
4
- ? ie(e, t, { enumerable: !0, configurable: !0, writable: !0, value: i })
4
+ ? sr(e, t, { enumerable: !0, configurable: !0, writable: !0, value: i })
5
5
  : (e[t] = i);
6
- var $ = (e, t, i) => (oe(e, typeof t != "symbol" ? t + "" : t, i), i),
7
- j = (e, t, i) => {
6
+ var $ = (e, t, i) => (ar(e, typeof t != "symbol" ? t + "" : t, i), i),
7
+ q = (e, t, i) => {
8
8
  if (!t.has(e)) throw TypeError("Cannot " + i);
9
9
  };
10
- var E = (e, t, i) => (
11
- j(e, t, "read from private field"), i ? i.call(e) : t.get(e)
10
+ var L = (e, t, i) => (
11
+ q(e, t, "read from private field"), i ? i.call(e) : t.get(e)
12
12
  ),
13
- P = (e, t, i) => {
13
+ F = (e, t, i) => {
14
14
  if (t.has(e))
15
15
  throw TypeError("Cannot add the same private member more than once");
16
16
  t instanceof WeakSet ? t.add(e) : t.set(e, i);
17
17
  },
18
18
  D = (e, t, i, c) => (
19
- j(e, t, "write to private field"), c ? c.call(e, i) : t.set(e, i), i
19
+ q(e, t, "write to private field"), c ? c.call(e, i) : t.set(e, i), i
20
20
  );
21
- var x = (e, t, i) => (j(e, t, "access private method"), i);
22
- var U =
23
- typeof globalThis < "u"
24
- ? globalThis
25
- : typeof window < "u"
26
- ? window
27
- : typeof global < "u"
28
- ? global
29
- : typeof self < "u"
30
- ? self
31
- : {};
32
- function se(e) {
33
- if (e.__esModule) return e;
34
- var t = e.default;
35
- if (typeof t == "function") {
36
- var i = function c() {
37
- if (this instanceof c) {
38
- var y = [null];
39
- y.push.apply(y, arguments);
40
- var p = Function.bind.apply(t, y);
41
- return new p();
42
- }
43
- return t.apply(this, arguments);
44
- };
45
- i.prototype = t.prototype;
46
- } else i = {};
47
- return (
48
- Object.defineProperty(i, "__esModule", { value: !0 }),
49
- Object.keys(e).forEach(function (c) {
50
- var y = Object.getOwnPropertyDescriptor(e, c);
51
- Object.defineProperty(
52
- i,
53
- c,
54
- y.get
55
- ? y
56
- : {
57
- enumerable: !0,
58
- get: function () {
59
- return e[c];
60
- },
61
- }
62
- );
63
- }),
64
- i
65
- );
66
- }
67
- var M = {},
68
- ae = {
21
+ var w = (e, t, i) => (q(e, t, "access private method"), i);
22
+ var z =
23
+ typeof globalThis < "u"
24
+ ? globalThis
25
+ : typeof window < "u"
26
+ ? window
27
+ : typeof global < "u"
28
+ ? global
29
+ : typeof self < "u"
30
+ ? self
31
+ : {},
32
+ V = {},
33
+ or = {
69
34
  get exports() {
70
- return M;
35
+ return V;
71
36
  },
72
37
  set exports(e) {
73
- M = e;
38
+ V = e;
74
39
  },
75
- };
76
- function ce(e) {
77
- throw new Error(
78
- 'Could not dynamically require "' +
79
- e +
80
- '". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.'
81
- );
82
- }
83
- var L = {},
84
- ue = {
40
+ },
41
+ I = {},
42
+ fr = {
85
43
  get exports() {
86
- return L;
44
+ return I;
87
45
  },
88
46
  set exports(e) {
89
- L = e;
47
+ I = e;
90
48
  },
91
- };
92
- const fe = {},
93
- le = /* @__PURE__ */ Object.freeze(
94
- /* @__PURE__ */ Object.defineProperty(
95
- {
96
- __proto__: null,
97
- default: fe,
98
- },
99
- Symbol.toStringTag,
100
- { value: "Module" }
101
- )
102
- ),
103
- he = /* @__PURE__ */ se(le);
104
- var Q;
105
- function G() {
49
+ },
50
+ Q;
51
+ function j() {
106
52
  return (
107
53
  Q ||
108
54
  ((Q = 1),
109
55
  (function (e, t) {
110
56
  (function (i, c) {
111
57
  e.exports = c();
112
- })(U, function () {
58
+ })(z, function () {
113
59
  var i =
114
60
  i ||
115
- (function (c, y) {
116
- var p;
117
- if (
118
- (typeof window < "u" && window.crypto && (p = window.crypto),
119
- typeof self < "u" && self.crypto && (p = self.crypto),
120
- typeof globalThis < "u" &&
121
- globalThis.crypto &&
122
- (p = globalThis.crypto),
123
- !p &&
124
- typeof window < "u" &&
125
- window.msCrypto &&
126
- (p = window.msCrypto),
127
- !p && typeof U < "u" && U.crypto && (p = U.crypto),
128
- !p && typeof ce == "function")
129
- )
130
- try {
131
- p = he;
132
- } catch {}
133
- var S = function () {
134
- if (p) {
135
- if (typeof p.getRandomValues == "function")
136
- try {
137
- return p.getRandomValues(new Uint32Array(1))[0];
138
- } catch {}
139
- if (typeof p.randomBytes == "function")
140
- try {
141
- return p.randomBytes(4).readInt32LE();
142
- } catch {}
143
- }
144
- throw new Error(
145
- "Native crypto module could not be used to get secure random number."
146
- );
147
- },
148
- k =
61
+ (function (c, U) {
62
+ var B =
149
63
  Object.create ||
150
64
  (function () {
151
65
  function r() {}
152
66
  return function (n) {
153
- var s;
67
+ var f;
154
68
  return (
155
69
  (r.prototype = n),
156
- (s = new r()),
70
+ (f = new r()),
157
71
  (r.prototype = null),
158
- s
72
+ f
159
73
  );
160
74
  };
161
75
  })(),
162
- a = {},
163
- m = (a.lib = {}),
164
- v = (m.Base = (function () {
76
+ y = {},
77
+ C = (y.lib = {}),
78
+ o = (C.Base = (function () {
165
79
  return {
166
80
  extend: function (r) {
167
- var n = k(this);
81
+ var n = B(this);
168
82
  return (
169
83
  r && n.mixIn(r),
170
84
  (!n.hasOwnProperty("init") || this.init === n.init) &&
@@ -191,30 +105,30 @@ function G() {
191
105
  },
192
106
  };
193
107
  })()),
194
- l = (m.WordArray = v.extend({
108
+ p = (C.WordArray = o.extend({
195
109
  init: function (r, n) {
196
110
  (r = this.words = r || []),
197
- n != y
111
+ n != U
198
112
  ? (this.sigBytes = n)
199
113
  : (this.sigBytes = r.length * 4);
200
114
  },
201
115
  toString: function (r) {
202
- return (r || f).stringify(this);
116
+ return (r || v).stringify(this);
203
117
  },
204
118
  concat: function (r) {
205
119
  var n = this.words,
206
- s = r.words,
207
- u = this.sigBytes,
208
- g = r.sigBytes;
209
- if ((this.clamp(), u % 4))
210
- for (var w = 0; w < g; w++) {
211
- var b = (s[w >>> 2] >>> (24 - (w % 4) * 8)) & 255;
212
- n[(u + w) >>> 2] |= b << (24 - ((u + w) % 4) * 8);
120
+ f = r.words,
121
+ s = this.sigBytes,
122
+ h = r.sigBytes;
123
+ if ((this.clamp(), s % 4))
124
+ for (var l = 0; l < h; l++) {
125
+ var H = (f[l >>> 2] >>> (24 - (l % 4) * 8)) & 255;
126
+ n[(s + l) >>> 2] |= H << (24 - ((s + l) % 4) * 8);
213
127
  }
214
128
  else
215
- for (var B = 0; B < g; B += 4)
216
- n[(u + B) >>> 2] = s[B >>> 2];
217
- return (this.sigBytes += g), this;
129
+ for (var l = 0; l < h; l += 4)
130
+ n[(s + l) >>> 2] = f[l >>> 2];
131
+ return (this.sigBytes += h), this;
218
132
  },
219
133
  clamp: function () {
220
134
  var r = this.words,
@@ -223,55 +137,79 @@ function G() {
223
137
  (r.length = c.ceil(n / 4));
224
138
  },
225
139
  clone: function () {
226
- var r = v.clone.call(this);
140
+ var r = o.clone.call(this);
227
141
  return (r.words = this.words.slice(0)), r;
228
142
  },
229
143
  random: function (r) {
230
- for (var n = [], s = 0; s < r; s += 4) n.push(S());
231
- return new l.init(n, r);
144
+ for (
145
+ var n = [],
146
+ f = function (m) {
147
+ var m = m,
148
+ g = 987654321,
149
+ A = 4294967295;
150
+ return function () {
151
+ (g = (36969 * (g & 65535) + (g >> 16)) & A),
152
+ (m = (18e3 * (m & 65535) + (m >> 16)) & A);
153
+ var S = ((g << 16) + m) & A;
154
+ return (
155
+ (S /= 4294967296),
156
+ (S += 0.5),
157
+ S * (c.random() > 0.5 ? 1 : -1)
158
+ );
159
+ };
160
+ },
161
+ s = 0,
162
+ h;
163
+ s < r;
164
+ s += 4
165
+ ) {
166
+ var l = f((h || c.random()) * 4294967296);
167
+ (h = l() * 987654071), n.push((l() * 4294967296) | 0);
168
+ }
169
+ return new p.init(n, r);
232
170
  },
233
171
  })),
234
- _ = (a.enc = {}),
235
- f = (_.Hex = {
172
+ x = (y.enc = {}),
173
+ v = (x.Hex = {
236
174
  stringify: function (r) {
237
175
  for (
238
- var n = r.words, s = r.sigBytes, u = [], g = 0;
239
- g < s;
240
- g++
176
+ var n = r.words, f = r.sigBytes, s = [], h = 0;
177
+ h < f;
178
+ h++
241
179
  ) {
242
- var w = (n[g >>> 2] >>> (24 - (g % 4) * 8)) & 255;
243
- u.push((w >>> 4).toString(16)),
244
- u.push((w & 15).toString(16));
180
+ var l = (n[h >>> 2] >>> (24 - (h % 4) * 8)) & 255;
181
+ s.push((l >>> 4).toString(16)),
182
+ s.push((l & 15).toString(16));
245
183
  }
246
- return u.join("");
184
+ return s.join("");
247
185
  },
248
186
  parse: function (r) {
249
- for (var n = r.length, s = [], u = 0; u < n; u += 2)
250
- s[u >>> 3] |=
251
- parseInt(r.substr(u, 2), 16) << (24 - (u % 8) * 4);
252
- return new l.init(s, n / 2);
187
+ for (var n = r.length, f = [], s = 0; s < n; s += 2)
188
+ f[s >>> 3] |=
189
+ parseInt(r.substr(s, 2), 16) << (24 - (s % 8) * 4);
190
+ return new p.init(f, n / 2);
253
191
  },
254
192
  }),
255
- d = (_.Latin1 = {
193
+ d = (x.Latin1 = {
256
194
  stringify: function (r) {
257
195
  for (
258
- var n = r.words, s = r.sigBytes, u = [], g = 0;
259
- g < s;
260
- g++
196
+ var n = r.words, f = r.sigBytes, s = [], h = 0;
197
+ h < f;
198
+ h++
261
199
  ) {
262
- var w = (n[g >>> 2] >>> (24 - (g % 4) * 8)) & 255;
263
- u.push(String.fromCharCode(w));
200
+ var l = (n[h >>> 2] >>> (24 - (h % 4) * 8)) & 255;
201
+ s.push(String.fromCharCode(l));
264
202
  }
265
- return u.join("");
203
+ return s.join("");
266
204
  },
267
205
  parse: function (r) {
268
- for (var n = r.length, s = [], u = 0; u < n; u++)
269
- s[u >>> 2] |=
270
- (r.charCodeAt(u) & 255) << (24 - (u % 4) * 8);
271
- return new l.init(s, n);
206
+ for (var n = r.length, f = [], s = 0; s < n; s++)
207
+ f[s >>> 2] |=
208
+ (r.charCodeAt(s) & 255) << (24 - (s % 4) * 8);
209
+ return new p.init(f, n);
272
210
  },
273
211
  }),
274
- o = (_.Utf8 = {
212
+ u = (x.Utf8 = {
275
213
  stringify: function (r) {
276
214
  try {
277
215
  return decodeURIComponent(escape(d.stringify(r)));
@@ -283,47 +221,47 @@ function G() {
283
221
  return d.parse(unescape(encodeURIComponent(r)));
284
222
  },
285
223
  }),
286
- h = (m.BufferedBlockAlgorithm = v.extend({
224
+ _ = (C.BufferedBlockAlgorithm = o.extend({
287
225
  reset: function () {
288
- (this._data = new l.init()), (this._nDataBytes = 0);
226
+ (this._data = new p.init()), (this._nDataBytes = 0);
289
227
  },
290
228
  _append: function (r) {
291
- typeof r == "string" && (r = o.parse(r)),
229
+ typeof r == "string" && (r = u.parse(r)),
292
230
  this._data.concat(r),
293
231
  (this._nDataBytes += r.sigBytes);
294
232
  },
295
233
  _process: function (r) {
296
- var n,
297
- s = this._data,
298
- u = s.words,
299
- g = s.sigBytes,
300
- w = this.blockSize,
301
- b = w * 4,
302
- B = g / b;
234
+ var n = this._data,
235
+ f = n.words,
236
+ s = n.sigBytes,
237
+ h = this.blockSize,
238
+ l = h * 4,
239
+ H = s / l;
303
240
  r
304
- ? (B = c.ceil(B))
305
- : (B = c.max((B | 0) - this._minBufferSize, 0));
306
- var I = B * w,
307
- H = c.min(I * 4, g);
308
- if (I) {
309
- for (var O = 0; O < I; O += w) this._doProcessBlock(u, O);
310
- (n = u.splice(0, I)), (s.sigBytes -= H);
241
+ ? (H = c.ceil(H))
242
+ : (H = c.max((H | 0) - this._minBufferSize, 0));
243
+ var m = H * h,
244
+ g = c.min(m * 4, s);
245
+ if (m) {
246
+ for (var A = 0; A < m; A += h) this._doProcessBlock(f, A);
247
+ var S = f.splice(0, m);
248
+ n.sigBytes -= g;
311
249
  }
312
- return new l.init(n, H);
250
+ return new p.init(S, g);
313
251
  },
314
252
  clone: function () {
315
- var r = v.clone.call(this);
253
+ var r = o.clone.call(this);
316
254
  return (r._data = this._data.clone()), r;
317
255
  },
318
256
  _minBufferSize: 0,
319
257
  }));
320
- m.Hasher = h.extend({
321
- cfg: v.extend(),
258
+ C.Hasher = _.extend({
259
+ cfg: o.extend(),
322
260
  init: function (r) {
323
261
  (this.cfg = this.cfg.extend(r)), this.reset();
324
262
  },
325
263
  reset: function () {
326
- h.reset.call(this), this._doReset();
264
+ _.reset.call(this), this._doReset();
327
265
  },
328
266
  update: function (r) {
329
267
  return this._append(r), this._process(), this;
@@ -335,265 +273,278 @@ function G() {
335
273
  },
336
274
  blockSize: 16,
337
275
  _createHelper: function (r) {
338
- return function (n, s) {
339
- return new r.init(s).finalize(n);
276
+ return function (n, f) {
277
+ return new r.init(f).finalize(n);
340
278
  };
341
279
  },
342
280
  _createHmacHelper: function (r) {
343
- return function (n, s) {
344
- return new C.HMAC.init(r, s).finalize(n);
281
+ return function (n, f) {
282
+ return new a.HMAC.init(r, f).finalize(n);
345
283
  };
346
284
  },
347
285
  });
348
- var C = (a.algo = {});
349
- return a;
286
+ var a = (y.algo = {});
287
+ return y;
350
288
  })(Math);
351
289
  return i;
352
290
  });
353
- })(ue)),
354
- L
291
+ })(fr)),
292
+ I
355
293
  );
356
294
  }
357
295
  (function (e, t) {
358
296
  (function (i, c) {
359
- e.exports = c(G());
360
- })(U, function (i) {
297
+ e.exports = c(j());
298
+ })(z, function (i) {
361
299
  return (
362
300
  (function () {
363
301
  var c = i,
364
- y = c.lib,
365
- p = y.WordArray,
366
- S = c.enc;
367
- S.Base64url = {
368
- stringify: function (a, m = !0) {
369
- var v = a.words,
370
- l = a.sigBytes,
371
- _ = m ? this._safe_map : this._map;
372
- a.clamp();
373
- for (var f = [], d = 0; d < l; d += 3)
302
+ U = c.lib,
303
+ B = U.WordArray,
304
+ y = c.enc;
305
+ y.Base64 = {
306
+ stringify: function (o) {
307
+ var p = o.words,
308
+ x = o.sigBytes,
309
+ v = this._map;
310
+ o.clamp();
311
+ for (var d = [], u = 0; u < x; u += 3)
374
312
  for (
375
- var o = (v[d >>> 2] >>> (24 - (d % 4) * 8)) & 255,
376
- h = (v[(d + 1) >>> 2] >>> (24 - ((d + 1) % 4) * 8)) & 255,
377
- C = (v[(d + 2) >>> 2] >>> (24 - ((d + 2) % 4) * 8)) & 255,
378
- r = (o << 16) | (h << 8) | C,
379
- n = 0;
380
- n < 4 && d + n * 0.75 < l;
381
- n++
313
+ var _ = (p[u >>> 2] >>> (24 - (u % 4) * 8)) & 255,
314
+ a = (p[(u + 1) >>> 2] >>> (24 - ((u + 1) % 4) * 8)) & 255,
315
+ r = (p[(u + 2) >>> 2] >>> (24 - ((u + 2) % 4) * 8)) & 255,
316
+ n = (_ << 16) | (a << 8) | r,
317
+ f = 0;
318
+ f < 4 && u + f * 0.75 < x;
319
+ f++
382
320
  )
383
- f.push(_.charAt((r >>> (6 * (3 - n))) & 63));
384
- var s = _.charAt(64);
385
- if (s) for (; f.length % 4; ) f.push(s);
386
- return f.join("");
321
+ d.push(v.charAt((n >>> (6 * (3 - f))) & 63));
322
+ var s = v.charAt(64);
323
+ if (s) for (; d.length % 4; ) d.push(s);
324
+ return d.join("");
387
325
  },
388
- parse: function (a, m = !0) {
389
- var v = a.length,
390
- l = m ? this._safe_map : this._map,
391
- _ = this._reverseMap;
392
- if (!_) {
393
- _ = this._reverseMap = [];
394
- for (var f = 0; f < l.length; f++) _[l.charCodeAt(f)] = f;
326
+ parse: function (o) {
327
+ var p = o.length,
328
+ x = this._map,
329
+ v = this._reverseMap;
330
+ if (!v) {
331
+ v = this._reverseMap = [];
332
+ for (var d = 0; d < x.length; d++) v[x.charCodeAt(d)] = d;
395
333
  }
396
- var d = l.charAt(64);
397
- if (d) {
398
- var o = a.indexOf(d);
399
- o !== -1 && (v = o);
334
+ var u = x.charAt(64);
335
+ if (u) {
336
+ var _ = o.indexOf(u);
337
+ _ !== -1 && (p = _);
400
338
  }
401
- return k(a, v, _);
339
+ return C(o, p, v);
402
340
  },
403
341
  _map: "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",
404
- _safe_map:
405
- "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_",
406
342
  };
407
- function k(a, m, v) {
408
- for (var l = [], _ = 0, f = 0; f < m; f++)
409
- if (f % 4) {
410
- var d = v[a.charCodeAt(f - 1)] << ((f % 4) * 2),
411
- o = v[a.charCodeAt(f)] >>> (6 - (f % 4) * 2),
412
- h = d | o;
413
- (l[_ >>> 2] |= h << (24 - (_ % 4) * 8)), _++;
343
+ function C(o, p, x) {
344
+ for (var v = [], d = 0, u = 0; u < p; u++)
345
+ if (u % 4) {
346
+ var _ = x[o.charCodeAt(u - 1)] << ((u % 4) * 2),
347
+ a = x[o.charCodeAt(u)] >>> (6 - (u % 4) * 2);
348
+ (v[d >>> 2] |= (_ | a) << (24 - (d % 4) * 8)), d++;
414
349
  }
415
- return p.create(l, _);
350
+ return B.create(v, d);
416
351
  }
417
352
  })(),
418
- i.enc.Base64url
353
+ i.enc.Base64
419
354
  );
420
355
  });
421
- })(ae);
422
- var V = {},
423
- pe = {
356
+ })(or);
357
+ var G = {},
358
+ cr = {
424
359
  get exports() {
425
- return V;
360
+ return G;
426
361
  },
427
362
  set exports(e) {
428
- V = e;
363
+ G = e;
429
364
  },
430
365
  };
431
366
  (function (e, t) {
432
367
  (function (i, c) {
433
- e.exports = c(G());
434
- })(U, function (i) {
368
+ e.exports = c(j());
369
+ })(z, function (i) {
370
+ return i.enc.Utf8;
371
+ });
372
+ })(cr);
373
+ var J = {},
374
+ ur = {
375
+ get exports() {
376
+ return J;
377
+ },
378
+ set exports(e) {
379
+ J = e;
380
+ },
381
+ };
382
+ (function (e, t) {
383
+ (function (i, c) {
384
+ e.exports = c(j());
385
+ })(z, function (i) {
435
386
  return (
436
387
  (function () {
437
388
  if (typeof ArrayBuffer == "function") {
438
389
  var c = i,
439
- y = c.lib,
440
- p = y.WordArray,
441
- S = p.init,
442
- k = (p.init = function (a) {
390
+ U = c.lib,
391
+ B = U.WordArray,
392
+ y = B.init,
393
+ C = (B.init = function (o) {
443
394
  if (
444
- (a instanceof ArrayBuffer && (a = new Uint8Array(a)),
445
- (a instanceof Int8Array ||
395
+ (o instanceof ArrayBuffer && (o = new Uint8Array(o)),
396
+ (o instanceof Int8Array ||
446
397
  (typeof Uint8ClampedArray < "u" &&
447
- a instanceof Uint8ClampedArray) ||
448
- a instanceof Int16Array ||
449
- a instanceof Uint16Array ||
450
- a instanceof Int32Array ||
451
- a instanceof Uint32Array ||
452
- a instanceof Float32Array ||
453
- a instanceof Float64Array) &&
454
- (a = new Uint8Array(a.buffer, a.byteOffset, a.byteLength)),
455
- a instanceof Uint8Array)
398
+ o instanceof Uint8ClampedArray) ||
399
+ o instanceof Int16Array ||
400
+ o instanceof Uint16Array ||
401
+ o instanceof Int32Array ||
402
+ o instanceof Uint32Array ||
403
+ o instanceof Float32Array ||
404
+ o instanceof Float64Array) &&
405
+ (o = new Uint8Array(o.buffer, o.byteOffset, o.byteLength)),
406
+ o instanceof Uint8Array)
456
407
  ) {
457
- for (var m = a.byteLength, v = [], l = 0; l < m; l++)
458
- v[l >>> 2] |= a[l] << (24 - (l % 4) * 8);
459
- S.call(this, v, m);
460
- } else S.apply(this, arguments);
408
+ for (var p = o.byteLength, x = [], v = 0; v < p; v++)
409
+ x[v >>> 2] |= o[v] << (24 - (v % 4) * 8);
410
+ y.call(this, x, p);
411
+ } else y.apply(this, arguments);
461
412
  });
462
- k.prototype = p;
413
+ C.prototype = B;
463
414
  }
464
415
  })(),
465
416
  i.lib.WordArray
466
417
  );
467
418
  });
468
- })(pe);
469
- var N = {},
470
- de = {
419
+ })(ur);
420
+ var M = {},
421
+ hr = {
471
422
  get exports() {
472
- return N;
423
+ return M;
473
424
  },
474
425
  set exports(e) {
475
- N = e;
426
+ M = e;
476
427
  },
477
428
  };
478
429
  (function (e, t) {
479
430
  (function (i, c) {
480
- e.exports = c(G());
481
- })(U, function (i) {
431
+ e.exports = c(j());
432
+ })(z, function (i) {
482
433
  return (
483
434
  (function (c) {
484
- var y = i,
485
- p = y.lib,
486
- S = p.WordArray,
487
- k = p.Hasher,
488
- a = y.algo,
489
- m = [],
490
- v = [];
435
+ var U = i,
436
+ B = U.lib,
437
+ y = B.WordArray,
438
+ C = B.Hasher,
439
+ o = U.algo,
440
+ p = [],
441
+ x = [];
491
442
  (function () {
492
- function f(C) {
493
- for (var r = c.sqrt(C), n = 2; n <= r; n++) if (!(C % n)) return !1;
443
+ function u(n) {
444
+ for (var f = c.sqrt(n), s = 2; s <= f; s++) if (!(n % s)) return !1;
494
445
  return !0;
495
446
  }
496
- function d(C) {
497
- return ((C - (C | 0)) * 4294967296) | 0;
447
+ function _(n) {
448
+ return ((n - (n | 0)) * 4294967296) | 0;
498
449
  }
499
- for (var o = 2, h = 0; h < 64; )
500
- f(o) &&
501
- (h < 8 && (m[h] = d(c.pow(o, 1 / 2))),
502
- (v[h] = d(c.pow(o, 1 / 3))),
503
- h++),
504
- o++;
450
+ for (var a = 2, r = 0; r < 64; )
451
+ u(a) &&
452
+ (r < 8 && (p[r] = _(c.pow(a, 1 / 2))),
453
+ (x[r] = _(c.pow(a, 1 / 3))),
454
+ r++),
455
+ a++;
505
456
  })();
506
- var l = [],
507
- _ = (a.SHA256 = k.extend({
457
+ var v = [],
458
+ d = (o.SHA256 = C.extend({
508
459
  _doReset: function () {
509
- this._hash = new S.init(m.slice(0));
460
+ this._hash = new y.init(p.slice(0));
510
461
  },
511
- _doProcessBlock: function (f, d) {
462
+ _doProcessBlock: function (u, _) {
512
463
  for (
513
- var o = this._hash.words,
514
- h = o[0],
515
- C = o[1],
516
- r = o[2],
517
- n = o[3],
518
- s = o[4],
519
- u = o[5],
520
- g = o[6],
521
- w = o[7],
522
- b = 0;
523
- b < 64;
524
- b++
464
+ var a = this._hash.words,
465
+ r = a[0],
466
+ n = a[1],
467
+ f = a[2],
468
+ s = a[3],
469
+ h = a[4],
470
+ l = a[5],
471
+ H = a[6],
472
+ m = a[7],
473
+ g = 0;
474
+ g < 64;
475
+ g++
525
476
  ) {
526
- if (b < 16) l[b] = f[d + b] | 0;
477
+ if (g < 16) v[g] = u[_ + g] | 0;
527
478
  else {
528
- var B = l[b - 15],
529
- I =
530
- ((B << 25) | (B >>> 7)) ^
531
- ((B << 14) | (B >>> 18)) ^
532
- (B >>> 3),
533
- H = l[b - 2],
534
- O =
535
- ((H << 15) | (H >>> 17)) ^
536
- ((H << 13) | (H >>> 19)) ^
537
- (H >>> 10);
538
- l[b] = I + l[b - 7] + O + l[b - 16];
479
+ var A = v[g - 15],
480
+ S =
481
+ ((A << 25) | (A >>> 7)) ^
482
+ ((A << 14) | (A >>> 18)) ^
483
+ (A >>> 3),
484
+ P = v[g - 2],
485
+ Y =
486
+ ((P << 15) | (P >>> 17)) ^
487
+ ((P << 13) | (P >>> 19)) ^
488
+ (P >>> 10);
489
+ v[g] = S + v[g - 7] + Y + v[g - 16];
539
490
  }
540
- var Y = (s & u) ^ (~s & g),
541
- ee = (h & C) ^ (h & r) ^ (C & r),
542
- re =
543
- ((h << 30) | (h >>> 2)) ^
544
- ((h << 19) | (h >>> 13)) ^
545
- ((h << 10) | (h >>> 22)),
546
- te =
547
- ((s << 26) | (s >>> 6)) ^
548
- ((s << 21) | (s >>> 11)) ^
549
- ((s << 7) | (s >>> 25)),
550
- J = w + te + Y + v[b] + l[b],
551
- ne = re + ee;
552
- (w = g),
553
- (g = u),
554
- (u = s),
555
- (s = (n + J) | 0),
491
+ var rr = (h & l) ^ (~h & H),
492
+ er = (r & n) ^ (r & f) ^ (n & f),
493
+ tr =
494
+ ((r << 30) | (r >>> 2)) ^
495
+ ((r << 19) | (r >>> 13)) ^
496
+ ((r << 10) | (r >>> 22)),
497
+ nr =
498
+ ((h << 26) | (h >>> 6)) ^
499
+ ((h << 21) | (h >>> 11)) ^
500
+ ((h << 7) | (h >>> 25)),
501
+ N = m + nr + rr + x[g] + v[g],
502
+ ir = tr + er;
503
+ (m = H),
504
+ (H = l),
505
+ (l = h),
506
+ (h = (s + N) | 0),
507
+ (s = f),
508
+ (f = n),
556
509
  (n = r),
557
- (r = C),
558
- (C = h),
559
- (h = (J + ne) | 0);
510
+ (r = (N + ir) | 0);
560
511
  }
561
- (o[0] = (o[0] + h) | 0),
562
- (o[1] = (o[1] + C) | 0),
563
- (o[2] = (o[2] + r) | 0),
564
- (o[3] = (o[3] + n) | 0),
565
- (o[4] = (o[4] + s) | 0),
566
- (o[5] = (o[5] + u) | 0),
567
- (o[6] = (o[6] + g) | 0),
568
- (o[7] = (o[7] + w) | 0);
512
+ (a[0] = (a[0] + r) | 0),
513
+ (a[1] = (a[1] + n) | 0),
514
+ (a[2] = (a[2] + f) | 0),
515
+ (a[3] = (a[3] + s) | 0),
516
+ (a[4] = (a[4] + h) | 0),
517
+ (a[5] = (a[5] + l) | 0),
518
+ (a[6] = (a[6] + H) | 0),
519
+ (a[7] = (a[7] + m) | 0);
569
520
  },
570
521
  _doFinalize: function () {
571
- var f = this._data,
572
- d = f.words,
573
- o = this._nDataBytes * 8,
574
- h = f.sigBytes * 8;
522
+ var u = this._data,
523
+ _ = u.words,
524
+ a = this._nDataBytes * 8,
525
+ r = u.sigBytes * 8;
575
526
  return (
576
- (d[h >>> 5] |= 128 << (24 - (h % 32))),
577
- (d[(((h + 64) >>> 9) << 4) + 14] = c.floor(o / 4294967296)),
578
- (d[(((h + 64) >>> 9) << 4) + 15] = o),
579
- (f.sigBytes = d.length * 4),
527
+ (_[r >>> 5] |= 128 << (24 - (r % 32))),
528
+ (_[(((r + 64) >>> 9) << 4) + 14] = c.floor(a / 4294967296)),
529
+ (_[(((r + 64) >>> 9) << 4) + 15] = a),
530
+ (u.sigBytes = _.length * 4),
580
531
  this._process(),
581
532
  this._hash
582
533
  );
583
534
  },
584
535
  clone: function () {
585
- var f = k.clone.call(this);
586
- return (f._hash = this._hash.clone()), f;
536
+ var u = C.clone.call(this);
537
+ return (u._hash = this._hash.clone()), u;
587
538
  },
588
539
  }));
589
- (y.SHA256 = k._createHelper(_)),
590
- (y.HmacSHA256 = k._createHmacHelper(_));
540
+ (U.SHA256 = C._createHelper(d)),
541
+ (U.HmacSHA256 = C._createHmacHelper(d));
591
542
  })(Math),
592
543
  i.SHA256
593
544
  );
594
545
  });
595
- })(de);
596
- const ve = {
546
+ })(hr);
547
+ const vr = {
597
548
  environments: {
598
549
  production: {
599
550
  api: "https://api.monerium.app",
@@ -605,75 +556,73 @@ const ve = {
605
556
  },
606
557
  },
607
558
  };
608
- var W, z, A, R, T, X, q, Z, F, K;
609
- class Se {
559
+ var R, W, b, k, E, X, O, Z, T, K;
560
+ class Cr {
610
561
  constructor(t = "sandbox") {
611
- P(this, A);
612
- P(this, T);
613
- P(this, q);
614
- P(this, F);
615
- P(this, W, void 0);
616
- P(this, z, void 0);
562
+ F(this, b);
563
+ F(this, E);
564
+ F(this, O);
565
+ F(this, T);
566
+ F(this, R, void 0);
567
+ F(this, W, void 0);
617
568
  $(this, "codeVerifier");
618
569
  $(this, "bearerProfile");
619
- $(this, "clientId");
620
- $(this, "pkceRequest", this.getAuthFlowURI);
621
- D(this, W, ve.environments[t]);
570
+ $(this, "pkceRequest", (t) => this.getAuthFlowURI(t));
571
+ D(this, R, vr.environments[t]);
622
572
  }
623
573
  async auth(t) {
624
574
  let i;
625
- if (x(this, T, X).call(this, t))
575
+ if (w(this, E, X).call(this, t))
626
576
  i = { ...t, grant_type: "authorization_code" };
627
- else if (x(this, q, Z).call(this, t))
577
+ else if (w(this, O, Z).call(this, t))
628
578
  i = { ...t, grant_type: "refresh_token" };
629
- else if (x(this, F, K).call(this, t))
579
+ else if (w(this, T, K).call(this, t))
630
580
  i = { ...t, grant_type: "client_credentials" };
631
581
  else throw new Error("Authentication method could not be detected.");
632
- (this.clientId = t.client_id),
633
- (this.bearerProfile = await x(this, A, R).call(
634
- this,
635
- "post",
636
- "auth/token",
637
- new URLSearchParams(i),
638
- !0
639
- )),
640
- D(this, z, `Bearer ${this.bearerProfile.access_token}`);
582
+ (this.bearerProfile = await w(this, b, k).call(
583
+ this,
584
+ "post",
585
+ "auth/token",
586
+ new URLSearchParams(i),
587
+ !0
588
+ )),
589
+ D(this, W, `Bearer ${this.bearerProfile.access_token}`);
641
590
  }
642
591
  getAuthFlowURI(t) {
643
- this.codeVerifier = V.random(64).toString();
644
- const i = M.stringify(N(this.codeVerifier)),
592
+ this.codeVerifier = J.random(64).toString();
593
+ const i = G.stringify(V.stringify(M(this.codeVerifier))),
645
594
  c = {
646
595
  ...t,
647
- client_id: this.clientId || (t == null ? void 0 : t.client_id),
596
+ client_id: t == null ? void 0 : t.client_id,
648
597
  code_challenge: i,
649
598
  code_challenge_method: "S256",
650
599
  response_type: "code",
651
600
  };
652
- return `${E(this, W).api}/auth?${new URLSearchParams(c)}`;
601
+ return `${L(this, R).api}/auth?${new URLSearchParams(c)}`;
653
602
  }
654
603
  getAuthContext() {
655
- return x(this, A, R).call(this, "get", "auth/context");
604
+ return w(this, b, k).call(this, "get", "auth/context");
656
605
  }
657
606
  getProfile(t) {
658
- return x(this, A, R).call(this, "get", `profiles/${t}`);
607
+ return w(this, b, k).call(this, "get", `profiles/${t}`);
659
608
  }
660
609
  getBalances(t) {
661
610
  return t
662
- ? x(this, A, R).call(this, "get", `profiles/${t}/balances`)
663
- : x(this, A, R).call(this, "get", "balances");
611
+ ? w(this, b, k).call(this, "get", `profiles/${t}/balances`)
612
+ : w(this, b, k).call(this, "get", "balances");
664
613
  }
665
614
  getOrders(t) {
666
615
  const i = new URLSearchParams(t);
667
- return x(this, A, R).call(this, "get", `orders?${i}`);
616
+ return w(this, b, k).call(this, "get", `orders?${i}`);
668
617
  }
669
618
  getOrder(t) {
670
- return x(this, A, R).call(this, "get", `orders/${t}`);
619
+ return w(this, b, k).call(this, "get", `orders/${t}`);
671
620
  }
672
621
  getTokens() {
673
- return x(this, A, R).call(this, "get", "tokens");
622
+ return w(this, b, k).call(this, "get", "tokens");
674
623
  }
675
624
  linkAddress(t, i) {
676
- return x(this, A, R).call(
625
+ return w(this, b, k).call(
677
626
  this,
678
627
  "post",
679
628
  `profiles/${t}/addresses`,
@@ -682,103 +631,103 @@ class Se {
682
631
  }
683
632
  placeOrder(t, i) {
684
633
  return i
685
- ? x(this, A, R).call(
634
+ ? w(this, b, k).call(
686
635
  this,
687
636
  "post",
688
637
  `profiles/${i}/orders`,
689
638
  JSON.stringify(t)
690
639
  )
691
- : x(this, A, R).call(this, "post", "orders", JSON.stringify(t));
640
+ : w(this, b, k).call(this, "post", "orders", JSON.stringify(t));
692
641
  }
693
642
  uploadSupportingDocument(t) {
694
643
  const i = new URLSearchParams(t);
695
- return x(this, A, R).call(this, "post", "files/supporting-document", i, !0);
644
+ return w(this, b, k).call(this, "post", "files/supporting-document", i, !0);
696
645
  }
697
646
  }
698
- (W = new WeakMap()),
699
- (z = new WeakMap()),
700
- (A = new WeakSet()),
701
- (R = async function (t, i, c, y) {
702
- const p = await fetch(`${E(this, W).api}/${i}`, {
647
+ (R = new WeakMap()),
648
+ (W = new WeakMap()),
649
+ (b = new WeakSet()),
650
+ (k = async function (t, i, c, U) {
651
+ const B = await fetch(`${L(this, R).api}/${i}`, {
703
652
  method: t,
704
653
  headers: {
705
- "Content-Type": `application/${y ? "x-www-form-urlencoded" : "json"}`,
706
- Authorization: E(this, z) || "",
654
+ "Content-Type": `application/${U ? "x-www-form-urlencoded" : "json"}`,
655
+ Authorization: L(this, W) || "",
707
656
  },
708
657
  body: c,
709
658
  }),
710
- S = await p.json();
711
- if (p.ok) return S;
712
- throw S;
659
+ y = await B.json();
660
+ if (B.ok) return y;
661
+ throw y;
713
662
  }),
714
- (T = new WeakSet()),
663
+ (E = new WeakSet()),
715
664
  (X = function (t) {
716
665
  return t.code != null;
717
666
  }),
718
- (q = new WeakSet()),
667
+ (O = new WeakSet()),
719
668
  (Z = function (t) {
720
669
  return t.refresh_token != null;
721
670
  }),
722
- (F = new WeakSet()),
671
+ (T = new WeakSet()),
723
672
  (K = function (t) {
724
673
  return t.client_secret != null;
725
674
  });
726
- var ge = /* @__PURE__ */ ((e) => (
675
+ var lr = /* @__PURE__ */ ((e) => (
727
676
  (e.eur = "eur"), (e.usd = "usd"), (e.gbp = "gbp"), (e.isk = "isk"), e
728
- ))(ge || {}),
729
- ye = /* @__PURE__ */ ((e) => (
677
+ ))(lr || {}),
678
+ pr = /* @__PURE__ */ ((e) => (
730
679
  (e.corporate = "corporate"), (e.personal = "personal"), e
731
- ))(ye || {}),
732
- _e = /* @__PURE__ */ ((e) => ((e.read = "read"), (e.write = "write"), e))(
733
- _e || {}
680
+ ))(pr || {}),
681
+ dr = /* @__PURE__ */ ((e) => ((e.read = "read"), (e.write = "write"), e))(
682
+ dr || {}
734
683
  ),
735
- we = /* @__PURE__ */ ((e) => (
684
+ gr = /* @__PURE__ */ ((e) => (
736
685
  (e.absent = "absent"),
737
686
  (e.submitted = "submitted"),
738
687
  (e.pending = "pending"),
739
688
  (e.confirmed = "confirmed"),
740
689
  e
741
- ))(we || {}),
742
- me = /* @__PURE__ */ ((e) => (
690
+ ))(gr || {}),
691
+ xr = /* @__PURE__ */ ((e) => (
743
692
  (e.approved = "approved"),
744
693
  (e.rejected = "rejected"),
745
694
  (e.unknown = "unknown"),
746
695
  e
747
- ))(me || {}),
748
- be = /* @__PURE__ */ ((e) => ((e.iban = "iban"), (e.scan = "scan"), e))(
749
- be || {}
696
+ ))(xr || {}),
697
+ _r = /* @__PURE__ */ ((e) => ((e.iban = "iban"), (e.scan = "scan"), e))(
698
+ _r || {}
750
699
  ),
751
- Be = /* @__PURE__ */ ((e) => (
700
+ wr = /* @__PURE__ */ ((e) => (
752
701
  (e.polygon = "polygon"), (e.ethereum = "ethereum"), (e.gnosis = "gnosis"), e
753
- ))(Be || {}),
754
- xe = /* @__PURE__ */ ((e) => (
702
+ ))(wr || {}),
703
+ mr = /* @__PURE__ */ ((e) => (
755
704
  (e.mainnet = "mainnet"),
756
705
  (e.chiado = "chiado"),
757
706
  (e.goerli = "goerli"),
758
707
  (e.mumbai = "mumbai"),
759
708
  e
760
- ))(xe || {}),
761
- Ce = /* @__PURE__ */ ((e) => ((e.redeem = "redeem"), (e.issue = "issue"), e))(
762
- Ce || {}
709
+ ))(mr || {}),
710
+ br = /* @__PURE__ */ ((e) => ((e.redeem = "redeem"), (e.issue = "issue"), e))(
711
+ br || {}
763
712
  ),
764
- Ae = /* @__PURE__ */ ((e) => (
713
+ yr = /* @__PURE__ */ ((e) => (
765
714
  (e.placed = "placed"),
766
715
  (e.pending = "pending"),
767
716
  (e.processed = "processed"),
768
717
  (e.rejected = "rejected"),
769
718
  e
770
- ))(Ae || {});
719
+ ))(yr || {});
771
720
  export {
772
- Be as Chain,
773
- ge as Currency,
774
- me as KYCOutcome,
775
- we as KYCState,
776
- Se as MoneriumClient,
777
- xe as Network,
778
- Ce as OrderKind,
779
- Ae as OrderState,
780
- be as PaymentStandard,
781
- _e as Permission,
782
- ye as ProfileType,
721
+ wr as Chain,
722
+ lr as Currency,
723
+ xr as KYCOutcome,
724
+ gr as KYCState,
725
+ Cr as MoneriumClient,
726
+ mr as Network,
727
+ br as OrderKind,
728
+ yr as OrderState,
729
+ _r as PaymentStandard,
730
+ dr as Permission,
731
+ pr as ProfileType,
783
732
  };
784
733
  //# sourceMappingURL=index.es.js.map