@doordeck/doordeck-headless-sdk 0.190.0 → 0.193.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.
- package/kotlin/Kermit-kermit-core.js +58 -58
- package/kotlin/Kermit-kermit.js +8 -8
- package/kotlin/MultiplatformSettings-multiplatform-settings.js +23 -23
- package/kotlin/doordeck-sdk.d.ts +1 -0
- package/kotlin/doordeck-sdk.js +10137 -10173
- package/kotlin/kotlin-kotlin-stdlib.js +375 -377
- package/kotlin/kotlinx-atomicfu.js +21 -21
- package/kotlin/kotlinx-coroutines-core.js +1942 -1942
- package/kotlin/kotlinx-io-kotlinx-io-bytestring.js +47 -47
- package/kotlin/kotlinx-io-kotlinx-io-core.js +476 -476
- package/kotlin/kotlinx-serialization-kotlinx-serialization-core.js +1902 -1902
- package/kotlin/kotlinx-serialization-kotlinx-serialization-json.js +1454 -1454
- package/kotlin/ktor-ktor-client-auth.js +258 -258
- package/kotlin/ktor-ktor-client-content-negotiation.js +158 -158
- package/kotlin/ktor-ktor-client-core.js +1995 -1995
- package/kotlin/ktor-ktor-client-logging.js +649 -649
- package/kotlin/ktor-ktor-events.js +12 -12
- package/kotlin/ktor-ktor-http-cio.js +370 -370
- package/kotlin/ktor-ktor-http.js +782 -782
- package/kotlin/ktor-ktor-io.js +651 -651
- package/kotlin/ktor-ktor-serialization-kotlinx-json.js +8 -8
- package/kotlin/ktor-ktor-serialization-kotlinx.js +153 -153
- package/kotlin/ktor-ktor-serialization.js +72 -72
- package/kotlin/ktor-ktor-utils.js +741 -741
- package/kotlin/ktor-ktor-websockets.js +52 -52
- package/package.json +3 -4
- package/kotlin/KotlinMultiplatformLibsodium-multiplatform-crypto-libsodium-bindings.js +0 -329
|
@@ -2,24 +2,24 @@
|
|
|
2
2
|
'use strict';
|
|
3
3
|
//region block: imports
|
|
4
4
|
var imul = Math.imul;
|
|
5
|
-
var collectionSizeOrDefault = kotlin_kotlin.$_$.
|
|
6
|
-
var mapCapacity = kotlin_kotlin.$_$.
|
|
7
|
-
var coerceAtLeast = kotlin_kotlin.$_$.
|
|
5
|
+
var collectionSizeOrDefault = kotlin_kotlin.$_$.u5;
|
|
6
|
+
var mapCapacity = kotlin_kotlin.$_$.l7;
|
|
7
|
+
var coerceAtLeast = kotlin_kotlin.$_$.cc;
|
|
8
8
|
var LinkedHashMap_init_$Create$ = kotlin_kotlin.$_$.r;
|
|
9
|
-
var Unit_instance = kotlin_kotlin.$_$.
|
|
10
|
-
var protoOf = kotlin_kotlin.$_$.
|
|
11
|
-
var initMetadataForCompanion = kotlin_kotlin.$_$.
|
|
12
|
-
var enumEntries = kotlin_kotlin.$_$.
|
|
13
|
-
var Enum = kotlin_kotlin.$_$.
|
|
14
|
-
var initMetadataForClass = kotlin_kotlin.$_$.
|
|
9
|
+
var Unit_instance = kotlin_kotlin.$_$.z4;
|
|
10
|
+
var protoOf = kotlin_kotlin.$_$.vb;
|
|
11
|
+
var initMetadataForCompanion = kotlin_kotlin.$_$.za;
|
|
12
|
+
var enumEntries = kotlin_kotlin.$_$.j9;
|
|
13
|
+
var Enum = kotlin_kotlin.$_$.kf;
|
|
14
|
+
var initMetadataForClass = kotlin_kotlin.$_$.ya;
|
|
15
15
|
var VOID = kotlin_kotlin.$_$.b;
|
|
16
|
-
var toString = kotlin_kotlin.$_$.
|
|
17
|
-
var getStringHashCode = kotlin_kotlin.$_$.
|
|
16
|
+
var toString = kotlin_kotlin.$_$.yb;
|
|
17
|
+
var getStringHashCode = kotlin_kotlin.$_$.wa;
|
|
18
18
|
var DisposableHandle = kotlin_org_jetbrains_kotlinx_kotlinx_coroutines_core.$_$.c1;
|
|
19
|
-
var initMetadataForObject = kotlin_kotlin.$_$.
|
|
20
|
-
var compareTo = kotlin_kotlin.$_$.
|
|
21
|
-
var ensureNotNull = kotlin_kotlin.$_$.
|
|
22
|
-
var objectCreate = kotlin_kotlin.$_$.
|
|
19
|
+
var initMetadataForObject = kotlin_kotlin.$_$.eb;
|
|
20
|
+
var compareTo = kotlin_kotlin.$_$.oa;
|
|
21
|
+
var ensureNotNull = kotlin_kotlin.$_$.lg;
|
|
22
|
+
var objectCreate = kotlin_kotlin.$_$.ub;
|
|
23
23
|
var toByteArray = kotlin_io_ktor_ktor_io.$_$.d1;
|
|
24
24
|
var Buffer = kotlin_org_jetbrains_kotlinx_kotlinx_io_core.$_$.f;
|
|
25
25
|
var writeText = kotlin_io_ktor_ktor_io.$_$.f1;
|
|
@@ -61,14 +61,14 @@
|
|
|
61
61
|
var _iterator__ex2g4s = this_0.t();
|
|
62
62
|
while (_iterator__ex2g4s.u()) {
|
|
63
63
|
var element = _iterator__ex2g4s.v();
|
|
64
|
-
var tmp$ret$0 = element.
|
|
64
|
+
var tmp$ret$0 = element.z38_1;
|
|
65
65
|
destination.y2(tmp$ret$0, element);
|
|
66
66
|
}
|
|
67
|
-
tmp.
|
|
68
|
-
this.
|
|
67
|
+
tmp.a39_1 = destination;
|
|
68
|
+
this.b39_1 = Codes_INTERNAL_ERROR_getInstance();
|
|
69
69
|
}
|
|
70
|
-
protoOf(Companion).
|
|
71
|
-
return this.
|
|
70
|
+
protoOf(Companion).c39 = function (code) {
|
|
71
|
+
return this.a39_1.g3(code);
|
|
72
72
|
};
|
|
73
73
|
var Companion_instance;
|
|
74
74
|
function Companion_getInstance() {
|
|
@@ -107,7 +107,7 @@
|
|
|
107
107
|
var $ENTRIES;
|
|
108
108
|
function Codes(name, ordinal, code) {
|
|
109
109
|
Enum.call(this, name, ordinal);
|
|
110
|
-
this.
|
|
110
|
+
this.z38_1 = code;
|
|
111
111
|
}
|
|
112
112
|
function Codes_NORMAL_getInstance() {
|
|
113
113
|
Codes_initEntries();
|
|
@@ -158,19 +158,19 @@
|
|
|
158
158
|
return Codes_TRY_AGAIN_LATER_instance;
|
|
159
159
|
}
|
|
160
160
|
function CloseReason(code, message) {
|
|
161
|
-
this.
|
|
162
|
-
this.
|
|
161
|
+
this.d39_1 = code;
|
|
162
|
+
this.e39_1 = message;
|
|
163
163
|
}
|
|
164
|
-
protoOf(CloseReason).
|
|
165
|
-
return Companion_getInstance().
|
|
164
|
+
protoOf(CloseReason).f39 = function () {
|
|
165
|
+
return Companion_getInstance().c39(this.d39_1);
|
|
166
166
|
};
|
|
167
167
|
protoOf(CloseReason).toString = function () {
|
|
168
|
-
var tmp0_elvis_lhs = this.
|
|
169
|
-
return 'CloseReason(reason=' + toString(tmp0_elvis_lhs == null ? this.
|
|
168
|
+
var tmp0_elvis_lhs = this.f39();
|
|
169
|
+
return 'CloseReason(reason=' + toString(tmp0_elvis_lhs == null ? this.d39_1 : tmp0_elvis_lhs) + ', message=' + this.e39_1 + ')';
|
|
170
170
|
};
|
|
171
171
|
protoOf(CloseReason).hashCode = function () {
|
|
172
|
-
var result = this.
|
|
173
|
-
result = imul(result, 31) + getStringHashCode(this.
|
|
172
|
+
var result = this.d39_1;
|
|
173
|
+
result = imul(result, 31) + getStringHashCode(this.e39_1) | 0;
|
|
174
174
|
return result;
|
|
175
175
|
};
|
|
176
176
|
protoOf(CloseReason).equals = function (other) {
|
|
@@ -178,15 +178,15 @@
|
|
|
178
178
|
return true;
|
|
179
179
|
if (!(other instanceof CloseReason))
|
|
180
180
|
return false;
|
|
181
|
-
if (!(this.
|
|
181
|
+
if (!(this.d39_1 === other.d39_1))
|
|
182
182
|
return false;
|
|
183
|
-
if (!(this.
|
|
183
|
+
if (!(this.e39_1 === other.e39_1))
|
|
184
184
|
return false;
|
|
185
185
|
return true;
|
|
186
186
|
};
|
|
187
187
|
function NonDisposableHandle() {
|
|
188
188
|
}
|
|
189
|
-
protoOf(NonDisposableHandle).
|
|
189
|
+
protoOf(NonDisposableHandle).ku = function () {
|
|
190
190
|
return Unit_instance;
|
|
191
191
|
};
|
|
192
192
|
protoOf(NonDisposableHandle).toString = function () {
|
|
@@ -228,10 +228,10 @@
|
|
|
228
228
|
tmp$ret$0 = maxElem;
|
|
229
229
|
break $l$block_0;
|
|
230
230
|
}
|
|
231
|
-
var maxValue = maxElem.
|
|
231
|
+
var maxValue = maxElem.j39_1;
|
|
232
232
|
do {
|
|
233
233
|
var e = iterator.v();
|
|
234
|
-
var v = e.
|
|
234
|
+
var v = e.j39_1;
|
|
235
235
|
if (compareTo(maxValue, v) < 0) {
|
|
236
236
|
maxElem = e;
|
|
237
237
|
maxValue = v;
|
|
@@ -240,10 +240,10 @@
|
|
|
240
240
|
while (iterator.u());
|
|
241
241
|
tmp$ret$0 = maxElem;
|
|
242
242
|
}
|
|
243
|
-
tmp.
|
|
243
|
+
tmp.k39_1 = ensureNotNull(tmp$ret$0).j39_1;
|
|
244
244
|
var tmp_0 = this;
|
|
245
245
|
var tmp_1 = 0;
|
|
246
|
-
var tmp_2 = this.
|
|
246
|
+
var tmp_2 = this.k39_1 + 1 | 0;
|
|
247
247
|
// Inline function 'kotlin.arrayOfNulls' call
|
|
248
248
|
var tmp_3 = Array(tmp_2);
|
|
249
249
|
while (tmp_1 < tmp_2) {
|
|
@@ -257,7 +257,7 @@
|
|
|
257
257
|
var _iterator__ex2g4s = tmp0_0.t();
|
|
258
258
|
while (_iterator__ex2g4s.u()) {
|
|
259
259
|
var element = _iterator__ex2g4s.v();
|
|
260
|
-
if (element.
|
|
260
|
+
if (element.j39_1 === tmp_4) {
|
|
261
261
|
if (found) {
|
|
262
262
|
tmp$ret$5 = null;
|
|
263
263
|
break $l$block_2;
|
|
@@ -275,7 +275,7 @@
|
|
|
275
275
|
tmp_3[tmp_4] = tmp$ret$5;
|
|
276
276
|
tmp_1 = tmp_1 + 1 | 0;
|
|
277
277
|
}
|
|
278
|
-
tmp_0.
|
|
278
|
+
tmp_0.l39_1 = tmp_3;
|
|
279
279
|
}
|
|
280
280
|
var Companion_instance_0;
|
|
281
281
|
function Companion_getInstance_0() {
|
|
@@ -307,8 +307,8 @@
|
|
|
307
307
|
var $ENTRIES_0;
|
|
308
308
|
function FrameType(name, ordinal, controlFrame, opcode) {
|
|
309
309
|
Enum.call(this, name, ordinal);
|
|
310
|
-
this.
|
|
311
|
-
this.
|
|
310
|
+
this.i39_1 = controlFrame;
|
|
311
|
+
this.j39_1 = opcode;
|
|
312
312
|
}
|
|
313
313
|
function FrameType_TEXT_getInstance() {
|
|
314
314
|
FrameType_initEntries();
|
|
@@ -351,8 +351,8 @@
|
|
|
351
351
|
function Close_init_$Init$(reason, $this) {
|
|
352
352
|
// Inline function 'io.ktor.utils.io.core.buildPacket' call
|
|
353
353
|
var builder = new Buffer();
|
|
354
|
-
builder.
|
|
355
|
-
writeText(builder, reason.
|
|
354
|
+
builder.wp(reason.d39_1);
|
|
355
|
+
writeText(builder, reason.e39_1);
|
|
356
356
|
Close_init_$Init$_0(builder, $this);
|
|
357
357
|
return $this;
|
|
358
358
|
}
|
|
@@ -364,7 +364,7 @@
|
|
|
364
364
|
return $this;
|
|
365
365
|
}
|
|
366
366
|
function Close_init_$Init$_1($this) {
|
|
367
|
-
Close.call($this, Companion_getInstance_1().
|
|
367
|
+
Close.call($this, Companion_getInstance_1().m39_1);
|
|
368
368
|
return $this;
|
|
369
369
|
}
|
|
370
370
|
function Close_init_$Create$_0() {
|
|
@@ -387,7 +387,7 @@
|
|
|
387
387
|
}
|
|
388
388
|
function Companion_1() {
|
|
389
389
|
Companion_instance_1 = this;
|
|
390
|
-
this.
|
|
390
|
+
this.m39_1 = new Int8Array(0);
|
|
391
391
|
}
|
|
392
392
|
var Companion_instance_1;
|
|
393
393
|
function Companion_getInstance_1() {
|
|
@@ -401,16 +401,16 @@
|
|
|
401
401
|
rsv1 = rsv1 === VOID ? false : rsv1;
|
|
402
402
|
rsv2 = rsv2 === VOID ? false : rsv2;
|
|
403
403
|
rsv3 = rsv3 === VOID ? false : rsv3;
|
|
404
|
-
this.
|
|
405
|
-
this.
|
|
406
|
-
this.
|
|
407
|
-
this.
|
|
408
|
-
this.
|
|
409
|
-
this.
|
|
410
|
-
this.
|
|
404
|
+
this.n39_1 = fin;
|
|
405
|
+
this.o39_1 = frameType;
|
|
406
|
+
this.p39_1 = data;
|
|
407
|
+
this.q39_1 = disposableHandle;
|
|
408
|
+
this.r39_1 = rsv1;
|
|
409
|
+
this.s39_1 = rsv2;
|
|
410
|
+
this.t39_1 = rsv3;
|
|
411
411
|
}
|
|
412
412
|
protoOf(Frame).toString = function () {
|
|
413
|
-
return 'Frame ' + this.
|
|
413
|
+
return 'Frame ' + this.o39_1.toString() + ' (fin=' + this.n39_1 + ', buffer len = ' + this.p39_1.length + ')';
|
|
414
414
|
};
|
|
415
415
|
//region block: init
|
|
416
416
|
NonDisposableHandle_instance = new NonDisposableHandle();
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@doordeck/doordeck-headless-sdk",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.193.0",
|
|
4
4
|
"main": "kotlin/doordeck-sdk.js",
|
|
5
5
|
"types": "kotlin/doordeck-sdk.d.ts",
|
|
6
6
|
"devDependencies": {
|
|
@@ -13,12 +13,11 @@
|
|
|
13
13
|
"typescript": "5.9.2"
|
|
14
14
|
},
|
|
15
15
|
"dependencies": {
|
|
16
|
+
"libsodium-wrappers-sumo": "0.8.2",
|
|
16
17
|
"asn1js": "3.0.6",
|
|
17
18
|
"pkijs": "3.3.3",
|
|
18
19
|
"ws": "8.18.3",
|
|
19
|
-
"@js-joda/core": "3.2.0"
|
|
20
|
-
"libsodium-wrappers-sumo": "0.7.13",
|
|
21
|
-
"format-util": "^1.0.5"
|
|
20
|
+
"@js-joda/core": "3.2.0"
|
|
22
21
|
},
|
|
23
22
|
"peerDependencies": {},
|
|
24
23
|
"optionalDependencies": {},
|
|
@@ -1,329 +0,0 @@
|
|
|
1
|
-
(function (_, $module$libsodium_sumo_a6nla1, JsSodiumInterface, kotlin_kotlin) {
|
|
2
|
-
'use strict';
|
|
3
|
-
//region block: imports
|
|
4
|
-
var imul = Math.imul;
|
|
5
|
-
var _sodium_init = $module$libsodium_sumo_a6nla1._sodium_init;
|
|
6
|
-
var ready = $module$libsodium_sumo_a6nla1.ready;
|
|
7
|
-
var UByteArray__toString_impl_ukpl97 = kotlin_kotlin.$_$.c3;
|
|
8
|
-
var protoOf = kotlin_kotlin.$_$.xb;
|
|
9
|
-
var UByteArray__hashCode_impl_ip8jx2 = kotlin_kotlin.$_$.y2;
|
|
10
|
-
var THROW_CCE = kotlin_kotlin.$_$.vf;
|
|
11
|
-
var equals = kotlin_kotlin.$_$.sa;
|
|
12
|
-
var initMetadataForClass = kotlin_kotlin.$_$.ab;
|
|
13
|
-
var RuntimeException = kotlin_kotlin.$_$.uf;
|
|
14
|
-
var RuntimeException_init_$Init$ = kotlin_kotlin.$_$.z1;
|
|
15
|
-
var captureStack = kotlin_kotlin.$_$.ja;
|
|
16
|
-
var Unit_instance = kotlin_kotlin.$_$.b5;
|
|
17
|
-
var Companion_instance = kotlin_kotlin.$_$.w4;
|
|
18
|
-
var _Result___init__impl__xyqfz8 = kotlin_kotlin.$_$.n2;
|
|
19
|
-
var createFailure = kotlin_kotlin.$_$.mg;
|
|
20
|
-
var intercepted = kotlin_kotlin.$_$.w8;
|
|
21
|
-
var SafeContinuation_init_$Create$ = kotlin_kotlin.$_$.a1;
|
|
22
|
-
var initMetadataForObject = kotlin_kotlin.$_$.gb;
|
|
23
|
-
var VOID = kotlin_kotlin.$_$.b;
|
|
24
|
-
var _UByteArray___get_storage__impl__d4kctt = kotlin_kotlin.$_$.b3;
|
|
25
|
-
var toTypedArray = kotlin_kotlin.$_$.o8;
|
|
26
|
-
var println = kotlin_kotlin.$_$.n9;
|
|
27
|
-
var _UByteArray___init__impl__ip4y9n = kotlin_kotlin.$_$.w2;
|
|
28
|
-
var _UByte___init__impl__g9hnc4 = kotlin_kotlin.$_$.s2;
|
|
29
|
-
var UByteArray__set_impl_jvcicn = kotlin_kotlin.$_$.z2;
|
|
30
|
-
var CoroutineImpl = kotlin_kotlin.$_$.j9;
|
|
31
|
-
var get_COROUTINE_SUSPENDED = kotlin_kotlin.$_$.t8;
|
|
32
|
-
var initMetadataForCoroutine = kotlin_kotlin.$_$.cb;
|
|
33
|
-
//endregion
|
|
34
|
-
//region block: pre-declaration
|
|
35
|
-
initMetadataForClass(SignatureKeyPair, 'SignatureKeyPair');
|
|
36
|
-
initMetadataForClass(InvalidSignatureException, 'InvalidSignatureException', InvalidSignatureException, RuntimeException);
|
|
37
|
-
initMetadataForObject(JsSodiumLoader, 'JsSodiumLoader', VOID, VOID, VOID, [0]);
|
|
38
|
-
initMetadataForCoroutine($initializeCOROUTINE$, CoroutineImpl);
|
|
39
|
-
initMetadataForObject(LibsodiumInitializer, 'LibsodiumInitializer', VOID, VOID, VOID, [0]);
|
|
40
|
-
initMetadataForObject(Signature, 'Signature');
|
|
41
|
-
//endregion
|
|
42
|
-
var crypto_aead_xchacha20poly1305_ietf_KEYBYTES;
|
|
43
|
-
var crypto_aead_xchacha20poly1305_ietf_NPUBBYTES;
|
|
44
|
-
var crypto_aead_xchacha20poly1305_ietf_ABYTES;
|
|
45
|
-
var crypto_aead_chacha20poly1305_ietf_KEYBYTES;
|
|
46
|
-
var crypto_aead_chacha20poly1305_ietf_NPUBBYTES;
|
|
47
|
-
var crypto_aead_chacha20poly1305_ietf_ABYTES;
|
|
48
|
-
var crypto_aead_chacha20poly1305_KEYBYTES;
|
|
49
|
-
var crypto_aead_chacha20poly1305_NPUBBYTES;
|
|
50
|
-
var crypto_aead_chacha20poly1305_ABYTES;
|
|
51
|
-
var crypto_auth_BYTES;
|
|
52
|
-
var crypto_auth_KEYBYTES;
|
|
53
|
-
var crypto_auth_hmacsha512256_BYTES;
|
|
54
|
-
var crypto_auth_hmacsha512256_KEYBYTES;
|
|
55
|
-
var crypto_auth_hmacsha256_KEYBYTES;
|
|
56
|
-
var crypto_auth_hmacsha256_BYTES;
|
|
57
|
-
var crypto_auth_hmacsha512_KEYBYTES;
|
|
58
|
-
var crypto_auth_hmacsha512_BYTES;
|
|
59
|
-
var crypto_box_PUBLICKEYBYTES;
|
|
60
|
-
var crypto_box_SECRETKEYBYTES;
|
|
61
|
-
var crypto_box_MACBYTES;
|
|
62
|
-
var crypto_box_SEEDBYTES;
|
|
63
|
-
var crypto_box_NONCEBYTES;
|
|
64
|
-
var crypto_box_SEALBYTES;
|
|
65
|
-
var crypto_box_BEFORENMBYTES;
|
|
66
|
-
var crypto_generichash_BYTES;
|
|
67
|
-
var crypto_generichash_blake2b_BYTES_MIN;
|
|
68
|
-
var crypto_generichash_blake2b_BYTES_MAX;
|
|
69
|
-
var crypto_generichash_blake2b_BYTES;
|
|
70
|
-
var crypto_generichash_blake2b_KEYBYTES_MIN;
|
|
71
|
-
var crypto_generichash_blake2b_KEYBYTES_MAX;
|
|
72
|
-
var crypto_generichash_blake2b_KEYBYTES;
|
|
73
|
-
var crypto_generichash_blake2b_SALTBYTES;
|
|
74
|
-
var crypto_hash_BYTES;
|
|
75
|
-
var crypto_hash_sha256_BYTES;
|
|
76
|
-
var crypto_hash_sha512_BYTES;
|
|
77
|
-
var crypto_secretbox_KEYBYTES;
|
|
78
|
-
var crypto_secretbox_MACBYTES;
|
|
79
|
-
var crypto_secretbox_NONCEBYTES;
|
|
80
|
-
var crypto_secretstream_xchacha20poly1305_TAG_MESSAGE;
|
|
81
|
-
var crypto_secretstream_xchacha20poly1305_TAG_PUSH;
|
|
82
|
-
var crypto_secretstream_xchacha20poly1305_TAG_REKEY;
|
|
83
|
-
var crypto_secretstream_xchacha20poly1305_TAG_FINAL;
|
|
84
|
-
var crypto_secretstream_xchacha20poly1305_HEADERBYTES;
|
|
85
|
-
var crypto_secretstream_xchacha20poly1305_KEYBYTES;
|
|
86
|
-
var crypto_secretstream_xchacha20poly1305_ABYTES;
|
|
87
|
-
function SignatureKeyPair(publicKey, secretKey) {
|
|
88
|
-
this.nn_1 = publicKey;
|
|
89
|
-
this.on_1 = secretKey;
|
|
90
|
-
}
|
|
91
|
-
protoOf(SignatureKeyPair).toString = function () {
|
|
92
|
-
return 'SignatureKeyPair(publicKey=' + UByteArray__toString_impl_ukpl97(this.nn_1) + ', secretKey=' + UByteArray__toString_impl_ukpl97(this.on_1) + ')';
|
|
93
|
-
};
|
|
94
|
-
protoOf(SignatureKeyPair).hashCode = function () {
|
|
95
|
-
var result = UByteArray__hashCode_impl_ip8jx2(this.nn_1);
|
|
96
|
-
result = imul(result, 31) + UByteArray__hashCode_impl_ip8jx2(this.on_1) | 0;
|
|
97
|
-
return result;
|
|
98
|
-
};
|
|
99
|
-
protoOf(SignatureKeyPair).equals = function (other) {
|
|
100
|
-
if (this === other)
|
|
101
|
-
return true;
|
|
102
|
-
if (!(other instanceof SignatureKeyPair))
|
|
103
|
-
return false;
|
|
104
|
-
var tmp0_other_with_cast = other instanceof SignatureKeyPair ? other : THROW_CCE();
|
|
105
|
-
if (!equals(this.nn_1, tmp0_other_with_cast.nn_1))
|
|
106
|
-
return false;
|
|
107
|
-
if (!equals(this.on_1, tmp0_other_with_cast.on_1))
|
|
108
|
-
return false;
|
|
109
|
-
return true;
|
|
110
|
-
};
|
|
111
|
-
function InvalidSignatureException() {
|
|
112
|
-
RuntimeException_init_$Init$('Signature validation failed', this);
|
|
113
|
-
captureStack(this, InvalidSignatureException);
|
|
114
|
-
}
|
|
115
|
-
var randombytes_SEEDBYTES;
|
|
116
|
-
function JsSodiumLoader$load$lambda($continuation) {
|
|
117
|
-
return function (it) {
|
|
118
|
-
_sodium_init();
|
|
119
|
-
set_sodiumLoaded(true);
|
|
120
|
-
// Inline function 'kotlin.Companion.success' call
|
|
121
|
-
var tmp$ret$0 = _Result___init__impl__xyqfz8(Unit_instance);
|
|
122
|
-
$continuation.l9(tmp$ret$0);
|
|
123
|
-
return Unit_instance;
|
|
124
|
-
};
|
|
125
|
-
}
|
|
126
|
-
function JsSodiumLoader$load$lambda_0($continuation) {
|
|
127
|
-
return function (e) {
|
|
128
|
-
// Inline function 'kotlin.Companion.failure' call
|
|
129
|
-
var tmp$ret$0 = _Result___init__impl__xyqfz8(createFailure(e));
|
|
130
|
-
$continuation.l9(tmp$ret$0);
|
|
131
|
-
return Unit_instance;
|
|
132
|
-
};
|
|
133
|
-
}
|
|
134
|
-
function JsSodiumLoader() {
|
|
135
|
-
}
|
|
136
|
-
protoOf(JsSodiumLoader).pn = function ($completion) {
|
|
137
|
-
var safe = SafeContinuation_init_$Create$(intercepted($completion));
|
|
138
|
-
if (!getSodiumLoaded()) {
|
|
139
|
-
var tmp = ready;
|
|
140
|
-
var tmp_0 = tmp.then(JsSodiumLoader$load$lambda(safe));
|
|
141
|
-
tmp_0.catch(JsSodiumLoader$load$lambda_0(safe));
|
|
142
|
-
} else {
|
|
143
|
-
// Inline function 'kotlin.Companion.success' call
|
|
144
|
-
var tmp$ret$0 = _Result___init__impl__xyqfz8(Unit_instance);
|
|
145
|
-
safe.l9(tmp$ret$0);
|
|
146
|
-
}
|
|
147
|
-
return safe.s9();
|
|
148
|
-
};
|
|
149
|
-
var JsSodiumLoader_instance;
|
|
150
|
-
function JsSodiumLoader_getInstance() {
|
|
151
|
-
return JsSodiumLoader_instance;
|
|
152
|
-
}
|
|
153
|
-
function toUInt8Array(_this__u8e3s4) {
|
|
154
|
-
// Inline function 'kotlin.collections.toByteArray' call
|
|
155
|
-
// Inline function 'kotlin.collections.copyOf' call
|
|
156
|
-
// Inline function 'kotlin.js.asDynamic' call
|
|
157
|
-
var tmp$ret$2 = _UByteArray___get_storage__impl__d4kctt(_this__u8e3s4).slice();
|
|
158
|
-
var uint8Result = new Uint8Array(toTypedArray(tmp$ret$2));
|
|
159
|
-
return uint8Result;
|
|
160
|
-
}
|
|
161
|
-
function toUByteArray(_this__u8e3s4) {
|
|
162
|
-
// Inline function 'kotlin.js.asDynamic' call
|
|
163
|
-
if (_this__u8e3s4.length == undefined) {
|
|
164
|
-
println('Error');
|
|
165
|
-
}
|
|
166
|
-
var result = _UByteArray___init__impl__ip4y9n(_this__u8e3s4.length);
|
|
167
|
-
var inductionVariable = 0;
|
|
168
|
-
var last = _this__u8e3s4.length;
|
|
169
|
-
if (inductionVariable < last)
|
|
170
|
-
do {
|
|
171
|
-
var i = inductionVariable;
|
|
172
|
-
inductionVariable = inductionVariable + 1 | 0;
|
|
173
|
-
// Inline function 'org.khronos.webgl.get' call
|
|
174
|
-
// Inline function 'kotlin.js.asDynamic' call
|
|
175
|
-
// Inline function 'kotlin.toUByte' call
|
|
176
|
-
var this_0 = _this__u8e3s4[i];
|
|
177
|
-
var tmp$ret$3 = _UByte___init__impl__g9hnc4(this_0);
|
|
178
|
-
UByteArray__set_impl_jvcicn(result, i, tmp$ret$3);
|
|
179
|
-
}
|
|
180
|
-
while (inductionVariable < last);
|
|
181
|
-
return result;
|
|
182
|
-
}
|
|
183
|
-
function set_sodiumLoaded(_set____db54di) {
|
|
184
|
-
sodiumLoaded = _set____db54di;
|
|
185
|
-
}
|
|
186
|
-
var sodiumLoaded;
|
|
187
|
-
function $initializeCOROUTINE$(_this__u8e3s4, resultContinuation) {
|
|
188
|
-
CoroutineImpl.call(this, resultContinuation);
|
|
189
|
-
this.yn_1 = _this__u8e3s4;
|
|
190
|
-
}
|
|
191
|
-
protoOf($initializeCOROUTINE$).i9 = function () {
|
|
192
|
-
var suspendResult = this.c9_1;
|
|
193
|
-
$sm: do
|
|
194
|
-
try {
|
|
195
|
-
var tmp = this.a9_1;
|
|
196
|
-
switch (tmp) {
|
|
197
|
-
case 0:
|
|
198
|
-
this.b9_1 = 2;
|
|
199
|
-
this.a9_1 = 1;
|
|
200
|
-
suspendResult = JsSodiumLoader_instance.pn(this);
|
|
201
|
-
if (suspendResult === get_COROUTINE_SUSPENDED()) {
|
|
202
|
-
return suspendResult;
|
|
203
|
-
}
|
|
204
|
-
|
|
205
|
-
continue $sm;
|
|
206
|
-
case 1:
|
|
207
|
-
this.yn_1.zn_1 = true;
|
|
208
|
-
return Unit_instance;
|
|
209
|
-
case 2:
|
|
210
|
-
throw this.d9_1;
|
|
211
|
-
}
|
|
212
|
-
} catch ($p) {
|
|
213
|
-
var e = $p;
|
|
214
|
-
if (this.b9_1 === 2) {
|
|
215
|
-
throw e;
|
|
216
|
-
} else {
|
|
217
|
-
this.a9_1 = this.b9_1;
|
|
218
|
-
this.d9_1 = e;
|
|
219
|
-
}
|
|
220
|
-
}
|
|
221
|
-
while (true);
|
|
222
|
-
};
|
|
223
|
-
function LibsodiumInitializer() {
|
|
224
|
-
this.zn_1 = false;
|
|
225
|
-
}
|
|
226
|
-
protoOf(LibsodiumInitializer).ao = function ($completion) {
|
|
227
|
-
var tmp = new $initializeCOROUTINE$(this, $completion);
|
|
228
|
-
tmp.c9_1 = Unit_instance;
|
|
229
|
-
tmp.d9_1 = null;
|
|
230
|
-
return tmp.i9();
|
|
231
|
-
};
|
|
232
|
-
var LibsodiumInitializer_instance;
|
|
233
|
-
function LibsodiumInitializer_getInstance() {
|
|
234
|
-
return LibsodiumInitializer_instance;
|
|
235
|
-
}
|
|
236
|
-
function getSodium() {
|
|
237
|
-
return JsSodiumInterface;
|
|
238
|
-
}
|
|
239
|
-
function getSodiumLoaded() {
|
|
240
|
-
return sodiumLoaded;
|
|
241
|
-
}
|
|
242
|
-
function Signature() {
|
|
243
|
-
}
|
|
244
|
-
protoOf(Signature).bo = function () {
|
|
245
|
-
var keypair = getSodium().crypto_sign_keypair();
|
|
246
|
-
var tmp = keypair.publicKey;
|
|
247
|
-
var tmp_0 = toUByteArray(tmp instanceof Uint8Array ? tmp : THROW_CCE());
|
|
248
|
-
var tmp_1 = keypair.privateKey;
|
|
249
|
-
return new SignatureKeyPair(tmp_0, toUByteArray(tmp_1 instanceof Uint8Array ? tmp_1 : THROW_CCE()));
|
|
250
|
-
};
|
|
251
|
-
protoOf(Signature).co = function (seed) {
|
|
252
|
-
var keypair = getSodium().crypto_sign_seed_keypair(toUInt8Array(seed));
|
|
253
|
-
var tmp = keypair.publicKey;
|
|
254
|
-
var tmp_0 = toUByteArray(tmp instanceof Uint8Array ? tmp : THROW_CCE());
|
|
255
|
-
var tmp_1 = keypair.privateKey;
|
|
256
|
-
return new SignatureKeyPair(tmp_0, toUByteArray(tmp_1 instanceof Uint8Array ? tmp_1 : THROW_CCE()));
|
|
257
|
-
};
|
|
258
|
-
protoOf(Signature).do = function (message, secretKey) {
|
|
259
|
-
return toUByteArray(getSodium().crypto_sign_detached(toUInt8Array(message), toUInt8Array(secretKey)));
|
|
260
|
-
};
|
|
261
|
-
protoOf(Signature).eo = function (signature, message, publicKey) {
|
|
262
|
-
var verificationResult = getSodium().crypto_sign_verify_detached(toUInt8Array(signature), toUInt8Array(message), toUInt8Array(publicKey));
|
|
263
|
-
if (verificationResult === false) {
|
|
264
|
-
throw new InvalidSignatureException();
|
|
265
|
-
}
|
|
266
|
-
};
|
|
267
|
-
var Signature_instance;
|
|
268
|
-
function Signature_getInstance() {
|
|
269
|
-
return Signature_instance;
|
|
270
|
-
}
|
|
271
|
-
//region block: init
|
|
272
|
-
crypto_aead_xchacha20poly1305_ietf_KEYBYTES = 32;
|
|
273
|
-
crypto_aead_xchacha20poly1305_ietf_NPUBBYTES = 24;
|
|
274
|
-
crypto_aead_xchacha20poly1305_ietf_ABYTES = 16;
|
|
275
|
-
crypto_aead_chacha20poly1305_ietf_KEYBYTES = 32;
|
|
276
|
-
crypto_aead_chacha20poly1305_ietf_NPUBBYTES = 12;
|
|
277
|
-
crypto_aead_chacha20poly1305_ietf_ABYTES = 16;
|
|
278
|
-
crypto_aead_chacha20poly1305_KEYBYTES = 32;
|
|
279
|
-
crypto_aead_chacha20poly1305_NPUBBYTES = 8;
|
|
280
|
-
crypto_aead_chacha20poly1305_ABYTES = 16;
|
|
281
|
-
crypto_auth_BYTES = 32;
|
|
282
|
-
crypto_auth_KEYBYTES = 32;
|
|
283
|
-
crypto_auth_hmacsha512256_BYTES = 32;
|
|
284
|
-
crypto_auth_hmacsha512256_KEYBYTES = 32;
|
|
285
|
-
crypto_auth_hmacsha256_KEYBYTES = 32;
|
|
286
|
-
crypto_auth_hmacsha256_BYTES = 32;
|
|
287
|
-
crypto_auth_hmacsha512_KEYBYTES = 32;
|
|
288
|
-
crypto_auth_hmacsha512_BYTES = 64;
|
|
289
|
-
crypto_box_PUBLICKEYBYTES = 32;
|
|
290
|
-
crypto_box_SECRETKEYBYTES = 32;
|
|
291
|
-
crypto_box_MACBYTES = 16;
|
|
292
|
-
crypto_box_SEEDBYTES = 32;
|
|
293
|
-
crypto_box_NONCEBYTES = 24;
|
|
294
|
-
crypto_box_SEALBYTES = 48;
|
|
295
|
-
crypto_box_BEFORENMBYTES = 32;
|
|
296
|
-
crypto_generichash_BYTES = 32;
|
|
297
|
-
crypto_generichash_blake2b_BYTES_MIN = 16;
|
|
298
|
-
crypto_generichash_blake2b_BYTES_MAX = 64;
|
|
299
|
-
crypto_generichash_blake2b_BYTES = 32;
|
|
300
|
-
crypto_generichash_blake2b_KEYBYTES_MIN = 16;
|
|
301
|
-
crypto_generichash_blake2b_KEYBYTES_MAX = 64;
|
|
302
|
-
crypto_generichash_blake2b_KEYBYTES = 32;
|
|
303
|
-
crypto_generichash_blake2b_SALTBYTES = 16;
|
|
304
|
-
crypto_hash_BYTES = 64;
|
|
305
|
-
crypto_hash_sha256_BYTES = 32;
|
|
306
|
-
crypto_hash_sha512_BYTES = 64;
|
|
307
|
-
crypto_secretbox_KEYBYTES = 32;
|
|
308
|
-
crypto_secretbox_MACBYTES = 16;
|
|
309
|
-
crypto_secretbox_NONCEBYTES = 24;
|
|
310
|
-
crypto_secretstream_xchacha20poly1305_TAG_MESSAGE = 0;
|
|
311
|
-
crypto_secretstream_xchacha20poly1305_TAG_PUSH = 1;
|
|
312
|
-
crypto_secretstream_xchacha20poly1305_TAG_REKEY = 2;
|
|
313
|
-
crypto_secretstream_xchacha20poly1305_TAG_FINAL = 3;
|
|
314
|
-
crypto_secretstream_xchacha20poly1305_HEADERBYTES = 24;
|
|
315
|
-
crypto_secretstream_xchacha20poly1305_KEYBYTES = 32;
|
|
316
|
-
crypto_secretstream_xchacha20poly1305_ABYTES = 17;
|
|
317
|
-
randombytes_SEEDBYTES = 32;
|
|
318
|
-
JsSodiumLoader_instance = new JsSodiumLoader();
|
|
319
|
-
sodiumLoaded = false;
|
|
320
|
-
LibsodiumInitializer_instance = new LibsodiumInitializer();
|
|
321
|
-
Signature_instance = new Signature();
|
|
322
|
-
//endregion
|
|
323
|
-
//region block: exports
|
|
324
|
-
_.$_$ = _.$_$ || {};
|
|
325
|
-
_.$_$.a = Signature_instance;
|
|
326
|
-
_.$_$.b = LibsodiumInitializer_instance;
|
|
327
|
-
//endregion
|
|
328
|
-
return _;
|
|
329
|
-
}(module.exports, require('libsodium-sumo'), require('libsodium-wrappers-sumo'), require('./kotlin-kotlin-stdlib.js')));
|