@monerium/sdk 2.0.19 → 2.1.20
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/CHANGELOG.md +115 -0
- package/README.md +14 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.mjs +66 -75
- package/dist/index.mjs.map +1 -1
- package/dist/index.umd.js +161 -170
- package/dist/index.umd.js.map +1 -1
- package/package.json +2 -2
package/CHANGELOG.md
ADDED
|
@@ -0,0 +1,115 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
## [2.1.20](https://github.com/monerium/sdk/compare/v2.1.19...v2.1.20) (2023-04-24)
|
|
4
|
+
|
|
5
|
+
### Bug Fixes
|
|
6
|
+
|
|
7
|
+
- auth ([9eafd6e](https://github.com/monerium/sdk/commit/9eafd6e5f65dd328ab61067dc345b4cb1388f70b))
|
|
8
|
+
- missing semicolon ([2e87267](https://github.com/monerium/sdk/commit/2e87267849957c957b122dd2a0af0c1a282f948f))
|
|
9
|
+
- scope shouldnt have at prefix ([4c5ab0f](https://github.com/monerium/sdk/commit/4c5ab0f2a4c24ef637b3a266c39c5e41f05d97ac))
|
|
10
|
+
|
|
11
|
+
## [2.1.19](https://github.com/monerium/sdk/compare/v2.1.18...v2.1.19) (2023-04-24)
|
|
12
|
+
|
|
13
|
+
### Bug Fixes
|
|
14
|
+
|
|
15
|
+
- npm server ([b6a1e11](https://github.com/monerium/sdk/commit/b6a1e11827b898263d058634c6f4d1b37b34d078))
|
|
16
|
+
|
|
17
|
+
## [2.1.18](https://github.com/monerium/sdk/compare/v2.1.17...v2.1.18) (2023-04-24)
|
|
18
|
+
|
|
19
|
+
### Bug Fixes
|
|
20
|
+
|
|
21
|
+
- npm auth ([36a8a47](https://github.com/monerium/sdk/commit/36a8a47e117b25561dbd669a9361b407a915fb89))
|
|
22
|
+
|
|
23
|
+
## [2.1.17](https://github.com/monerium/sdk/compare/v2.1.16...v2.1.17) (2023-04-24)
|
|
24
|
+
|
|
25
|
+
### Bug Fixes
|
|
26
|
+
|
|
27
|
+
- npm ([f55a9f1](https://github.com/monerium/sdk/commit/f55a9f18bf2b798cfe7d4425b8dc5e6b680ff192))
|
|
28
|
+
|
|
29
|
+
## [2.1.16](https://github.com/monerium/sdk/compare/v2.1.15...v2.1.16) (2023-04-24)
|
|
30
|
+
|
|
31
|
+
### Bug Fixes
|
|
32
|
+
|
|
33
|
+
- npmAuthToken ([5a3416d](https://github.com/monerium/sdk/commit/5a3416dd2f44370a782d54359035ffd9f8ea2c1f))
|
|
34
|
+
|
|
35
|
+
## [2.1.15](https://github.com/monerium/sdk/compare/v2.1.14...v2.1.15) (2023-04-24)
|
|
36
|
+
|
|
37
|
+
### Bug Fixes
|
|
38
|
+
|
|
39
|
+
- add publish registry ([582fabd](https://github.com/monerium/sdk/commit/582fabd4602f30f1ae4c971a651c4cc8ec89d68a))
|
|
40
|
+
- global set npm auth ([4ae8d49](https://github.com/monerium/sdk/commit/4ae8d498792fd5dd9eb892e1e18ccda5184fa2d3))
|
|
41
|
+
|
|
42
|
+
## [2.1.14](https://github.com/monerium/sdk/compare/v2.1.13...v2.1.14) (2023-04-24)
|
|
43
|
+
|
|
44
|
+
### Bug Fixes
|
|
45
|
+
|
|
46
|
+
- add token ([ff30c0a](https://github.com/monerium/sdk/commit/ff30c0afbca9f7467e3aef2546244bcd57b709d1))
|
|
47
|
+
- missing bracket ([817e366](https://github.com/monerium/sdk/commit/817e366c540395ea10c24cb79e1f173d81f337b5))
|
|
48
|
+
|
|
49
|
+
## [2.1.13](https://github.com/monerium/sdk/compare/v2.1.12...v2.1.13) (2023-04-24)
|
|
50
|
+
|
|
51
|
+
### Bug Fixes
|
|
52
|
+
|
|
53
|
+
- login & whoami ([b22f8db](https://github.com/monerium/sdk/commit/b22f8db0c130dd12ad594e19541ba8988a5848c2))
|
|
54
|
+
|
|
55
|
+
## [2.1.12](https://github.com/monerium/sdk/compare/v2.1.11...v2.1.12) (2023-04-24)
|
|
56
|
+
|
|
57
|
+
### Bug Fixes
|
|
58
|
+
|
|
59
|
+
- npm scope with at ([a0b645f](https://github.com/monerium/sdk/commit/a0b645f4f1cf9950b653c7ab40e71c72573a2a5b))
|
|
60
|
+
|
|
61
|
+
## [2.1.11](https://github.com/monerium/sdk/compare/v2.1.10...v2.1.11) (2023-04-24)
|
|
62
|
+
|
|
63
|
+
### Bug Fixes
|
|
64
|
+
|
|
65
|
+
- auth issue ([28aeb1d](https://github.com/monerium/sdk/commit/28aeb1d8b77b68c10d86db07784664a5c143df03))
|
|
66
|
+
|
|
67
|
+
## [2.1.10](https://github.com/monerium/sdk/compare/v2.1.9...v2.1.10) (2023-04-24)
|
|
68
|
+
|
|
69
|
+
### Bug Fixes
|
|
70
|
+
|
|
71
|
+
- npm scope ([8f2ea68](https://github.com/monerium/sdk/commit/8f2ea68549d9385fd8eef50fa3820e485efa56c2))
|
|
72
|
+
|
|
73
|
+
## [2.1.9](https://github.com/monerium/sdk/compare/v2.1.8...v2.1.9) (2023-04-24)
|
|
74
|
+
|
|
75
|
+
### Bug Fixes
|
|
76
|
+
|
|
77
|
+
- always auth ([2ceafec](https://github.com/monerium/sdk/commit/2ceafece261751653bc824729b0e0553e53c8d17))
|
|
78
|
+
- npm scope ([cc27404](https://github.com/monerium/sdk/commit/cc27404f76eab0ffab0d1b2aad1823685335c07a))
|
|
79
|
+
|
|
80
|
+
## [2.1.8](https://github.com/monerium/sdk/compare/v2.1.7...v2.1.8) (2023-04-24)
|
|
81
|
+
|
|
82
|
+
### Bug Fixes
|
|
83
|
+
|
|
84
|
+
- ja pierdole ([a657bf7](https://github.com/monerium/sdk/commit/a657bf77b5d3f819c780874050042312e4b7dcb1))
|
|
85
|
+
|
|
86
|
+
## [2.1.7](https://github.com/monerium/sdk/compare/v2.1.6...v2.1.7) (2023-04-24)
|
|
87
|
+
|
|
88
|
+
### Bug Fixes
|
|
89
|
+
|
|
90
|
+
- the internet says this might fix our problems ([2757bc8](https://github.com/monerium/sdk/commit/2757bc84e3851f893a71145b1d82bf32688549e3))
|
|
91
|
+
|
|
92
|
+
## [2.1.6](https://github.com/monerium/sdk/compare/v2.1.0...v2.1.6) (2023-04-24)
|
|
93
|
+
|
|
94
|
+
### Bug Fixes
|
|
95
|
+
|
|
96
|
+
- add registry server ([46f5711](https://github.com/monerium/sdk/commit/46f5711560307acce80391b70cf945d35d58d11c))
|
|
97
|
+
- cant force version numbers for PleaseRelease ([fc2f2d5](https://github.com/monerium/sdk/commit/fc2f2d5fab12733b9a2cb5f0a567b8b4fcfb5cf0))
|
|
98
|
+
- fix ([2d781e3](https://github.com/monerium/sdk/commit/2d781e3780eda0d1ad5cf520f39eab9abfb10c7c))
|
|
99
|
+
- frozen lockfile deprecated ([143cb31](https://github.com/monerium/sdk/commit/143cb31c847cc88b1bbcf1a8ba8d2e653ad94001))
|
|
100
|
+
- npm scope ([5412bf9](https://github.com/monerium/sdk/commit/5412bf97d85e18d8d6b121199519271036345d05))
|
|
101
|
+
- npmAuthToken can be empty, static deploy github action doesnt need it ([e7e553b](https://github.com/monerium/sdk/commit/e7e553b03def857101b02fcb31b1d4f0f6ba0479))
|
|
102
|
+
- remove verbose ([c9a1097](https://github.com/monerium/sdk/commit/c9a10976c5dd2de7cc68c01af4e663a392de3224))
|
|
103
|
+
- yarn cache ([cacbdfb](https://github.com/monerium/sdk/commit/cacbdfbd637966290c2dbd313179cc128e5c0bb4))
|
|
104
|
+
- zero install ([f563c15](https://github.com/monerium/sdk/commit/f563c1514801675b9baf63b10aa7ac8d856cb7fa))
|
|
105
|
+
|
|
106
|
+
### Miscellaneous
|
|
107
|
+
|
|
108
|
+
- **main:** release 2.1.0 ([#52](https://github.com/monerium/sdk/issues/52)) ([c2b9590](https://github.com/monerium/sdk/commit/c2b95906eb0f654f51c5d3fb54fdcf21b87e5d44))
|
|
109
|
+
- **main:** release 2.1.1 ([#47](https://github.com/monerium/sdk/issues/47)) ([c39eed0](https://github.com/monerium/sdk/commit/c39eed01763cc3506adea0d25caeb51e088b6634))
|
|
110
|
+
- **main:** release 2.1.2 ([#48](https://github.com/monerium/sdk/issues/48)) ([5ed5b48](https://github.com/monerium/sdk/commit/5ed5b486378300298cd9ae9a80b0972fc3c9542a))
|
|
111
|
+
- **main:** release 2.1.3 ([#49](https://github.com/monerium/sdk/issues/49)) ([9b517f4](https://github.com/monerium/sdk/commit/9b517f497e8e7a42265f065c0b71fbb3796bd7cd))
|
|
112
|
+
- **main:** release 2.1.4 ([#50](https://github.com/monerium/sdk/issues/50)) ([83d3127](https://github.com/monerium/sdk/commit/83d3127364411b4bc57e842d68ddaafc9ada4355))
|
|
113
|
+
- **main:** release 2.1.5 ([#51](https://github.com/monerium/sdk/issues/51)) ([b977d7e](https://github.com/monerium/sdk/commit/b977d7e262e98c8683952bf2ca59986f19265fb6))
|
|
114
|
+
- release 2.1.0 ([6f4d549](https://github.com/monerium/sdk/commit/6f4d5490843aaf2385dfd83e77159f4f28da8f42))
|
|
115
|
+
- release 2.1.6 ([68c01f3](https://github.com/monerium/sdk/commit/68c01f38fda0e9cd95322ae653fb3db391939c6f))
|
package/README.md
CHANGED
|
@@ -22,6 +22,20 @@ yarn add @monerium/sdk
|
|
|
22
22
|
- `watch`: Run Vite in watch mode to detect changes to files during development
|
|
23
23
|
- `build`: Run Vite to build a production release distributable
|
|
24
24
|
|
|
25
|
+
### Environments
|
|
26
|
+
|
|
27
|
+
#### Sandbox:
|
|
28
|
+
|
|
29
|
+
chains: `ethereum`, `polygon`, `gnosis`.
|
|
30
|
+
|
|
31
|
+
networks: `goerli`, `mumbai`, `chiado`.
|
|
32
|
+
|
|
33
|
+
#### Production:
|
|
34
|
+
|
|
35
|
+
chains: `ethereum`, `polygon`, `gnosis`.
|
|
36
|
+
|
|
37
|
+
networks: `mainnet`, `mainnet`, `mainnet`.
|
|
38
|
+
|
|
25
39
|
## Getting started
|
|
26
40
|
|
|
27
41
|
If you are new here, we recommend starting in the [Developer Portal](https://monerium.dev/docs/welcome). There you will more about `client_id`'s and ways of authenticating.
|
package/dist/index.d.ts
CHANGED
package/dist/index.mjs
CHANGED
|
@@ -37,8 +37,8 @@ function ie(e) {
|
|
|
37
37
|
if (this instanceof a) {
|
|
38
38
|
var w = [null];
|
|
39
39
|
w.push.apply(w, arguments);
|
|
40
|
-
var
|
|
41
|
-
return new
|
|
40
|
+
var l = Function.bind.apply(t, w);
|
|
41
|
+
return new l();
|
|
42
42
|
}
|
|
43
43
|
return t.apply(this, arguments);
|
|
44
44
|
};
|
|
@@ -100,7 +100,7 @@ const ue = {},
|
|
|
100
100
|
{ value: "Module" }
|
|
101
101
|
)
|
|
102
102
|
),
|
|
103
|
-
|
|
103
|
+
he = /* @__PURE__ */ ie(fe);
|
|
104
104
|
var G;
|
|
105
105
|
function J() {
|
|
106
106
|
return (
|
|
@@ -113,39 +113,39 @@ function J() {
|
|
|
113
113
|
var o =
|
|
114
114
|
o ||
|
|
115
115
|
(function (a, w) {
|
|
116
|
-
var
|
|
116
|
+
var l;
|
|
117
117
|
if (
|
|
118
|
-
(typeof window < "u" && window.crypto && (
|
|
119
|
-
typeof self < "u" && self.crypto && (
|
|
118
|
+
(typeof window < "u" && window.crypto && (l = window.crypto),
|
|
119
|
+
typeof self < "u" && self.crypto && (l = self.crypto),
|
|
120
120
|
typeof globalThis < "u" &&
|
|
121
121
|
globalThis.crypto &&
|
|
122
|
-
(
|
|
123
|
-
!
|
|
122
|
+
(l = globalThis.crypto),
|
|
123
|
+
!l &&
|
|
124
124
|
typeof window < "u" &&
|
|
125
125
|
window.msCrypto &&
|
|
126
|
-
(
|
|
127
|
-
!
|
|
128
|
-
!
|
|
126
|
+
(l = window.msCrypto),
|
|
127
|
+
!l && typeof O < "u" && O.crypto && (l = O.crypto),
|
|
128
|
+
!l && typeof ae == "function")
|
|
129
129
|
)
|
|
130
130
|
try {
|
|
131
|
-
|
|
131
|
+
l = he;
|
|
132
132
|
} catch {}
|
|
133
133
|
var S = function () {
|
|
134
|
-
if (
|
|
135
|
-
if (typeof
|
|
134
|
+
if (l) {
|
|
135
|
+
if (typeof l.getRandomValues == "function")
|
|
136
136
|
try {
|
|
137
|
-
return
|
|
137
|
+
return l.getRandomValues(new Uint32Array(1))[0];
|
|
138
138
|
} catch {}
|
|
139
|
-
if (typeof
|
|
139
|
+
if (typeof l.randomBytes == "function")
|
|
140
140
|
try {
|
|
141
|
-
return
|
|
141
|
+
return l.randomBytes(4).readInt32LE();
|
|
142
142
|
} catch {}
|
|
143
143
|
}
|
|
144
144
|
throw new Error(
|
|
145
145
|
"Native crypto module could not be used to get secure random number."
|
|
146
146
|
);
|
|
147
147
|
},
|
|
148
|
-
|
|
148
|
+
P =
|
|
149
149
|
Object.create ||
|
|
150
150
|
(function () {
|
|
151
151
|
function r() {}
|
|
@@ -164,7 +164,7 @@ function J() {
|
|
|
164
164
|
y = (C.Base = (function () {
|
|
165
165
|
return {
|
|
166
166
|
extend: function (r) {
|
|
167
|
-
var n =
|
|
167
|
+
var n = P(this);
|
|
168
168
|
return (
|
|
169
169
|
r && n.mixIn(r),
|
|
170
170
|
(!n.hasOwnProperty("init") || this.init === n.init) &&
|
|
@@ -252,7 +252,7 @@ function J() {
|
|
|
252
252
|
return new d.init(s, n / 2);
|
|
253
253
|
},
|
|
254
254
|
}),
|
|
255
|
-
|
|
255
|
+
h = (v.Latin1 = {
|
|
256
256
|
stringify: function (r) {
|
|
257
257
|
for (
|
|
258
258
|
var n = r.words, s = r.sigBytes, c = [], p = 0;
|
|
@@ -274,13 +274,13 @@ function J() {
|
|
|
274
274
|
i = (v.Utf8 = {
|
|
275
275
|
stringify: function (r) {
|
|
276
276
|
try {
|
|
277
|
-
return decodeURIComponent(escape(
|
|
277
|
+
return decodeURIComponent(escape(h.stringify(r)));
|
|
278
278
|
} catch {
|
|
279
279
|
throw new Error("Malformed UTF-8 data");
|
|
280
280
|
}
|
|
281
281
|
},
|
|
282
282
|
parse: function (r) {
|
|
283
|
-
return
|
|
283
|
+
return h.parse(unescape(encodeURIComponent(r)));
|
|
284
284
|
},
|
|
285
285
|
}),
|
|
286
286
|
f = (C.BufferedBlockAlgorithm = y.extend({
|
|
@@ -304,12 +304,12 @@ function J() {
|
|
|
304
304
|
? (b = a.ceil(b))
|
|
305
305
|
: (b = a.max((b | 0) - this._minBufferSize, 0));
|
|
306
306
|
var z = b * g,
|
|
307
|
-
|
|
307
|
+
k = a.min(z * 4, p);
|
|
308
308
|
if (z) {
|
|
309
309
|
for (var L = 0; L < z; L += g) this._doProcessBlock(c, L);
|
|
310
|
-
(n = c.splice(0, z)), (s.sigBytes -=
|
|
310
|
+
(n = c.splice(0, z)), (s.sigBytes -= k);
|
|
311
311
|
}
|
|
312
|
-
return new d.init(n,
|
|
312
|
+
return new d.init(n, k);
|
|
313
313
|
},
|
|
314
314
|
clone: function () {
|
|
315
315
|
var r = y.clone.call(this);
|
|
@@ -362,7 +362,7 @@ function J() {
|
|
|
362
362
|
(function () {
|
|
363
363
|
var a = o,
|
|
364
364
|
w = a.lib,
|
|
365
|
-
|
|
365
|
+
l = w.WordArray,
|
|
366
366
|
S = a.enc;
|
|
367
367
|
S.Base64url = {
|
|
368
368
|
stringify: function (_, C = !0) {
|
|
@@ -370,14 +370,14 @@ function J() {
|
|
|
370
370
|
d = _.sigBytes,
|
|
371
371
|
v = C ? this._safe_map : this._map;
|
|
372
372
|
_.clamp();
|
|
373
|
-
for (var u = [],
|
|
373
|
+
for (var u = [], h = 0; h < d; h += 3)
|
|
374
374
|
for (
|
|
375
|
-
var i = (y[
|
|
376
|
-
f = (y[(
|
|
377
|
-
x = (y[(
|
|
375
|
+
var i = (y[h >>> 2] >>> (24 - (h % 4) * 8)) & 255,
|
|
376
|
+
f = (y[(h + 1) >>> 2] >>> (24 - ((h + 1) % 4) * 8)) & 255,
|
|
377
|
+
x = (y[(h + 2) >>> 2] >>> (24 - ((h + 2) % 4) * 8)) & 255,
|
|
378
378
|
r = (i << 16) | (f << 8) | x,
|
|
379
379
|
n = 0;
|
|
380
|
-
n < 4 &&
|
|
380
|
+
n < 4 && h + n * 0.75 < d;
|
|
381
381
|
n++
|
|
382
382
|
)
|
|
383
383
|
u.push(v.charAt((r >>> (6 * (3 - n))) & 63));
|
|
@@ -393,26 +393,26 @@ function J() {
|
|
|
393
393
|
v = this._reverseMap = [];
|
|
394
394
|
for (var u = 0; u < d.length; u++) v[d.charCodeAt(u)] = u;
|
|
395
395
|
}
|
|
396
|
-
var
|
|
397
|
-
if (
|
|
398
|
-
var i = _.indexOf(
|
|
396
|
+
var h = d.charAt(64);
|
|
397
|
+
if (h) {
|
|
398
|
+
var i = _.indexOf(h);
|
|
399
399
|
i !== -1 && (y = i);
|
|
400
400
|
}
|
|
401
|
-
return
|
|
401
|
+
return P(_, y, v);
|
|
402
402
|
},
|
|
403
403
|
_map: "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",
|
|
404
404
|
_safe_map:
|
|
405
405
|
"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_",
|
|
406
406
|
};
|
|
407
|
-
function
|
|
407
|
+
function P(_, C, y) {
|
|
408
408
|
for (var d = [], v = 0, u = 0; u < C; u++)
|
|
409
409
|
if (u % 4) {
|
|
410
|
-
var
|
|
410
|
+
var h = y[_.charCodeAt(u - 1)] << ((u % 4) * 2),
|
|
411
411
|
i = y[_.charCodeAt(u)] >>> (6 - (u % 4) * 2),
|
|
412
|
-
f =
|
|
412
|
+
f = h | i;
|
|
413
413
|
(d[v >>> 2] |= f << (24 - (v % 4) * 8)), v++;
|
|
414
414
|
}
|
|
415
|
-
return
|
|
415
|
+
return l.create(d, v);
|
|
416
416
|
}
|
|
417
417
|
})(),
|
|
418
418
|
o.enc.Base64url
|
|
@@ -420,7 +420,7 @@ function J() {
|
|
|
420
420
|
});
|
|
421
421
|
})(se);
|
|
422
422
|
var V = {},
|
|
423
|
-
|
|
423
|
+
le = {
|
|
424
424
|
get exports() {
|
|
425
425
|
return V;
|
|
426
426
|
},
|
|
@@ -435,9 +435,9 @@ var V = {},
|
|
|
435
435
|
return (
|
|
436
436
|
(function (a) {
|
|
437
437
|
var w = o,
|
|
438
|
-
|
|
439
|
-
S =
|
|
440
|
-
|
|
438
|
+
l = w.lib,
|
|
439
|
+
S = l.WordArray,
|
|
440
|
+
P = l.Hasher,
|
|
441
441
|
_ = w.algo,
|
|
442
442
|
C = [],
|
|
443
443
|
y = [];
|
|
@@ -446,22 +446,22 @@ var V = {},
|
|
|
446
446
|
for (var r = a.sqrt(x), n = 2; n <= r; n++) if (!(x % n)) return !1;
|
|
447
447
|
return !0;
|
|
448
448
|
}
|
|
449
|
-
function
|
|
449
|
+
function h(x) {
|
|
450
450
|
return ((x - (x | 0)) * 4294967296) | 0;
|
|
451
451
|
}
|
|
452
452
|
for (var i = 2, f = 0; f < 64; )
|
|
453
453
|
u(i) &&
|
|
454
|
-
(f < 8 && (C[f] =
|
|
455
|
-
(y[f] =
|
|
454
|
+
(f < 8 && (C[f] = h(a.pow(i, 1 / 2))),
|
|
455
|
+
(y[f] = h(a.pow(i, 1 / 3))),
|
|
456
456
|
f++),
|
|
457
457
|
i++;
|
|
458
458
|
})();
|
|
459
459
|
var d = [],
|
|
460
|
-
v = (_.SHA256 =
|
|
460
|
+
v = (_.SHA256 = P.extend({
|
|
461
461
|
_doReset: function () {
|
|
462
462
|
this._hash = new S.init(C.slice(0));
|
|
463
463
|
},
|
|
464
|
-
_doProcessBlock: function (u,
|
|
464
|
+
_doProcessBlock: function (u, h) {
|
|
465
465
|
for (
|
|
466
466
|
var i = this._hash.words,
|
|
467
467
|
f = i[0],
|
|
@@ -476,18 +476,18 @@ var V = {},
|
|
|
476
476
|
m < 64;
|
|
477
477
|
m++
|
|
478
478
|
) {
|
|
479
|
-
if (m < 16) d[m] = u[
|
|
479
|
+
if (m < 16) d[m] = u[h + m] | 0;
|
|
480
480
|
else {
|
|
481
481
|
var b = d[m - 15],
|
|
482
482
|
z =
|
|
483
483
|
((b << 25) | (b >>> 7)) ^
|
|
484
484
|
((b << 14) | (b >>> 18)) ^
|
|
485
485
|
(b >>> 3),
|
|
486
|
-
|
|
486
|
+
k = d[m - 2],
|
|
487
487
|
L =
|
|
488
|
-
((
|
|
489
|
-
((
|
|
490
|
-
(
|
|
488
|
+
((k << 15) | (k >>> 17)) ^
|
|
489
|
+
((k << 13) | (k >>> 19)) ^
|
|
490
|
+
(k >>> 10);
|
|
491
491
|
d[m] = z + d[m - 7] + L + d[m - 16];
|
|
492
492
|
}
|
|
493
493
|
var K = (s & c) ^ (~s & p),
|
|
@@ -522,30 +522,30 @@ var V = {},
|
|
|
522
522
|
},
|
|
523
523
|
_doFinalize: function () {
|
|
524
524
|
var u = this._data,
|
|
525
|
-
|
|
525
|
+
h = u.words,
|
|
526
526
|
i = this._nDataBytes * 8,
|
|
527
527
|
f = u.sigBytes * 8;
|
|
528
528
|
return (
|
|
529
|
-
(
|
|
530
|
-
(
|
|
531
|
-
(
|
|
532
|
-
(u.sigBytes =
|
|
529
|
+
(h[f >>> 5] |= 128 << (24 - (f % 32))),
|
|
530
|
+
(h[(((f + 64) >>> 9) << 4) + 14] = a.floor(i / 4294967296)),
|
|
531
|
+
(h[(((f + 64) >>> 9) << 4) + 15] = i),
|
|
532
|
+
(u.sigBytes = h.length * 4),
|
|
533
533
|
this._process(),
|
|
534
534
|
this._hash
|
|
535
535
|
);
|
|
536
536
|
},
|
|
537
537
|
clone: function () {
|
|
538
|
-
var u =
|
|
538
|
+
var u = P.clone.call(this);
|
|
539
539
|
return (u._hash = this._hash.clone()), u;
|
|
540
540
|
},
|
|
541
541
|
}));
|
|
542
|
-
(w.SHA256 =
|
|
543
|
-
(w.HmacSHA256 =
|
|
542
|
+
(w.SHA256 = P._createHelper(v)),
|
|
543
|
+
(w.HmacSHA256 = P._createHmacHelper(v));
|
|
544
544
|
})(Math),
|
|
545
545
|
o.SHA256
|
|
546
546
|
);
|
|
547
547
|
});
|
|
548
|
-
})(
|
|
548
|
+
})(le);
|
|
549
549
|
const de = () => {
|
|
550
550
|
let e = "";
|
|
551
551
|
const t = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",
|
|
@@ -581,9 +581,6 @@ class Re {
|
|
|
581
581
|
M(this, $, pe.environments[t]);
|
|
582
582
|
}
|
|
583
583
|
async auth(t) {
|
|
584
|
-
console.log("------------------------------"),
|
|
585
|
-
console.log("------------------------------"),
|
|
586
|
-
console.log("------------------------------");
|
|
587
584
|
let o;
|
|
588
585
|
if (B(this, T, Q).call(this, t))
|
|
589
586
|
o = { ...t, grant_type: "authorization_code" };
|
|
@@ -593,11 +590,6 @@ class Re {
|
|
|
593
590
|
o = { ...t, grant_type: "client_credentials" };
|
|
594
591
|
else throw new Error("Authentication method could not be detected.");
|
|
595
592
|
return (
|
|
596
|
-
console.log(
|
|
597
|
-
"%c params",
|
|
598
|
-
"color:white; padding: 30px; background-color: darkgreen",
|
|
599
|
-
o
|
|
600
|
-
),
|
|
601
593
|
(this.bearerProfile = await B(this, A, R).call(
|
|
602
594
|
this,
|
|
603
595
|
"post",
|
|
@@ -605,7 +597,6 @@ class Re {
|
|
|
605
597
|
new URLSearchParams(o),
|
|
606
598
|
!0
|
|
607
599
|
)),
|
|
608
|
-
console.log("bearer", this),
|
|
609
600
|
M(this, W, `Bearer ${this.bearerProfile.access_token}`),
|
|
610
601
|
this.bearerProfile
|
|
611
602
|
);
|
|
@@ -670,7 +661,7 @@ class Re {
|
|
|
670
661
|
(W = new WeakMap()),
|
|
671
662
|
(A = new WeakSet()),
|
|
672
663
|
(R = async function (t, o, a, w) {
|
|
673
|
-
const
|
|
664
|
+
const l = await fetch(`${U(this, $).api}/${o}`, {
|
|
674
665
|
method: t,
|
|
675
666
|
headers: {
|
|
676
667
|
"Content-Type": `application/${w ? "x-www-form-urlencoded" : "json"}`,
|
|
@@ -680,11 +671,11 @@ class Re {
|
|
|
680
671
|
});
|
|
681
672
|
let S;
|
|
682
673
|
try {
|
|
683
|
-
S = await
|
|
674
|
+
S = await l.json();
|
|
684
675
|
} catch {
|
|
685
|
-
throw await
|
|
676
|
+
throw await l.text();
|
|
686
677
|
}
|
|
687
|
-
if (
|
|
678
|
+
if (l.ok) return S;
|
|
688
679
|
throw S;
|
|
689
680
|
}),
|
|
690
681
|
(T = new WeakSet()),
|