@sphereon/idk-lib-data-store-credential-design-impl 0.25.0-SNAPSHOT-build-8529934
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/idk-lib-cbor-public.mjs +4930 -0
- package/idk-lib-cbor-public.mjs.map +1 -0
- package/idk-lib-core-api-default.mjs +4 -0
- package/idk-lib-core-api-default.mjs.map +1 -0
- package/idk-lib-core-api-public.mjs +4540 -0
- package/idk-lib-core-api-public.mjs.map +1 -0
- package/idk-lib-crypto-core-impl.mjs +2009 -0
- package/idk-lib-crypto-core-impl.mjs.map +1 -0
- package/idk-lib-crypto-core-public.mjs +37349 -0
- package/idk-lib-crypto-core-public.mjs.map +1 -0
- package/idk-lib-crypto-core.mjs +4 -0
- package/idk-lib-crypto-core.mjs.map +1 -0
- package/idk-lib-data-store-credential-design-impl.d.mts +9296 -0
- package/idk-lib-data-store-credential-design-impl.mjs +8 -0
- package/idk-lib-data-store-credential-design-impl.mjs.map +1 -0
- package/idk-lib-oauth2-common-public.mjs +1789 -0
- package/idk-lib-oauth2-common-public.mjs.map +1 -0
- package/idk-lib-openid-oid4vc-common-public.mjs +343 -0
- package/idk-lib-openid-oid4vc-common-public.mjs.map +1 -0
- package/idk-lib-openid-oid4vci-common-public.mjs +4 -0
- package/idk-lib-openid-oid4vci-common-public.mjs.map +1 -0
- package/idk-lib-sdjwt-public.mjs +1531 -0
- package/idk-lib-sdjwt-public.mjs.map +1 -0
- package/package.json +39 -0
|
@@ -0,0 +1,1531 @@
|
|
|
1
|
+
import {
|
|
2
|
+
IllegalArgumentException2asla15b5jaob as IllegalArgumentException,
|
|
3
|
+
toString1pkumu07cwy4m as toString,
|
|
4
|
+
Unit_instancev9v8hjid95df as Unit_instance,
|
|
5
|
+
ensureNotNull1e947j3ixpazm as ensureNotNull,
|
|
6
|
+
startsWith26w8qjqapeeq6 as startsWith,
|
|
7
|
+
initMetadataForClassbxx6q50dy2s7 as initMetadataForClass,
|
|
8
|
+
_Char___init__impl__6a9atx2gndcvjvc5pke as _Char___init__impl__6a9atx,
|
|
9
|
+
initMetadataForCompanion1wyw17z38v6ac as initMetadataForCompanion,
|
|
10
|
+
VOID3gxj6tk5isa35 as VOID,
|
|
11
|
+
emptyList1g2z5xcrvp2zy as emptyList,
|
|
12
|
+
charArrayOf27f4r3dozbrk1 as charArrayOf,
|
|
13
|
+
trim6jpmwojjgb3l as trim,
|
|
14
|
+
toString30pk9tzaqopn as toString_0,
|
|
15
|
+
hashCodeq5arwsb9dgti as hashCode,
|
|
16
|
+
equals2au1ep9vhcato as equals,
|
|
17
|
+
emptyMapr06gerzljqtm as emptyMap,
|
|
18
|
+
encodeToByteArray1onwao0uakjfh as encodeToByteArray,
|
|
19
|
+
getStringHashCode26igk1bx568vk as getStringHashCode,
|
|
20
|
+
THROW_IAE23kobfj9wdoxr as THROW_IAE,
|
|
21
|
+
Enum3alwj03lh1n41 as Enum,
|
|
22
|
+
LazyThreadSafetyMode_PUBLICATION_getInstance3qslfm3vqg6y3 as LazyThreadSafetyMode_PUBLICATION_getInstance,
|
|
23
|
+
lazy1261dae0bgscp as lazy,
|
|
24
|
+
THROW_CCE2g6jy02ryeudk as THROW_CCE,
|
|
25
|
+
protoOf180f3jzyo7rfj as protoOf,
|
|
26
|
+
initMetadataForObject1cxne3s9w65el as initMetadataForObject,
|
|
27
|
+
createThis2j2avj17cvnv2 as createThis,
|
|
28
|
+
getBooleanHashCode1bbj3u6b3v0a7 as getBooleanHashCode,
|
|
29
|
+
toDoubleOrNullkxwozihadygj as toDoubleOrNull,
|
|
30
|
+
numberToLong2pakxeg38estk as numberToLong,
|
|
31
|
+
System_instance3k0g5wk7vsmvs as System_instance,
|
|
32
|
+
getBigIntHashCode294hi5bdhtj6e as getBigIntHashCode,
|
|
33
|
+
initMetadataForInterface1egvbzx539z91 as initMetadataForInterface,
|
|
34
|
+
defineProp3ur6h3slcvq4x as defineProp,
|
|
35
|
+
minus165a8u1e0x1lu as minus,
|
|
36
|
+
LinkedHashSet2tkztfx86kyx2 as LinkedHashSet,
|
|
37
|
+
toSet2orjxp16sotqu as toSet,
|
|
38
|
+
} from '../kotlin-kotlin-stdlib.mjs';
|
|
39
|
+
import {
|
|
40
|
+
JsonObjectBuilder2nl6rv6vdayuk as JsonObjectBuilder,
|
|
41
|
+
JsonPrimitiveolttw629wj53 as JsonPrimitive,
|
|
42
|
+
JsonObjectee06ihoeeiqj as JsonObject,
|
|
43
|
+
JsonArrayBuilderu8edol6ui3pj as JsonArrayBuilder,
|
|
44
|
+
add2mhilexupr285 as add,
|
|
45
|
+
Default_getInstancejyc493d440j2 as Default_getInstance,
|
|
46
|
+
Companion_instance2oncdbblu15w1 as Companion_instance,
|
|
47
|
+
} from '../kotlinx-serialization-kotlinx-serialization-json.mjs';
|
|
48
|
+
import {
|
|
49
|
+
DigestAlg_SHA256_getInstance4p927n8wouz6 as DigestAlg_SHA256_getInstance,
|
|
50
|
+
JwsPayloadBuilder15rf98oxqhkv as JwsPayloadBuilder,
|
|
51
|
+
} from './idk-lib-crypto-core-public.mjs';
|
|
52
|
+
import { encodeToBase64Url2i0k898p6b1e3 as encodeToBase64Url } from './idk-lib-core-api-public.mjs';
|
|
53
|
+
import {
|
|
54
|
+
createSimpleEnumSerializer2guioz11kk1m0 as createSimpleEnumSerializer,
|
|
55
|
+
PluginGeneratedSerialDescriptorqdzeg5asqhfg as PluginGeneratedSerialDescriptor,
|
|
56
|
+
UnknownFieldExceptiona60e3a6v1xqo as UnknownFieldException,
|
|
57
|
+
IntSerializer_getInstanceuhm8c1wku08l as IntSerializer_getInstance,
|
|
58
|
+
typeParametersSerializers2likxjr48tr7y as typeParametersSerializers,
|
|
59
|
+
GeneratedSerializer1f7t7hssdd2ws as GeneratedSerializer,
|
|
60
|
+
throwMissingFieldException2cmke0v3ynf14 as throwMissingFieldException,
|
|
61
|
+
BooleanSerializer_getInstance2fsi2wywr82nt as BooleanSerializer_getInstance,
|
|
62
|
+
get_nullable197rfua9r7fsz as get_nullable,
|
|
63
|
+
StringSerializer_getInstance11v9md0a7d9yk as StringSerializer_getInstance,
|
|
64
|
+
LinkedHashMapSerializermaoj2nyji7op as LinkedHashMapSerializer,
|
|
65
|
+
SerializableWithd2dap36updxd as SerializableWith,
|
|
66
|
+
} from '../kotlinx-serialization-kotlinx-serialization-core.mjs';
|
|
67
|
+
//region block: imports
|
|
68
|
+
var imul = Math.imul;
|
|
69
|
+
//endregion
|
|
70
|
+
//region block: pre-declaration
|
|
71
|
+
class CnfBuilder {
|
|
72
|
+
constructor() {
|
|
73
|
+
this.f5i_1 = null;
|
|
74
|
+
this.g5i_1 = null;
|
|
75
|
+
this.h5i_1 = null;
|
|
76
|
+
}
|
|
77
|
+
kid(kid) {
|
|
78
|
+
this.f5i_1 = kid;
|
|
79
|
+
return this;
|
|
80
|
+
}
|
|
81
|
+
jwk(jwk) {
|
|
82
|
+
this.g5i_1 = jwk.toJsonObject();
|
|
83
|
+
return this;
|
|
84
|
+
}
|
|
85
|
+
jwkJsonObject(jwk) {
|
|
86
|
+
this.g5i_1 = jwk;
|
|
87
|
+
return this;
|
|
88
|
+
}
|
|
89
|
+
jku(jku) {
|
|
90
|
+
this.h5i_1 = jku;
|
|
91
|
+
return this;
|
|
92
|
+
}
|
|
93
|
+
build() {
|
|
94
|
+
// Inline function 'kotlin.require' call
|
|
95
|
+
if (!(!(this.f5i_1 == null) || !(this.g5i_1 == null) || !(this.h5i_1 == null))) {
|
|
96
|
+
var message = 'At least one confirmation method (kid, jwk, or jku) is required';
|
|
97
|
+
throw IllegalArgumentException.y1(toString(message));
|
|
98
|
+
}
|
|
99
|
+
if (!(this.f5i_1 == null) && this.g5i_1 == null && this.h5i_1 == null) {
|
|
100
|
+
// Inline function 'kotlin.require' call
|
|
101
|
+
if (!startsWith(ensureNotNull(this.f5i_1), 'did:')) {
|
|
102
|
+
var message_0 = "When only 'kid' is provided without 'jwk' or 'jku', it must be a DID (starting with 'did:'). Non-DID kid values cannot be resolved to obtain key material. Either use a DID-based kid, or provide a 'jwk' alongside the kid.";
|
|
103
|
+
throw IllegalArgumentException.y1(toString(message_0));
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
// Inline function 'kotlinx.serialization.json.buildJsonObject' call
|
|
107
|
+
var builder = new JsonObjectBuilder();
|
|
108
|
+
var tmp0_safe_receiver = this.f5i_1;
|
|
109
|
+
if (tmp0_safe_receiver == null)
|
|
110
|
+
null;
|
|
111
|
+
else {
|
|
112
|
+
// Inline function 'kotlin.let' call
|
|
113
|
+
builder.l1l('kid', JsonPrimitive(tmp0_safe_receiver));
|
|
114
|
+
}
|
|
115
|
+
var tmp = this.g5i_1;
|
|
116
|
+
var tmp1_safe_receiver = tmp instanceof JsonObject ? tmp : null;
|
|
117
|
+
if (tmp1_safe_receiver == null)
|
|
118
|
+
null;
|
|
119
|
+
else {
|
|
120
|
+
// Inline function 'kotlin.let' call
|
|
121
|
+
builder.l1l('jwk', tmp1_safe_receiver);
|
|
122
|
+
}
|
|
123
|
+
var tmp2_safe_receiver = this.h5i_1;
|
|
124
|
+
if (tmp2_safe_receiver == null)
|
|
125
|
+
null;
|
|
126
|
+
else {
|
|
127
|
+
// Inline function 'kotlin.let' call
|
|
128
|
+
builder.l1l('jku', JsonPrimitive(tmp2_safe_receiver));
|
|
129
|
+
}
|
|
130
|
+
return builder.a1k();
|
|
131
|
+
}
|
|
132
|
+
}
|
|
133
|
+
class Companion {
|
|
134
|
+
constructor() {
|
|
135
|
+
Companion_instance_0 = this;
|
|
136
|
+
this.SD_CLAIM = '_sd';
|
|
137
|
+
this.SD_ALG_CLAIM = '_sd_alg';
|
|
138
|
+
this.SEPARATOR = _Char___init__impl__6a9atx(126);
|
|
139
|
+
this.DEFAULT_HASH_ALG = DigestAlg_SHA256_getInstance();
|
|
140
|
+
}
|
|
141
|
+
i5i() {
|
|
142
|
+
return this.SD_CLAIM;
|
|
143
|
+
}
|
|
144
|
+
j5i() {
|
|
145
|
+
return this.SD_ALG_CLAIM;
|
|
146
|
+
}
|
|
147
|
+
k5i() {
|
|
148
|
+
return this.SEPARATOR;
|
|
149
|
+
}
|
|
150
|
+
l5i() {
|
|
151
|
+
return this.DEFAULT_HASH_ALG;
|
|
152
|
+
}
|
|
153
|
+
}
|
|
154
|
+
class SdJwt {
|
|
155
|
+
constructor(jwt, header, payload, disclosures, keyBindingJwt) {
|
|
156
|
+
Companion_getInstance();
|
|
157
|
+
disclosures = disclosures === VOID ? emptyList() : disclosures;
|
|
158
|
+
keyBindingJwt = keyBindingJwt === VOID ? null : keyBindingJwt;
|
|
159
|
+
this.jwt = jwt;
|
|
160
|
+
this.header = header;
|
|
161
|
+
this.payload = payload;
|
|
162
|
+
this.disclosures = disclosures;
|
|
163
|
+
this.keyBindingJwt = keyBindingJwt;
|
|
164
|
+
}
|
|
165
|
+
l2s() {
|
|
166
|
+
return this.jwt;
|
|
167
|
+
}
|
|
168
|
+
c4m() {
|
|
169
|
+
return this.header;
|
|
170
|
+
}
|
|
171
|
+
l4c() {
|
|
172
|
+
return this.payload;
|
|
173
|
+
}
|
|
174
|
+
m5i() {
|
|
175
|
+
return this.disclosures;
|
|
176
|
+
}
|
|
177
|
+
n5i() {
|
|
178
|
+
return this.keyBindingJwt;
|
|
179
|
+
}
|
|
180
|
+
y4v() {
|
|
181
|
+
var tmp0_safe_receiver = this.header.uh('alg');
|
|
182
|
+
var tmp1_safe_receiver = tmp0_safe_receiver == null ? null : toString(tmp0_safe_receiver);
|
|
183
|
+
return tmp1_safe_receiver == null ? null : trim(tmp1_safe_receiver, charArrayOf([_Char___init__impl__6a9atx(34)]));
|
|
184
|
+
}
|
|
185
|
+
i2u() {
|
|
186
|
+
var tmp0_safe_receiver = this.header.uh('kid');
|
|
187
|
+
var tmp1_safe_receiver = tmp0_safe_receiver == null ? null : toString(tmp0_safe_receiver);
|
|
188
|
+
return tmp1_safe_receiver == null ? null : trim(tmp1_safe_receiver, charArrayOf([_Char___init__impl__6a9atx(34)]));
|
|
189
|
+
}
|
|
190
|
+
z37() {
|
|
191
|
+
var tmp0_safe_receiver = this.header.uh('typ');
|
|
192
|
+
var tmp1_safe_receiver = tmp0_safe_receiver == null ? null : toString(tmp0_safe_receiver);
|
|
193
|
+
return tmp1_safe_receiver == null ? null : trim(tmp1_safe_receiver, charArrayOf([_Char___init__impl__6a9atx(34)]));
|
|
194
|
+
}
|
|
195
|
+
nk() {
|
|
196
|
+
return this.jwt;
|
|
197
|
+
}
|
|
198
|
+
ok() {
|
|
199
|
+
return this.header;
|
|
200
|
+
}
|
|
201
|
+
tr() {
|
|
202
|
+
return this.payload;
|
|
203
|
+
}
|
|
204
|
+
e2p() {
|
|
205
|
+
return this.disclosures;
|
|
206
|
+
}
|
|
207
|
+
f2p() {
|
|
208
|
+
return this.keyBindingJwt;
|
|
209
|
+
}
|
|
210
|
+
o5i(jwt, header, payload, disclosures, keyBindingJwt) {
|
|
211
|
+
return new SdJwt(jwt, header, payload, disclosures, keyBindingJwt);
|
|
212
|
+
}
|
|
213
|
+
copy(jwt, header, payload, disclosures, keyBindingJwt, $super) {
|
|
214
|
+
jwt = jwt === VOID ? this.jwt : jwt;
|
|
215
|
+
header = header === VOID ? this.header : header;
|
|
216
|
+
payload = payload === VOID ? this.payload : payload;
|
|
217
|
+
disclosures = disclosures === VOID ? this.disclosures : disclosures;
|
|
218
|
+
keyBindingJwt = keyBindingJwt === VOID ? this.keyBindingJwt : keyBindingJwt;
|
|
219
|
+
return $super === VOID ? this.o5i(jwt, header, payload, disclosures, keyBindingJwt) : $super.o5i.call(this, jwt, header, payload, disclosures, keyBindingJwt);
|
|
220
|
+
}
|
|
221
|
+
toString() {
|
|
222
|
+
return 'SdJwt(jwt=' + toString(this.jwt) + ', header=' + this.header.toString() + ', payload=' + this.payload.toString() + ', disclosures=' + toString(this.disclosures) + ', keyBindingJwt=' + toString_0(this.keyBindingJwt) + ')';
|
|
223
|
+
}
|
|
224
|
+
hashCode() {
|
|
225
|
+
var result = hashCode(this.jwt);
|
|
226
|
+
result = imul(result, 31) + this.header.hashCode() | 0;
|
|
227
|
+
result = imul(result, 31) + this.payload.hashCode() | 0;
|
|
228
|
+
result = imul(result, 31) + hashCode(this.disclosures) | 0;
|
|
229
|
+
result = imul(result, 31) + (this.keyBindingJwt == null ? 0 : this.keyBindingJwt.hashCode()) | 0;
|
|
230
|
+
return result;
|
|
231
|
+
}
|
|
232
|
+
equals(other) {
|
|
233
|
+
if (this === other)
|
|
234
|
+
return true;
|
|
235
|
+
if (!(other instanceof SdJwt))
|
|
236
|
+
return false;
|
|
237
|
+
if (!equals(this.jwt, other.jwt))
|
|
238
|
+
return false;
|
|
239
|
+
if (!this.header.equals(other.header))
|
|
240
|
+
return false;
|
|
241
|
+
if (!this.payload.equals(other.payload))
|
|
242
|
+
return false;
|
|
243
|
+
if (!equals(this.disclosures, other.disclosures))
|
|
244
|
+
return false;
|
|
245
|
+
if (!equals(this.keyBindingJwt, other.keyBindingJwt))
|
|
246
|
+
return false;
|
|
247
|
+
return true;
|
|
248
|
+
}
|
|
249
|
+
get algorithm() {
|
|
250
|
+
return this.y4v();
|
|
251
|
+
}
|
|
252
|
+
get keyId() {
|
|
253
|
+
return this.i2u();
|
|
254
|
+
}
|
|
255
|
+
get type() {
|
|
256
|
+
return this.z37();
|
|
257
|
+
}
|
|
258
|
+
}
|
|
259
|
+
class SdJwtPayload {
|
|
260
|
+
constructor(undisclosedPayload, fullPayload, digestedDisclosures) {
|
|
261
|
+
digestedDisclosures = digestedDisclosures === VOID ? emptyMap() : digestedDisclosures;
|
|
262
|
+
this.undisclosedPayload = undisclosedPayload;
|
|
263
|
+
this.fullPayload = fullPayload;
|
|
264
|
+
this.digestedDisclosures = digestedDisclosures;
|
|
265
|
+
}
|
|
266
|
+
p5i() {
|
|
267
|
+
return this.undisclosedPayload;
|
|
268
|
+
}
|
|
269
|
+
q5i() {
|
|
270
|
+
return this.fullPayload;
|
|
271
|
+
}
|
|
272
|
+
r5i() {
|
|
273
|
+
return this.digestedDisclosures;
|
|
274
|
+
}
|
|
275
|
+
nk() {
|
|
276
|
+
return this.undisclosedPayload;
|
|
277
|
+
}
|
|
278
|
+
ok() {
|
|
279
|
+
return this.fullPayload;
|
|
280
|
+
}
|
|
281
|
+
tr() {
|
|
282
|
+
return this.digestedDisclosures;
|
|
283
|
+
}
|
|
284
|
+
s5i(undisclosedPayload, fullPayload, digestedDisclosures) {
|
|
285
|
+
return new SdJwtPayload(undisclosedPayload, fullPayload, digestedDisclosures);
|
|
286
|
+
}
|
|
287
|
+
copy(undisclosedPayload, fullPayload, digestedDisclosures, $super) {
|
|
288
|
+
undisclosedPayload = undisclosedPayload === VOID ? this.undisclosedPayload : undisclosedPayload;
|
|
289
|
+
fullPayload = fullPayload === VOID ? this.fullPayload : fullPayload;
|
|
290
|
+
digestedDisclosures = digestedDisclosures === VOID ? this.digestedDisclosures : digestedDisclosures;
|
|
291
|
+
return $super === VOID ? this.s5i(undisclosedPayload, fullPayload, digestedDisclosures) : $super.s5i.call(this, undisclosedPayload, fullPayload, digestedDisclosures);
|
|
292
|
+
}
|
|
293
|
+
toString() {
|
|
294
|
+
return 'SdJwtPayload(undisclosedPayload=' + this.undisclosedPayload.toString() + ', fullPayload=' + this.fullPayload.toString() + ', digestedDisclosures=' + toString(this.digestedDisclosures) + ')';
|
|
295
|
+
}
|
|
296
|
+
hashCode() {
|
|
297
|
+
var result = this.undisclosedPayload.hashCode();
|
|
298
|
+
result = imul(result, 31) + this.fullPayload.hashCode() | 0;
|
|
299
|
+
result = imul(result, 31) + hashCode(this.digestedDisclosures) | 0;
|
|
300
|
+
return result;
|
|
301
|
+
}
|
|
302
|
+
equals(other) {
|
|
303
|
+
if (this === other)
|
|
304
|
+
return true;
|
|
305
|
+
if (!(other instanceof SdJwtPayload))
|
|
306
|
+
return false;
|
|
307
|
+
if (!this.undisclosedPayload.equals(other.undisclosedPayload))
|
|
308
|
+
return false;
|
|
309
|
+
if (!this.fullPayload.equals(other.fullPayload))
|
|
310
|
+
return false;
|
|
311
|
+
if (!equals(this.digestedDisclosures, other.digestedDisclosures))
|
|
312
|
+
return false;
|
|
313
|
+
return true;
|
|
314
|
+
}
|
|
315
|
+
}
|
|
316
|
+
class Companion_0 {
|
|
317
|
+
objectProperty(saltProvider, claimName, claimValue) {
|
|
318
|
+
var salt = saltProvider.t5i();
|
|
319
|
+
// Inline function 'kotlinx.serialization.json.buildJsonArray' call
|
|
320
|
+
var builder = new JsonArrayBuilder();
|
|
321
|
+
add(builder, salt);
|
|
322
|
+
add(builder, claimName);
|
|
323
|
+
builder.n1l(claimValue);
|
|
324
|
+
var disclosureArray = builder.a1k();
|
|
325
|
+
var encoded = encodeToBase64Url(encodeToByteArray(Default_getInstance().q1i(Companion_instance.z1k(), disclosureArray)));
|
|
326
|
+
return new Disclosure(salt, claimName, claimValue, encoded);
|
|
327
|
+
}
|
|
328
|
+
arrayElement(saltProvider, elementValue) {
|
|
329
|
+
var salt = saltProvider.t5i();
|
|
330
|
+
// Inline function 'kotlinx.serialization.json.buildJsonArray' call
|
|
331
|
+
var builder = new JsonArrayBuilder();
|
|
332
|
+
add(builder, salt);
|
|
333
|
+
builder.n1l(elementValue);
|
|
334
|
+
var disclosureArray = builder.a1k();
|
|
335
|
+
var encoded = encodeToBase64Url(encodeToByteArray(Default_getInstance().q1i(Companion_instance.z1k(), disclosureArray)));
|
|
336
|
+
return new Disclosure(salt, '', elementValue, encoded);
|
|
337
|
+
}
|
|
338
|
+
}
|
|
339
|
+
class Disclosure {
|
|
340
|
+
constructor(salt, key, value, encoded, digest) {
|
|
341
|
+
digest = digest === VOID ? null : digest;
|
|
342
|
+
this.salt = salt;
|
|
343
|
+
this.key = key;
|
|
344
|
+
this.value = value;
|
|
345
|
+
this.encoded = encoded;
|
|
346
|
+
this.digest = digest;
|
|
347
|
+
}
|
|
348
|
+
u5i() {
|
|
349
|
+
return this.salt;
|
|
350
|
+
}
|
|
351
|
+
h4() {
|
|
352
|
+
return this.key;
|
|
353
|
+
}
|
|
354
|
+
i4() {
|
|
355
|
+
return this.value;
|
|
356
|
+
}
|
|
357
|
+
v5i() {
|
|
358
|
+
return this.encoded;
|
|
359
|
+
}
|
|
360
|
+
w5i() {
|
|
361
|
+
return this.digest;
|
|
362
|
+
}
|
|
363
|
+
nk() {
|
|
364
|
+
return this.salt;
|
|
365
|
+
}
|
|
366
|
+
ok() {
|
|
367
|
+
return this.key;
|
|
368
|
+
}
|
|
369
|
+
tr() {
|
|
370
|
+
return this.value;
|
|
371
|
+
}
|
|
372
|
+
e2p() {
|
|
373
|
+
return this.encoded;
|
|
374
|
+
}
|
|
375
|
+
f2p() {
|
|
376
|
+
return this.digest;
|
|
377
|
+
}
|
|
378
|
+
x5i(salt, key, value, encoded, digest) {
|
|
379
|
+
return new Disclosure(salt, key, value, encoded, digest);
|
|
380
|
+
}
|
|
381
|
+
copy(salt, key, value, encoded, digest, $super) {
|
|
382
|
+
salt = salt === VOID ? this.salt : salt;
|
|
383
|
+
key = key === VOID ? this.key : key;
|
|
384
|
+
value = value === VOID ? this.value : value;
|
|
385
|
+
encoded = encoded === VOID ? this.encoded : encoded;
|
|
386
|
+
digest = digest === VOID ? this.digest : digest;
|
|
387
|
+
return $super === VOID ? this.x5i(salt, key, value, encoded, digest) : $super.x5i.call(this, salt, key, value, encoded, digest);
|
|
388
|
+
}
|
|
389
|
+
toString() {
|
|
390
|
+
return 'Disclosure(salt=' + this.salt + ', key=' + this.key + ', value=' + toString(this.value) + ', encoded=' + this.encoded + ', digest=' + this.digest + ')';
|
|
391
|
+
}
|
|
392
|
+
hashCode() {
|
|
393
|
+
var result = getStringHashCode(this.salt);
|
|
394
|
+
result = imul(result, 31) + getStringHashCode(this.key) | 0;
|
|
395
|
+
result = imul(result, 31) + hashCode(this.value) | 0;
|
|
396
|
+
result = imul(result, 31) + getStringHashCode(this.encoded) | 0;
|
|
397
|
+
result = imul(result, 31) + (this.digest == null ? 0 : getStringHashCode(this.digest)) | 0;
|
|
398
|
+
return result;
|
|
399
|
+
}
|
|
400
|
+
equals(other) {
|
|
401
|
+
if (this === other)
|
|
402
|
+
return true;
|
|
403
|
+
if (!(other instanceof Disclosure))
|
|
404
|
+
return false;
|
|
405
|
+
if (!(this.salt === other.salt))
|
|
406
|
+
return false;
|
|
407
|
+
if (!(this.key === other.key))
|
|
408
|
+
return false;
|
|
409
|
+
if (!equals(this.value, other.value))
|
|
410
|
+
return false;
|
|
411
|
+
if (!(this.encoded === other.encoded))
|
|
412
|
+
return false;
|
|
413
|
+
if (!(this.digest == other.digest))
|
|
414
|
+
return false;
|
|
415
|
+
return true;
|
|
416
|
+
}
|
|
417
|
+
}
|
|
418
|
+
class DecoyMode extends Enum {
|
|
419
|
+
get name() {
|
|
420
|
+
return this.b1();
|
|
421
|
+
}
|
|
422
|
+
get ordinal() {
|
|
423
|
+
return this.a5();
|
|
424
|
+
}
|
|
425
|
+
}
|
|
426
|
+
class Companion_1 {
|
|
427
|
+
constructor() {
|
|
428
|
+
Companion_instance_2 = this;
|
|
429
|
+
var tmp = this;
|
|
430
|
+
var tmp_0 = LazyThreadSafetyMode_PUBLICATION_getInstance();
|
|
431
|
+
// Inline function 'kotlin.arrayOf' call
|
|
432
|
+
// Inline function 'kotlin.js.unsafeCast' call
|
|
433
|
+
// Inline function 'kotlin.js.asDynamic' call
|
|
434
|
+
tmp.a5j_1 = [lazy(tmp_0, DecoyConfig$Companion$$childSerializers$_anonymous__ox6nj0), null];
|
|
435
|
+
}
|
|
436
|
+
}
|
|
437
|
+
class $serializer {
|
|
438
|
+
constructor() {
|
|
439
|
+
$serializer_instance = this;
|
|
440
|
+
var tmp0_serialDesc = new PluginGeneratedSerialDescriptor('com.sphereon.sdjwt.DecoyConfig', this, 2);
|
|
441
|
+
tmp0_serialDesc.j17('mode', true);
|
|
442
|
+
tmp0_serialDesc.j17('count', true);
|
|
443
|
+
this.b5j_1 = tmp0_serialDesc;
|
|
444
|
+
}
|
|
445
|
+
c5j(encoder, value) {
|
|
446
|
+
var tmp0_desc = this.b5j_1;
|
|
447
|
+
var tmp1_output = encoder.pz(tmp0_desc);
|
|
448
|
+
var tmp2_cached = Companion_getInstance_1().a5j_1;
|
|
449
|
+
if (tmp1_output.m11(tmp0_desc, 0) ? true : !value.mode.equals(DecoyMode_NONE_getInstance())) {
|
|
450
|
+
tmp1_output.h11(tmp0_desc, 0, tmp2_cached[0].i4(), value.mode);
|
|
451
|
+
}
|
|
452
|
+
if (tmp1_output.m11(tmp0_desc, 1) ? true : !(value.count === 0)) {
|
|
453
|
+
tmp1_output.a11(tmp0_desc, 1, value.count);
|
|
454
|
+
}
|
|
455
|
+
tmp1_output.qz(tmp0_desc);
|
|
456
|
+
}
|
|
457
|
+
nv(encoder, value) {
|
|
458
|
+
return this.c5j(encoder, value instanceof DecoyConfig ? value : THROW_CCE());
|
|
459
|
+
}
|
|
460
|
+
ov(decoder) {
|
|
461
|
+
var tmp0_desc = this.b5j_1;
|
|
462
|
+
var tmp1_flag = true;
|
|
463
|
+
var tmp2_index = 0;
|
|
464
|
+
var tmp3_bitMask0 = 0;
|
|
465
|
+
var tmp4_local0 = null;
|
|
466
|
+
var tmp5_local1 = 0;
|
|
467
|
+
var tmp6_input = decoder.pz(tmp0_desc);
|
|
468
|
+
var tmp7_cached = Companion_getInstance_1().a5j_1;
|
|
469
|
+
if (tmp6_input.f10()) {
|
|
470
|
+
tmp4_local0 = tmp6_input.b10(tmp0_desc, 0, tmp7_cached[0].i4(), tmp4_local0);
|
|
471
|
+
tmp3_bitMask0 = tmp3_bitMask0 | 1;
|
|
472
|
+
tmp5_local1 = tmp6_input.uz(tmp0_desc, 1);
|
|
473
|
+
tmp3_bitMask0 = tmp3_bitMask0 | 2;
|
|
474
|
+
} else
|
|
475
|
+
while (tmp1_flag) {
|
|
476
|
+
tmp2_index = tmp6_input.g10(tmp0_desc);
|
|
477
|
+
switch (tmp2_index) {
|
|
478
|
+
case -1:
|
|
479
|
+
tmp1_flag = false;
|
|
480
|
+
break;
|
|
481
|
+
case 0:
|
|
482
|
+
tmp4_local0 = tmp6_input.b10(tmp0_desc, 0, tmp7_cached[0].i4(), tmp4_local0);
|
|
483
|
+
tmp3_bitMask0 = tmp3_bitMask0 | 1;
|
|
484
|
+
break;
|
|
485
|
+
case 1:
|
|
486
|
+
tmp5_local1 = tmp6_input.uz(tmp0_desc, 1);
|
|
487
|
+
tmp3_bitMask0 = tmp3_bitMask0 | 2;
|
|
488
|
+
break;
|
|
489
|
+
default:
|
|
490
|
+
throw UnknownFieldException.xw(tmp2_index);
|
|
491
|
+
}
|
|
492
|
+
}
|
|
493
|
+
tmp6_input.qz(tmp0_desc);
|
|
494
|
+
return DecoyConfig.d5j(tmp3_bitMask0, tmp4_local0, tmp5_local1, null);
|
|
495
|
+
}
|
|
496
|
+
av() {
|
|
497
|
+
return this.b5j_1;
|
|
498
|
+
}
|
|
499
|
+
y17() {
|
|
500
|
+
// Inline function 'kotlin.arrayOf' call
|
|
501
|
+
// Inline function 'kotlin.js.unsafeCast' call
|
|
502
|
+
// Inline function 'kotlin.js.asDynamic' call
|
|
503
|
+
return [Companion_getInstance_1().a5j_1[0].i4(), IntSerializer_getInstance()];
|
|
504
|
+
}
|
|
505
|
+
}
|
|
506
|
+
class DecoyConfig {
|
|
507
|
+
constructor(mode, count) {
|
|
508
|
+
Companion_getInstance_1();
|
|
509
|
+
mode = mode === VOID ? DecoyMode_NONE_getInstance() : mode;
|
|
510
|
+
count = count === VOID ? 0 : count;
|
|
511
|
+
this.mode = mode;
|
|
512
|
+
this.count = count;
|
|
513
|
+
}
|
|
514
|
+
o5c() {
|
|
515
|
+
return this.mode;
|
|
516
|
+
}
|
|
517
|
+
e5j() {
|
|
518
|
+
return this.count;
|
|
519
|
+
}
|
|
520
|
+
nk() {
|
|
521
|
+
return this.mode;
|
|
522
|
+
}
|
|
523
|
+
ok() {
|
|
524
|
+
return this.count;
|
|
525
|
+
}
|
|
526
|
+
f5j(mode, count) {
|
|
527
|
+
return new DecoyConfig(mode, count);
|
|
528
|
+
}
|
|
529
|
+
copy(mode, count, $super) {
|
|
530
|
+
mode = mode === VOID ? this.mode : mode;
|
|
531
|
+
count = count === VOID ? this.count : count;
|
|
532
|
+
return $super === VOID ? this.f5j(mode, count) : $super.f5j.call(this, mode, count);
|
|
533
|
+
}
|
|
534
|
+
toString() {
|
|
535
|
+
return 'DecoyConfig(mode=' + this.mode.toString() + ', count=' + this.count + ')';
|
|
536
|
+
}
|
|
537
|
+
hashCode() {
|
|
538
|
+
var result = this.mode.hashCode();
|
|
539
|
+
result = imul(result, 31) + this.count | 0;
|
|
540
|
+
return result;
|
|
541
|
+
}
|
|
542
|
+
equals(other) {
|
|
543
|
+
if (this === other)
|
|
544
|
+
return true;
|
|
545
|
+
if (!(other instanceof DecoyConfig))
|
|
546
|
+
return false;
|
|
547
|
+
if (!this.mode.equals(other.mode))
|
|
548
|
+
return false;
|
|
549
|
+
if (!(this.count === other.count))
|
|
550
|
+
return false;
|
|
551
|
+
return true;
|
|
552
|
+
}
|
|
553
|
+
static d5j(seen0, mode, count, serializationConstructorMarker) {
|
|
554
|
+
Companion_getInstance_1();
|
|
555
|
+
if (!(0 === (0 & seen0))) {
|
|
556
|
+
throwMissingFieldException(seen0, 0, $serializer_getInstance().b5j_1);
|
|
557
|
+
}
|
|
558
|
+
var $this = createThis(this);
|
|
559
|
+
if (0 === (seen0 & 1))
|
|
560
|
+
$this.mode = DecoyMode_NONE_getInstance();
|
|
561
|
+
else
|
|
562
|
+
$this.mode = mode;
|
|
563
|
+
if (0 === (seen0 & 2))
|
|
564
|
+
$this.count = 0;
|
|
565
|
+
else
|
|
566
|
+
$this.count = count;
|
|
567
|
+
return $this;
|
|
568
|
+
}
|
|
569
|
+
}
|
|
570
|
+
class Companion_2 {}
|
|
571
|
+
class $serializer_0 {
|
|
572
|
+
constructor() {
|
|
573
|
+
$serializer_instance_0 = this;
|
|
574
|
+
var tmp0_serialDesc = new PluginGeneratedSerialDescriptor('com.sphereon.sdjwt.SdField', this, 2);
|
|
575
|
+
tmp0_serialDesc.j17('sd', false);
|
|
576
|
+
tmp0_serialDesc.j17('children', true);
|
|
577
|
+
this.g5j_1 = tmp0_serialDesc;
|
|
578
|
+
}
|
|
579
|
+
h5j(encoder, value) {
|
|
580
|
+
var tmp0_desc = this.g5j_1;
|
|
581
|
+
var tmp1_output = encoder.pz(tmp0_desc);
|
|
582
|
+
tmp1_output.x10(tmp0_desc, 0, value.sd);
|
|
583
|
+
if (tmp1_output.m11(tmp0_desc, 1) ? true : !(value.children == null)) {
|
|
584
|
+
tmp1_output.i11(tmp0_desc, 1, $serializer_getInstance_1(), value.children);
|
|
585
|
+
}
|
|
586
|
+
tmp1_output.qz(tmp0_desc);
|
|
587
|
+
}
|
|
588
|
+
nv(encoder, value) {
|
|
589
|
+
return this.h5j(encoder, value instanceof SdField ? value : THROW_CCE());
|
|
590
|
+
}
|
|
591
|
+
ov(decoder) {
|
|
592
|
+
var tmp0_desc = this.g5j_1;
|
|
593
|
+
var tmp1_flag = true;
|
|
594
|
+
var tmp2_index = 0;
|
|
595
|
+
var tmp3_bitMask0 = 0;
|
|
596
|
+
var tmp4_local0 = false;
|
|
597
|
+
var tmp5_local1 = null;
|
|
598
|
+
var tmp6_input = decoder.pz(tmp0_desc);
|
|
599
|
+
if (tmp6_input.f10()) {
|
|
600
|
+
tmp4_local0 = tmp6_input.rz(tmp0_desc, 0);
|
|
601
|
+
tmp3_bitMask0 = tmp3_bitMask0 | 1;
|
|
602
|
+
tmp5_local1 = tmp6_input.d10(tmp0_desc, 1, $serializer_getInstance_1(), tmp5_local1);
|
|
603
|
+
tmp3_bitMask0 = tmp3_bitMask0 | 2;
|
|
604
|
+
} else
|
|
605
|
+
while (tmp1_flag) {
|
|
606
|
+
tmp2_index = tmp6_input.g10(tmp0_desc);
|
|
607
|
+
switch (tmp2_index) {
|
|
608
|
+
case -1:
|
|
609
|
+
tmp1_flag = false;
|
|
610
|
+
break;
|
|
611
|
+
case 0:
|
|
612
|
+
tmp4_local0 = tmp6_input.rz(tmp0_desc, 0);
|
|
613
|
+
tmp3_bitMask0 = tmp3_bitMask0 | 1;
|
|
614
|
+
break;
|
|
615
|
+
case 1:
|
|
616
|
+
tmp5_local1 = tmp6_input.d10(tmp0_desc, 1, $serializer_getInstance_1(), tmp5_local1);
|
|
617
|
+
tmp3_bitMask0 = tmp3_bitMask0 | 2;
|
|
618
|
+
break;
|
|
619
|
+
default:
|
|
620
|
+
throw UnknownFieldException.xw(tmp2_index);
|
|
621
|
+
}
|
|
622
|
+
}
|
|
623
|
+
tmp6_input.qz(tmp0_desc);
|
|
624
|
+
return SdField.i5j(tmp3_bitMask0, tmp4_local0, tmp5_local1, null);
|
|
625
|
+
}
|
|
626
|
+
av() {
|
|
627
|
+
return this.g5j_1;
|
|
628
|
+
}
|
|
629
|
+
y17() {
|
|
630
|
+
// Inline function 'kotlin.arrayOf' call
|
|
631
|
+
// Inline function 'kotlin.js.unsafeCast' call
|
|
632
|
+
// Inline function 'kotlin.js.asDynamic' call
|
|
633
|
+
return [BooleanSerializer_getInstance(), get_nullable($serializer_getInstance_1())];
|
|
634
|
+
}
|
|
635
|
+
}
|
|
636
|
+
class SdField {
|
|
637
|
+
constructor(sd, children) {
|
|
638
|
+
children = children === VOID ? null : children;
|
|
639
|
+
this.sd = sd;
|
|
640
|
+
this.children = children;
|
|
641
|
+
}
|
|
642
|
+
j5j() {
|
|
643
|
+
return this.sd;
|
|
644
|
+
}
|
|
645
|
+
k5j() {
|
|
646
|
+
return this.children;
|
|
647
|
+
}
|
|
648
|
+
nk() {
|
|
649
|
+
return this.sd;
|
|
650
|
+
}
|
|
651
|
+
ok() {
|
|
652
|
+
return this.children;
|
|
653
|
+
}
|
|
654
|
+
l5j(sd, children) {
|
|
655
|
+
return new SdField(sd, children);
|
|
656
|
+
}
|
|
657
|
+
copy(sd, children, $super) {
|
|
658
|
+
sd = sd === VOID ? this.sd : sd;
|
|
659
|
+
children = children === VOID ? this.children : children;
|
|
660
|
+
return $super === VOID ? this.l5j(sd, children) : $super.l5j.call(this, sd, children);
|
|
661
|
+
}
|
|
662
|
+
toString() {
|
|
663
|
+
return 'SdField(sd=' + this.sd + ', children=' + toString_0(this.children) + ')';
|
|
664
|
+
}
|
|
665
|
+
hashCode() {
|
|
666
|
+
var result = getBooleanHashCode(this.sd);
|
|
667
|
+
result = imul(result, 31) + (this.children == null ? 0 : this.children.hashCode()) | 0;
|
|
668
|
+
return result;
|
|
669
|
+
}
|
|
670
|
+
equals(other) {
|
|
671
|
+
if (this === other)
|
|
672
|
+
return true;
|
|
673
|
+
if (!(other instanceof SdField))
|
|
674
|
+
return false;
|
|
675
|
+
if (!(this.sd === other.sd))
|
|
676
|
+
return false;
|
|
677
|
+
if (!equals(this.children, other.children))
|
|
678
|
+
return false;
|
|
679
|
+
return true;
|
|
680
|
+
}
|
|
681
|
+
static i5j(seen0, sd, children, serializationConstructorMarker) {
|
|
682
|
+
if (!(1 === (1 & seen0))) {
|
|
683
|
+
throwMissingFieldException(seen0, 1, $serializer_getInstance_0().g5j_1);
|
|
684
|
+
}
|
|
685
|
+
var $this = createThis(this);
|
|
686
|
+
$this.sd = sd;
|
|
687
|
+
if (0 === (seen0 & 2))
|
|
688
|
+
$this.children = null;
|
|
689
|
+
else
|
|
690
|
+
$this.children = children;
|
|
691
|
+
return $this;
|
|
692
|
+
}
|
|
693
|
+
}
|
|
694
|
+
class Companion_3 {
|
|
695
|
+
constructor() {
|
|
696
|
+
Companion_instance_4 = this;
|
|
697
|
+
var tmp = this;
|
|
698
|
+
var tmp_0 = LazyThreadSafetyMode_PUBLICATION_getInstance();
|
|
699
|
+
// Inline function 'kotlin.arrayOf' call
|
|
700
|
+
// Inline function 'kotlin.js.unsafeCast' call
|
|
701
|
+
// Inline function 'kotlin.js.asDynamic' call
|
|
702
|
+
tmp.m5j_1 = [lazy(tmp_0, SdMap$Companion$$childSerializers$_anonymous__fdyn6p), null];
|
|
703
|
+
}
|
|
704
|
+
}
|
|
705
|
+
class $serializer_1 {
|
|
706
|
+
constructor() {
|
|
707
|
+
$serializer_instance_1 = this;
|
|
708
|
+
var tmp0_serialDesc = new PluginGeneratedSerialDescriptor('com.sphereon.sdjwt.SdMap', this, 2);
|
|
709
|
+
tmp0_serialDesc.j17('fields', false);
|
|
710
|
+
tmp0_serialDesc.j17('decoyConfig', true);
|
|
711
|
+
this.n5j_1 = tmp0_serialDesc;
|
|
712
|
+
}
|
|
713
|
+
o5j(encoder, value) {
|
|
714
|
+
var tmp0_desc = this.n5j_1;
|
|
715
|
+
var tmp1_output = encoder.pz(tmp0_desc);
|
|
716
|
+
var tmp2_cached = Companion_getInstance_3().m5j_1;
|
|
717
|
+
tmp1_output.h11(tmp0_desc, 0, tmp2_cached[0].i4(), value.fields);
|
|
718
|
+
if (tmp1_output.m11(tmp0_desc, 1) ? true : !value.decoyConfig.equals(new DecoyConfig())) {
|
|
719
|
+
tmp1_output.h11(tmp0_desc, 1, $serializer_getInstance(), value.decoyConfig);
|
|
720
|
+
}
|
|
721
|
+
tmp1_output.qz(tmp0_desc);
|
|
722
|
+
}
|
|
723
|
+
nv(encoder, value) {
|
|
724
|
+
return this.o5j(encoder, value instanceof SdMap ? value : THROW_CCE());
|
|
725
|
+
}
|
|
726
|
+
ov(decoder) {
|
|
727
|
+
var tmp0_desc = this.n5j_1;
|
|
728
|
+
var tmp1_flag = true;
|
|
729
|
+
var tmp2_index = 0;
|
|
730
|
+
var tmp3_bitMask0 = 0;
|
|
731
|
+
var tmp4_local0 = null;
|
|
732
|
+
var tmp5_local1 = null;
|
|
733
|
+
var tmp6_input = decoder.pz(tmp0_desc);
|
|
734
|
+
var tmp7_cached = Companion_getInstance_3().m5j_1;
|
|
735
|
+
if (tmp6_input.f10()) {
|
|
736
|
+
tmp4_local0 = tmp6_input.b10(tmp0_desc, 0, tmp7_cached[0].i4(), tmp4_local0);
|
|
737
|
+
tmp3_bitMask0 = tmp3_bitMask0 | 1;
|
|
738
|
+
tmp5_local1 = tmp6_input.b10(tmp0_desc, 1, $serializer_getInstance(), tmp5_local1);
|
|
739
|
+
tmp3_bitMask0 = tmp3_bitMask0 | 2;
|
|
740
|
+
} else
|
|
741
|
+
while (tmp1_flag) {
|
|
742
|
+
tmp2_index = tmp6_input.g10(tmp0_desc);
|
|
743
|
+
switch (tmp2_index) {
|
|
744
|
+
case -1:
|
|
745
|
+
tmp1_flag = false;
|
|
746
|
+
break;
|
|
747
|
+
case 0:
|
|
748
|
+
tmp4_local0 = tmp6_input.b10(tmp0_desc, 0, tmp7_cached[0].i4(), tmp4_local0);
|
|
749
|
+
tmp3_bitMask0 = tmp3_bitMask0 | 1;
|
|
750
|
+
break;
|
|
751
|
+
case 1:
|
|
752
|
+
tmp5_local1 = tmp6_input.b10(tmp0_desc, 1, $serializer_getInstance(), tmp5_local1);
|
|
753
|
+
tmp3_bitMask0 = tmp3_bitMask0 | 2;
|
|
754
|
+
break;
|
|
755
|
+
default:
|
|
756
|
+
throw UnknownFieldException.xw(tmp2_index);
|
|
757
|
+
}
|
|
758
|
+
}
|
|
759
|
+
tmp6_input.qz(tmp0_desc);
|
|
760
|
+
return SdMap.p5j(tmp3_bitMask0, tmp4_local0, tmp5_local1, null);
|
|
761
|
+
}
|
|
762
|
+
av() {
|
|
763
|
+
return this.n5j_1;
|
|
764
|
+
}
|
|
765
|
+
y17() {
|
|
766
|
+
// Inline function 'kotlin.arrayOf' call
|
|
767
|
+
// Inline function 'kotlin.js.unsafeCast' call
|
|
768
|
+
// Inline function 'kotlin.js.asDynamic' call
|
|
769
|
+
return [Companion_getInstance_3().m5j_1[0].i4(), $serializer_getInstance()];
|
|
770
|
+
}
|
|
771
|
+
}
|
|
772
|
+
class SdMap {
|
|
773
|
+
constructor(fields, decoyConfig) {
|
|
774
|
+
Companion_getInstance_3();
|
|
775
|
+
decoyConfig = decoyConfig === VOID ? new DecoyConfig() : decoyConfig;
|
|
776
|
+
this.fields = fields;
|
|
777
|
+
this.decoyConfig = decoyConfig;
|
|
778
|
+
}
|
|
779
|
+
q5j() {
|
|
780
|
+
return this.fields;
|
|
781
|
+
}
|
|
782
|
+
r5j() {
|
|
783
|
+
return this.decoyConfig;
|
|
784
|
+
}
|
|
785
|
+
get(key) {
|
|
786
|
+
return this.fields.m4(key);
|
|
787
|
+
}
|
|
788
|
+
containsKey(key) {
|
|
789
|
+
return this.fields.k4(key);
|
|
790
|
+
}
|
|
791
|
+
n4() {
|
|
792
|
+
return this.fields.n4();
|
|
793
|
+
}
|
|
794
|
+
o4() {
|
|
795
|
+
return this.fields.o4();
|
|
796
|
+
}
|
|
797
|
+
x2() {
|
|
798
|
+
return this.fields.x2();
|
|
799
|
+
}
|
|
800
|
+
isEmpty() {
|
|
801
|
+
return this.fields.h1();
|
|
802
|
+
}
|
|
803
|
+
nk() {
|
|
804
|
+
return this.fields;
|
|
805
|
+
}
|
|
806
|
+
ok() {
|
|
807
|
+
return this.decoyConfig;
|
|
808
|
+
}
|
|
809
|
+
s5j(fields, decoyConfig) {
|
|
810
|
+
return new SdMap(fields, decoyConfig);
|
|
811
|
+
}
|
|
812
|
+
copy(fields, decoyConfig, $super) {
|
|
813
|
+
fields = fields === VOID ? this.fields : fields;
|
|
814
|
+
decoyConfig = decoyConfig === VOID ? this.decoyConfig : decoyConfig;
|
|
815
|
+
return $super === VOID ? this.s5j(fields, decoyConfig) : $super.s5j.call(this, fields, decoyConfig);
|
|
816
|
+
}
|
|
817
|
+
toString() {
|
|
818
|
+
return 'SdMap(fields=' + toString(this.fields) + ', decoyConfig=' + this.decoyConfig.toString() + ')';
|
|
819
|
+
}
|
|
820
|
+
hashCode() {
|
|
821
|
+
var result = hashCode(this.fields);
|
|
822
|
+
result = imul(result, 31) + this.decoyConfig.hashCode() | 0;
|
|
823
|
+
return result;
|
|
824
|
+
}
|
|
825
|
+
equals(other) {
|
|
826
|
+
if (this === other)
|
|
827
|
+
return true;
|
|
828
|
+
if (!(other instanceof SdMap))
|
|
829
|
+
return false;
|
|
830
|
+
if (!equals(this.fields, other.fields))
|
|
831
|
+
return false;
|
|
832
|
+
if (!this.decoyConfig.equals(other.decoyConfig))
|
|
833
|
+
return false;
|
|
834
|
+
return true;
|
|
835
|
+
}
|
|
836
|
+
static p5j(seen0, fields, decoyConfig, serializationConstructorMarker) {
|
|
837
|
+
Companion_getInstance_3();
|
|
838
|
+
if (!(1 === (1 & seen0))) {
|
|
839
|
+
throwMissingFieldException(seen0, 1, $serializer_getInstance_1().n5j_1);
|
|
840
|
+
}
|
|
841
|
+
var $this = createThis(this);
|
|
842
|
+
$this.fields = fields;
|
|
843
|
+
if (0 === (seen0 & 2))
|
|
844
|
+
$this.decoyConfig = new DecoyConfig();
|
|
845
|
+
else
|
|
846
|
+
$this.decoyConfig = decoyConfig;
|
|
847
|
+
return $this;
|
|
848
|
+
}
|
|
849
|
+
get keys() {
|
|
850
|
+
return this.n4();
|
|
851
|
+
}
|
|
852
|
+
get values() {
|
|
853
|
+
return this.o4();
|
|
854
|
+
}
|
|
855
|
+
get entries() {
|
|
856
|
+
return this.x2();
|
|
857
|
+
}
|
|
858
|
+
}
|
|
859
|
+
class KeyBindingJwt {
|
|
860
|
+
constructor(jwt, header, payload) {
|
|
861
|
+
this.jwt = jwt;
|
|
862
|
+
this.header = header;
|
|
863
|
+
this.payload = payload;
|
|
864
|
+
}
|
|
865
|
+
l2s() {
|
|
866
|
+
return this.jwt;
|
|
867
|
+
}
|
|
868
|
+
c4m() {
|
|
869
|
+
return this.header;
|
|
870
|
+
}
|
|
871
|
+
l4c() {
|
|
872
|
+
return this.payload;
|
|
873
|
+
}
|
|
874
|
+
t5j() {
|
|
875
|
+
var tmp0_safe_receiver = this.payload.uh('aud');
|
|
876
|
+
var tmp1_safe_receiver = tmp0_safe_receiver == null ? null : toString(tmp0_safe_receiver);
|
|
877
|
+
return tmp1_safe_receiver == null ? null : trim(tmp1_safe_receiver, charArrayOf([_Char___init__impl__6a9atx(34)]));
|
|
878
|
+
}
|
|
879
|
+
u5j() {
|
|
880
|
+
var tmp0_safe_receiver = this.payload.uh('nonce');
|
|
881
|
+
var tmp1_safe_receiver = tmp0_safe_receiver == null ? null : toString(tmp0_safe_receiver);
|
|
882
|
+
return tmp1_safe_receiver == null ? null : trim(tmp1_safe_receiver, charArrayOf([_Char___init__impl__6a9atx(34)]));
|
|
883
|
+
}
|
|
884
|
+
v5j() {
|
|
885
|
+
var tmp0_safe_receiver = this.payload.uh('iat');
|
|
886
|
+
var tmp1_safe_receiver = tmp0_safe_receiver == null ? null : toString(tmp0_safe_receiver);
|
|
887
|
+
var tmp2_safe_receiver = tmp1_safe_receiver == null ? null : toDoubleOrNull(tmp1_safe_receiver);
|
|
888
|
+
return tmp2_safe_receiver == null ? null : numberToLong(tmp2_safe_receiver);
|
|
889
|
+
}
|
|
890
|
+
w5j() {
|
|
891
|
+
var tmp0_safe_receiver = this.payload.uh('sd_hash');
|
|
892
|
+
var tmp1_safe_receiver = tmp0_safe_receiver == null ? null : toString(tmp0_safe_receiver);
|
|
893
|
+
return tmp1_safe_receiver == null ? null : trim(tmp1_safe_receiver, charArrayOf([_Char___init__impl__6a9atx(34)]));
|
|
894
|
+
}
|
|
895
|
+
nk() {
|
|
896
|
+
return this.jwt;
|
|
897
|
+
}
|
|
898
|
+
ok() {
|
|
899
|
+
return this.header;
|
|
900
|
+
}
|
|
901
|
+
tr() {
|
|
902
|
+
return this.payload;
|
|
903
|
+
}
|
|
904
|
+
x5j(jwt, header, payload) {
|
|
905
|
+
return new KeyBindingJwt(jwt, header, payload);
|
|
906
|
+
}
|
|
907
|
+
copy(jwt, header, payload, $super) {
|
|
908
|
+
jwt = jwt === VOID ? this.jwt : jwt;
|
|
909
|
+
header = header === VOID ? this.header : header;
|
|
910
|
+
payload = payload === VOID ? this.payload : payload;
|
|
911
|
+
return $super === VOID ? this.x5j(jwt, header, payload) : $super.x5j.call(this, jwt, header, payload);
|
|
912
|
+
}
|
|
913
|
+
toString() {
|
|
914
|
+
return 'KeyBindingJwt(jwt=' + this.jwt + ', header=' + this.header.toString() + ', payload=' + this.payload.toString() + ')';
|
|
915
|
+
}
|
|
916
|
+
hashCode() {
|
|
917
|
+
var result = getStringHashCode(this.jwt);
|
|
918
|
+
result = imul(result, 31) + this.header.hashCode() | 0;
|
|
919
|
+
result = imul(result, 31) + this.payload.hashCode() | 0;
|
|
920
|
+
return result;
|
|
921
|
+
}
|
|
922
|
+
equals(other) {
|
|
923
|
+
if (this === other)
|
|
924
|
+
return true;
|
|
925
|
+
if (!(other instanceof KeyBindingJwt))
|
|
926
|
+
return false;
|
|
927
|
+
if (!(this.jwt === other.jwt))
|
|
928
|
+
return false;
|
|
929
|
+
if (!this.header.equals(other.header))
|
|
930
|
+
return false;
|
|
931
|
+
if (!this.payload.equals(other.payload))
|
|
932
|
+
return false;
|
|
933
|
+
return true;
|
|
934
|
+
}
|
|
935
|
+
get audience() {
|
|
936
|
+
return this.t5j();
|
|
937
|
+
}
|
|
938
|
+
get nonce() {
|
|
939
|
+
return this.u5j();
|
|
940
|
+
}
|
|
941
|
+
get issuedAt() {
|
|
942
|
+
return this.v5j();
|
|
943
|
+
}
|
|
944
|
+
get sdHash() {
|
|
945
|
+
return this.w5j();
|
|
946
|
+
}
|
|
947
|
+
}
|
|
948
|
+
class SdJwtVerificationResult {
|
|
949
|
+
constructor(sdJwt, signatureValid, disclosuresValid, keyBindingValid, errorMessages, verificationTime) {
|
|
950
|
+
keyBindingValid = keyBindingValid === VOID ? true : keyBindingValid;
|
|
951
|
+
errorMessages = errorMessages === VOID ? emptyList() : errorMessages;
|
|
952
|
+
verificationTime = verificationTime === VOID ? System_instance.kp().hq() : verificationTime;
|
|
953
|
+
this.sdJwt = sdJwt;
|
|
954
|
+
this.signatureValid = signatureValid;
|
|
955
|
+
this.disclosuresValid = disclosuresValid;
|
|
956
|
+
this.keyBindingValid = keyBindingValid;
|
|
957
|
+
this.errorMessages = errorMessages;
|
|
958
|
+
this.verificationTime = verificationTime;
|
|
959
|
+
}
|
|
960
|
+
y5j() {
|
|
961
|
+
return this.sdJwt;
|
|
962
|
+
}
|
|
963
|
+
z5j() {
|
|
964
|
+
return this.signatureValid;
|
|
965
|
+
}
|
|
966
|
+
a5k() {
|
|
967
|
+
return this.disclosuresValid;
|
|
968
|
+
}
|
|
969
|
+
b5k() {
|
|
970
|
+
return this.keyBindingValid;
|
|
971
|
+
}
|
|
972
|
+
o5e() {
|
|
973
|
+
return this.errorMessages;
|
|
974
|
+
}
|
|
975
|
+
j56() {
|
|
976
|
+
return this.verificationTime;
|
|
977
|
+
}
|
|
978
|
+
u3i() {
|
|
979
|
+
return this.signatureValid && this.disclosuresValid && this.keyBindingValid && this.errorMessages.h1();
|
|
980
|
+
}
|
|
981
|
+
nk() {
|
|
982
|
+
return this.sdJwt;
|
|
983
|
+
}
|
|
984
|
+
ok() {
|
|
985
|
+
return this.signatureValid;
|
|
986
|
+
}
|
|
987
|
+
tr() {
|
|
988
|
+
return this.disclosuresValid;
|
|
989
|
+
}
|
|
990
|
+
e2p() {
|
|
991
|
+
return this.keyBindingValid;
|
|
992
|
+
}
|
|
993
|
+
f2p() {
|
|
994
|
+
return this.errorMessages;
|
|
995
|
+
}
|
|
996
|
+
g2p() {
|
|
997
|
+
return this.verificationTime;
|
|
998
|
+
}
|
|
999
|
+
c5k(sdJwt, signatureValid, disclosuresValid, keyBindingValid, errorMessages, verificationTime) {
|
|
1000
|
+
return new SdJwtVerificationResult(sdJwt, signatureValid, disclosuresValid, keyBindingValid, errorMessages, verificationTime);
|
|
1001
|
+
}
|
|
1002
|
+
copy(sdJwt, signatureValid, disclosuresValid, keyBindingValid, errorMessages, verificationTime, $super) {
|
|
1003
|
+
sdJwt = sdJwt === VOID ? this.sdJwt : sdJwt;
|
|
1004
|
+
signatureValid = signatureValid === VOID ? this.signatureValid : signatureValid;
|
|
1005
|
+
disclosuresValid = disclosuresValid === VOID ? this.disclosuresValid : disclosuresValid;
|
|
1006
|
+
keyBindingValid = keyBindingValid === VOID ? this.keyBindingValid : keyBindingValid;
|
|
1007
|
+
errorMessages = errorMessages === VOID ? this.errorMessages : errorMessages;
|
|
1008
|
+
verificationTime = verificationTime === VOID ? this.verificationTime : verificationTime;
|
|
1009
|
+
return $super === VOID ? this.c5k(sdJwt, signatureValid, disclosuresValid, keyBindingValid, errorMessages, verificationTime) : $super.c5k.call(this, sdJwt, signatureValid, disclosuresValid, keyBindingValid, errorMessages, verificationTime);
|
|
1010
|
+
}
|
|
1011
|
+
toString() {
|
|
1012
|
+
return 'SdJwtVerificationResult(sdJwt=' + this.sdJwt.toString() + ', signatureValid=' + this.signatureValid + ', disclosuresValid=' + this.disclosuresValid + ', keyBindingValid=' + this.keyBindingValid + ', errorMessages=' + toString(this.errorMessages) + ', verificationTime=' + this.verificationTime.toString() + ')';
|
|
1013
|
+
}
|
|
1014
|
+
hashCode() {
|
|
1015
|
+
var result = this.sdJwt.hashCode();
|
|
1016
|
+
result = imul(result, 31) + getBooleanHashCode(this.signatureValid) | 0;
|
|
1017
|
+
result = imul(result, 31) + getBooleanHashCode(this.disclosuresValid) | 0;
|
|
1018
|
+
result = imul(result, 31) + getBooleanHashCode(this.keyBindingValid) | 0;
|
|
1019
|
+
result = imul(result, 31) + hashCode(this.errorMessages) | 0;
|
|
1020
|
+
result = imul(result, 31) + getBigIntHashCode(this.verificationTime) | 0;
|
|
1021
|
+
return result;
|
|
1022
|
+
}
|
|
1023
|
+
equals(other) {
|
|
1024
|
+
if (this === other)
|
|
1025
|
+
return true;
|
|
1026
|
+
if (!(other instanceof SdJwtVerificationResult))
|
|
1027
|
+
return false;
|
|
1028
|
+
if (!this.sdJwt.equals(other.sdJwt))
|
|
1029
|
+
return false;
|
|
1030
|
+
if (!(this.signatureValid === other.signatureValid))
|
|
1031
|
+
return false;
|
|
1032
|
+
if (!(this.disclosuresValid === other.disclosuresValid))
|
|
1033
|
+
return false;
|
|
1034
|
+
if (!(this.keyBindingValid === other.keyBindingValid))
|
|
1035
|
+
return false;
|
|
1036
|
+
if (!equals(this.errorMessages, other.errorMessages))
|
|
1037
|
+
return false;
|
|
1038
|
+
if (!(this.verificationTime === other.verificationTime))
|
|
1039
|
+
return false;
|
|
1040
|
+
return true;
|
|
1041
|
+
}
|
|
1042
|
+
get isValid() {
|
|
1043
|
+
return this.u3i();
|
|
1044
|
+
}
|
|
1045
|
+
}
|
|
1046
|
+
class Companion_4 {
|
|
1047
|
+
constructor() {
|
|
1048
|
+
Companion_instance_5 = this;
|
|
1049
|
+
this.DEFAULT = new SdJwtSpec();
|
|
1050
|
+
this.Default = this.DEFAULT;
|
|
1051
|
+
}
|
|
1052
|
+
r2s() {
|
|
1053
|
+
return this.DEFAULT;
|
|
1054
|
+
}
|
|
1055
|
+
r2p() {
|
|
1056
|
+
return this.Default;
|
|
1057
|
+
}
|
|
1058
|
+
}
|
|
1059
|
+
class SdJwtSpec {
|
|
1060
|
+
constructor(digestAlg, includeAlgClaim, decoyConfig) {
|
|
1061
|
+
Companion_getInstance_4();
|
|
1062
|
+
digestAlg = digestAlg === VOID ? DigestAlg_SHA256_getInstance() : digestAlg;
|
|
1063
|
+
includeAlgClaim = includeAlgClaim === VOID ? true : includeAlgClaim;
|
|
1064
|
+
decoyConfig = decoyConfig === VOID ? new DecoyConfig() : decoyConfig;
|
|
1065
|
+
this.digestAlg = digestAlg;
|
|
1066
|
+
this.includeAlgClaim = includeAlgClaim;
|
|
1067
|
+
this.decoyConfig = decoyConfig;
|
|
1068
|
+
}
|
|
1069
|
+
s45() {
|
|
1070
|
+
return this.digestAlg;
|
|
1071
|
+
}
|
|
1072
|
+
d5k() {
|
|
1073
|
+
return this.includeAlgClaim;
|
|
1074
|
+
}
|
|
1075
|
+
r5j() {
|
|
1076
|
+
return this.decoyConfig;
|
|
1077
|
+
}
|
|
1078
|
+
nk() {
|
|
1079
|
+
return this.digestAlg;
|
|
1080
|
+
}
|
|
1081
|
+
ok() {
|
|
1082
|
+
return this.includeAlgClaim;
|
|
1083
|
+
}
|
|
1084
|
+
tr() {
|
|
1085
|
+
return this.decoyConfig;
|
|
1086
|
+
}
|
|
1087
|
+
e5k(digestAlg, includeAlgClaim, decoyConfig) {
|
|
1088
|
+
return new SdJwtSpec(digestAlg, includeAlgClaim, decoyConfig);
|
|
1089
|
+
}
|
|
1090
|
+
copy(digestAlg, includeAlgClaim, decoyConfig, $super) {
|
|
1091
|
+
digestAlg = digestAlg === VOID ? this.digestAlg : digestAlg;
|
|
1092
|
+
includeAlgClaim = includeAlgClaim === VOID ? this.includeAlgClaim : includeAlgClaim;
|
|
1093
|
+
decoyConfig = decoyConfig === VOID ? this.decoyConfig : decoyConfig;
|
|
1094
|
+
return $super === VOID ? this.e5k(digestAlg, includeAlgClaim, decoyConfig) : $super.e5k.call(this, digestAlg, includeAlgClaim, decoyConfig);
|
|
1095
|
+
}
|
|
1096
|
+
toString() {
|
|
1097
|
+
return 'SdJwtSpec(digestAlg=' + this.digestAlg.toString() + ', includeAlgClaim=' + this.includeAlgClaim + ', decoyConfig=' + this.decoyConfig.toString() + ')';
|
|
1098
|
+
}
|
|
1099
|
+
hashCode() {
|
|
1100
|
+
var result = this.digestAlg.hashCode();
|
|
1101
|
+
result = imul(result, 31) + getBooleanHashCode(this.includeAlgClaim) | 0;
|
|
1102
|
+
result = imul(result, 31) + this.decoyConfig.hashCode() | 0;
|
|
1103
|
+
return result;
|
|
1104
|
+
}
|
|
1105
|
+
equals(other) {
|
|
1106
|
+
if (this === other)
|
|
1107
|
+
return true;
|
|
1108
|
+
if (!(other instanceof SdJwtSpec))
|
|
1109
|
+
return false;
|
|
1110
|
+
if (!this.digestAlg.equals(other.digestAlg))
|
|
1111
|
+
return false;
|
|
1112
|
+
if (!(this.includeAlgClaim === other.includeAlgClaim))
|
|
1113
|
+
return false;
|
|
1114
|
+
if (!this.decoyConfig.equals(other.decoyConfig))
|
|
1115
|
+
return false;
|
|
1116
|
+
return true;
|
|
1117
|
+
}
|
|
1118
|
+
}
|
|
1119
|
+
class SaltProvider {}
|
|
1120
|
+
function generateSalt$default(length, $super) {
|
|
1121
|
+
length = length === VOID ? 16 : length;
|
|
1122
|
+
return $super === VOID ? this.f5k(length) : $super.f5k.call(this, length);
|
|
1123
|
+
}
|
|
1124
|
+
class SdJwtPayload_0 {
|
|
1125
|
+
constructor(claims, sdClaims, minimumDigests) {
|
|
1126
|
+
minimumDigests = minimumDigests === VOID ? null : minimumDigests;
|
|
1127
|
+
this.claims = claims;
|
|
1128
|
+
this.sdClaims = sdClaims;
|
|
1129
|
+
this.minimumDigests = minimumDigests;
|
|
1130
|
+
}
|
|
1131
|
+
g5k() {
|
|
1132
|
+
return this.claims;
|
|
1133
|
+
}
|
|
1134
|
+
h5k() {
|
|
1135
|
+
return this.sdClaims;
|
|
1136
|
+
}
|
|
1137
|
+
i5k() {
|
|
1138
|
+
return this.minimumDigests;
|
|
1139
|
+
}
|
|
1140
|
+
isClaimSelectivelyDisclosable(claimName) {
|
|
1141
|
+
return this.sdClaims.f3(claimName);
|
|
1142
|
+
}
|
|
1143
|
+
j5k() {
|
|
1144
|
+
return minus(this.claims.n4(), this.sdClaims);
|
|
1145
|
+
}
|
|
1146
|
+
nk() {
|
|
1147
|
+
return this.claims;
|
|
1148
|
+
}
|
|
1149
|
+
ok() {
|
|
1150
|
+
return this.sdClaims;
|
|
1151
|
+
}
|
|
1152
|
+
tr() {
|
|
1153
|
+
return this.minimumDigests;
|
|
1154
|
+
}
|
|
1155
|
+
k5k(claims, sdClaims, minimumDigests) {
|
|
1156
|
+
return new SdJwtPayload_0(claims, sdClaims, minimumDigests);
|
|
1157
|
+
}
|
|
1158
|
+
copy(claims, sdClaims, minimumDigests, $super) {
|
|
1159
|
+
claims = claims === VOID ? this.claims : claims;
|
|
1160
|
+
sdClaims = sdClaims === VOID ? this.sdClaims : sdClaims;
|
|
1161
|
+
minimumDigests = minimumDigests === VOID ? this.minimumDigests : minimumDigests;
|
|
1162
|
+
return $super === VOID ? this.k5k(claims, sdClaims, minimumDigests) : $super.k5k.call(this, claims, sdClaims, minimumDigests);
|
|
1163
|
+
}
|
|
1164
|
+
toString() {
|
|
1165
|
+
return 'SdJwtPayload(claims=' + this.claims.toString() + ', sdClaims=' + toString(this.sdClaims) + ', minimumDigests=' + this.minimumDigests + ')';
|
|
1166
|
+
}
|
|
1167
|
+
hashCode() {
|
|
1168
|
+
var result = this.claims.hashCode();
|
|
1169
|
+
result = imul(result, 31) + hashCode(this.sdClaims) | 0;
|
|
1170
|
+
result = imul(result, 31) + (this.minimumDigests == null ? 0 : this.minimumDigests) | 0;
|
|
1171
|
+
return result;
|
|
1172
|
+
}
|
|
1173
|
+
equals(other) {
|
|
1174
|
+
if (this === other)
|
|
1175
|
+
return true;
|
|
1176
|
+
if (!(other instanceof SdJwtPayload_0))
|
|
1177
|
+
return false;
|
|
1178
|
+
if (!this.claims.equals(other.claims))
|
|
1179
|
+
return false;
|
|
1180
|
+
if (!equals(this.sdClaims, other.sdClaims))
|
|
1181
|
+
return false;
|
|
1182
|
+
if (!(this.minimumDigests == other.minimumDigests))
|
|
1183
|
+
return false;
|
|
1184
|
+
return true;
|
|
1185
|
+
}
|
|
1186
|
+
get plainClaims() {
|
|
1187
|
+
return this.j5k();
|
|
1188
|
+
}
|
|
1189
|
+
}
|
|
1190
|
+
class SdJwtPayloadBuilder {
|
|
1191
|
+
constructor() {
|
|
1192
|
+
this.l5k_1 = new JwsPayloadBuilder();
|
|
1193
|
+
var tmp = this;
|
|
1194
|
+
// Inline function 'kotlin.collections.mutableSetOf' call
|
|
1195
|
+
tmp.m5k_1 = LinkedHashSet.o2();
|
|
1196
|
+
this.n5k_1 = null;
|
|
1197
|
+
}
|
|
1198
|
+
iss(value) {
|
|
1199
|
+
// Inline function 'kotlin.apply' call
|
|
1200
|
+
this.l5k_1.iss(value);
|
|
1201
|
+
return this;
|
|
1202
|
+
}
|
|
1203
|
+
sub(value) {
|
|
1204
|
+
// Inline function 'kotlin.apply' call
|
|
1205
|
+
this.l5k_1.sub(value);
|
|
1206
|
+
return this;
|
|
1207
|
+
}
|
|
1208
|
+
audSingle(value) {
|
|
1209
|
+
// Inline function 'kotlin.apply' call
|
|
1210
|
+
this.l5k_1.audSingle(value);
|
|
1211
|
+
return this;
|
|
1212
|
+
}
|
|
1213
|
+
audMultiple(values) {
|
|
1214
|
+
// Inline function 'kotlin.apply' call
|
|
1215
|
+
this.l5k_1.audMultiple(values.slice());
|
|
1216
|
+
return this;
|
|
1217
|
+
}
|
|
1218
|
+
expLong(value) {
|
|
1219
|
+
// Inline function 'kotlin.apply' call
|
|
1220
|
+
this.l5k_1.expLong(value);
|
|
1221
|
+
return this;
|
|
1222
|
+
}
|
|
1223
|
+
expNumber(value) {
|
|
1224
|
+
// Inline function 'kotlin.apply' call
|
|
1225
|
+
this.l5k_1.expNumber(value);
|
|
1226
|
+
return this;
|
|
1227
|
+
}
|
|
1228
|
+
nbfLong(value) {
|
|
1229
|
+
// Inline function 'kotlin.apply' call
|
|
1230
|
+
this.l5k_1.nbfLong(value);
|
|
1231
|
+
return this;
|
|
1232
|
+
}
|
|
1233
|
+
nbfNumber(value) {
|
|
1234
|
+
// Inline function 'kotlin.apply' call
|
|
1235
|
+
this.l5k_1.nbfNumber(value);
|
|
1236
|
+
return this;
|
|
1237
|
+
}
|
|
1238
|
+
iatLong(value) {
|
|
1239
|
+
// Inline function 'kotlin.apply' call
|
|
1240
|
+
this.l5k_1.iatLong(value);
|
|
1241
|
+
return this;
|
|
1242
|
+
}
|
|
1243
|
+
iatNumber(value) {
|
|
1244
|
+
// Inline function 'kotlin.apply' call
|
|
1245
|
+
this.l5k_1.iatNumber(value);
|
|
1246
|
+
return this;
|
|
1247
|
+
}
|
|
1248
|
+
jti(value) {
|
|
1249
|
+
// Inline function 'kotlin.apply' call
|
|
1250
|
+
this.l5k_1.jti(value);
|
|
1251
|
+
return this;
|
|
1252
|
+
}
|
|
1253
|
+
claimString(name, value) {
|
|
1254
|
+
// Inline function 'kotlin.apply' call
|
|
1255
|
+
this.l5k_1.claimString(name, value);
|
|
1256
|
+
return this;
|
|
1257
|
+
}
|
|
1258
|
+
claimNumber(name, value) {
|
|
1259
|
+
// Inline function 'kotlin.apply' call
|
|
1260
|
+
this.l5k_1.claimNumber(name, value);
|
|
1261
|
+
return this;
|
|
1262
|
+
}
|
|
1263
|
+
claimBoolean(name, value) {
|
|
1264
|
+
// Inline function 'kotlin.apply' call
|
|
1265
|
+
this.l5k_1.claimBoolean(name, value);
|
|
1266
|
+
return this;
|
|
1267
|
+
}
|
|
1268
|
+
claimJsonElement(name, value) {
|
|
1269
|
+
// Inline function 'kotlin.apply' call
|
|
1270
|
+
this.l5k_1.claimJsonElement(name, value);
|
|
1271
|
+
return this;
|
|
1272
|
+
}
|
|
1273
|
+
subSd(value) {
|
|
1274
|
+
// Inline function 'kotlin.apply' call
|
|
1275
|
+
this.l5k_1.sub(value);
|
|
1276
|
+
// Inline function 'kotlin.collections.plusAssign' call
|
|
1277
|
+
this.m5k_1.k2('sub');
|
|
1278
|
+
return this;
|
|
1279
|
+
}
|
|
1280
|
+
iatSdLong(value) {
|
|
1281
|
+
// Inline function 'kotlin.apply' call
|
|
1282
|
+
this.l5k_1.iatLong(value);
|
|
1283
|
+
// Inline function 'kotlin.collections.plusAssign' call
|
|
1284
|
+
this.m5k_1.k2('iat');
|
|
1285
|
+
return this;
|
|
1286
|
+
}
|
|
1287
|
+
iatSdNumber(value) {
|
|
1288
|
+
// Inline function 'kotlin.apply' call
|
|
1289
|
+
this.l5k_1.iatNumber(value);
|
|
1290
|
+
// Inline function 'kotlin.collections.plusAssign' call
|
|
1291
|
+
this.m5k_1.k2('iat');
|
|
1292
|
+
return this;
|
|
1293
|
+
}
|
|
1294
|
+
jtiSd(value) {
|
|
1295
|
+
// Inline function 'kotlin.apply' call
|
|
1296
|
+
this.l5k_1.jti(value);
|
|
1297
|
+
// Inline function 'kotlin.collections.plusAssign' call
|
|
1298
|
+
this.m5k_1.k2('jti');
|
|
1299
|
+
return this;
|
|
1300
|
+
}
|
|
1301
|
+
claimSdString(name, value) {
|
|
1302
|
+
// Inline function 'kotlin.apply' call
|
|
1303
|
+
this.l5k_1.claimString(name, value);
|
|
1304
|
+
// Inline function 'kotlin.collections.plusAssign' call
|
|
1305
|
+
this.m5k_1.k2(name);
|
|
1306
|
+
return this;
|
|
1307
|
+
}
|
|
1308
|
+
claimSdNumber(name, value) {
|
|
1309
|
+
// Inline function 'kotlin.apply' call
|
|
1310
|
+
this.l5k_1.claimNumber(name, value);
|
|
1311
|
+
// Inline function 'kotlin.collections.plusAssign' call
|
|
1312
|
+
this.m5k_1.k2(name);
|
|
1313
|
+
return this;
|
|
1314
|
+
}
|
|
1315
|
+
claimSdBoolean(name, value) {
|
|
1316
|
+
// Inline function 'kotlin.apply' call
|
|
1317
|
+
this.l5k_1.claimBoolean(name, value);
|
|
1318
|
+
// Inline function 'kotlin.collections.plusAssign' call
|
|
1319
|
+
this.m5k_1.k2(name);
|
|
1320
|
+
return this;
|
|
1321
|
+
}
|
|
1322
|
+
claimSdJsonElement(name, value) {
|
|
1323
|
+
// Inline function 'kotlin.apply' call
|
|
1324
|
+
this.l5k_1.claimJsonElement(name, value);
|
|
1325
|
+
// Inline function 'kotlin.collections.plusAssign' call
|
|
1326
|
+
this.m5k_1.k2(name);
|
|
1327
|
+
return this;
|
|
1328
|
+
}
|
|
1329
|
+
objSd(name, builder) {
|
|
1330
|
+
// Inline function 'kotlin.apply' call
|
|
1331
|
+
// Inline function 'kotlin.apply' call
|
|
1332
|
+
var this_0 = new SdJwtPayloadBuilder();
|
|
1333
|
+
builder(this_0);
|
|
1334
|
+
var nested = this_0;
|
|
1335
|
+
var nestedPayload = nested.build();
|
|
1336
|
+
this.l5k_1.claimJsonElement(name, nestedPayload.claims);
|
|
1337
|
+
// Inline function 'kotlin.collections.plusAssign' call
|
|
1338
|
+
this.m5k_1.k2(name);
|
|
1339
|
+
// Inline function 'kotlin.collections.forEach' call
|
|
1340
|
+
var _iterator__ex2g4s = nestedPayload.sdClaims.j1();
|
|
1341
|
+
while (_iterator__ex2g4s.k1()) {
|
|
1342
|
+
var element = _iterator__ex2g4s.l1();
|
|
1343
|
+
var tmp0 = this.m5k_1;
|
|
1344
|
+
// Inline function 'kotlin.collections.plusAssign' call
|
|
1345
|
+
var element_0 = name + '.' + element;
|
|
1346
|
+
tmp0.k2(element_0);
|
|
1347
|
+
}
|
|
1348
|
+
return this;
|
|
1349
|
+
}
|
|
1350
|
+
minimumDigests(count) {
|
|
1351
|
+
// Inline function 'kotlin.apply' call
|
|
1352
|
+
// Inline function 'kotlin.require' call
|
|
1353
|
+
if (!(count > 0)) {
|
|
1354
|
+
var message = 'minimumDigests must be greater than 0';
|
|
1355
|
+
throw IllegalArgumentException.y1(toString(message));
|
|
1356
|
+
}
|
|
1357
|
+
this.n5k_1 = count;
|
|
1358
|
+
return this;
|
|
1359
|
+
}
|
|
1360
|
+
buildClaims() {
|
|
1361
|
+
return this.l5k_1.build();
|
|
1362
|
+
}
|
|
1363
|
+
build() {
|
|
1364
|
+
return new SdJwtPayload_0(this.l5k_1.build(), toSet(this.m5k_1), this.n5k_1);
|
|
1365
|
+
}
|
|
1366
|
+
}
|
|
1367
|
+
//endregion
|
|
1368
|
+
var Companion_instance_0;
|
|
1369
|
+
function Companion_getInstance() {
|
|
1370
|
+
if (Companion_instance_0 === VOID)
|
|
1371
|
+
new Companion();
|
|
1372
|
+
return Companion_instance_0;
|
|
1373
|
+
}
|
|
1374
|
+
var Companion_instance_1;
|
|
1375
|
+
function Companion_getInstance_0() {
|
|
1376
|
+
return Companion_instance_1;
|
|
1377
|
+
}
|
|
1378
|
+
var DecoyMode_NONE_instance;
|
|
1379
|
+
var DecoyMode_FIXED_instance;
|
|
1380
|
+
var DecoyMode_MINIMUM_instance;
|
|
1381
|
+
var DecoyMode_RANDOM_instance;
|
|
1382
|
+
function values() {
|
|
1383
|
+
return [DecoyMode_NONE_getInstance(), DecoyMode_FIXED_getInstance(), DecoyMode_MINIMUM_getInstance(), DecoyMode_RANDOM_getInstance()];
|
|
1384
|
+
}
|
|
1385
|
+
function valueOf(value) {
|
|
1386
|
+
switch (value) {
|
|
1387
|
+
case 'NONE':
|
|
1388
|
+
return DecoyMode_NONE_getInstance();
|
|
1389
|
+
case 'FIXED':
|
|
1390
|
+
return DecoyMode_FIXED_getInstance();
|
|
1391
|
+
case 'MINIMUM':
|
|
1392
|
+
return DecoyMode_MINIMUM_getInstance();
|
|
1393
|
+
case 'RANDOM':
|
|
1394
|
+
return DecoyMode_RANDOM_getInstance();
|
|
1395
|
+
default:
|
|
1396
|
+
DecoyMode_initEntries();
|
|
1397
|
+
THROW_IAE('No enum constant com.sphereon.sdjwt.DecoyMode.' + value);
|
|
1398
|
+
break;
|
|
1399
|
+
}
|
|
1400
|
+
}
|
|
1401
|
+
var DecoyMode_entriesInitialized;
|
|
1402
|
+
function DecoyMode_initEntries() {
|
|
1403
|
+
if (DecoyMode_entriesInitialized)
|
|
1404
|
+
return Unit_instance;
|
|
1405
|
+
DecoyMode_entriesInitialized = true;
|
|
1406
|
+
DecoyMode_NONE_instance = new DecoyMode('NONE', 0);
|
|
1407
|
+
DecoyMode_FIXED_instance = new DecoyMode('FIXED', 1);
|
|
1408
|
+
DecoyMode_MINIMUM_instance = new DecoyMode('MINIMUM', 2);
|
|
1409
|
+
DecoyMode_RANDOM_instance = new DecoyMode('RANDOM', 3);
|
|
1410
|
+
}
|
|
1411
|
+
function DecoyConfig$Companion$$childSerializers$_anonymous__ox6nj0() {
|
|
1412
|
+
return createSimpleEnumSerializer('com.sphereon.sdjwt.DecoyMode', values());
|
|
1413
|
+
}
|
|
1414
|
+
var Companion_instance_2;
|
|
1415
|
+
function Companion_getInstance_1() {
|
|
1416
|
+
if (Companion_instance_2 === VOID)
|
|
1417
|
+
new Companion_1();
|
|
1418
|
+
return Companion_instance_2;
|
|
1419
|
+
}
|
|
1420
|
+
var $serializer_instance;
|
|
1421
|
+
function $serializer_getInstance() {
|
|
1422
|
+
if ($serializer_instance === VOID)
|
|
1423
|
+
new $serializer();
|
|
1424
|
+
return $serializer_instance;
|
|
1425
|
+
}
|
|
1426
|
+
var Companion_instance_3;
|
|
1427
|
+
function Companion_getInstance_2() {
|
|
1428
|
+
return Companion_instance_3;
|
|
1429
|
+
}
|
|
1430
|
+
var $serializer_instance_0;
|
|
1431
|
+
function $serializer_getInstance_0() {
|
|
1432
|
+
if ($serializer_instance_0 === VOID)
|
|
1433
|
+
new $serializer_0();
|
|
1434
|
+
return $serializer_instance_0;
|
|
1435
|
+
}
|
|
1436
|
+
function SdMap$Companion$$childSerializers$_anonymous__fdyn6p() {
|
|
1437
|
+
return new LinkedHashMapSerializer(StringSerializer_getInstance(), $serializer_getInstance_0());
|
|
1438
|
+
}
|
|
1439
|
+
var Companion_instance_4;
|
|
1440
|
+
function Companion_getInstance_3() {
|
|
1441
|
+
if (Companion_instance_4 === VOID)
|
|
1442
|
+
new Companion_3();
|
|
1443
|
+
return Companion_instance_4;
|
|
1444
|
+
}
|
|
1445
|
+
var $serializer_instance_1;
|
|
1446
|
+
function $serializer_getInstance_1() {
|
|
1447
|
+
if ($serializer_instance_1 === VOID)
|
|
1448
|
+
new $serializer_1();
|
|
1449
|
+
return $serializer_instance_1;
|
|
1450
|
+
}
|
|
1451
|
+
var Companion_instance_5;
|
|
1452
|
+
function Companion_getInstance_4() {
|
|
1453
|
+
if (Companion_instance_5 === VOID)
|
|
1454
|
+
new Companion_4();
|
|
1455
|
+
return Companion_instance_5;
|
|
1456
|
+
}
|
|
1457
|
+
function DecoyMode_NONE_getInstance() {
|
|
1458
|
+
DecoyMode_initEntries();
|
|
1459
|
+
return DecoyMode_NONE_instance;
|
|
1460
|
+
}
|
|
1461
|
+
function DecoyMode_FIXED_getInstance() {
|
|
1462
|
+
DecoyMode_initEntries();
|
|
1463
|
+
return DecoyMode_FIXED_instance;
|
|
1464
|
+
}
|
|
1465
|
+
function DecoyMode_MINIMUM_getInstance() {
|
|
1466
|
+
DecoyMode_initEntries();
|
|
1467
|
+
return DecoyMode_MINIMUM_instance;
|
|
1468
|
+
}
|
|
1469
|
+
function DecoyMode_RANDOM_getInstance() {
|
|
1470
|
+
DecoyMode_initEntries();
|
|
1471
|
+
return DecoyMode_RANDOM_instance;
|
|
1472
|
+
}
|
|
1473
|
+
//region block: post-declaration
|
|
1474
|
+
initMetadataForClass(CnfBuilder, 'CnfBuilder', CnfBuilder);
|
|
1475
|
+
initMetadataForCompanion(Companion);
|
|
1476
|
+
initMetadataForClass(SdJwt, 'SdJwt');
|
|
1477
|
+
initMetadataForClass(SdJwtPayload, 'SdJwtPayload');
|
|
1478
|
+
initMetadataForCompanion(Companion_0);
|
|
1479
|
+
initMetadataForClass(Disclosure, 'Disclosure');
|
|
1480
|
+
initMetadataForClass(DecoyMode, 'DecoyMode');
|
|
1481
|
+
initMetadataForCompanion(Companion_1);
|
|
1482
|
+
protoOf($serializer).z17 = typeParametersSerializers;
|
|
1483
|
+
initMetadataForObject($serializer, '$serializer', VOID, VOID, [GeneratedSerializer]);
|
|
1484
|
+
initMetadataForClass(DecoyConfig, 'DecoyConfig', DecoyConfig, VOID, VOID, VOID, VOID, {0: $serializer_getInstance});
|
|
1485
|
+
initMetadataForCompanion(Companion_2);
|
|
1486
|
+
protoOf($serializer_0).z17 = typeParametersSerializers;
|
|
1487
|
+
initMetadataForObject($serializer_0, '$serializer', VOID, VOID, [GeneratedSerializer]);
|
|
1488
|
+
initMetadataForClass(SdField, 'SdField', VOID, VOID, VOID, VOID, VOID, {0: $serializer_getInstance_0});
|
|
1489
|
+
initMetadataForCompanion(Companion_3);
|
|
1490
|
+
protoOf($serializer_1).z17 = typeParametersSerializers;
|
|
1491
|
+
initMetadataForObject($serializer_1, '$serializer', VOID, VOID, [GeneratedSerializer]);
|
|
1492
|
+
initMetadataForClass(SdMap, 'SdMap', VOID, VOID, VOID, VOID, VOID, {0: $serializer_getInstance_1});
|
|
1493
|
+
initMetadataForClass(KeyBindingJwt, 'KeyBindingJwt');
|
|
1494
|
+
initMetadataForClass(SdJwtVerificationResult, 'SdJwtVerificationResult');
|
|
1495
|
+
initMetadataForCompanion(Companion_4);
|
|
1496
|
+
initMetadataForClass(SdJwtSpec, 'SdJwtSpec', SdJwtSpec);
|
|
1497
|
+
initMetadataForInterface(SaltProvider, 'SaltProvider');
|
|
1498
|
+
initMetadataForClass(SdJwtPayload_0, 'SdJwtPayload');
|
|
1499
|
+
initMetadataForClass(SdJwtPayloadBuilder, 'SdJwtPayloadBuilder', SdJwtPayloadBuilder);
|
|
1500
|
+
//endregion
|
|
1501
|
+
//region block: init
|
|
1502
|
+
Companion_instance_1 = new Companion_0();
|
|
1503
|
+
Companion_instance_3 = new Companion_2();
|
|
1504
|
+
//endregion
|
|
1505
|
+
//region block: exports
|
|
1506
|
+
defineProp(SdJwt, 'Companion', Companion_getInstance, VOID, true);
|
|
1507
|
+
defineProp(Disclosure, 'Companion', Companion_getInstance_0, VOID, true);
|
|
1508
|
+
DecoyMode.values = values;
|
|
1509
|
+
DecoyMode.valueOf = valueOf;
|
|
1510
|
+
defineProp(DecoyMode, 'NONE', DecoyMode_NONE_getInstance, VOID, true);
|
|
1511
|
+
defineProp(DecoyMode, 'FIXED', DecoyMode_FIXED_getInstance, VOID, true);
|
|
1512
|
+
defineProp(DecoyMode, 'MINIMUM', DecoyMode_MINIMUM_getInstance, VOID, true);
|
|
1513
|
+
defineProp(DecoyMode, 'RANDOM', DecoyMode_RANDOM_getInstance, VOID, true);
|
|
1514
|
+
defineProp(SdJwtSpec, 'Companion', Companion_getInstance_4, VOID, true);
|
|
1515
|
+
export {
|
|
1516
|
+
CnfBuilder as CnfBuilder,
|
|
1517
|
+
SdJwt as SdJwt,
|
|
1518
|
+
SdJwtPayload as SdJwtPayload,
|
|
1519
|
+
Disclosure as Disclosure,
|
|
1520
|
+
DecoyMode as DecoyMode,
|
|
1521
|
+
DecoyConfig as DecoyConfig,
|
|
1522
|
+
SdField as SdField,
|
|
1523
|
+
SdMap as SdMap,
|
|
1524
|
+
KeyBindingJwt as KeyBindingJwt,
|
|
1525
|
+
SdJwtVerificationResult as SdJwtVerificationResult,
|
|
1526
|
+
SdJwtSpec as SdJwtSpec,
|
|
1527
|
+
SdJwtPayloadBuilder as SdJwtPayloadBuilder,
|
|
1528
|
+
};
|
|
1529
|
+
//endregion
|
|
1530
|
+
|
|
1531
|
+
//# sourceMappingURL=idk-lib-sdjwt-public.mjs.map
|