@monerium/sdk 2.0.16 → 2.0.17

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