@midnight-ntwrk/credential-compact 0.1.0-rc2

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.
Files changed (61) hide show
  1. package/CHANGELOG.md +10 -0
  2. package/LICENSE +201 -0
  3. package/README.md +59 -0
  4. package/dist/compact-build.json +29 -0
  5. package/dist/contract.d.ts +2 -0
  6. package/dist/contract.d.ts.map +1 -0
  7. package/dist/contract.js +2 -0
  8. package/dist/contract.js.map +1 -0
  9. package/dist/credentials/bindings.compact +5 -0
  10. package/dist/credentials/composable.compact +14 -0
  11. package/dist/credentials/holder-bindings.compact +320 -0
  12. package/dist/credentials/issue.compact +91 -0
  13. package/dist/credentials/present.compact +84 -0
  14. package/dist/credentials/proofs.compact +122 -0
  15. package/dist/credentials/protocol-support.compact +7 -0
  16. package/dist/credentials/protocols.compact +125 -0
  17. package/dist/credentials/relations.compact +36 -0
  18. package/dist/credentials/status-bindings.compact +60 -0
  19. package/dist/credentials/types.compact +141 -0
  20. package/dist/credentials/vc-support.compact +8 -0
  21. package/dist/credentials/vc.compact +59 -0
  22. package/dist/credentials/vp.compact +25 -0
  23. package/dist/credentials.compact +20 -0
  24. package/dist/holder-binding/same-holder/composable.compact +179 -0
  25. package/dist/holder-binding/same-holder.compact +180 -0
  26. package/dist/holder-binding/same-holder.d.ts +2 -0
  27. package/dist/holder-binding/same-holder.d.ts.map +1 -0
  28. package/dist/holder-binding/same-holder.js +2 -0
  29. package/dist/holder-binding/same-holder.js.map +1 -0
  30. package/dist/index.d.ts +3 -0
  31. package/dist/index.d.ts.map +1 -0
  32. package/dist/index.js +3 -0
  33. package/dist/index.js.map +1 -0
  34. package/dist/jubjub.d.ts +3 -0
  35. package/dist/jubjub.d.ts.map +1 -0
  36. package/dist/jubjub.js +6 -0
  37. package/dist/jubjub.js.map +1 -0
  38. package/dist/managed/credentials/contract/index.d.ts +330 -0
  39. package/dist/managed/credentials/contract/index.js +2213 -0
  40. package/dist/managed/credentials/contract/index.js.map +8 -0
  41. package/dist/managed/same-holder/contract/index.d.ts +400 -0
  42. package/dist/managed/same-holder/contract/index.js +2688 -0
  43. package/dist/managed/same-holder/contract/index.js.map +8 -0
  44. package/package.json +113 -0
  45. package/src/credentials/bindings.compact +5 -0
  46. package/src/credentials/composable.compact +14 -0
  47. package/src/credentials/holder-bindings.compact +320 -0
  48. package/src/credentials/issue.compact +91 -0
  49. package/src/credentials/present.compact +84 -0
  50. package/src/credentials/proofs.compact +122 -0
  51. package/src/credentials/protocol-support.compact +7 -0
  52. package/src/credentials/protocols.compact +125 -0
  53. package/src/credentials/relations.compact +36 -0
  54. package/src/credentials/status-bindings.compact +60 -0
  55. package/src/credentials/types.compact +141 -0
  56. package/src/credentials/vc-support.compact +8 -0
  57. package/src/credentials/vc.compact +59 -0
  58. package/src/credentials/vp.compact +25 -0
  59. package/src/credentials.compact +20 -0
  60. package/src/holder-binding/same-holder/composable.compact +179 -0
  61. package/src/holder-binding/same-holder.compact +180 -0
@@ -0,0 +1,2213 @@
1
+ import * as __compactRuntime from '@midnight-ntwrk/compact-runtime';
2
+ __compactRuntime.checkRuntimeVersion('0.15.0');
3
+
4
+ export var HolderBindingProfile;
5
+ (function (HolderBindingProfile) {
6
+ HolderBindingProfile[HolderBindingProfile['explicitDid'] = 0] = 'explicitDid';
7
+ HolderBindingProfile[HolderBindingProfile['secretHolder'] = 1] = 'secretHolder';
8
+ HolderBindingProfile[HolderBindingProfile['blindedSecretHolder'] = 2] = 'blindedSecretHolder';
9
+ })(HolderBindingProfile || (HolderBindingProfile = {}));
10
+
11
+ export var StatusType;
12
+ (function (StatusType) {
13
+ StatusType[StatusType['revocationRegistry'] = 0] = 'revocationRegistry';
14
+ })(StatusType || (StatusType = {}));
15
+
16
+ const _descriptor_0 = new __compactRuntime.CompactTypeEnum(0, 0);
17
+
18
+ const _descriptor_1 = new __compactRuntime.CompactTypeBytes(32);
19
+
20
+ class _ContractAddress_0 {
21
+ alignment() {
22
+ return _descriptor_1.alignment();
23
+ }
24
+ fromValue(value_0) {
25
+ return {
26
+ bytes: _descriptor_1.fromValue(value_0)
27
+ }
28
+ }
29
+ toValue(value_0) {
30
+ return _descriptor_1.toValue(value_0.bytes);
31
+ }
32
+ }
33
+
34
+ const _descriptor_2 = new _ContractAddress_0();
35
+
36
+ class _VerificationMethodRef_0 {
37
+ alignment() {
38
+ return _descriptor_2.alignment().concat(_descriptor_1.alignment());
39
+ }
40
+ fromValue(value_0) {
41
+ return {
42
+ didContractAddress: _descriptor_2.fromValue(value_0),
43
+ methodId: _descriptor_1.fromValue(value_0)
44
+ }
45
+ }
46
+ toValue(value_0) {
47
+ return _descriptor_2.toValue(value_0.didContractAddress).concat(_descriptor_1.toValue(value_0.methodId));
48
+ }
49
+ }
50
+
51
+ const _descriptor_3 = new _VerificationMethodRef_0();
52
+
53
+ class _StatusRegistryRef_0 {
54
+ alignment() {
55
+ return _descriptor_1.alignment().concat(_descriptor_3.alignment());
56
+ }
57
+ fromValue(value_0) {
58
+ return {
59
+ registryId: _descriptor_1.fromValue(value_0),
60
+ authorityVerificationMethodRef: _descriptor_3.fromValue(value_0)
61
+ }
62
+ }
63
+ toValue(value_0) {
64
+ return _descriptor_1.toValue(value_0.registryId).concat(_descriptor_3.toValue(value_0.authorityVerificationMethodRef));
65
+ }
66
+ }
67
+
68
+ const _descriptor_4 = new _StatusRegistryRef_0();
69
+
70
+ class _RegistryBoundStatusBinding_0 {
71
+ alignment() {
72
+ return _descriptor_0.alignment().concat(_descriptor_4.alignment().concat(_descriptor_1.alignment()));
73
+ }
74
+ fromValue(value_0) {
75
+ return {
76
+ statusType: _descriptor_0.fromValue(value_0),
77
+ registryRef: _descriptor_4.fromValue(value_0),
78
+ statusHandleCommitment: _descriptor_1.fromValue(value_0)
79
+ }
80
+ }
81
+ toValue(value_0) {
82
+ return _descriptor_0.toValue(value_0.statusType).concat(_descriptor_4.toValue(value_0.registryRef).concat(_descriptor_1.toValue(value_0.statusHandleCommitment)));
83
+ }
84
+ }
85
+
86
+ const _descriptor_5 = new _RegistryBoundStatusBinding_0();
87
+
88
+ class _NoStatusBinding_0 {
89
+ alignment() {
90
+ return [];
91
+ }
92
+ fromValue(value_0) {
93
+ return {
94
+ }
95
+ }
96
+ toValue(value_0) {
97
+ return [];
98
+ }
99
+ }
100
+
101
+ const _descriptor_6 = new _NoStatusBinding_0();
102
+
103
+ const _descriptor_7 = new __compactRuntime.CompactTypeUnsignedInteger(65535n, 2);
104
+
105
+ const _descriptor_8 = __compactRuntime.CompactTypeBoolean;
106
+
107
+ const _descriptor_9 = new __compactRuntime.CompactTypeUnsignedInteger(18446744073709551615n, 8);
108
+
109
+ class _ProtocolMessageEnvelope_0 {
110
+ alignment() {
111
+ return _descriptor_7.alignment().concat(_descriptor_1.alignment().concat(_descriptor_1.alignment().concat(_descriptor_8.alignment().concat(_descriptor_1.alignment().concat(_descriptor_9.alignment().concat(_descriptor_8.alignment().concat(_descriptor_9.alignment())))))));
112
+ }
113
+ fromValue(value_0) {
114
+ return {
115
+ version: _descriptor_7.fromValue(value_0),
116
+ messageId: _descriptor_1.fromValue(value_0),
117
+ threadId: _descriptor_1.fromValue(value_0),
118
+ initialMessage: _descriptor_8.fromValue(value_0),
119
+ respondsToMessageId: _descriptor_1.fromValue(value_0),
120
+ createdAt: _descriptor_9.fromValue(value_0),
121
+ hasExpiresAt: _descriptor_8.fromValue(value_0),
122
+ expiresAt: _descriptor_9.fromValue(value_0)
123
+ }
124
+ }
125
+ toValue(value_0) {
126
+ return _descriptor_7.toValue(value_0.version).concat(_descriptor_1.toValue(value_0.messageId).concat(_descriptor_1.toValue(value_0.threadId).concat(_descriptor_8.toValue(value_0.initialMessage).concat(_descriptor_1.toValue(value_0.respondsToMessageId).concat(_descriptor_9.toValue(value_0.createdAt).concat(_descriptor_8.toValue(value_0.hasExpiresAt).concat(_descriptor_9.toValue(value_0.expiresAt))))))));
127
+ }
128
+ }
129
+
130
+ const _descriptor_10 = new _ProtocolMessageEnvelope_0();
131
+
132
+ class _SchemaRef_0 {
133
+ alignment() {
134
+ return _descriptor_1.alignment().concat(_descriptor_1.alignment().concat(_descriptor_7.alignment().concat(_descriptor_7.alignment())));
135
+ }
136
+ fromValue(value_0) {
137
+ return {
138
+ packageId: _descriptor_1.fromValue(value_0),
139
+ schemaId: _descriptor_1.fromValue(value_0),
140
+ majorVersion: _descriptor_7.fromValue(value_0),
141
+ minorVersion: _descriptor_7.fromValue(value_0)
142
+ }
143
+ }
144
+ toValue(value_0) {
145
+ return _descriptor_1.toValue(value_0.packageId).concat(_descriptor_1.toValue(value_0.schemaId).concat(_descriptor_7.toValue(value_0.majorVersion).concat(_descriptor_7.toValue(value_0.minorVersion))));
146
+ }
147
+ }
148
+
149
+ const _descriptor_11 = new _SchemaRef_0();
150
+
151
+ class _CredentialProtocolFeatures_0 {
152
+ alignment() {
153
+ return _descriptor_8.alignment().concat(_descriptor_8.alignment().concat(_descriptor_8.alignment().concat(_descriptor_8.alignment())));
154
+ }
155
+ fromValue(value_0) {
156
+ return {
157
+ supportsSelectiveDisclosure: _descriptor_8.fromValue(value_0),
158
+ supportsPredicateProofs: _descriptor_8.fromValue(value_0),
159
+ supportsVerifierScopedPseudonym: _descriptor_8.fromValue(value_0),
160
+ supportsSameHolderProof: _descriptor_8.fromValue(value_0)
161
+ }
162
+ }
163
+ toValue(value_0) {
164
+ return _descriptor_8.toValue(value_0.supportsSelectiveDisclosure).concat(_descriptor_8.toValue(value_0.supportsPredicateProofs).concat(_descriptor_8.toValue(value_0.supportsVerifierScopedPseudonym).concat(_descriptor_8.toValue(value_0.supportsSameHolderProof))));
165
+ }
166
+ }
167
+
168
+ const _descriptor_12 = new _CredentialProtocolFeatures_0();
169
+
170
+ class _SchemaCapabilities_0 {
171
+ alignment() {
172
+ return _descriptor_8.alignment().concat(_descriptor_8.alignment().concat(_descriptor_8.alignment().concat(_descriptor_8.alignment())));
173
+ }
174
+ fromValue(value_0) {
175
+ return {
176
+ supportsSelectiveDisclosure: _descriptor_8.fromValue(value_0),
177
+ supportsPredicateProofs: _descriptor_8.fromValue(value_0),
178
+ supportsVerifierScopedPseudonym: _descriptor_8.fromValue(value_0),
179
+ supportsSameHolderProof: _descriptor_8.fromValue(value_0)
180
+ }
181
+ }
182
+ toValue(value_0) {
183
+ return _descriptor_8.toValue(value_0.supportsSelectiveDisclosure).concat(_descriptor_8.toValue(value_0.supportsPredicateProofs).concat(_descriptor_8.toValue(value_0.supportsVerifierScopedPseudonym).concat(_descriptor_8.toValue(value_0.supportsSameHolderProof))));
184
+ }
185
+ }
186
+
187
+ const _descriptor_13 = new _SchemaCapabilities_0();
188
+
189
+ class _BlindedSecretHolderBinding_0 {
190
+ alignment() {
191
+ return _descriptor_1.alignment().concat(_descriptor_1.alignment().concat(_descriptor_1.alignment()));
192
+ }
193
+ fromValue(value_0) {
194
+ return {
195
+ blindedHolderSecretCommitment: _descriptor_1.fromValue(value_0),
196
+ issuerNonce: _descriptor_1.fromValue(value_0),
197
+ requestChallengeResponse: _descriptor_1.fromValue(value_0)
198
+ }
199
+ }
200
+ toValue(value_0) {
201
+ return _descriptor_1.toValue(value_0.blindedHolderSecretCommitment).concat(_descriptor_1.toValue(value_0.issuerNonce).concat(_descriptor_1.toValue(value_0.requestChallengeResponse)));
202
+ }
203
+ }
204
+
205
+ const _descriptor_14 = new _BlindedSecretHolderBinding_0();
206
+
207
+ class _SecretHolderBinding_0 {
208
+ alignment() {
209
+ return _descriptor_1.alignment().concat(_descriptor_1.alignment());
210
+ }
211
+ fromValue(value_0) {
212
+ return {
213
+ holderSecretCommitment: _descriptor_1.fromValue(value_0),
214
+ requestChallengeResponse: _descriptor_1.fromValue(value_0)
215
+ }
216
+ }
217
+ toValue(value_0) {
218
+ return _descriptor_1.toValue(value_0.holderSecretCommitment).concat(_descriptor_1.toValue(value_0.requestChallengeResponse));
219
+ }
220
+ }
221
+
222
+ const _descriptor_15 = new _SecretHolderBinding_0();
223
+
224
+ const _descriptor_16 = __compactRuntime.CompactTypeJubjubPoint;
225
+
226
+ class _OffchainMidnightHolderBinding_0 {
227
+ alignment() {
228
+ return _descriptor_1.alignment().concat(_descriptor_1.alignment().concat(_descriptor_16.alignment()));
229
+ }
230
+ fromValue(value_0) {
231
+ return {
232
+ holderDidStateHash: _descriptor_1.fromValue(value_0),
233
+ holderMethodId: _descriptor_1.fromValue(value_0),
234
+ holderPublicKey: _descriptor_16.fromValue(value_0)
235
+ }
236
+ }
237
+ toValue(value_0) {
238
+ return _descriptor_1.toValue(value_0.holderDidStateHash).concat(_descriptor_1.toValue(value_0.holderMethodId).concat(_descriptor_16.toValue(value_0.holderPublicKey)));
239
+ }
240
+ }
241
+
242
+ const _descriptor_17 = new _OffchainMidnightHolderBinding_0();
243
+
244
+ const _descriptor_18 = __compactRuntime.CompactTypeField;
245
+
246
+ class _Signature_0 {
247
+ alignment() {
248
+ return _descriptor_16.alignment().concat(_descriptor_18.alignment());
249
+ }
250
+ fromValue(value_0) {
251
+ return {
252
+ r: _descriptor_16.fromValue(value_0),
253
+ s: _descriptor_18.fromValue(value_0)
254
+ }
255
+ }
256
+ toValue(value_0) {
257
+ return _descriptor_16.toValue(value_0.r).concat(_descriptor_18.toValue(value_0.s));
258
+ }
259
+ }
260
+
261
+ const _descriptor_19 = new _Signature_0();
262
+
263
+ class _Proof_0 {
264
+ alignment() {
265
+ return _descriptor_3.alignment().concat(_descriptor_9.alignment().concat(_descriptor_1.alignment().concat(_descriptor_16.alignment().concat(_descriptor_19.alignment()))));
266
+ }
267
+ fromValue(value_0) {
268
+ return {
269
+ signerVerificationMethodRef: _descriptor_3.fromValue(value_0),
270
+ createdAt: _descriptor_9.fromValue(value_0),
271
+ challengeHash: _descriptor_1.fromValue(value_0),
272
+ publicKey: _descriptor_16.fromValue(value_0),
273
+ signature: _descriptor_19.fromValue(value_0)
274
+ }
275
+ }
276
+ toValue(value_0) {
277
+ return _descriptor_3.toValue(value_0.signerVerificationMethodRef).concat(_descriptor_9.toValue(value_0.createdAt).concat(_descriptor_1.toValue(value_0.challengeHash).concat(_descriptor_16.toValue(value_0.publicKey).concat(_descriptor_19.toValue(value_0.signature)))));
278
+ }
279
+ }
280
+
281
+ const _descriptor_20 = new _Proof_0();
282
+
283
+ class _JubjubHolderBinding_0 {
284
+ alignment() {
285
+ return _descriptor_16.alignment();
286
+ }
287
+ fromValue(value_0) {
288
+ return {
289
+ holderPublicKey: _descriptor_16.fromValue(value_0)
290
+ }
291
+ }
292
+ toValue(value_0) {
293
+ return _descriptor_16.toValue(value_0.holderPublicKey);
294
+ }
295
+ }
296
+
297
+ const _descriptor_21 = new _JubjubHolderBinding_0();
298
+
299
+ class _ExplicitHolderBinding_0 {
300
+ alignment() {
301
+ return _descriptor_3.alignment();
302
+ }
303
+ fromValue(value_0) {
304
+ return {
305
+ holderVerificationMethodRef: _descriptor_3.fromValue(value_0)
306
+ }
307
+ }
308
+ toValue(value_0) {
309
+ return _descriptor_3.toValue(value_0.holderVerificationMethodRef);
310
+ }
311
+ }
312
+
313
+ const _descriptor_22 = new _ExplicitHolderBinding_0();
314
+
315
+ class _SchemaFamilyResolutionHint_0 {
316
+ alignment() {
317
+ return _descriptor_8.alignment().concat(_descriptor_1.alignment());
318
+ }
319
+ fromValue(value_0) {
320
+ return {
321
+ hasResolverHint: _descriptor_8.fromValue(value_0),
322
+ resolverHint: _descriptor_1.fromValue(value_0)
323
+ }
324
+ }
325
+ toValue(value_0) {
326
+ return _descriptor_8.toValue(value_0.hasResolverHint).concat(_descriptor_1.toValue(value_0.resolverHint));
327
+ }
328
+ }
329
+
330
+ const _descriptor_23 = new _SchemaFamilyResolutionHint_0();
331
+
332
+ class _SchemaDescriptor_0 {
333
+ alignment() {
334
+ return _descriptor_11.alignment().concat(_descriptor_13.alignment().concat(_descriptor_23.alignment()));
335
+ }
336
+ fromValue(value_0) {
337
+ return {
338
+ schema: _descriptor_11.fromValue(value_0),
339
+ capabilities: _descriptor_13.fromValue(value_0),
340
+ familyResolutionHint: _descriptor_23.fromValue(value_0)
341
+ }
342
+ }
343
+ toValue(value_0) {
344
+ return _descriptor_11.toValue(value_0.schema).concat(_descriptor_13.toValue(value_0.capabilities).concat(_descriptor_23.toValue(value_0.familyResolutionHint)));
345
+ }
346
+ }
347
+
348
+ const _descriptor_24 = new _SchemaDescriptor_0();
349
+
350
+ const _descriptor_25 = new __compactRuntime.CompactTypeVector(4, _descriptor_1);
351
+
352
+ const _descriptor_26 = new __compactRuntime.CompactTypeVector(3, _descriptor_1);
353
+
354
+ const _descriptor_27 = new __compactRuntime.CompactTypeVector(5, _descriptor_1);
355
+
356
+ class _Either_0 {
357
+ alignment() {
358
+ return _descriptor_8.alignment().concat(_descriptor_1.alignment().concat(_descriptor_1.alignment()));
359
+ }
360
+ fromValue(value_0) {
361
+ return {
362
+ is_left: _descriptor_8.fromValue(value_0),
363
+ left: _descriptor_1.fromValue(value_0),
364
+ right: _descriptor_1.fromValue(value_0)
365
+ }
366
+ }
367
+ toValue(value_0) {
368
+ return _descriptor_8.toValue(value_0.is_left).concat(_descriptor_1.toValue(value_0.left).concat(_descriptor_1.toValue(value_0.right)));
369
+ }
370
+ }
371
+
372
+ const _descriptor_28 = new _Either_0();
373
+
374
+ const _descriptor_29 = new __compactRuntime.CompactTypeUnsignedInteger(340282366920938463463374607431768211455n, 16);
375
+
376
+ const _descriptor_30 = new __compactRuntime.CompactTypeUnsignedInteger(255n, 1);
377
+
378
+ export class Contract {
379
+ witnesses;
380
+ constructor(...args_0) {
381
+ if (args_0.length !== 1) {
382
+ throw new __compactRuntime.CompactError(`Contract constructor: expected 1 argument, received ${args_0.length}`);
383
+ }
384
+ const witnesses_0 = args_0[0];
385
+ if (typeof(witnesses_0) !== 'object') {
386
+ throw new __compactRuntime.CompactError('first (witnesses) argument to Contract constructor is not an object');
387
+ }
388
+ this.witnesses = witnesses_0;
389
+ this.circuits = {
390
+ noSchemaFamilyResolverHint(context, ...args_1) {
391
+ return { result: pureCircuits.noSchemaFamilyResolverHint(...args_1), context };
392
+ },
393
+ assertValidSchemaRef(context, ...args_1) {
394
+ return { result: pureCircuits.assertValidSchemaRef(...args_1), context };
395
+ },
396
+ assertValidSchemaCapabilities(context, ...args_1) {
397
+ return { result: pureCircuits.assertValidSchemaCapabilities(...args_1), context };
398
+ },
399
+ assertValidSchemaFamilyResolutionHint(context, ...args_1) {
400
+ return { result: pureCircuits.assertValidSchemaFamilyResolutionHint(...args_1), context };
401
+ },
402
+ assertValidSchemaDescriptor(context, ...args_1) {
403
+ return { result: pureCircuits.assertValidSchemaDescriptor(...args_1), context };
404
+ },
405
+ assertMatchingSchemaCapabilities(context, ...args_1) {
406
+ return { result: pureCircuits.assertMatchingSchemaCapabilities(...args_1), context };
407
+ },
408
+ verifySignature(context, ...args_1) {
409
+ return { result: pureCircuits.verifySignature(...args_1), context };
410
+ },
411
+ issuanceContextTag(context, ...args_1) {
412
+ return { result: pureCircuits.issuanceContextTag(...args_1), context };
413
+ },
414
+ presentationContextTag(context, ...args_1) {
415
+ return { result: pureCircuits.presentationContextTag(...args_1), context };
416
+ },
417
+ issuanceProofPayloadRoot(context, ...args_1) {
418
+ return { result: pureCircuits.issuanceProofPayloadRoot(...args_1), context };
419
+ },
420
+ presentationProofPayloadRoot(context, ...args_1) {
421
+ return { result: pureCircuits.presentationProofPayloadRoot(...args_1), context };
422
+ },
423
+ issuanceProofChallenge(context, ...args_1) {
424
+ return { result: pureCircuits.issuanceProofChallenge(...args_1), context };
425
+ },
426
+ presentationProofChallenge(context, ...args_1) {
427
+ return { result: pureCircuits.presentationProofChallenge(...args_1), context };
428
+ },
429
+ assertValidIssuanceContextProof(context, ...args_1) {
430
+ return { result: pureCircuits.assertValidIssuanceContextProof(...args_1), context };
431
+ },
432
+ assertValidPresentationContextProof(context, ...args_1) {
433
+ return { result: pureCircuits.assertValidPresentationContextProof(...args_1), context };
434
+ },
435
+ assertValidExplicitHolderBinding(context, ...args_1) {
436
+ return { result: pureCircuits.assertValidExplicitHolderBinding(...args_1), context };
437
+ },
438
+ assertMatchingExplicitHolderBindings(context, ...args_1) {
439
+ return { result: pureCircuits.assertMatchingExplicitHolderBindings(...args_1), context };
440
+ },
441
+ assertProofMatchesExplicitHolderBinding(context, ...args_1) {
442
+ return { result: pureCircuits.assertProofMatchesExplicitHolderBinding(...args_1), context };
443
+ },
444
+ assertValidJubjubHolderBinding(context, ...args_1) {
445
+ return { result: pureCircuits.assertValidJubjubHolderBinding(...args_1), context };
446
+ },
447
+ assertMatchingJubjubHolderBindings(context, ...args_1) {
448
+ return { result: pureCircuits.assertMatchingJubjubHolderBindings(...args_1), context };
449
+ },
450
+ assertProofMatchesJubjubHolderBinding(context, ...args_1) {
451
+ return { result: pureCircuits.assertProofMatchesJubjubHolderBinding(...args_1), context };
452
+ },
453
+ assertValidOffchainMidnightHolderBinding(context, ...args_1) {
454
+ return { result: pureCircuits.assertValidOffchainMidnightHolderBinding(...args_1), context };
455
+ },
456
+ assertMatchingOffchainMidnightHolderBindings(context, ...args_1) {
457
+ return { result: pureCircuits.assertMatchingOffchainMidnightHolderBindings(...args_1), context };
458
+ },
459
+ assertProofMatchesOffchainMidnightHolderBinding(context, ...args_1) {
460
+ return { result: pureCircuits.assertProofMatchesOffchainMidnightHolderBinding(...args_1), context };
461
+ },
462
+ noSecretHolderChallengeResponse(context, ...args_1) {
463
+ return { result: pureCircuits.noSecretHolderChallengeResponse(...args_1), context };
464
+ },
465
+ secretHolderBindingCommitment(context, ...args_1) {
466
+ return { result: pureCircuits.secretHolderBindingCommitment(...args_1), context };
467
+ },
468
+ secretHolderBindingChallengeResponse(context, ...args_1) {
469
+ return { result: pureCircuits.secretHolderBindingChallengeResponse(...args_1), context };
470
+ },
471
+ verifierScopedPseudonym(context, ...args_1) {
472
+ return { result: pureCircuits.verifierScopedPseudonym(...args_1), context };
473
+ },
474
+ assertVerifierScopedPseudonym(context, ...args_1) {
475
+ return { result: pureCircuits.assertVerifierScopedPseudonym(...args_1), context };
476
+ },
477
+ blindedSecretHolderCommitment(context, ...args_1) {
478
+ return { result: pureCircuits.blindedSecretHolderCommitment(...args_1), context };
479
+ },
480
+ assertValidSecretHolderCredentialBinding(context, ...args_1) {
481
+ return { result: pureCircuits.assertValidSecretHolderCredentialBinding(...args_1), context };
482
+ },
483
+ assertValidSecretHolderPresentationBinding(context, ...args_1) {
484
+ return { result: pureCircuits.assertValidSecretHolderPresentationBinding(...args_1), context };
485
+ },
486
+ assertMatchingSecretHolderBindings(context, ...args_1) {
487
+ return { result: pureCircuits.assertMatchingSecretHolderBindings(...args_1), context };
488
+ },
489
+ assertValidBlindedSecretHolderCredentialBinding(context, ...args_1) {
490
+ return { result: pureCircuits.assertValidBlindedSecretHolderCredentialBinding(...args_1), context };
491
+ },
492
+ assertValidBlindedSecretHolderPresentationBinding(context, ...args_1) {
493
+ return { result: pureCircuits.assertValidBlindedSecretHolderPresentationBinding(...args_1), context };
494
+ },
495
+ assertMatchingBlindedSecretHolderBindings(context, ...args_1) {
496
+ return { result: pureCircuits.assertMatchingBlindedSecretHolderBindings(...args_1), context };
497
+ },
498
+ assertSecretHolderBindingWitness(context, ...args_1) {
499
+ return { result: pureCircuits.assertSecretHolderBindingWitness(...args_1), context };
500
+ },
501
+ assertBlindedSecretHolderBindingWitness(context, ...args_1) {
502
+ return { result: pureCircuits.assertBlindedSecretHolderBindingWitness(...args_1), context };
503
+ },
504
+ protocolFeaturesAsSchemaCapabilities(context, ...args_1) {
505
+ return { result: pureCircuits.protocolFeaturesAsSchemaCapabilities(...args_1), context };
506
+ },
507
+ assertProtocolFeaturesMatchSchemaCapabilities(context, ...args_1) {
508
+ return { result: pureCircuits.assertProtocolFeaturesMatchSchemaCapabilities(...args_1), context };
509
+ },
510
+ noProtocolResponseReference(context, ...args_1) {
511
+ return { result: pureCircuits.noProtocolResponseReference(...args_1), context };
512
+ },
513
+ assertValidVerificationMethodRef(context, ...args_1) {
514
+ return { result: pureCircuits.assertValidVerificationMethodRef(...args_1), context };
515
+ },
516
+ assertMatchingSchemaRefs(context, ...args_1) {
517
+ return { result: pureCircuits.assertMatchingSchemaRefs(...args_1), context };
518
+ },
519
+ assertValidProtocolMessageEnvelope(context, ...args_1) {
520
+ return { result: pureCircuits.assertValidProtocolMessageEnvelope(...args_1), context };
521
+ },
522
+ assertProtocolResponseEnvelope(context, ...args_1) {
523
+ return { result: pureCircuits.assertProtocolResponseEnvelope(...args_1), context };
524
+ },
525
+ assertValidStatusRegistryRef(context, ...args_1) {
526
+ return { result: pureCircuits.assertValidStatusRegistryRef(...args_1), context };
527
+ },
528
+ assertValidNoStatusBinding(context, ...args_1) {
529
+ return { result: pureCircuits.assertValidNoStatusBinding(...args_1), context };
530
+ },
531
+ assertValidRegistryBoundStatusBinding(context, ...args_1) {
532
+ return { result: pureCircuits.assertValidRegistryBoundStatusBinding(...args_1), context };
533
+ },
534
+ registryBoundStatusBindingRoot(context, ...args_1) {
535
+ return { result: pureCircuits.registryBoundStatusBindingRoot(...args_1), context };
536
+ }
537
+ };
538
+ this.impureCircuits = {};
539
+ this.provableCircuits = {};
540
+ }
541
+ initialState(...args_0) {
542
+ if (args_0.length !== 1) {
543
+ throw new __compactRuntime.CompactError(`Contract state constructor: expected 1 argument (as invoked from Typescript), received ${args_0.length}`);
544
+ }
545
+ const constructorContext_0 = args_0[0];
546
+ if (typeof(constructorContext_0) !== 'object') {
547
+ throw new __compactRuntime.CompactError(`Contract state constructor: expected 'constructorContext' in argument 1 (as invoked from Typescript) to be an object`);
548
+ }
549
+ if (!('initialZswapLocalState' in constructorContext_0)) {
550
+ throw new __compactRuntime.CompactError(`Contract state constructor: expected 'initialZswapLocalState' in argument 1 (as invoked from Typescript)`);
551
+ }
552
+ if (typeof(constructorContext_0.initialZswapLocalState) !== 'object') {
553
+ throw new __compactRuntime.CompactError(`Contract state constructor: expected 'initialZswapLocalState' in argument 1 (as invoked from Typescript) to be an object`);
554
+ }
555
+ const state_0 = new __compactRuntime.ContractState();
556
+ let stateValue_0 = __compactRuntime.StateValue.newArray();
557
+ state_0.data = new __compactRuntime.ChargedState(stateValue_0);
558
+ const context = __compactRuntime.createCircuitContext(__compactRuntime.dummyContractAddress(), constructorContext_0.initialZswapLocalState.coinPublicKey, state_0.data, constructorContext_0.initialPrivateState);
559
+ const partialProofData = {
560
+ input: { value: [], alignment: [] },
561
+ output: undefined,
562
+ publicTranscript: [],
563
+ privateTranscriptOutputs: []
564
+ };
565
+ state_0.data = new __compactRuntime.ChargedState(context.currentQueryContext.state.state);
566
+ return {
567
+ currentContractState: state_0,
568
+ currentPrivateState: context.currentPrivateState,
569
+ currentZswapLocalState: context.currentZswapLocalState
570
+ }
571
+ }
572
+ _transientHash_0(value_0) {
573
+ const result_0 = __compactRuntime.transientHash(_descriptor_16, value_0);
574
+ return result_0;
575
+ }
576
+ _transientHash_1(value_0) {
577
+ const result_0 = __compactRuntime.transientHash(_descriptor_9, value_0);
578
+ return result_0;
579
+ }
580
+ _persistentHash_0(value_0) {
581
+ const result_0 = __compactRuntime.persistentHash(_descriptor_27, value_0);
582
+ return result_0;
583
+ }
584
+ _persistentHash_1(value_0) {
585
+ const result_0 = __compactRuntime.persistentHash(_descriptor_3, value_0);
586
+ return result_0;
587
+ }
588
+ _persistentHash_2(value_0) {
589
+ const result_0 = __compactRuntime.persistentHash(_descriptor_26, value_0);
590
+ return result_0;
591
+ }
592
+ _persistentHash_3(value_0) {
593
+ const result_0 = __compactRuntime.persistentHash(_descriptor_25, value_0);
594
+ return result_0;
595
+ }
596
+ _persistentHash_4(value_0) {
597
+ const result_0 = __compactRuntime.persistentHash(_descriptor_5, value_0);
598
+ return result_0;
599
+ }
600
+ _persistentCommit_0(value_0, rand_0) {
601
+ const result_0 = __compactRuntime.persistentCommit(_descriptor_1,
602
+ value_0,
603
+ rand_0);
604
+ return result_0;
605
+ }
606
+ _degradeToTransient_0(x_0) {
607
+ const result_0 = __compactRuntime.degradeToTransient(x_0);
608
+ return result_0;
609
+ }
610
+ _upgradeFromTransient_0(x_0) {
611
+ const result_0 = __compactRuntime.upgradeFromTransient(x_0);
612
+ return result_0;
613
+ }
614
+ _jubjubPointX_0(np_0) {
615
+ const result_0 = __compactRuntime.jubjubPointX(np_0);
616
+ return result_0;
617
+ }
618
+ _jubjubPointY_0(np_0) {
619
+ const result_0 = __compactRuntime.jubjubPointY(np_0);
620
+ return result_0;
621
+ }
622
+ _ecAdd_0(a_0, b_0) {
623
+ const result_0 = __compactRuntime.ecAdd(a_0, b_0);
624
+ return result_0;
625
+ }
626
+ _ecMul_0(a_0, b_0) {
627
+ const result_0 = __compactRuntime.ecMul(a_0, b_0);
628
+ return result_0;
629
+ }
630
+ _ecMulGenerator_0(b_0) {
631
+ const result_0 = __compactRuntime.ecMulGenerator(b_0);
632
+ return result_0;
633
+ }
634
+ _noSchemaFamilyResolverHint_0() {
635
+ return new Uint8Array([109, 105, 100, 110, 105, 103, 104, 116, 58, 118, 99, 58, 115, 99, 104, 101, 109, 97, 58, 110, 111, 45, 104, 105, 110, 116, 0, 0, 0, 0, 0, 0]);
636
+ }
637
+ _assertValidSchemaRef_0(schema_0) {
638
+ __compactRuntime.assert(!this._equal_0(schema_0.packageId,
639
+ new Uint8Array([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0])),
640
+ 'Schema package id must be set');
641
+ __compactRuntime.assert(!this._equal_1(schema_0.schemaId,
642
+ new Uint8Array([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0])),
643
+ 'Schema id must be set');
644
+ let t_0;
645
+ __compactRuntime.assert((t_0 = schema_0.majorVersion, t_0 > 0n),
646
+ 'Schema major version must be positive');
647
+ return [];
648
+ }
649
+ _assertValidSchemaCapabilities_0(capabilities_0) { return []; }
650
+ _assertValidSchemaFamilyResolutionHint_0(hint_0) {
651
+ const noHint_0 = this._noSchemaFamilyResolverHint_0();
652
+ if (hint_0.hasResolverHint) {
653
+ __compactRuntime.assert(!this._equal_2(hint_0.resolverHint, noHint_0),
654
+ 'Schema resolver hint must be set');
655
+ __compactRuntime.assert(!this._equal_3(hint_0.resolverHint,
656
+ new Uint8Array([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0])),
657
+ 'Schema resolver hint must not be empty');
658
+ } else {
659
+ __compactRuntime.assert(this._equal_4(hint_0.resolverHint, noHint_0),
660
+ 'Absent schema resolver hint must use the no-hint sentinel');
661
+ }
662
+ return [];
663
+ }
664
+ _assertValidSchemaDescriptor_0(descriptor_0) {
665
+ this._assertValidSchemaRef_0(descriptor_0.schema);
666
+ this._assertValidSchemaCapabilities_0(descriptor_0.capabilities);
667
+ this._assertValidSchemaFamilyResolutionHint_0(descriptor_0.familyResolutionHint);
668
+ return [];
669
+ }
670
+ _assertMatchingSchemaCapabilities_0(expected_0, actual_0) {
671
+ __compactRuntime.assert(expected_0.supportsSelectiveDisclosure
672
+ ===
673
+ actual_0.supportsSelectiveDisclosure
674
+ &&
675
+ expected_0.supportsPredicateProofs
676
+ ===
677
+ actual_0.supportsPredicateProofs
678
+ &&
679
+ expected_0.supportsVerifierScopedPseudonym
680
+ ===
681
+ actual_0.supportsVerifierScopedPseudonym
682
+ &&
683
+ expected_0.supportsSameHolderProof
684
+ ===
685
+ actual_0.supportsSameHolderProof,
686
+ 'Schema capabilities mismatch');
687
+ return [];
688
+ }
689
+ _verifySignature_0(pk_0, signature_0, challenge_0) {
690
+ const leftSide_0 = this._ecMulGenerator_0(signature_0.s);
691
+ const cPk_0 = this._ecMul_0(pk_0, challenge_0);
692
+ const rightSide_0 = this._ecAdd_0(signature_0.r, cPk_0);
693
+ const xMatches_0 = this._jubjubPointX_0(leftSide_0)
694
+ ===
695
+ this._jubjubPointX_0(rightSide_0);
696
+ const yMatches_0 = this._jubjubPointY_0(leftSide_0)
697
+ ===
698
+ this._jubjubPointY_0(rightSide_0);
699
+ __compactRuntime.assert(xMatches_0 && yMatches_0,
700
+ 'Signature verification failed');
701
+ return xMatches_0 && yMatches_0;
702
+ }
703
+ _issuanceContextTag_0() {
704
+ return new Uint8Array([109, 105, 100, 110, 105, 103, 104, 116, 58, 118, 99, 58, 105, 115, 115, 117, 97, 110, 99, 101, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]);
705
+ }
706
+ _presentationContextTag_0() {
707
+ return new Uint8Array([109, 105, 100, 110, 105, 103, 104, 116, 58, 118, 99, 58, 112, 114, 101, 115, 101, 110, 116, 97, 116, 105, 111, 110, 0, 0, 0, 0, 0, 0, 0, 0]);
708
+ }
709
+ _proofPayloadRootForContext_0(bodyRoot_0, contextTag_0, proof_0) {
710
+ return this._persistentHash_0([bodyRoot_0,
711
+ contextTag_0,
712
+ this._persistentHash_1(proof_0.signerVerificationMethodRef),
713
+ this._upgradeFromTransient_0(this._transientHash_1(proof_0.createdAt)),
714
+ proof_0.challengeHash]);
715
+ }
716
+ _proofChallengeForContext_0(bodyRoot_0, contextTag_0, proof_0) {
717
+ return this._degradeToTransient_0(this._persistentHash_2([this._proofPayloadRootForContext_0(bodyRoot_0,
718
+ contextTag_0,
719
+ proof_0),
720
+ this._upgradeFromTransient_0(this._transientHash_0(proof_0.publicKey)),
721
+ this._upgradeFromTransient_0(this._transientHash_0(proof_0.signature.r))]));
722
+ }
723
+ _assertValidProofForContext_0(bodyRoot_0, contextTag_0, proof_0) {
724
+ __compactRuntime.assert(this._verifySignature_0(proof_0.publicKey,
725
+ proof_0.signature,
726
+ this._proofChallengeForContext_0(bodyRoot_0,
727
+ contextTag_0,
728
+ proof_0)),
729
+ 'Proof verification failed');
730
+ return [];
731
+ }
732
+ _issuanceProofPayloadRoot_0(bodyRoot_0, proof_0) {
733
+ return this._proofPayloadRootForContext_0(bodyRoot_0,
734
+ this._issuanceContextTag_0(),
735
+ proof_0);
736
+ }
737
+ _presentationProofPayloadRoot_0(bodyRoot_0, proof_0) {
738
+ return this._proofPayloadRootForContext_0(bodyRoot_0,
739
+ this._presentationContextTag_0(),
740
+ proof_0);
741
+ }
742
+ _issuanceProofChallenge_0(bodyRoot_0, proof_0) {
743
+ return this._proofChallengeForContext_0(bodyRoot_0,
744
+ this._issuanceContextTag_0(),
745
+ proof_0);
746
+ }
747
+ _presentationProofChallenge_0(bodyRoot_0, proof_0) {
748
+ return this._proofChallengeForContext_0(bodyRoot_0,
749
+ this._presentationContextTag_0(),
750
+ proof_0);
751
+ }
752
+ _assertValidIssuanceContextProof_0(bodyRoot_0, proof_0) {
753
+ this._assertValidProofForContext_0(bodyRoot_0,
754
+ this._issuanceContextTag_0(),
755
+ proof_0);
756
+ return [];
757
+ }
758
+ _assertValidPresentationContextProof_0(bodyRoot_0, proof_0) {
759
+ this._assertValidProofForContext_0(bodyRoot_0,
760
+ this._presentationContextTag_0(),
761
+ proof_0);
762
+ return [];
763
+ }
764
+ _assertValidExplicitHolderBinding_0(binding_0) {
765
+ __compactRuntime.assert(!this._equal_5(binding_0.holderVerificationMethodRef.didContractAddress.bytes,
766
+ new Uint8Array([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0])),
767
+ 'Explicit holder binding DID contract address must be set');
768
+ __compactRuntime.assert(!this._equal_6(binding_0.holderVerificationMethodRef.methodId,
769
+ new Uint8Array([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0])),
770
+ 'Explicit holder binding method reference must be set');
771
+ return [];
772
+ }
773
+ _assertMatchingExplicitHolderBindings_0(credentialBinding_0,
774
+ presentationBinding_0)
775
+ {
776
+ __compactRuntime.assert(this._equal_7(presentationBinding_0.holderVerificationMethodRef.didContractAddress,
777
+ credentialBinding_0.holderVerificationMethodRef.didContractAddress),
778
+ 'Presentation holder contract does not match credential holder binding');
779
+ __compactRuntime.assert(this._equal_8(presentationBinding_0.holderVerificationMethodRef.methodId,
780
+ credentialBinding_0.holderVerificationMethodRef.methodId),
781
+ 'Presentation holder method reference does not match credential holder binding');
782
+ return [];
783
+ }
784
+ _assertProofMatchesExplicitHolderBinding_0(binding_0, presentationProof_0) {
785
+ __compactRuntime.assert(this._equal_9(binding_0.holderVerificationMethodRef.didContractAddress,
786
+ presentationProof_0.signerVerificationMethodRef.didContractAddress),
787
+ 'Presentation proof signer must match holder binding');
788
+ __compactRuntime.assert(this._equal_10(binding_0.holderVerificationMethodRef.methodId,
789
+ presentationProof_0.signerVerificationMethodRef.methodId),
790
+ 'Presentation proof signer method reference must match holder binding');
791
+ return [];
792
+ }
793
+ _assertValidJubjubHolderBinding_0(binding_0) {
794
+ __compactRuntime.assert(this._jubjubPointX_0(binding_0.holderPublicKey)
795
+ !==
796
+ 0n
797
+ ||
798
+ this._jubjubPointY_0(binding_0.holderPublicKey)
799
+ !==
800
+ 0n,
801
+ 'Jubjub holder binding public key must be set');
802
+ return [];
803
+ }
804
+ _assertMatchingJubjubHolderBindings_0(credentialBinding_0,
805
+ presentationBinding_0)
806
+ {
807
+ __compactRuntime.assert(this._jubjubPointX_0(presentationBinding_0.holderPublicKey)
808
+ ===
809
+ this._jubjubPointX_0(credentialBinding_0.holderPublicKey)
810
+ &&
811
+ this._jubjubPointY_0(presentationBinding_0.holderPublicKey)
812
+ ===
813
+ this._jubjubPointY_0(credentialBinding_0.holderPublicKey),
814
+ 'Presentation Jubjub holder key does not match the credential holder binding');
815
+ return [];
816
+ }
817
+ _assertProofMatchesJubjubHolderBinding_0(binding_0, presentationProof_0) {
818
+ __compactRuntime.assert(this._jubjubPointX_0(binding_0.holderPublicKey)
819
+ ===
820
+ this._jubjubPointX_0(presentationProof_0.publicKey)
821
+ &&
822
+ this._jubjubPointY_0(binding_0.holderPublicKey)
823
+ ===
824
+ this._jubjubPointY_0(presentationProof_0.publicKey),
825
+ 'Presentation proof public key must match the Jubjub holder binding');
826
+ return [];
827
+ }
828
+ _assertValidOffchainMidnightHolderBinding_0(binding_0) {
829
+ __compactRuntime.assert(!this._equal_11(binding_0.holderDidStateHash,
830
+ new Uint8Array([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0])),
831
+ 'Offchain Midnight holder state hash must be set');
832
+ __compactRuntime.assert(!this._equal_12(binding_0.holderMethodId,
833
+ new Uint8Array([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0])),
834
+ 'Offchain Midnight holder method id must be set');
835
+ const jubjubBinding_0 = { holderPublicKey: binding_0.holderPublicKey };
836
+ this._assertValidJubjubHolderBinding_0(jubjubBinding_0);
837
+ return [];
838
+ }
839
+ _assertMatchingOffchainMidnightHolderBindings_0(credentialBinding_0,
840
+ presentationBinding_0)
841
+ {
842
+ __compactRuntime.assert(this._equal_13(presentationBinding_0.holderDidStateHash,
843
+ credentialBinding_0.holderDidStateHash),
844
+ 'Offchain Midnight holder state hash does not match the credential holder binding');
845
+ __compactRuntime.assert(this._equal_14(presentationBinding_0.holderMethodId,
846
+ credentialBinding_0.holderMethodId),
847
+ 'Offchain Midnight holder method id does not match the credential holder binding');
848
+ const credentialJubjubBinding_0 = { holderPublicKey:
849
+ credentialBinding_0.holderPublicKey };
850
+ const presentationJubjubBinding_0 = { holderPublicKey:
851
+ presentationBinding_0.holderPublicKey };
852
+ this._assertMatchingJubjubHolderBindings_0(credentialJubjubBinding_0,
853
+ presentationJubjubBinding_0);
854
+ return [];
855
+ }
856
+ _assertProofMatchesOffchainMidnightHolderBinding_0(binding_0,
857
+ presentationProof_0)
858
+ {
859
+ const jubjubBinding_0 = { holderPublicKey: binding_0.holderPublicKey };
860
+ this._assertProofMatchesJubjubHolderBinding_0(jubjubBinding_0,
861
+ presentationProof_0);
862
+ return [];
863
+ }
864
+ _noSecretHolderChallengeResponse_0() {
865
+ return new Uint8Array([109, 105, 100, 110, 105, 103, 104, 116, 58, 118, 99, 58, 110, 111, 45, 104, 111, 108, 100, 101, 114, 45, 114, 101, 115, 112, 111, 110, 115, 101, 0, 0]);
866
+ }
867
+ _secretHolderBindingCommitment_0(holderSecret_0, opening_0) {
868
+ return this._persistentCommit_0(holderSecret_0, opening_0);
869
+ }
870
+ _secretHolderBindingChallengeResponse_0(holderSecret_0,
871
+ verifierChallengeHash_0)
872
+ {
873
+ return this._persistentHash_2([new Uint8Array([109, 105, 100, 110, 105, 103, 104, 116, 58, 118, 99, 58, 104, 111, 108, 100, 101, 114, 45, 99, 104, 97, 108, 108, 0, 0, 0, 0, 0, 0, 0, 0]),
874
+ holderSecret_0,
875
+ verifierChallengeHash_0]);
876
+ }
877
+ _verifierScopedPseudonym_0(holderSecret_0, verifierDomainHash_0) {
878
+ return this._persistentHash_2([new Uint8Array([109, 105, 100, 110, 105, 103, 104, 116, 58, 118, 99, 58, 104, 111, 108, 100, 101, 114, 45, 112, 115, 101, 117, 100, 111, 110, 121, 109, 0, 0, 0, 0]),
879
+ holderSecret_0,
880
+ verifierDomainHash_0]);
881
+ }
882
+ _assertVerifierScopedPseudonym_0(pseudonym_0,
883
+ holderSecret_0,
884
+ verifierDomainHash_0)
885
+ {
886
+ __compactRuntime.assert(this._equal_15(pseudonym_0,
887
+ this._verifierScopedPseudonym_0(holderSecret_0,
888
+ verifierDomainHash_0)),
889
+ 'Verifier-scoped pseudonym does not match the holder secret and verifier domain');
890
+ return [];
891
+ }
892
+ _blindedSecretHolderCommitment_0(holderSecretCommitment_0,
893
+ issuerNonce_0,
894
+ blindingFactor_0)
895
+ {
896
+ return this._persistentHash_3([new Uint8Array([109, 105, 100, 110, 105, 103, 104, 116, 58, 118, 99, 58, 98, 108, 105, 110, 100, 45, 104, 111, 108, 100, 101, 114, 0, 0, 0, 0, 0, 0, 0, 0]),
897
+ holderSecretCommitment_0,
898
+ issuerNonce_0,
899
+ blindingFactor_0]);
900
+ }
901
+ _assertValidSecretHolderCredentialBinding_0(binding_0) {
902
+ __compactRuntime.assert(this._equal_16(binding_0.requestChallengeResponse,
903
+ this._noSecretHolderChallengeResponse_0()),
904
+ 'Credential secret holder binding must not embed a request challenge response');
905
+ return [];
906
+ }
907
+ _assertValidSecretHolderPresentationBinding_0(binding_0) {
908
+ __compactRuntime.assert(!this._equal_17(binding_0.requestChallengeResponse,
909
+ this._noSecretHolderChallengeResponse_0()),
910
+ 'Presentation secret holder binding must include a request challenge response');
911
+ return [];
912
+ }
913
+ _assertMatchingSecretHolderBindings_0(credentialBinding_0,
914
+ presentationBinding_0)
915
+ {
916
+ __compactRuntime.assert(this._equal_18(credentialBinding_0.holderSecretCommitment,
917
+ presentationBinding_0.holderSecretCommitment),
918
+ 'Presentation holder secret commitment does not match the credential holder binding');
919
+ return [];
920
+ }
921
+ _assertValidBlindedSecretHolderCredentialBinding_0(binding_0) {
922
+ __compactRuntime.assert(this._equal_19(binding_0.requestChallengeResponse,
923
+ this._noSecretHolderChallengeResponse_0()),
924
+ 'Credential blinded holder binding must not embed a request challenge response');
925
+ return [];
926
+ }
927
+ _assertValidBlindedSecretHolderPresentationBinding_0(binding_0) {
928
+ __compactRuntime.assert(!this._equal_20(binding_0.requestChallengeResponse,
929
+ this._noSecretHolderChallengeResponse_0()),
930
+ 'Presentation blinded holder binding must include a request challenge response');
931
+ return [];
932
+ }
933
+ _assertMatchingBlindedSecretHolderBindings_0(credentialBinding_0,
934
+ presentationBinding_0)
935
+ {
936
+ __compactRuntime.assert(this._equal_21(credentialBinding_0.blindedHolderSecretCommitment,
937
+ presentationBinding_0.blindedHolderSecretCommitment),
938
+ 'Presentation blinded holder commitment does not match the credential holder binding');
939
+ __compactRuntime.assert(this._equal_22(credentialBinding_0.issuerNonce,
940
+ presentationBinding_0.issuerNonce),
941
+ 'Presentation issuer nonce does not match the credential holder binding');
942
+ return [];
943
+ }
944
+ _assertSecretHolderBindingWitness_0(binding_0,
945
+ verifierChallengeHash_0,
946
+ holderSecret_0,
947
+ opening_0)
948
+ {
949
+ __compactRuntime.assert(this._equal_23(this._secretHolderBindingCommitment_0(holderSecret_0,
950
+ opening_0),
951
+ binding_0.holderSecretCommitment),
952
+ 'Holder secret witness does not match the holder-binding commitment');
953
+ __compactRuntime.assert(this._equal_24(this._secretHolderBindingChallengeResponse_0(holderSecret_0,
954
+ verifierChallengeHash_0),
955
+ binding_0.requestChallengeResponse),
956
+ 'Holder secret challenge response does not match the verifier challenge');
957
+ return [];
958
+ }
959
+ _assertBlindedSecretHolderBindingWitness_0(binding_0,
960
+ verifierChallengeHash_0,
961
+ holderSecret_0,
962
+ opening_0,
963
+ blindingFactor_0)
964
+ {
965
+ const holderCommitment_0 = this._secretHolderBindingCommitment_0(holderSecret_0,
966
+ opening_0);
967
+ __compactRuntime.assert(this._equal_25(this._blindedSecretHolderCommitment_0(holderCommitment_0,
968
+ binding_0.issuerNonce,
969
+ blindingFactor_0),
970
+ binding_0.blindedHolderSecretCommitment),
971
+ 'Blinded holder commitment does not match the hidden holder secret witness');
972
+ __compactRuntime.assert(this._equal_26(this._secretHolderBindingChallengeResponse_0(holderSecret_0,
973
+ verifierChallengeHash_0),
974
+ binding_0.requestChallengeResponse),
975
+ 'Blinded holder challenge response does not match the verifier challenge');
976
+ return [];
977
+ }
978
+ _protocolFeaturesAsSchemaCapabilities_0(features_0) {
979
+ return { supportsSelectiveDisclosure: features_0.supportsSelectiveDisclosure,
980
+ supportsPredicateProofs: features_0.supportsPredicateProofs,
981
+ supportsVerifierScopedPseudonym:
982
+ features_0.supportsVerifierScopedPseudonym,
983
+ supportsSameHolderProof: features_0.supportsSameHolderProof };
984
+ }
985
+ _assertProtocolFeaturesMatchSchemaCapabilities_0(features_0, capabilities_0) {
986
+ this._assertMatchingSchemaCapabilities_0(this._protocolFeaturesAsSchemaCapabilities_0(features_0),
987
+ capabilities_0);
988
+ return [];
989
+ }
990
+ _noProtocolResponseReference_0() {
991
+ return new Uint8Array([109, 105, 100, 110, 105, 103, 104, 116, 58, 118, 99, 58, 112, 114, 111, 116, 111, 99, 111, 108, 58, 110, 111, 110, 101, 0, 0, 0, 0, 0, 0, 0]);
992
+ }
993
+ _assertValidVerificationMethodRef_0(verificationMethodRef_0) {
994
+ __compactRuntime.assert(!this._equal_27(verificationMethodRef_0.methodId,
995
+ new Uint8Array([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0])),
996
+ 'Verification method reference must be set');
997
+ return [];
998
+ }
999
+ _assertMatchingSchemaRefs_0(expected_0, actual_0) {
1000
+ this._assertValidSchemaRef_0(expected_0);
1001
+ this._assertValidSchemaRef_0(actual_0);
1002
+ __compactRuntime.assert(this._equal_28(expected_0.packageId,
1003
+ actual_0.packageId)
1004
+ &&
1005
+ this._equal_29(expected_0.schemaId,
1006
+ actual_0.schemaId)
1007
+ &&
1008
+ this._equal_30(expected_0.majorVersion,
1009
+ actual_0.majorVersion)
1010
+ &&
1011
+ this._equal_31(expected_0.minorVersion,
1012
+ actual_0.minorVersion),
1013
+ 'Schema reference mismatch');
1014
+ return [];
1015
+ }
1016
+ _assertValidProtocolMessageEnvelope_0(envelope_0) {
1017
+ const noResponse_0 = this._noProtocolResponseReference_0();
1018
+ __compactRuntime.assert(this._equal_32(envelope_0.version, 1n),
1019
+ 'Protocol message version mismatch');
1020
+ __compactRuntime.assert(!this._equal_33(envelope_0.messageId, noResponse_0),
1021
+ 'Protocol message id must be set');
1022
+ __compactRuntime.assert(!this._equal_34(envelope_0.threadId, noResponse_0),
1023
+ 'Protocol thread id must be set');
1024
+ if (envelope_0.initialMessage) {
1025
+ __compactRuntime.assert(this._equal_35(envelope_0.respondsToMessageId,
1026
+ noResponse_0),
1027
+ 'Initial protocol message must not reference a previous message');
1028
+ } else {
1029
+ __compactRuntime.assert(!this._equal_36(envelope_0.respondsToMessageId,
1030
+ noResponse_0),
1031
+ 'Protocol response message must reference a previous message');
1032
+ }
1033
+ if (envelope_0.hasExpiresAt) {
1034
+ let t_0;
1035
+ __compactRuntime.assert((t_0 = envelope_0.expiresAt,
1036
+ t_0 >= envelope_0.createdAt),
1037
+ 'Protocol message expiration must not precede creation');
1038
+ }
1039
+ return [];
1040
+ }
1041
+ _assertProtocolResponseEnvelope_0(requestEnvelope_0, responseEnvelope_0) {
1042
+ this._assertValidProtocolMessageEnvelope_0(requestEnvelope_0);
1043
+ this._assertValidProtocolMessageEnvelope_0(responseEnvelope_0);
1044
+ __compactRuntime.assert(!responseEnvelope_0.initialMessage,
1045
+ 'Protocol response must not be initial');
1046
+ __compactRuntime.assert(this._equal_37(responseEnvelope_0.threadId,
1047
+ requestEnvelope_0.threadId),
1048
+ 'Protocol response thread id does not match the request thread id');
1049
+ __compactRuntime.assert(this._equal_38(responseEnvelope_0.respondsToMessageId,
1050
+ requestEnvelope_0.messageId),
1051
+ 'Protocol response does not reference the request message id');
1052
+ let t_0;
1053
+ __compactRuntime.assert((t_0 = responseEnvelope_0.createdAt,
1054
+ t_0 >= requestEnvelope_0.createdAt),
1055
+ 'Protocol response creation time must not precede the request');
1056
+ return [];
1057
+ }
1058
+ _assertValidStatusRegistryRef_0(registryRef_0) {
1059
+ __compactRuntime.assert(!this._equal_39(registryRef_0.registryId,
1060
+ new Uint8Array([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0])),
1061
+ 'Status registry id must be set');
1062
+ this._assertValidVerificationMethodRef_0(registryRef_0.authorityVerificationMethodRef);
1063
+ return [];
1064
+ }
1065
+ _assertValidNoStatusBinding_0(binding_0) { return []; }
1066
+ _assertValidRegistryBoundStatusBinding_0(binding_0) {
1067
+ __compactRuntime.assert(binding_0.statusType === 0,
1068
+ 'Registry-bound status type must be revocationRegistry');
1069
+ this._assertValidStatusRegistryRef_0(binding_0.registryRef);
1070
+ __compactRuntime.assert(!this._equal_40(binding_0.statusHandleCommitment,
1071
+ new Uint8Array([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0])),
1072
+ 'Status handle commitment must be set');
1073
+ return [];
1074
+ }
1075
+ _registryBoundStatusBindingRoot_0(binding_0) {
1076
+ this._assertValidRegistryBoundStatusBinding_0(binding_0);
1077
+ return this._persistentHash_4(binding_0);
1078
+ }
1079
+ _equal_0(x0, y0) {
1080
+ if (!x0.every((x, i) => y0[i] === x)) { return false; }
1081
+ return true;
1082
+ }
1083
+ _equal_1(x0, y0) {
1084
+ if (!x0.every((x, i) => y0[i] === x)) { return false; }
1085
+ return true;
1086
+ }
1087
+ _equal_2(x0, y0) {
1088
+ if (!x0.every((x, i) => y0[i] === x)) { return false; }
1089
+ return true;
1090
+ }
1091
+ _equal_3(x0, y0) {
1092
+ if (!x0.every((x, i) => y0[i] === x)) { return false; }
1093
+ return true;
1094
+ }
1095
+ _equal_4(x0, y0) {
1096
+ if (!x0.every((x, i) => y0[i] === x)) { return false; }
1097
+ return true;
1098
+ }
1099
+ _equal_5(x0, y0) {
1100
+ if (!x0.every((x, i) => y0[i] === x)) { return false; }
1101
+ return true;
1102
+ }
1103
+ _equal_6(x0, y0) {
1104
+ if (!x0.every((x, i) => y0[i] === x)) { return false; }
1105
+ return true;
1106
+ }
1107
+ _equal_7(x0, y0) {
1108
+ {
1109
+ let x1 = x0.bytes;
1110
+ let y1 = y0.bytes;
1111
+ if (!x1.every((x, i) => y1[i] === x)) { return false; }
1112
+ }
1113
+ return true;
1114
+ }
1115
+ _equal_8(x0, y0) {
1116
+ if (!x0.every((x, i) => y0[i] === x)) { return false; }
1117
+ return true;
1118
+ }
1119
+ _equal_9(x0, y0) {
1120
+ {
1121
+ let x1 = x0.bytes;
1122
+ let y1 = y0.bytes;
1123
+ if (!x1.every((x, i) => y1[i] === x)) { return false; }
1124
+ }
1125
+ return true;
1126
+ }
1127
+ _equal_10(x0, y0) {
1128
+ if (!x0.every((x, i) => y0[i] === x)) { return false; }
1129
+ return true;
1130
+ }
1131
+ _equal_11(x0, y0) {
1132
+ if (!x0.every((x, i) => y0[i] === x)) { return false; }
1133
+ return true;
1134
+ }
1135
+ _equal_12(x0, y0) {
1136
+ if (!x0.every((x, i) => y0[i] === x)) { return false; }
1137
+ return true;
1138
+ }
1139
+ _equal_13(x0, y0) {
1140
+ if (!x0.every((x, i) => y0[i] === x)) { return false; }
1141
+ return true;
1142
+ }
1143
+ _equal_14(x0, y0) {
1144
+ if (!x0.every((x, i) => y0[i] === x)) { return false; }
1145
+ return true;
1146
+ }
1147
+ _equal_15(x0, y0) {
1148
+ if (!x0.every((x, i) => y0[i] === x)) { return false; }
1149
+ return true;
1150
+ }
1151
+ _equal_16(x0, y0) {
1152
+ if (!x0.every((x, i) => y0[i] === x)) { return false; }
1153
+ return true;
1154
+ }
1155
+ _equal_17(x0, y0) {
1156
+ if (!x0.every((x, i) => y0[i] === x)) { return false; }
1157
+ return true;
1158
+ }
1159
+ _equal_18(x0, y0) {
1160
+ if (!x0.every((x, i) => y0[i] === x)) { return false; }
1161
+ return true;
1162
+ }
1163
+ _equal_19(x0, y0) {
1164
+ if (!x0.every((x, i) => y0[i] === x)) { return false; }
1165
+ return true;
1166
+ }
1167
+ _equal_20(x0, y0) {
1168
+ if (!x0.every((x, i) => y0[i] === x)) { return false; }
1169
+ return true;
1170
+ }
1171
+ _equal_21(x0, y0) {
1172
+ if (!x0.every((x, i) => y0[i] === x)) { return false; }
1173
+ return true;
1174
+ }
1175
+ _equal_22(x0, y0) {
1176
+ if (!x0.every((x, i) => y0[i] === x)) { return false; }
1177
+ return true;
1178
+ }
1179
+ _equal_23(x0, y0) {
1180
+ if (!x0.every((x, i) => y0[i] === x)) { return false; }
1181
+ return true;
1182
+ }
1183
+ _equal_24(x0, y0) {
1184
+ if (!x0.every((x, i) => y0[i] === x)) { return false; }
1185
+ return true;
1186
+ }
1187
+ _equal_25(x0, y0) {
1188
+ if (!x0.every((x, i) => y0[i] === x)) { return false; }
1189
+ return true;
1190
+ }
1191
+ _equal_26(x0, y0) {
1192
+ if (!x0.every((x, i) => y0[i] === x)) { return false; }
1193
+ return true;
1194
+ }
1195
+ _equal_27(x0, y0) {
1196
+ if (!x0.every((x, i) => y0[i] === x)) { return false; }
1197
+ return true;
1198
+ }
1199
+ _equal_28(x0, y0) {
1200
+ if (!x0.every((x, i) => y0[i] === x)) { return false; }
1201
+ return true;
1202
+ }
1203
+ _equal_29(x0, y0) {
1204
+ if (!x0.every((x, i) => y0[i] === x)) { return false; }
1205
+ return true;
1206
+ }
1207
+ _equal_30(x0, y0) {
1208
+ if (x0 !== y0) { return false; }
1209
+ return true;
1210
+ }
1211
+ _equal_31(x0, y0) {
1212
+ if (x0 !== y0) { return false; }
1213
+ return true;
1214
+ }
1215
+ _equal_32(x0, y0) {
1216
+ if (x0 !== y0) { return false; }
1217
+ return true;
1218
+ }
1219
+ _equal_33(x0, y0) {
1220
+ if (!x0.every((x, i) => y0[i] === x)) { return false; }
1221
+ return true;
1222
+ }
1223
+ _equal_34(x0, y0) {
1224
+ if (!x0.every((x, i) => y0[i] === x)) { return false; }
1225
+ return true;
1226
+ }
1227
+ _equal_35(x0, y0) {
1228
+ if (!x0.every((x, i) => y0[i] === x)) { return false; }
1229
+ return true;
1230
+ }
1231
+ _equal_36(x0, y0) {
1232
+ if (!x0.every((x, i) => y0[i] === x)) { return false; }
1233
+ return true;
1234
+ }
1235
+ _equal_37(x0, y0) {
1236
+ if (!x0.every((x, i) => y0[i] === x)) { return false; }
1237
+ return true;
1238
+ }
1239
+ _equal_38(x0, y0) {
1240
+ if (!x0.every((x, i) => y0[i] === x)) { return false; }
1241
+ return true;
1242
+ }
1243
+ _equal_39(x0, y0) {
1244
+ if (!x0.every((x, i) => y0[i] === x)) { return false; }
1245
+ return true;
1246
+ }
1247
+ _equal_40(x0, y0) {
1248
+ if (!x0.every((x, i) => y0[i] === x)) { return false; }
1249
+ return true;
1250
+ }
1251
+ }
1252
+ export function ledger(stateOrChargedState) {
1253
+ const state = stateOrChargedState instanceof __compactRuntime.StateValue ? stateOrChargedState : stateOrChargedState.state;
1254
+ const chargedState = stateOrChargedState instanceof __compactRuntime.StateValue ? new __compactRuntime.ChargedState(stateOrChargedState) : stateOrChargedState;
1255
+ const context = {
1256
+ currentQueryContext: new __compactRuntime.QueryContext(chargedState, __compactRuntime.dummyContractAddress()),
1257
+ costModel: __compactRuntime.CostModel.initialCostModel()
1258
+ };
1259
+ const partialProofData = {
1260
+ input: { value: [], alignment: [] },
1261
+ output: undefined,
1262
+ publicTranscript: [],
1263
+ privateTranscriptOutputs: []
1264
+ };
1265
+ return {
1266
+ };
1267
+ }
1268
+ const _emptyContext = {
1269
+ currentQueryContext: new __compactRuntime.QueryContext(new __compactRuntime.ContractState().data, __compactRuntime.dummyContractAddress())
1270
+ };
1271
+ const _dummyContract = new Contract({ });
1272
+ export const pureCircuits = {
1273
+ noSchemaFamilyResolverHint: (...args_0) => {
1274
+ if (args_0.length !== 0) {
1275
+ throw new __compactRuntime.CompactError(`noSchemaFamilyResolverHint: expected 0 arguments (as invoked from Typescript), received ${args_0.length}`);
1276
+ }
1277
+ return _dummyContract._noSchemaFamilyResolverHint_0();
1278
+ },
1279
+ assertValidSchemaRef: (...args_0) => {
1280
+ if (args_0.length !== 1) {
1281
+ throw new __compactRuntime.CompactError(`assertValidSchemaRef: expected 1 argument (as invoked from Typescript), received ${args_0.length}`);
1282
+ }
1283
+ const schema_0 = args_0[0];
1284
+ if (!(typeof(schema_0) === 'object' && schema_0.packageId.buffer instanceof ArrayBuffer && schema_0.packageId.BYTES_PER_ELEMENT === 1 && schema_0.packageId.length === 32 && schema_0.schemaId.buffer instanceof ArrayBuffer && schema_0.schemaId.BYTES_PER_ELEMENT === 1 && schema_0.schemaId.length === 32 && typeof(schema_0.majorVersion) === 'bigint' && schema_0.majorVersion >= 0n && schema_0.majorVersion <= 65535n && typeof(schema_0.minorVersion) === 'bigint' && schema_0.minorVersion >= 0n && schema_0.minorVersion <= 65535n)) {
1285
+ __compactRuntime.typeError('assertValidSchemaRef',
1286
+ 'argument 1',
1287
+ 'types.compact line 30 char 1',
1288
+ 'struct SchemaRef<packageId: Bytes<32>, schemaId: Bytes<32>, majorVersion: Uint<0..65536>, minorVersion: Uint<0..65536>>',
1289
+ schema_0)
1290
+ }
1291
+ return _dummyContract._assertValidSchemaRef_0(schema_0);
1292
+ },
1293
+ assertValidSchemaCapabilities: (...args_0) => {
1294
+ if (args_0.length !== 1) {
1295
+ throw new __compactRuntime.CompactError(`assertValidSchemaCapabilities: expected 1 argument (as invoked from Typescript), received ${args_0.length}`);
1296
+ }
1297
+ const capabilities_0 = args_0[0];
1298
+ if (!(typeof(capabilities_0) === 'object' && typeof(capabilities_0.supportsSelectiveDisclosure) === 'boolean' && typeof(capabilities_0.supportsPredicateProofs) === 'boolean' && typeof(capabilities_0.supportsVerifierScopedPseudonym) === 'boolean' && typeof(capabilities_0.supportsSameHolderProof) === 'boolean')) {
1299
+ __compactRuntime.typeError('assertValidSchemaCapabilities',
1300
+ 'argument 1',
1301
+ 'types.compact line 36 char 1',
1302
+ 'struct SchemaCapabilities<supportsSelectiveDisclosure: Boolean, supportsPredicateProofs: Boolean, supportsVerifierScopedPseudonym: Boolean, supportsSameHolderProof: Boolean>',
1303
+ capabilities_0)
1304
+ }
1305
+ return _dummyContract._assertValidSchemaCapabilities_0(capabilities_0);
1306
+ },
1307
+ assertValidSchemaFamilyResolutionHint: (...args_0) => {
1308
+ if (args_0.length !== 1) {
1309
+ throw new __compactRuntime.CompactError(`assertValidSchemaFamilyResolutionHint: expected 1 argument (as invoked from Typescript), received ${args_0.length}`);
1310
+ }
1311
+ const hint_0 = args_0[0];
1312
+ if (!(typeof(hint_0) === 'object' && typeof(hint_0.hasResolverHint) === 'boolean' && hint_0.resolverHint.buffer instanceof ArrayBuffer && hint_0.resolverHint.BYTES_PER_ELEMENT === 1 && hint_0.resolverHint.length === 32)) {
1313
+ __compactRuntime.typeError('assertValidSchemaFamilyResolutionHint',
1314
+ 'argument 1',
1315
+ 'types.compact line 43 char 1',
1316
+ 'struct SchemaFamilyResolutionHint<hasResolverHint: Boolean, resolverHint: Bytes<32>>',
1317
+ hint_0)
1318
+ }
1319
+ return _dummyContract._assertValidSchemaFamilyResolutionHint_0(hint_0);
1320
+ },
1321
+ assertValidSchemaDescriptor: (...args_0) => {
1322
+ if (args_0.length !== 1) {
1323
+ throw new __compactRuntime.CompactError(`assertValidSchemaDescriptor: expected 1 argument (as invoked from Typescript), received ${args_0.length}`);
1324
+ }
1325
+ const descriptor_0 = args_0[0];
1326
+ if (!(typeof(descriptor_0) === 'object' && typeof(descriptor_0.schema) === 'object' && descriptor_0.schema.packageId.buffer instanceof ArrayBuffer && descriptor_0.schema.packageId.BYTES_PER_ELEMENT === 1 && descriptor_0.schema.packageId.length === 32 && descriptor_0.schema.schemaId.buffer instanceof ArrayBuffer && descriptor_0.schema.schemaId.BYTES_PER_ELEMENT === 1 && descriptor_0.schema.schemaId.length === 32 && typeof(descriptor_0.schema.majorVersion) === 'bigint' && descriptor_0.schema.majorVersion >= 0n && descriptor_0.schema.majorVersion <= 65535n && typeof(descriptor_0.schema.minorVersion) === 'bigint' && descriptor_0.schema.minorVersion >= 0n && descriptor_0.schema.minorVersion <= 65535n && typeof(descriptor_0.capabilities) === 'object' && typeof(descriptor_0.capabilities.supportsSelectiveDisclosure) === 'boolean' && typeof(descriptor_0.capabilities.supportsPredicateProofs) === 'boolean' && typeof(descriptor_0.capabilities.supportsVerifierScopedPseudonym) === 'boolean' && typeof(descriptor_0.capabilities.supportsSameHolderProof) === 'boolean' && typeof(descriptor_0.familyResolutionHint) === 'object' && typeof(descriptor_0.familyResolutionHint.hasResolverHint) === 'boolean' && descriptor_0.familyResolutionHint.resolverHint.buffer instanceof ArrayBuffer && descriptor_0.familyResolutionHint.resolverHint.BYTES_PER_ELEMENT === 1 && descriptor_0.familyResolutionHint.resolverHint.length === 32)) {
1327
+ __compactRuntime.typeError('assertValidSchemaDescriptor',
1328
+ 'argument 1',
1329
+ 'types.compact line 61 char 1',
1330
+ 'struct SchemaDescriptor<schema: struct SchemaRef<packageId: Bytes<32>, schemaId: Bytes<32>, majorVersion: Uint<0..65536>, minorVersion: Uint<0..65536>>, capabilities: struct SchemaCapabilities<supportsSelectiveDisclosure: Boolean, supportsPredicateProofs: Boolean, supportsVerifierScopedPseudonym: Boolean, supportsSameHolderProof: Boolean>, familyResolutionHint: struct SchemaFamilyResolutionHint<hasResolverHint: Boolean, resolverHint: Bytes<32>>>',
1331
+ descriptor_0)
1332
+ }
1333
+ return _dummyContract._assertValidSchemaDescriptor_0(descriptor_0);
1334
+ },
1335
+ assertMatchingSchemaCapabilities: (...args_0) => {
1336
+ if (args_0.length !== 2) {
1337
+ throw new __compactRuntime.CompactError(`assertMatchingSchemaCapabilities: expected 2 arguments (as invoked from Typescript), received ${args_0.length}`);
1338
+ }
1339
+ const expected_0 = args_0[0];
1340
+ const actual_0 = args_0[1];
1341
+ if (!(typeof(expected_0) === 'object' && typeof(expected_0.supportsSelectiveDisclosure) === 'boolean' && typeof(expected_0.supportsPredicateProofs) === 'boolean' && typeof(expected_0.supportsVerifierScopedPseudonym) === 'boolean' && typeof(expected_0.supportsSameHolderProof) === 'boolean')) {
1342
+ __compactRuntime.typeError('assertMatchingSchemaCapabilities',
1343
+ 'argument 1',
1344
+ 'types.compact line 69 char 1',
1345
+ 'struct SchemaCapabilities<supportsSelectiveDisclosure: Boolean, supportsPredicateProofs: Boolean, supportsVerifierScopedPseudonym: Boolean, supportsSameHolderProof: Boolean>',
1346
+ expected_0)
1347
+ }
1348
+ if (!(typeof(actual_0) === 'object' && typeof(actual_0.supportsSelectiveDisclosure) === 'boolean' && typeof(actual_0.supportsPredicateProofs) === 'boolean' && typeof(actual_0.supportsVerifierScopedPseudonym) === 'boolean' && typeof(actual_0.supportsSameHolderProof) === 'boolean')) {
1349
+ __compactRuntime.typeError('assertMatchingSchemaCapabilities',
1350
+ 'argument 2',
1351
+ 'types.compact line 69 char 1',
1352
+ 'struct SchemaCapabilities<supportsSelectiveDisclosure: Boolean, supportsPredicateProofs: Boolean, supportsVerifierScopedPseudonym: Boolean, supportsSameHolderProof: Boolean>',
1353
+ actual_0)
1354
+ }
1355
+ return _dummyContract._assertMatchingSchemaCapabilities_0(expected_0,
1356
+ actual_0);
1357
+ },
1358
+ verifySignature: (...args_0) => {
1359
+ if (args_0.length !== 3) {
1360
+ throw new __compactRuntime.CompactError(`verifySignature: expected 3 arguments (as invoked from Typescript), received ${args_0.length}`);
1361
+ }
1362
+ const pk_0 = args_0[0];
1363
+ const signature_0 = args_0[1];
1364
+ const challenge_0 = args_0[2];
1365
+ if (!(typeof(signature_0) === 'object' && true && typeof(signature_0.s) === 'bigint' && signature_0.s >= 0 && signature_0.s <= __compactRuntime.MAX_FIELD)) {
1366
+ __compactRuntime.typeError('verifySignature',
1367
+ 'argument 2',
1368
+ 'proofs.compact line 4 char 1',
1369
+ 'struct Signature<r: Opaque<"JubjubPoint">, s: Field>',
1370
+ signature_0)
1371
+ }
1372
+ if (!(typeof(challenge_0) === 'bigint' && challenge_0 >= 0 && challenge_0 <= __compactRuntime.MAX_FIELD)) {
1373
+ __compactRuntime.typeError('verifySignature',
1374
+ 'argument 3',
1375
+ 'proofs.compact line 4 char 1',
1376
+ 'Field',
1377
+ challenge_0)
1378
+ }
1379
+ return _dummyContract._verifySignature_0(pk_0, signature_0, challenge_0);
1380
+ },
1381
+ issuanceContextTag: (...args_0) => {
1382
+ if (args_0.length !== 0) {
1383
+ throw new __compactRuntime.CompactError(`issuanceContextTag: expected 0 arguments (as invoked from Typescript), received ${args_0.length}`);
1384
+ }
1385
+ return _dummyContract._issuanceContextTag_0();
1386
+ },
1387
+ presentationContextTag: (...args_0) => {
1388
+ if (args_0.length !== 0) {
1389
+ throw new __compactRuntime.CompactError(`presentationContextTag: expected 0 arguments (as invoked from Typescript), received ${args_0.length}`);
1390
+ }
1391
+ return _dummyContract._presentationContextTag_0();
1392
+ },
1393
+ issuanceProofPayloadRoot: (...args_0) => {
1394
+ if (args_0.length !== 2) {
1395
+ throw new __compactRuntime.CompactError(`issuanceProofPayloadRoot: expected 2 arguments (as invoked from Typescript), received ${args_0.length}`);
1396
+ }
1397
+ const bodyRoot_0 = args_0[0];
1398
+ const proof_0 = args_0[1];
1399
+ if (!(bodyRoot_0.buffer instanceof ArrayBuffer && bodyRoot_0.BYTES_PER_ELEMENT === 1 && bodyRoot_0.length === 32)) {
1400
+ __compactRuntime.typeError('issuanceProofPayloadRoot',
1401
+ 'argument 1',
1402
+ 'proofs.compact line 76 char 1',
1403
+ 'Bytes<32>',
1404
+ bodyRoot_0)
1405
+ }
1406
+ if (!(typeof(proof_0) === 'object' && typeof(proof_0.signerVerificationMethodRef) === 'object' && typeof(proof_0.signerVerificationMethodRef.didContractAddress) === 'object' && proof_0.signerVerificationMethodRef.didContractAddress.bytes.buffer instanceof ArrayBuffer && proof_0.signerVerificationMethodRef.didContractAddress.bytes.BYTES_PER_ELEMENT === 1 && proof_0.signerVerificationMethodRef.didContractAddress.bytes.length === 32 && proof_0.signerVerificationMethodRef.methodId.buffer instanceof ArrayBuffer && proof_0.signerVerificationMethodRef.methodId.BYTES_PER_ELEMENT === 1 && proof_0.signerVerificationMethodRef.methodId.length === 32 && typeof(proof_0.createdAt) === 'bigint' && proof_0.createdAt >= 0n && proof_0.createdAt <= 18446744073709551615n && proof_0.challengeHash.buffer instanceof ArrayBuffer && proof_0.challengeHash.BYTES_PER_ELEMENT === 1 && proof_0.challengeHash.length === 32 && true && typeof(proof_0.signature) === 'object' && true && typeof(proof_0.signature.s) === 'bigint' && proof_0.signature.s >= 0 && proof_0.signature.s <= __compactRuntime.MAX_FIELD)) {
1407
+ __compactRuntime.typeError('issuanceProofPayloadRoot',
1408
+ 'argument 2',
1409
+ 'proofs.compact line 76 char 1',
1410
+ 'struct Proof<signerVerificationMethodRef: struct VerificationMethodRef<didContractAddress: struct ContractAddress<bytes: Bytes<32>>, methodId: Bytes<32>>, createdAt: Uint<0..18446744073709551616>, challengeHash: Bytes<32>, publicKey: Opaque<"JubjubPoint">, signature: struct Signature<r: Opaque<"JubjubPoint">, s: Field>>',
1411
+ proof_0)
1412
+ }
1413
+ return _dummyContract._issuanceProofPayloadRoot_0(bodyRoot_0, proof_0);
1414
+ },
1415
+ presentationProofPayloadRoot: (...args_0) => {
1416
+ if (args_0.length !== 2) {
1417
+ throw new __compactRuntime.CompactError(`presentationProofPayloadRoot: expected 2 arguments (as invoked from Typescript), received ${args_0.length}`);
1418
+ }
1419
+ const bodyRoot_0 = args_0[0];
1420
+ const proof_0 = args_0[1];
1421
+ if (!(bodyRoot_0.buffer instanceof ArrayBuffer && bodyRoot_0.BYTES_PER_ELEMENT === 1 && bodyRoot_0.length === 32)) {
1422
+ __compactRuntime.typeError('presentationProofPayloadRoot',
1423
+ 'argument 1',
1424
+ 'proofs.compact line 83 char 1',
1425
+ 'Bytes<32>',
1426
+ bodyRoot_0)
1427
+ }
1428
+ if (!(typeof(proof_0) === 'object' && typeof(proof_0.signerVerificationMethodRef) === 'object' && typeof(proof_0.signerVerificationMethodRef.didContractAddress) === 'object' && proof_0.signerVerificationMethodRef.didContractAddress.bytes.buffer instanceof ArrayBuffer && proof_0.signerVerificationMethodRef.didContractAddress.bytes.BYTES_PER_ELEMENT === 1 && proof_0.signerVerificationMethodRef.didContractAddress.bytes.length === 32 && proof_0.signerVerificationMethodRef.methodId.buffer instanceof ArrayBuffer && proof_0.signerVerificationMethodRef.methodId.BYTES_PER_ELEMENT === 1 && proof_0.signerVerificationMethodRef.methodId.length === 32 && typeof(proof_0.createdAt) === 'bigint' && proof_0.createdAt >= 0n && proof_0.createdAt <= 18446744073709551615n && proof_0.challengeHash.buffer instanceof ArrayBuffer && proof_0.challengeHash.BYTES_PER_ELEMENT === 1 && proof_0.challengeHash.length === 32 && true && typeof(proof_0.signature) === 'object' && true && typeof(proof_0.signature.s) === 'bigint' && proof_0.signature.s >= 0 && proof_0.signature.s <= __compactRuntime.MAX_FIELD)) {
1429
+ __compactRuntime.typeError('presentationProofPayloadRoot',
1430
+ 'argument 2',
1431
+ 'proofs.compact line 83 char 1',
1432
+ 'struct Proof<signerVerificationMethodRef: struct VerificationMethodRef<didContractAddress: struct ContractAddress<bytes: Bytes<32>>, methodId: Bytes<32>>, createdAt: Uint<0..18446744073709551616>, challengeHash: Bytes<32>, publicKey: Opaque<"JubjubPoint">, signature: struct Signature<r: Opaque<"JubjubPoint">, s: Field>>',
1433
+ proof_0)
1434
+ }
1435
+ return _dummyContract._presentationProofPayloadRoot_0(bodyRoot_0, proof_0);
1436
+ },
1437
+ issuanceProofChallenge: (...args_0) => {
1438
+ if (args_0.length !== 2) {
1439
+ throw new __compactRuntime.CompactError(`issuanceProofChallenge: expected 2 arguments (as invoked from Typescript), received ${args_0.length}`);
1440
+ }
1441
+ const bodyRoot_0 = args_0[0];
1442
+ const proof_0 = args_0[1];
1443
+ if (!(bodyRoot_0.buffer instanceof ArrayBuffer && bodyRoot_0.BYTES_PER_ELEMENT === 1 && bodyRoot_0.length === 32)) {
1444
+ __compactRuntime.typeError('issuanceProofChallenge',
1445
+ 'argument 1',
1446
+ 'proofs.compact line 90 char 1',
1447
+ 'Bytes<32>',
1448
+ bodyRoot_0)
1449
+ }
1450
+ if (!(typeof(proof_0) === 'object' && typeof(proof_0.signerVerificationMethodRef) === 'object' && typeof(proof_0.signerVerificationMethodRef.didContractAddress) === 'object' && proof_0.signerVerificationMethodRef.didContractAddress.bytes.buffer instanceof ArrayBuffer && proof_0.signerVerificationMethodRef.didContractAddress.bytes.BYTES_PER_ELEMENT === 1 && proof_0.signerVerificationMethodRef.didContractAddress.bytes.length === 32 && proof_0.signerVerificationMethodRef.methodId.buffer instanceof ArrayBuffer && proof_0.signerVerificationMethodRef.methodId.BYTES_PER_ELEMENT === 1 && proof_0.signerVerificationMethodRef.methodId.length === 32 && typeof(proof_0.createdAt) === 'bigint' && proof_0.createdAt >= 0n && proof_0.createdAt <= 18446744073709551615n && proof_0.challengeHash.buffer instanceof ArrayBuffer && proof_0.challengeHash.BYTES_PER_ELEMENT === 1 && proof_0.challengeHash.length === 32 && true && typeof(proof_0.signature) === 'object' && true && typeof(proof_0.signature.s) === 'bigint' && proof_0.signature.s >= 0 && proof_0.signature.s <= __compactRuntime.MAX_FIELD)) {
1451
+ __compactRuntime.typeError('issuanceProofChallenge',
1452
+ 'argument 2',
1453
+ 'proofs.compact line 90 char 1',
1454
+ 'struct Proof<signerVerificationMethodRef: struct VerificationMethodRef<didContractAddress: struct ContractAddress<bytes: Bytes<32>>, methodId: Bytes<32>>, createdAt: Uint<0..18446744073709551616>, challengeHash: Bytes<32>, publicKey: Opaque<"JubjubPoint">, signature: struct Signature<r: Opaque<"JubjubPoint">, s: Field>>',
1455
+ proof_0)
1456
+ }
1457
+ return _dummyContract._issuanceProofChallenge_0(bodyRoot_0, proof_0);
1458
+ },
1459
+ presentationProofChallenge: (...args_0) => {
1460
+ if (args_0.length !== 2) {
1461
+ throw new __compactRuntime.CompactError(`presentationProofChallenge: expected 2 arguments (as invoked from Typescript), received ${args_0.length}`);
1462
+ }
1463
+ const bodyRoot_0 = args_0[0];
1464
+ const proof_0 = args_0[1];
1465
+ if (!(bodyRoot_0.buffer instanceof ArrayBuffer && bodyRoot_0.BYTES_PER_ELEMENT === 1 && bodyRoot_0.length === 32)) {
1466
+ __compactRuntime.typeError('presentationProofChallenge',
1467
+ 'argument 1',
1468
+ 'proofs.compact line 97 char 1',
1469
+ 'Bytes<32>',
1470
+ bodyRoot_0)
1471
+ }
1472
+ if (!(typeof(proof_0) === 'object' && typeof(proof_0.signerVerificationMethodRef) === 'object' && typeof(proof_0.signerVerificationMethodRef.didContractAddress) === 'object' && proof_0.signerVerificationMethodRef.didContractAddress.bytes.buffer instanceof ArrayBuffer && proof_0.signerVerificationMethodRef.didContractAddress.bytes.BYTES_PER_ELEMENT === 1 && proof_0.signerVerificationMethodRef.didContractAddress.bytes.length === 32 && proof_0.signerVerificationMethodRef.methodId.buffer instanceof ArrayBuffer && proof_0.signerVerificationMethodRef.methodId.BYTES_PER_ELEMENT === 1 && proof_0.signerVerificationMethodRef.methodId.length === 32 && typeof(proof_0.createdAt) === 'bigint' && proof_0.createdAt >= 0n && proof_0.createdAt <= 18446744073709551615n && proof_0.challengeHash.buffer instanceof ArrayBuffer && proof_0.challengeHash.BYTES_PER_ELEMENT === 1 && proof_0.challengeHash.length === 32 && true && typeof(proof_0.signature) === 'object' && true && typeof(proof_0.signature.s) === 'bigint' && proof_0.signature.s >= 0 && proof_0.signature.s <= __compactRuntime.MAX_FIELD)) {
1473
+ __compactRuntime.typeError('presentationProofChallenge',
1474
+ 'argument 2',
1475
+ 'proofs.compact line 97 char 1',
1476
+ 'struct Proof<signerVerificationMethodRef: struct VerificationMethodRef<didContractAddress: struct ContractAddress<bytes: Bytes<32>>, methodId: Bytes<32>>, createdAt: Uint<0..18446744073709551616>, challengeHash: Bytes<32>, publicKey: Opaque<"JubjubPoint">, signature: struct Signature<r: Opaque<"JubjubPoint">, s: Field>>',
1477
+ proof_0)
1478
+ }
1479
+ return _dummyContract._presentationProofChallenge_0(bodyRoot_0, proof_0);
1480
+ },
1481
+ assertValidIssuanceContextProof: (...args_0) => {
1482
+ if (args_0.length !== 2) {
1483
+ throw new __compactRuntime.CompactError(`assertValidIssuanceContextProof: expected 2 arguments (as invoked from Typescript), received ${args_0.length}`);
1484
+ }
1485
+ const bodyRoot_0 = args_0[0];
1486
+ const proof_0 = args_0[1];
1487
+ if (!(bodyRoot_0.buffer instanceof ArrayBuffer && bodyRoot_0.BYTES_PER_ELEMENT === 1 && bodyRoot_0.length === 32)) {
1488
+ __compactRuntime.typeError('assertValidIssuanceContextProof',
1489
+ 'argument 1',
1490
+ 'proofs.compact line 110 char 1',
1491
+ 'Bytes<32>',
1492
+ bodyRoot_0)
1493
+ }
1494
+ if (!(typeof(proof_0) === 'object' && typeof(proof_0.signerVerificationMethodRef) === 'object' && typeof(proof_0.signerVerificationMethodRef.didContractAddress) === 'object' && proof_0.signerVerificationMethodRef.didContractAddress.bytes.buffer instanceof ArrayBuffer && proof_0.signerVerificationMethodRef.didContractAddress.bytes.BYTES_PER_ELEMENT === 1 && proof_0.signerVerificationMethodRef.didContractAddress.bytes.length === 32 && proof_0.signerVerificationMethodRef.methodId.buffer instanceof ArrayBuffer && proof_0.signerVerificationMethodRef.methodId.BYTES_PER_ELEMENT === 1 && proof_0.signerVerificationMethodRef.methodId.length === 32 && typeof(proof_0.createdAt) === 'bigint' && proof_0.createdAt >= 0n && proof_0.createdAt <= 18446744073709551615n && proof_0.challengeHash.buffer instanceof ArrayBuffer && proof_0.challengeHash.BYTES_PER_ELEMENT === 1 && proof_0.challengeHash.length === 32 && true && typeof(proof_0.signature) === 'object' && true && typeof(proof_0.signature.s) === 'bigint' && proof_0.signature.s >= 0 && proof_0.signature.s <= __compactRuntime.MAX_FIELD)) {
1495
+ __compactRuntime.typeError('assertValidIssuanceContextProof',
1496
+ 'argument 2',
1497
+ 'proofs.compact line 110 char 1',
1498
+ 'struct Proof<signerVerificationMethodRef: struct VerificationMethodRef<didContractAddress: struct ContractAddress<bytes: Bytes<32>>, methodId: Bytes<32>>, createdAt: Uint<0..18446744073709551616>, challengeHash: Bytes<32>, publicKey: Opaque<"JubjubPoint">, signature: struct Signature<r: Opaque<"JubjubPoint">, s: Field>>',
1499
+ proof_0)
1500
+ }
1501
+ return _dummyContract._assertValidIssuanceContextProof_0(bodyRoot_0, proof_0);
1502
+ },
1503
+ assertValidPresentationContextProof: (...args_0) => {
1504
+ if (args_0.length !== 2) {
1505
+ throw new __compactRuntime.CompactError(`assertValidPresentationContextProof: expected 2 arguments (as invoked from Typescript), received ${args_0.length}`);
1506
+ }
1507
+ const bodyRoot_0 = args_0[0];
1508
+ const proof_0 = args_0[1];
1509
+ if (!(bodyRoot_0.buffer instanceof ArrayBuffer && bodyRoot_0.BYTES_PER_ELEMENT === 1 && bodyRoot_0.length === 32)) {
1510
+ __compactRuntime.typeError('assertValidPresentationContextProof',
1511
+ 'argument 1',
1512
+ 'proofs.compact line 117 char 1',
1513
+ 'Bytes<32>',
1514
+ bodyRoot_0)
1515
+ }
1516
+ if (!(typeof(proof_0) === 'object' && typeof(proof_0.signerVerificationMethodRef) === 'object' && typeof(proof_0.signerVerificationMethodRef.didContractAddress) === 'object' && proof_0.signerVerificationMethodRef.didContractAddress.bytes.buffer instanceof ArrayBuffer && proof_0.signerVerificationMethodRef.didContractAddress.bytes.BYTES_PER_ELEMENT === 1 && proof_0.signerVerificationMethodRef.didContractAddress.bytes.length === 32 && proof_0.signerVerificationMethodRef.methodId.buffer instanceof ArrayBuffer && proof_0.signerVerificationMethodRef.methodId.BYTES_PER_ELEMENT === 1 && proof_0.signerVerificationMethodRef.methodId.length === 32 && typeof(proof_0.createdAt) === 'bigint' && proof_0.createdAt >= 0n && proof_0.createdAt <= 18446744073709551615n && proof_0.challengeHash.buffer instanceof ArrayBuffer && proof_0.challengeHash.BYTES_PER_ELEMENT === 1 && proof_0.challengeHash.length === 32 && true && typeof(proof_0.signature) === 'object' && true && typeof(proof_0.signature.s) === 'bigint' && proof_0.signature.s >= 0 && proof_0.signature.s <= __compactRuntime.MAX_FIELD)) {
1517
+ __compactRuntime.typeError('assertValidPresentationContextProof',
1518
+ 'argument 2',
1519
+ 'proofs.compact line 117 char 1',
1520
+ 'struct Proof<signerVerificationMethodRef: struct VerificationMethodRef<didContractAddress: struct ContractAddress<bytes: Bytes<32>>, methodId: Bytes<32>>, createdAt: Uint<0..18446744073709551616>, challengeHash: Bytes<32>, publicKey: Opaque<"JubjubPoint">, signature: struct Signature<r: Opaque<"JubjubPoint">, s: Field>>',
1521
+ proof_0)
1522
+ }
1523
+ return _dummyContract._assertValidPresentationContextProof_0(bodyRoot_0,
1524
+ proof_0);
1525
+ },
1526
+ assertValidExplicitHolderBinding: (...args_0) => {
1527
+ if (args_0.length !== 1) {
1528
+ throw new __compactRuntime.CompactError(`assertValidExplicitHolderBinding: expected 1 argument (as invoked from Typescript), received ${args_0.length}`);
1529
+ }
1530
+ const binding_0 = args_0[0];
1531
+ if (!(typeof(binding_0) === 'object' && typeof(binding_0.holderVerificationMethodRef) === 'object' && typeof(binding_0.holderVerificationMethodRef.didContractAddress) === 'object' && binding_0.holderVerificationMethodRef.didContractAddress.bytes.buffer instanceof ArrayBuffer && binding_0.holderVerificationMethodRef.didContractAddress.bytes.BYTES_PER_ELEMENT === 1 && binding_0.holderVerificationMethodRef.didContractAddress.bytes.length === 32 && binding_0.holderVerificationMethodRef.methodId.buffer instanceof ArrayBuffer && binding_0.holderVerificationMethodRef.methodId.BYTES_PER_ELEMENT === 1 && binding_0.holderVerificationMethodRef.methodId.length === 32)) {
1532
+ __compactRuntime.typeError('assertValidExplicitHolderBinding',
1533
+ 'argument 1',
1534
+ 'holder-bindings.compact line 7 char 1',
1535
+ 'struct ExplicitHolderBinding<holderVerificationMethodRef: struct VerificationMethodRef<didContractAddress: struct ContractAddress<bytes: Bytes<32>>, methodId: Bytes<32>>>',
1536
+ binding_0)
1537
+ }
1538
+ return _dummyContract._assertValidExplicitHolderBinding_0(binding_0);
1539
+ },
1540
+ assertMatchingExplicitHolderBindings: (...args_0) => {
1541
+ if (args_0.length !== 2) {
1542
+ throw new __compactRuntime.CompactError(`assertMatchingExplicitHolderBindings: expected 2 arguments (as invoked from Typescript), received ${args_0.length}`);
1543
+ }
1544
+ const credentialBinding_0 = args_0[0];
1545
+ const presentationBinding_0 = args_0[1];
1546
+ if (!(typeof(credentialBinding_0) === 'object' && typeof(credentialBinding_0.holderVerificationMethodRef) === 'object' && typeof(credentialBinding_0.holderVerificationMethodRef.didContractAddress) === 'object' && credentialBinding_0.holderVerificationMethodRef.didContractAddress.bytes.buffer instanceof ArrayBuffer && credentialBinding_0.holderVerificationMethodRef.didContractAddress.bytes.BYTES_PER_ELEMENT === 1 && credentialBinding_0.holderVerificationMethodRef.didContractAddress.bytes.length === 32 && credentialBinding_0.holderVerificationMethodRef.methodId.buffer instanceof ArrayBuffer && credentialBinding_0.holderVerificationMethodRef.methodId.BYTES_PER_ELEMENT === 1 && credentialBinding_0.holderVerificationMethodRef.methodId.length === 32)) {
1547
+ __compactRuntime.typeError('assertMatchingExplicitHolderBindings',
1548
+ 'argument 1',
1549
+ 'holder-bindings.compact line 20 char 1',
1550
+ 'struct ExplicitHolderBinding<holderVerificationMethodRef: struct VerificationMethodRef<didContractAddress: struct ContractAddress<bytes: Bytes<32>>, methodId: Bytes<32>>>',
1551
+ credentialBinding_0)
1552
+ }
1553
+ if (!(typeof(presentationBinding_0) === 'object' && typeof(presentationBinding_0.holderVerificationMethodRef) === 'object' && typeof(presentationBinding_0.holderVerificationMethodRef.didContractAddress) === 'object' && presentationBinding_0.holderVerificationMethodRef.didContractAddress.bytes.buffer instanceof ArrayBuffer && presentationBinding_0.holderVerificationMethodRef.didContractAddress.bytes.BYTES_PER_ELEMENT === 1 && presentationBinding_0.holderVerificationMethodRef.didContractAddress.bytes.length === 32 && presentationBinding_0.holderVerificationMethodRef.methodId.buffer instanceof ArrayBuffer && presentationBinding_0.holderVerificationMethodRef.methodId.BYTES_PER_ELEMENT === 1 && presentationBinding_0.holderVerificationMethodRef.methodId.length === 32)) {
1554
+ __compactRuntime.typeError('assertMatchingExplicitHolderBindings',
1555
+ 'argument 2',
1556
+ 'holder-bindings.compact line 20 char 1',
1557
+ 'struct ExplicitHolderBinding<holderVerificationMethodRef: struct VerificationMethodRef<didContractAddress: struct ContractAddress<bytes: Bytes<32>>, methodId: Bytes<32>>>',
1558
+ presentationBinding_0)
1559
+ }
1560
+ return _dummyContract._assertMatchingExplicitHolderBindings_0(credentialBinding_0,
1561
+ presentationBinding_0);
1562
+ },
1563
+ assertProofMatchesExplicitHolderBinding: (...args_0) => {
1564
+ if (args_0.length !== 2) {
1565
+ throw new __compactRuntime.CompactError(`assertProofMatchesExplicitHolderBinding: expected 2 arguments (as invoked from Typescript), received ${args_0.length}`);
1566
+ }
1567
+ const binding_0 = args_0[0];
1568
+ const presentationProof_0 = args_0[1];
1569
+ if (!(typeof(binding_0) === 'object' && typeof(binding_0.holderVerificationMethodRef) === 'object' && typeof(binding_0.holderVerificationMethodRef.didContractAddress) === 'object' && binding_0.holderVerificationMethodRef.didContractAddress.bytes.buffer instanceof ArrayBuffer && binding_0.holderVerificationMethodRef.didContractAddress.bytes.BYTES_PER_ELEMENT === 1 && binding_0.holderVerificationMethodRef.didContractAddress.bytes.length === 32 && binding_0.holderVerificationMethodRef.methodId.buffer instanceof ArrayBuffer && binding_0.holderVerificationMethodRef.methodId.BYTES_PER_ELEMENT === 1 && binding_0.holderVerificationMethodRef.methodId.length === 32)) {
1570
+ __compactRuntime.typeError('assertProofMatchesExplicitHolderBinding',
1571
+ 'argument 1',
1572
+ 'holder-bindings.compact line 36 char 1',
1573
+ 'struct ExplicitHolderBinding<holderVerificationMethodRef: struct VerificationMethodRef<didContractAddress: struct ContractAddress<bytes: Bytes<32>>, methodId: Bytes<32>>>',
1574
+ binding_0)
1575
+ }
1576
+ if (!(typeof(presentationProof_0) === 'object' && typeof(presentationProof_0.signerVerificationMethodRef) === 'object' && typeof(presentationProof_0.signerVerificationMethodRef.didContractAddress) === 'object' && presentationProof_0.signerVerificationMethodRef.didContractAddress.bytes.buffer instanceof ArrayBuffer && presentationProof_0.signerVerificationMethodRef.didContractAddress.bytes.BYTES_PER_ELEMENT === 1 && presentationProof_0.signerVerificationMethodRef.didContractAddress.bytes.length === 32 && presentationProof_0.signerVerificationMethodRef.methodId.buffer instanceof ArrayBuffer && presentationProof_0.signerVerificationMethodRef.methodId.BYTES_PER_ELEMENT === 1 && presentationProof_0.signerVerificationMethodRef.methodId.length === 32 && typeof(presentationProof_0.createdAt) === 'bigint' && presentationProof_0.createdAt >= 0n && presentationProof_0.createdAt <= 18446744073709551615n && presentationProof_0.challengeHash.buffer instanceof ArrayBuffer && presentationProof_0.challengeHash.BYTES_PER_ELEMENT === 1 && presentationProof_0.challengeHash.length === 32 && true && typeof(presentationProof_0.signature) === 'object' && true && typeof(presentationProof_0.signature.s) === 'bigint' && presentationProof_0.signature.s >= 0 && presentationProof_0.signature.s <= __compactRuntime.MAX_FIELD)) {
1577
+ __compactRuntime.typeError('assertProofMatchesExplicitHolderBinding',
1578
+ 'argument 2',
1579
+ 'holder-bindings.compact line 36 char 1',
1580
+ 'struct Proof<signerVerificationMethodRef: struct VerificationMethodRef<didContractAddress: struct ContractAddress<bytes: Bytes<32>>, methodId: Bytes<32>>, createdAt: Uint<0..18446744073709551616>, challengeHash: Bytes<32>, publicKey: Opaque<"JubjubPoint">, signature: struct Signature<r: Opaque<"JubjubPoint">, s: Field>>',
1581
+ presentationProof_0)
1582
+ }
1583
+ return _dummyContract._assertProofMatchesExplicitHolderBinding_0(binding_0,
1584
+ presentationProof_0);
1585
+ },
1586
+ assertValidJubjubHolderBinding: (...args_0) => {
1587
+ if (args_0.length !== 1) {
1588
+ throw new __compactRuntime.CompactError(`assertValidJubjubHolderBinding: expected 1 argument (as invoked from Typescript), received ${args_0.length}`);
1589
+ }
1590
+ const binding_0 = args_0[0];
1591
+ if (!(typeof(binding_0) === 'object' && true)) {
1592
+ __compactRuntime.typeError('assertValidJubjubHolderBinding',
1593
+ 'argument 1',
1594
+ 'holder-bindings.compact line 52 char 1',
1595
+ 'struct JubjubHolderBinding<holderPublicKey: Opaque<"JubjubPoint">>',
1596
+ binding_0)
1597
+ }
1598
+ return _dummyContract._assertValidJubjubHolderBinding_0(binding_0);
1599
+ },
1600
+ assertMatchingJubjubHolderBindings: (...args_0) => {
1601
+ if (args_0.length !== 2) {
1602
+ throw new __compactRuntime.CompactError(`assertMatchingJubjubHolderBindings: expected 2 arguments (as invoked from Typescript), received ${args_0.length}`);
1603
+ }
1604
+ const credentialBinding_0 = args_0[0];
1605
+ const presentationBinding_0 = args_0[1];
1606
+ if (!(typeof(credentialBinding_0) === 'object' && true)) {
1607
+ __compactRuntime.typeError('assertMatchingJubjubHolderBindings',
1608
+ 'argument 1',
1609
+ 'holder-bindings.compact line 67 char 1',
1610
+ 'struct JubjubHolderBinding<holderPublicKey: Opaque<"JubjubPoint">>',
1611
+ credentialBinding_0)
1612
+ }
1613
+ if (!(typeof(presentationBinding_0) === 'object' && true)) {
1614
+ __compactRuntime.typeError('assertMatchingJubjubHolderBindings',
1615
+ 'argument 2',
1616
+ 'holder-bindings.compact line 67 char 1',
1617
+ 'struct JubjubHolderBinding<holderPublicKey: Opaque<"JubjubPoint">>',
1618
+ presentationBinding_0)
1619
+ }
1620
+ return _dummyContract._assertMatchingJubjubHolderBindings_0(credentialBinding_0,
1621
+ presentationBinding_0);
1622
+ },
1623
+ assertProofMatchesJubjubHolderBinding: (...args_0) => {
1624
+ if (args_0.length !== 2) {
1625
+ throw new __compactRuntime.CompactError(`assertProofMatchesJubjubHolderBinding: expected 2 arguments (as invoked from Typescript), received ${args_0.length}`);
1626
+ }
1627
+ const binding_0 = args_0[0];
1628
+ const presentationProof_0 = args_0[1];
1629
+ if (!(typeof(binding_0) === 'object' && true)) {
1630
+ __compactRuntime.typeError('assertProofMatchesJubjubHolderBinding',
1631
+ 'argument 1',
1632
+ 'holder-bindings.compact line 80 char 1',
1633
+ 'struct JubjubHolderBinding<holderPublicKey: Opaque<"JubjubPoint">>',
1634
+ binding_0)
1635
+ }
1636
+ if (!(typeof(presentationProof_0) === 'object' && typeof(presentationProof_0.signerVerificationMethodRef) === 'object' && typeof(presentationProof_0.signerVerificationMethodRef.didContractAddress) === 'object' && presentationProof_0.signerVerificationMethodRef.didContractAddress.bytes.buffer instanceof ArrayBuffer && presentationProof_0.signerVerificationMethodRef.didContractAddress.bytes.BYTES_PER_ELEMENT === 1 && presentationProof_0.signerVerificationMethodRef.didContractAddress.bytes.length === 32 && presentationProof_0.signerVerificationMethodRef.methodId.buffer instanceof ArrayBuffer && presentationProof_0.signerVerificationMethodRef.methodId.BYTES_PER_ELEMENT === 1 && presentationProof_0.signerVerificationMethodRef.methodId.length === 32 && typeof(presentationProof_0.createdAt) === 'bigint' && presentationProof_0.createdAt >= 0n && presentationProof_0.createdAt <= 18446744073709551615n && presentationProof_0.challengeHash.buffer instanceof ArrayBuffer && presentationProof_0.challengeHash.BYTES_PER_ELEMENT === 1 && presentationProof_0.challengeHash.length === 32 && true && typeof(presentationProof_0.signature) === 'object' && true && typeof(presentationProof_0.signature.s) === 'bigint' && presentationProof_0.signature.s >= 0 && presentationProof_0.signature.s <= __compactRuntime.MAX_FIELD)) {
1637
+ __compactRuntime.typeError('assertProofMatchesJubjubHolderBinding',
1638
+ 'argument 2',
1639
+ 'holder-bindings.compact line 80 char 1',
1640
+ 'struct Proof<signerVerificationMethodRef: struct VerificationMethodRef<didContractAddress: struct ContractAddress<bytes: Bytes<32>>, methodId: Bytes<32>>, createdAt: Uint<0..18446744073709551616>, challengeHash: Bytes<32>, publicKey: Opaque<"JubjubPoint">, signature: struct Signature<r: Opaque<"JubjubPoint">, s: Field>>',
1641
+ presentationProof_0)
1642
+ }
1643
+ return _dummyContract._assertProofMatchesJubjubHolderBinding_0(binding_0,
1644
+ presentationProof_0);
1645
+ },
1646
+ assertValidOffchainMidnightHolderBinding: (...args_0) => {
1647
+ if (args_0.length !== 1) {
1648
+ throw new __compactRuntime.CompactError(`assertValidOffchainMidnightHolderBinding: expected 1 argument (as invoked from Typescript), received ${args_0.length}`);
1649
+ }
1650
+ const binding_0 = args_0[0];
1651
+ if (!(typeof(binding_0) === 'object' && binding_0.holderDidStateHash.buffer instanceof ArrayBuffer && binding_0.holderDidStateHash.BYTES_PER_ELEMENT === 1 && binding_0.holderDidStateHash.length === 32 && binding_0.holderMethodId.buffer instanceof ArrayBuffer && binding_0.holderMethodId.BYTES_PER_ELEMENT === 1 && binding_0.holderMethodId.length === 32 && true)) {
1652
+ __compactRuntime.typeError('assertValidOffchainMidnightHolderBinding',
1653
+ 'argument 1',
1654
+ 'holder-bindings.compact line 93 char 1',
1655
+ 'struct OffchainMidnightHolderBinding<holderDidStateHash: Bytes<32>, holderMethodId: Bytes<32>, holderPublicKey: Opaque<"JubjubPoint">>',
1656
+ binding_0)
1657
+ }
1658
+ return _dummyContract._assertValidOffchainMidnightHolderBinding_0(binding_0);
1659
+ },
1660
+ assertMatchingOffchainMidnightHolderBindings: (...args_0) => {
1661
+ if (args_0.length !== 2) {
1662
+ throw new __compactRuntime.CompactError(`assertMatchingOffchainMidnightHolderBindings: expected 2 arguments (as invoked from Typescript), received ${args_0.length}`);
1663
+ }
1664
+ const credentialBinding_0 = args_0[0];
1665
+ const presentationBinding_0 = args_0[1];
1666
+ if (!(typeof(credentialBinding_0) === 'object' && credentialBinding_0.holderDidStateHash.buffer instanceof ArrayBuffer && credentialBinding_0.holderDidStateHash.BYTES_PER_ELEMENT === 1 && credentialBinding_0.holderDidStateHash.length === 32 && credentialBinding_0.holderMethodId.buffer instanceof ArrayBuffer && credentialBinding_0.holderMethodId.BYTES_PER_ELEMENT === 1 && credentialBinding_0.holderMethodId.length === 32 && true)) {
1667
+ __compactRuntime.typeError('assertMatchingOffchainMidnightHolderBindings',
1668
+ 'argument 1',
1669
+ 'holder-bindings.compact line 114 char 1',
1670
+ 'struct OffchainMidnightHolderBinding<holderDidStateHash: Bytes<32>, holderMethodId: Bytes<32>, holderPublicKey: Opaque<"JubjubPoint">>',
1671
+ credentialBinding_0)
1672
+ }
1673
+ if (!(typeof(presentationBinding_0) === 'object' && presentationBinding_0.holderDidStateHash.buffer instanceof ArrayBuffer && presentationBinding_0.holderDidStateHash.BYTES_PER_ELEMENT === 1 && presentationBinding_0.holderDidStateHash.length === 32 && presentationBinding_0.holderMethodId.buffer instanceof ArrayBuffer && presentationBinding_0.holderMethodId.BYTES_PER_ELEMENT === 1 && presentationBinding_0.holderMethodId.length === 32 && true)) {
1674
+ __compactRuntime.typeError('assertMatchingOffchainMidnightHolderBindings',
1675
+ 'argument 2',
1676
+ 'holder-bindings.compact line 114 char 1',
1677
+ 'struct OffchainMidnightHolderBinding<holderDidStateHash: Bytes<32>, holderMethodId: Bytes<32>, holderPublicKey: Opaque<"JubjubPoint">>',
1678
+ presentationBinding_0)
1679
+ }
1680
+ return _dummyContract._assertMatchingOffchainMidnightHolderBindings_0(credentialBinding_0,
1681
+ presentationBinding_0);
1682
+ },
1683
+ assertProofMatchesOffchainMidnightHolderBinding: (...args_0) => {
1684
+ if (args_0.length !== 2) {
1685
+ throw new __compactRuntime.CompactError(`assertProofMatchesOffchainMidnightHolderBinding: expected 2 arguments (as invoked from Typescript), received ${args_0.length}`);
1686
+ }
1687
+ const binding_0 = args_0[0];
1688
+ const presentationProof_0 = args_0[1];
1689
+ if (!(typeof(binding_0) === 'object' && binding_0.holderDidStateHash.buffer instanceof ArrayBuffer && binding_0.holderDidStateHash.BYTES_PER_ELEMENT === 1 && binding_0.holderDidStateHash.length === 32 && binding_0.holderMethodId.buffer instanceof ArrayBuffer && binding_0.holderMethodId.BYTES_PER_ELEMENT === 1 && binding_0.holderMethodId.length === 32 && true)) {
1690
+ __compactRuntime.typeError('assertProofMatchesOffchainMidnightHolderBinding',
1691
+ 'argument 1',
1692
+ 'holder-bindings.compact line 140 char 1',
1693
+ 'struct OffchainMidnightHolderBinding<holderDidStateHash: Bytes<32>, holderMethodId: Bytes<32>, holderPublicKey: Opaque<"JubjubPoint">>',
1694
+ binding_0)
1695
+ }
1696
+ if (!(typeof(presentationProof_0) === 'object' && typeof(presentationProof_0.signerVerificationMethodRef) === 'object' && typeof(presentationProof_0.signerVerificationMethodRef.didContractAddress) === 'object' && presentationProof_0.signerVerificationMethodRef.didContractAddress.bytes.buffer instanceof ArrayBuffer && presentationProof_0.signerVerificationMethodRef.didContractAddress.bytes.BYTES_PER_ELEMENT === 1 && presentationProof_0.signerVerificationMethodRef.didContractAddress.bytes.length === 32 && presentationProof_0.signerVerificationMethodRef.methodId.buffer instanceof ArrayBuffer && presentationProof_0.signerVerificationMethodRef.methodId.BYTES_PER_ELEMENT === 1 && presentationProof_0.signerVerificationMethodRef.methodId.length === 32 && typeof(presentationProof_0.createdAt) === 'bigint' && presentationProof_0.createdAt >= 0n && presentationProof_0.createdAt <= 18446744073709551615n && presentationProof_0.challengeHash.buffer instanceof ArrayBuffer && presentationProof_0.challengeHash.BYTES_PER_ELEMENT === 1 && presentationProof_0.challengeHash.length === 32 && true && typeof(presentationProof_0.signature) === 'object' && true && typeof(presentationProof_0.signature.s) === 'bigint' && presentationProof_0.signature.s >= 0 && presentationProof_0.signature.s <= __compactRuntime.MAX_FIELD)) {
1697
+ __compactRuntime.typeError('assertProofMatchesOffchainMidnightHolderBinding',
1698
+ 'argument 2',
1699
+ 'holder-bindings.compact line 140 char 1',
1700
+ 'struct Proof<signerVerificationMethodRef: struct VerificationMethodRef<didContractAddress: struct ContractAddress<bytes: Bytes<32>>, methodId: Bytes<32>>, createdAt: Uint<0..18446744073709551616>, challengeHash: Bytes<32>, publicKey: Opaque<"JubjubPoint">, signature: struct Signature<r: Opaque<"JubjubPoint">, s: Field>>',
1701
+ presentationProof_0)
1702
+ }
1703
+ return _dummyContract._assertProofMatchesOffchainMidnightHolderBinding_0(binding_0,
1704
+ presentationProof_0);
1705
+ },
1706
+ noSecretHolderChallengeResponse: (...args_0) => {
1707
+ if (args_0.length !== 0) {
1708
+ throw new __compactRuntime.CompactError(`noSecretHolderChallengeResponse: expected 0 arguments (as invoked from Typescript), received ${args_0.length}`);
1709
+ }
1710
+ return _dummyContract._noSecretHolderChallengeResponse_0();
1711
+ },
1712
+ secretHolderBindingCommitment: (...args_0) => {
1713
+ if (args_0.length !== 2) {
1714
+ throw new __compactRuntime.CompactError(`secretHolderBindingCommitment: expected 2 arguments (as invoked from Typescript), received ${args_0.length}`);
1715
+ }
1716
+ const holderSecret_0 = args_0[0];
1717
+ const opening_0 = args_0[1];
1718
+ if (!(holderSecret_0.buffer instanceof ArrayBuffer && holderSecret_0.BYTES_PER_ELEMENT === 1 && holderSecret_0.length === 32)) {
1719
+ __compactRuntime.typeError('secretHolderBindingCommitment',
1720
+ 'argument 1',
1721
+ 'holder-bindings.compact line 157 char 1',
1722
+ 'Bytes<32>',
1723
+ holderSecret_0)
1724
+ }
1725
+ if (!(opening_0.buffer instanceof ArrayBuffer && opening_0.BYTES_PER_ELEMENT === 1 && opening_0.length === 32)) {
1726
+ __compactRuntime.typeError('secretHolderBindingCommitment',
1727
+ 'argument 2',
1728
+ 'holder-bindings.compact line 157 char 1',
1729
+ 'Bytes<32>',
1730
+ opening_0)
1731
+ }
1732
+ return _dummyContract._secretHolderBindingCommitment_0(holderSecret_0,
1733
+ opening_0);
1734
+ },
1735
+ secretHolderBindingChallengeResponse: (...args_0) => {
1736
+ if (args_0.length !== 2) {
1737
+ throw new __compactRuntime.CompactError(`secretHolderBindingChallengeResponse: expected 2 arguments (as invoked from Typescript), received ${args_0.length}`);
1738
+ }
1739
+ const holderSecret_0 = args_0[0];
1740
+ const verifierChallengeHash_0 = args_0[1];
1741
+ if (!(holderSecret_0.buffer instanceof ArrayBuffer && holderSecret_0.BYTES_PER_ELEMENT === 1 && holderSecret_0.length === 32)) {
1742
+ __compactRuntime.typeError('secretHolderBindingChallengeResponse',
1743
+ 'argument 1',
1744
+ 'holder-bindings.compact line 164 char 1',
1745
+ 'Bytes<32>',
1746
+ holderSecret_0)
1747
+ }
1748
+ if (!(verifierChallengeHash_0.buffer instanceof ArrayBuffer && verifierChallengeHash_0.BYTES_PER_ELEMENT === 1 && verifierChallengeHash_0.length === 32)) {
1749
+ __compactRuntime.typeError('secretHolderBindingChallengeResponse',
1750
+ 'argument 2',
1751
+ 'holder-bindings.compact line 164 char 1',
1752
+ 'Bytes<32>',
1753
+ verifierChallengeHash_0)
1754
+ }
1755
+ return _dummyContract._secretHolderBindingChallengeResponse_0(holderSecret_0,
1756
+ verifierChallengeHash_0);
1757
+ },
1758
+ verifierScopedPseudonym: (...args_0) => {
1759
+ if (args_0.length !== 2) {
1760
+ throw new __compactRuntime.CompactError(`verifierScopedPseudonym: expected 2 arguments (as invoked from Typescript), received ${args_0.length}`);
1761
+ }
1762
+ const holderSecret_0 = args_0[0];
1763
+ const verifierDomainHash_0 = args_0[1];
1764
+ if (!(holderSecret_0.buffer instanceof ArrayBuffer && holderSecret_0.BYTES_PER_ELEMENT === 1 && holderSecret_0.length === 32)) {
1765
+ __compactRuntime.typeError('verifierScopedPseudonym',
1766
+ 'argument 1',
1767
+ 'holder-bindings.compact line 175 char 1',
1768
+ 'Bytes<32>',
1769
+ holderSecret_0)
1770
+ }
1771
+ if (!(verifierDomainHash_0.buffer instanceof ArrayBuffer && verifierDomainHash_0.BYTES_PER_ELEMENT === 1 && verifierDomainHash_0.length === 32)) {
1772
+ __compactRuntime.typeError('verifierScopedPseudonym',
1773
+ 'argument 2',
1774
+ 'holder-bindings.compact line 175 char 1',
1775
+ 'Bytes<32>',
1776
+ verifierDomainHash_0)
1777
+ }
1778
+ return _dummyContract._verifierScopedPseudonym_0(holderSecret_0,
1779
+ verifierDomainHash_0);
1780
+ },
1781
+ assertVerifierScopedPseudonym: (...args_0) => {
1782
+ if (args_0.length !== 3) {
1783
+ throw new __compactRuntime.CompactError(`assertVerifierScopedPseudonym: expected 3 arguments (as invoked from Typescript), received ${args_0.length}`);
1784
+ }
1785
+ const pseudonym_0 = args_0[0];
1786
+ const holderSecret_0 = args_0[1];
1787
+ const verifierDomainHash_0 = args_0[2];
1788
+ if (!(pseudonym_0.buffer instanceof ArrayBuffer && pseudonym_0.BYTES_PER_ELEMENT === 1 && pseudonym_0.length === 32)) {
1789
+ __compactRuntime.typeError('assertVerifierScopedPseudonym',
1790
+ 'argument 1',
1791
+ 'holder-bindings.compact line 186 char 1',
1792
+ 'Bytes<32>',
1793
+ pseudonym_0)
1794
+ }
1795
+ if (!(holderSecret_0.buffer instanceof ArrayBuffer && holderSecret_0.BYTES_PER_ELEMENT === 1 && holderSecret_0.length === 32)) {
1796
+ __compactRuntime.typeError('assertVerifierScopedPseudonym',
1797
+ 'argument 2',
1798
+ 'holder-bindings.compact line 186 char 1',
1799
+ 'Bytes<32>',
1800
+ holderSecret_0)
1801
+ }
1802
+ if (!(verifierDomainHash_0.buffer instanceof ArrayBuffer && verifierDomainHash_0.BYTES_PER_ELEMENT === 1 && verifierDomainHash_0.length === 32)) {
1803
+ __compactRuntime.typeError('assertVerifierScopedPseudonym',
1804
+ 'argument 3',
1805
+ 'holder-bindings.compact line 186 char 1',
1806
+ 'Bytes<32>',
1807
+ verifierDomainHash_0)
1808
+ }
1809
+ return _dummyContract._assertVerifierScopedPseudonym_0(pseudonym_0,
1810
+ holderSecret_0,
1811
+ verifierDomainHash_0);
1812
+ },
1813
+ blindedSecretHolderCommitment: (...args_0) => {
1814
+ if (args_0.length !== 3) {
1815
+ throw new __compactRuntime.CompactError(`blindedSecretHolderCommitment: expected 3 arguments (as invoked from Typescript), received ${args_0.length}`);
1816
+ }
1817
+ const holderSecretCommitment_0 = args_0[0];
1818
+ const issuerNonce_0 = args_0[1];
1819
+ const blindingFactor_0 = args_0[2];
1820
+ if (!(holderSecretCommitment_0.buffer instanceof ArrayBuffer && holderSecretCommitment_0.BYTES_PER_ELEMENT === 1 && holderSecretCommitment_0.length === 32)) {
1821
+ __compactRuntime.typeError('blindedSecretHolderCommitment',
1822
+ 'argument 1',
1823
+ 'holder-bindings.compact line 197 char 1',
1824
+ 'Bytes<32>',
1825
+ holderSecretCommitment_0)
1826
+ }
1827
+ if (!(issuerNonce_0.buffer instanceof ArrayBuffer && issuerNonce_0.BYTES_PER_ELEMENT === 1 && issuerNonce_0.length === 32)) {
1828
+ __compactRuntime.typeError('blindedSecretHolderCommitment',
1829
+ 'argument 2',
1830
+ 'holder-bindings.compact line 197 char 1',
1831
+ 'Bytes<32>',
1832
+ issuerNonce_0)
1833
+ }
1834
+ if (!(blindingFactor_0.buffer instanceof ArrayBuffer && blindingFactor_0.BYTES_PER_ELEMENT === 1 && blindingFactor_0.length === 32)) {
1835
+ __compactRuntime.typeError('blindedSecretHolderCommitment',
1836
+ 'argument 3',
1837
+ 'holder-bindings.compact line 197 char 1',
1838
+ 'Bytes<32>',
1839
+ blindingFactor_0)
1840
+ }
1841
+ return _dummyContract._blindedSecretHolderCommitment_0(holderSecretCommitment_0,
1842
+ issuerNonce_0,
1843
+ blindingFactor_0);
1844
+ },
1845
+ assertValidSecretHolderCredentialBinding: (...args_0) => {
1846
+ if (args_0.length !== 1) {
1847
+ throw new __compactRuntime.CompactError(`assertValidSecretHolderCredentialBinding: expected 1 argument (as invoked from Typescript), received ${args_0.length}`);
1848
+ }
1849
+ const binding_0 = args_0[0];
1850
+ if (!(typeof(binding_0) === 'object' && binding_0.holderSecretCommitment.buffer instanceof ArrayBuffer && binding_0.holderSecretCommitment.BYTES_PER_ELEMENT === 1 && binding_0.holderSecretCommitment.length === 32 && binding_0.requestChallengeResponse.buffer instanceof ArrayBuffer && binding_0.requestChallengeResponse.BYTES_PER_ELEMENT === 1 && binding_0.requestChallengeResponse.length === 32)) {
1851
+ __compactRuntime.typeError('assertValidSecretHolderCredentialBinding',
1852
+ 'argument 1',
1853
+ 'holder-bindings.compact line 213 char 1',
1854
+ 'struct SecretHolderBinding<holderSecretCommitment: Bytes<32>, requestChallengeResponse: Bytes<32>>',
1855
+ binding_0)
1856
+ }
1857
+ return _dummyContract._assertValidSecretHolderCredentialBinding_0(binding_0);
1858
+ },
1859
+ assertValidSecretHolderPresentationBinding: (...args_0) => {
1860
+ if (args_0.length !== 1) {
1861
+ throw new __compactRuntime.CompactError(`assertValidSecretHolderPresentationBinding: expected 1 argument (as invoked from Typescript), received ${args_0.length}`);
1862
+ }
1863
+ const binding_0 = args_0[0];
1864
+ if (!(typeof(binding_0) === 'object' && binding_0.holderSecretCommitment.buffer instanceof ArrayBuffer && binding_0.holderSecretCommitment.BYTES_PER_ELEMENT === 1 && binding_0.holderSecretCommitment.length === 32 && binding_0.requestChallengeResponse.buffer instanceof ArrayBuffer && binding_0.requestChallengeResponse.BYTES_PER_ELEMENT === 1 && binding_0.requestChallengeResponse.length === 32)) {
1865
+ __compactRuntime.typeError('assertValidSecretHolderPresentationBinding',
1866
+ 'argument 1',
1867
+ 'holder-bindings.compact line 222 char 1',
1868
+ 'struct SecretHolderBinding<holderSecretCommitment: Bytes<32>, requestChallengeResponse: Bytes<32>>',
1869
+ binding_0)
1870
+ }
1871
+ return _dummyContract._assertValidSecretHolderPresentationBinding_0(binding_0);
1872
+ },
1873
+ assertMatchingSecretHolderBindings: (...args_0) => {
1874
+ if (args_0.length !== 2) {
1875
+ throw new __compactRuntime.CompactError(`assertMatchingSecretHolderBindings: expected 2 arguments (as invoked from Typescript), received ${args_0.length}`);
1876
+ }
1877
+ const credentialBinding_0 = args_0[0];
1878
+ const presentationBinding_0 = args_0[1];
1879
+ if (!(typeof(credentialBinding_0) === 'object' && credentialBinding_0.holderSecretCommitment.buffer instanceof ArrayBuffer && credentialBinding_0.holderSecretCommitment.BYTES_PER_ELEMENT === 1 && credentialBinding_0.holderSecretCommitment.length === 32 && credentialBinding_0.requestChallengeResponse.buffer instanceof ArrayBuffer && credentialBinding_0.requestChallengeResponse.BYTES_PER_ELEMENT === 1 && credentialBinding_0.requestChallengeResponse.length === 32)) {
1880
+ __compactRuntime.typeError('assertMatchingSecretHolderBindings',
1881
+ 'argument 1',
1882
+ 'holder-bindings.compact line 231 char 1',
1883
+ 'struct SecretHolderBinding<holderSecretCommitment: Bytes<32>, requestChallengeResponse: Bytes<32>>',
1884
+ credentialBinding_0)
1885
+ }
1886
+ if (!(typeof(presentationBinding_0) === 'object' && presentationBinding_0.holderSecretCommitment.buffer instanceof ArrayBuffer && presentationBinding_0.holderSecretCommitment.BYTES_PER_ELEMENT === 1 && presentationBinding_0.holderSecretCommitment.length === 32 && presentationBinding_0.requestChallengeResponse.buffer instanceof ArrayBuffer && presentationBinding_0.requestChallengeResponse.BYTES_PER_ELEMENT === 1 && presentationBinding_0.requestChallengeResponse.length === 32)) {
1887
+ __compactRuntime.typeError('assertMatchingSecretHolderBindings',
1888
+ 'argument 2',
1889
+ 'holder-bindings.compact line 231 char 1',
1890
+ 'struct SecretHolderBinding<holderSecretCommitment: Bytes<32>, requestChallengeResponse: Bytes<32>>',
1891
+ presentationBinding_0)
1892
+ }
1893
+ return _dummyContract._assertMatchingSecretHolderBindings_0(credentialBinding_0,
1894
+ presentationBinding_0);
1895
+ },
1896
+ assertValidBlindedSecretHolderCredentialBinding: (...args_0) => {
1897
+ if (args_0.length !== 1) {
1898
+ throw new __compactRuntime.CompactError(`assertValidBlindedSecretHolderCredentialBinding: expected 1 argument (as invoked from Typescript), received ${args_0.length}`);
1899
+ }
1900
+ const binding_0 = args_0[0];
1901
+ if (!(typeof(binding_0) === 'object' && binding_0.blindedHolderSecretCommitment.buffer instanceof ArrayBuffer && binding_0.blindedHolderSecretCommitment.BYTES_PER_ELEMENT === 1 && binding_0.blindedHolderSecretCommitment.length === 32 && binding_0.issuerNonce.buffer instanceof ArrayBuffer && binding_0.issuerNonce.BYTES_PER_ELEMENT === 1 && binding_0.issuerNonce.length === 32 && binding_0.requestChallengeResponse.buffer instanceof ArrayBuffer && binding_0.requestChallengeResponse.BYTES_PER_ELEMENT === 1 && binding_0.requestChallengeResponse.length === 32)) {
1902
+ __compactRuntime.typeError('assertValidBlindedSecretHolderCredentialBinding',
1903
+ 'argument 1',
1904
+ 'holder-bindings.compact line 241 char 1',
1905
+ 'struct BlindedSecretHolderBinding<blindedHolderSecretCommitment: Bytes<32>, issuerNonce: Bytes<32>, requestChallengeResponse: Bytes<32>>',
1906
+ binding_0)
1907
+ }
1908
+ return _dummyContract._assertValidBlindedSecretHolderCredentialBinding_0(binding_0);
1909
+ },
1910
+ assertValidBlindedSecretHolderPresentationBinding: (...args_0) => {
1911
+ if (args_0.length !== 1) {
1912
+ throw new __compactRuntime.CompactError(`assertValidBlindedSecretHolderPresentationBinding: expected 1 argument (as invoked from Typescript), received ${args_0.length}`);
1913
+ }
1914
+ const binding_0 = args_0[0];
1915
+ if (!(typeof(binding_0) === 'object' && binding_0.blindedHolderSecretCommitment.buffer instanceof ArrayBuffer && binding_0.blindedHolderSecretCommitment.BYTES_PER_ELEMENT === 1 && binding_0.blindedHolderSecretCommitment.length === 32 && binding_0.issuerNonce.buffer instanceof ArrayBuffer && binding_0.issuerNonce.BYTES_PER_ELEMENT === 1 && binding_0.issuerNonce.length === 32 && binding_0.requestChallengeResponse.buffer instanceof ArrayBuffer && binding_0.requestChallengeResponse.BYTES_PER_ELEMENT === 1 && binding_0.requestChallengeResponse.length === 32)) {
1916
+ __compactRuntime.typeError('assertValidBlindedSecretHolderPresentationBinding',
1917
+ 'argument 1',
1918
+ 'holder-bindings.compact line 250 char 1',
1919
+ 'struct BlindedSecretHolderBinding<blindedHolderSecretCommitment: Bytes<32>, issuerNonce: Bytes<32>, requestChallengeResponse: Bytes<32>>',
1920
+ binding_0)
1921
+ }
1922
+ return _dummyContract._assertValidBlindedSecretHolderPresentationBinding_0(binding_0);
1923
+ },
1924
+ assertMatchingBlindedSecretHolderBindings: (...args_0) => {
1925
+ if (args_0.length !== 2) {
1926
+ throw new __compactRuntime.CompactError(`assertMatchingBlindedSecretHolderBindings: expected 2 arguments (as invoked from Typescript), received ${args_0.length}`);
1927
+ }
1928
+ const credentialBinding_0 = args_0[0];
1929
+ const presentationBinding_0 = args_0[1];
1930
+ if (!(typeof(credentialBinding_0) === 'object' && credentialBinding_0.blindedHolderSecretCommitment.buffer instanceof ArrayBuffer && credentialBinding_0.blindedHolderSecretCommitment.BYTES_PER_ELEMENT === 1 && credentialBinding_0.blindedHolderSecretCommitment.length === 32 && credentialBinding_0.issuerNonce.buffer instanceof ArrayBuffer && credentialBinding_0.issuerNonce.BYTES_PER_ELEMENT === 1 && credentialBinding_0.issuerNonce.length === 32 && credentialBinding_0.requestChallengeResponse.buffer instanceof ArrayBuffer && credentialBinding_0.requestChallengeResponse.BYTES_PER_ELEMENT === 1 && credentialBinding_0.requestChallengeResponse.length === 32)) {
1931
+ __compactRuntime.typeError('assertMatchingBlindedSecretHolderBindings',
1932
+ 'argument 1',
1933
+ 'holder-bindings.compact line 259 char 1',
1934
+ 'struct BlindedSecretHolderBinding<blindedHolderSecretCommitment: Bytes<32>, issuerNonce: Bytes<32>, requestChallengeResponse: Bytes<32>>',
1935
+ credentialBinding_0)
1936
+ }
1937
+ if (!(typeof(presentationBinding_0) === 'object' && presentationBinding_0.blindedHolderSecretCommitment.buffer instanceof ArrayBuffer && presentationBinding_0.blindedHolderSecretCommitment.BYTES_PER_ELEMENT === 1 && presentationBinding_0.blindedHolderSecretCommitment.length === 32 && presentationBinding_0.issuerNonce.buffer instanceof ArrayBuffer && presentationBinding_0.issuerNonce.BYTES_PER_ELEMENT === 1 && presentationBinding_0.issuerNonce.length === 32 && presentationBinding_0.requestChallengeResponse.buffer instanceof ArrayBuffer && presentationBinding_0.requestChallengeResponse.BYTES_PER_ELEMENT === 1 && presentationBinding_0.requestChallengeResponse.length === 32)) {
1938
+ __compactRuntime.typeError('assertMatchingBlindedSecretHolderBindings',
1939
+ 'argument 2',
1940
+ 'holder-bindings.compact line 259 char 1',
1941
+ 'struct BlindedSecretHolderBinding<blindedHolderSecretCommitment: Bytes<32>, issuerNonce: Bytes<32>, requestChallengeResponse: Bytes<32>>',
1942
+ presentationBinding_0)
1943
+ }
1944
+ return _dummyContract._assertMatchingBlindedSecretHolderBindings_0(credentialBinding_0,
1945
+ presentationBinding_0);
1946
+ },
1947
+ assertSecretHolderBindingWitness: (...args_0) => {
1948
+ if (args_0.length !== 4) {
1949
+ throw new __compactRuntime.CompactError(`assertSecretHolderBindingWitness: expected 4 arguments (as invoked from Typescript), received ${args_0.length}`);
1950
+ }
1951
+ const binding_0 = args_0[0];
1952
+ const verifierChallengeHash_0 = args_0[1];
1953
+ const holderSecret_0 = args_0[2];
1954
+ const opening_0 = args_0[3];
1955
+ if (!(typeof(binding_0) === 'object' && binding_0.holderSecretCommitment.buffer instanceof ArrayBuffer && binding_0.holderSecretCommitment.BYTES_PER_ELEMENT === 1 && binding_0.holderSecretCommitment.length === 32 && binding_0.requestChallengeResponse.buffer instanceof ArrayBuffer && binding_0.requestChallengeResponse.BYTES_PER_ELEMENT === 1 && binding_0.requestChallengeResponse.length === 32)) {
1956
+ __compactRuntime.typeError('assertSecretHolderBindingWitness',
1957
+ 'argument 1',
1958
+ 'holder-bindings.compact line 279 char 1',
1959
+ 'struct SecretHolderBinding<holderSecretCommitment: Bytes<32>, requestChallengeResponse: Bytes<32>>',
1960
+ binding_0)
1961
+ }
1962
+ if (!(verifierChallengeHash_0.buffer instanceof ArrayBuffer && verifierChallengeHash_0.BYTES_PER_ELEMENT === 1 && verifierChallengeHash_0.length === 32)) {
1963
+ __compactRuntime.typeError('assertSecretHolderBindingWitness',
1964
+ 'argument 2',
1965
+ 'holder-bindings.compact line 279 char 1',
1966
+ 'Bytes<32>',
1967
+ verifierChallengeHash_0)
1968
+ }
1969
+ if (!(holderSecret_0.buffer instanceof ArrayBuffer && holderSecret_0.BYTES_PER_ELEMENT === 1 && holderSecret_0.length === 32)) {
1970
+ __compactRuntime.typeError('assertSecretHolderBindingWitness',
1971
+ 'argument 3',
1972
+ 'holder-bindings.compact line 279 char 1',
1973
+ 'Bytes<32>',
1974
+ holderSecret_0)
1975
+ }
1976
+ if (!(opening_0.buffer instanceof ArrayBuffer && opening_0.BYTES_PER_ELEMENT === 1 && opening_0.length === 32)) {
1977
+ __compactRuntime.typeError('assertSecretHolderBindingWitness',
1978
+ 'argument 4',
1979
+ 'holder-bindings.compact line 279 char 1',
1980
+ 'Bytes<32>',
1981
+ opening_0)
1982
+ }
1983
+ return _dummyContract._assertSecretHolderBindingWitness_0(binding_0,
1984
+ verifierChallengeHash_0,
1985
+ holderSecret_0,
1986
+ opening_0);
1987
+ },
1988
+ assertBlindedSecretHolderBindingWitness: (...args_0) => {
1989
+ if (args_0.length !== 5) {
1990
+ throw new __compactRuntime.CompactError(`assertBlindedSecretHolderBindingWitness: expected 5 arguments (as invoked from Typescript), received ${args_0.length}`);
1991
+ }
1992
+ const binding_0 = args_0[0];
1993
+ const verifierChallengeHash_0 = args_0[1];
1994
+ const holderSecret_0 = args_0[2];
1995
+ const opening_0 = args_0[3];
1996
+ const blindingFactor_0 = args_0[4];
1997
+ if (!(typeof(binding_0) === 'object' && binding_0.blindedHolderSecretCommitment.buffer instanceof ArrayBuffer && binding_0.blindedHolderSecretCommitment.BYTES_PER_ELEMENT === 1 && binding_0.blindedHolderSecretCommitment.length === 32 && binding_0.issuerNonce.buffer instanceof ArrayBuffer && binding_0.issuerNonce.BYTES_PER_ELEMENT === 1 && binding_0.issuerNonce.length === 32 && binding_0.requestChallengeResponse.buffer instanceof ArrayBuffer && binding_0.requestChallengeResponse.BYTES_PER_ELEMENT === 1 && binding_0.requestChallengeResponse.length === 32)) {
1998
+ __compactRuntime.typeError('assertBlindedSecretHolderBindingWitness',
1999
+ 'argument 1',
2000
+ 'holder-bindings.compact line 296 char 1',
2001
+ 'struct BlindedSecretHolderBinding<blindedHolderSecretCommitment: Bytes<32>, issuerNonce: Bytes<32>, requestChallengeResponse: Bytes<32>>',
2002
+ binding_0)
2003
+ }
2004
+ if (!(verifierChallengeHash_0.buffer instanceof ArrayBuffer && verifierChallengeHash_0.BYTES_PER_ELEMENT === 1 && verifierChallengeHash_0.length === 32)) {
2005
+ __compactRuntime.typeError('assertBlindedSecretHolderBindingWitness',
2006
+ 'argument 2',
2007
+ 'holder-bindings.compact line 296 char 1',
2008
+ 'Bytes<32>',
2009
+ verifierChallengeHash_0)
2010
+ }
2011
+ if (!(holderSecret_0.buffer instanceof ArrayBuffer && holderSecret_0.BYTES_PER_ELEMENT === 1 && holderSecret_0.length === 32)) {
2012
+ __compactRuntime.typeError('assertBlindedSecretHolderBindingWitness',
2013
+ 'argument 3',
2014
+ 'holder-bindings.compact line 296 char 1',
2015
+ 'Bytes<32>',
2016
+ holderSecret_0)
2017
+ }
2018
+ if (!(opening_0.buffer instanceof ArrayBuffer && opening_0.BYTES_PER_ELEMENT === 1 && opening_0.length === 32)) {
2019
+ __compactRuntime.typeError('assertBlindedSecretHolderBindingWitness',
2020
+ 'argument 4',
2021
+ 'holder-bindings.compact line 296 char 1',
2022
+ 'Bytes<32>',
2023
+ opening_0)
2024
+ }
2025
+ if (!(blindingFactor_0.buffer instanceof ArrayBuffer && blindingFactor_0.BYTES_PER_ELEMENT === 1 && blindingFactor_0.length === 32)) {
2026
+ __compactRuntime.typeError('assertBlindedSecretHolderBindingWitness',
2027
+ 'argument 5',
2028
+ 'holder-bindings.compact line 296 char 1',
2029
+ 'Bytes<32>',
2030
+ blindingFactor_0)
2031
+ }
2032
+ return _dummyContract._assertBlindedSecretHolderBindingWitness_0(binding_0,
2033
+ verifierChallengeHash_0,
2034
+ holderSecret_0,
2035
+ opening_0,
2036
+ blindingFactor_0);
2037
+ },
2038
+ protocolFeaturesAsSchemaCapabilities: (...args_0) => {
2039
+ if (args_0.length !== 1) {
2040
+ throw new __compactRuntime.CompactError(`protocolFeaturesAsSchemaCapabilities: expected 1 argument (as invoked from Typescript), received ${args_0.length}`);
2041
+ }
2042
+ const features_0 = args_0[0];
2043
+ if (!(typeof(features_0) === 'object' && typeof(features_0.supportsSelectiveDisclosure) === 'boolean' && typeof(features_0.supportsPredicateProofs) === 'boolean' && typeof(features_0.supportsVerifierScopedPseudonym) === 'boolean' && typeof(features_0.supportsSameHolderProof) === 'boolean')) {
2044
+ __compactRuntime.typeError('protocolFeaturesAsSchemaCapabilities',
2045
+ 'argument 1',
2046
+ 'protocols.compact line 20 char 1',
2047
+ 'struct CredentialProtocolFeatures<supportsSelectiveDisclosure: Boolean, supportsPredicateProofs: Boolean, supportsVerifierScopedPseudonym: Boolean, supportsSameHolderProof: Boolean>',
2048
+ features_0)
2049
+ }
2050
+ return _dummyContract._protocolFeaturesAsSchemaCapabilities_0(features_0);
2051
+ },
2052
+ assertProtocolFeaturesMatchSchemaCapabilities: (...args_0) => {
2053
+ if (args_0.length !== 2) {
2054
+ throw new __compactRuntime.CompactError(`assertProtocolFeaturesMatchSchemaCapabilities: expected 2 arguments (as invoked from Typescript), received ${args_0.length}`);
2055
+ }
2056
+ const features_0 = args_0[0];
2057
+ const capabilities_0 = args_0[1];
2058
+ if (!(typeof(features_0) === 'object' && typeof(features_0.supportsSelectiveDisclosure) === 'boolean' && typeof(features_0.supportsPredicateProofs) === 'boolean' && typeof(features_0.supportsVerifierScopedPseudonym) === 'boolean' && typeof(features_0.supportsSameHolderProof) === 'boolean')) {
2059
+ __compactRuntime.typeError('assertProtocolFeaturesMatchSchemaCapabilities',
2060
+ 'argument 1',
2061
+ 'protocols.compact line 31 char 1',
2062
+ 'struct CredentialProtocolFeatures<supportsSelectiveDisclosure: Boolean, supportsPredicateProofs: Boolean, supportsVerifierScopedPseudonym: Boolean, supportsSameHolderProof: Boolean>',
2063
+ features_0)
2064
+ }
2065
+ if (!(typeof(capabilities_0) === 'object' && typeof(capabilities_0.supportsSelectiveDisclosure) === 'boolean' && typeof(capabilities_0.supportsPredicateProofs) === 'boolean' && typeof(capabilities_0.supportsVerifierScopedPseudonym) === 'boolean' && typeof(capabilities_0.supportsSameHolderProof) === 'boolean')) {
2066
+ __compactRuntime.typeError('assertProtocolFeaturesMatchSchemaCapabilities',
2067
+ 'argument 2',
2068
+ 'protocols.compact line 31 char 1',
2069
+ 'struct SchemaCapabilities<supportsSelectiveDisclosure: Boolean, supportsPredicateProofs: Boolean, supportsVerifierScopedPseudonym: Boolean, supportsSameHolderProof: Boolean>',
2070
+ capabilities_0)
2071
+ }
2072
+ return _dummyContract._assertProtocolFeaturesMatchSchemaCapabilities_0(features_0,
2073
+ capabilities_0);
2074
+ },
2075
+ noProtocolResponseReference: (...args_0) => {
2076
+ if (args_0.length !== 0) {
2077
+ throw new __compactRuntime.CompactError(`noProtocolResponseReference: expected 0 arguments (as invoked from Typescript), received ${args_0.length}`);
2078
+ }
2079
+ return _dummyContract._noProtocolResponseReference_0();
2080
+ },
2081
+ assertValidVerificationMethodRef: (...args_0) => {
2082
+ if (args_0.length !== 1) {
2083
+ throw new __compactRuntime.CompactError(`assertValidVerificationMethodRef: expected 1 argument (as invoked from Typescript), received ${args_0.length}`);
2084
+ }
2085
+ const verificationMethodRef_0 = args_0[0];
2086
+ if (!(typeof(verificationMethodRef_0) === 'object' && typeof(verificationMethodRef_0.didContractAddress) === 'object' && verificationMethodRef_0.didContractAddress.bytes.buffer instanceof ArrayBuffer && verificationMethodRef_0.didContractAddress.bytes.BYTES_PER_ELEMENT === 1 && verificationMethodRef_0.didContractAddress.bytes.length === 32 && verificationMethodRef_0.methodId.buffer instanceof ArrayBuffer && verificationMethodRef_0.methodId.BYTES_PER_ELEMENT === 1 && verificationMethodRef_0.methodId.length === 32)) {
2087
+ __compactRuntime.typeError('assertValidVerificationMethodRef',
2088
+ 'argument 1',
2089
+ 'protocols.compact line 56 char 1',
2090
+ 'struct VerificationMethodRef<didContractAddress: struct ContractAddress<bytes: Bytes<32>>, methodId: Bytes<32>>',
2091
+ verificationMethodRef_0)
2092
+ }
2093
+ return _dummyContract._assertValidVerificationMethodRef_0(verificationMethodRef_0);
2094
+ },
2095
+ assertMatchingSchemaRefs: (...args_0) => {
2096
+ if (args_0.length !== 2) {
2097
+ throw new __compactRuntime.CompactError(`assertMatchingSchemaRefs: expected 2 arguments (as invoked from Typescript), received ${args_0.length}`);
2098
+ }
2099
+ const expected_0 = args_0[0];
2100
+ const actual_0 = args_0[1];
2101
+ if (!(typeof(expected_0) === 'object' && expected_0.packageId.buffer instanceof ArrayBuffer && expected_0.packageId.BYTES_PER_ELEMENT === 1 && expected_0.packageId.length === 32 && expected_0.schemaId.buffer instanceof ArrayBuffer && expected_0.schemaId.BYTES_PER_ELEMENT === 1 && expected_0.schemaId.length === 32 && typeof(expected_0.majorVersion) === 'bigint' && expected_0.majorVersion >= 0n && expected_0.majorVersion <= 65535n && typeof(expected_0.minorVersion) === 'bigint' && expected_0.minorVersion >= 0n && expected_0.minorVersion <= 65535n)) {
2102
+ __compactRuntime.typeError('assertMatchingSchemaRefs',
2103
+ 'argument 1',
2104
+ 'protocols.compact line 65 char 1',
2105
+ 'struct SchemaRef<packageId: Bytes<32>, schemaId: Bytes<32>, majorVersion: Uint<0..65536>, minorVersion: Uint<0..65536>>',
2106
+ expected_0)
2107
+ }
2108
+ if (!(typeof(actual_0) === 'object' && actual_0.packageId.buffer instanceof ArrayBuffer && actual_0.packageId.BYTES_PER_ELEMENT === 1 && actual_0.packageId.length === 32 && actual_0.schemaId.buffer instanceof ArrayBuffer && actual_0.schemaId.BYTES_PER_ELEMENT === 1 && actual_0.schemaId.length === 32 && typeof(actual_0.majorVersion) === 'bigint' && actual_0.majorVersion >= 0n && actual_0.majorVersion <= 65535n && typeof(actual_0.minorVersion) === 'bigint' && actual_0.minorVersion >= 0n && actual_0.minorVersion <= 65535n)) {
2109
+ __compactRuntime.typeError('assertMatchingSchemaRefs',
2110
+ 'argument 2',
2111
+ 'protocols.compact line 65 char 1',
2112
+ 'struct SchemaRef<packageId: Bytes<32>, schemaId: Bytes<32>, majorVersion: Uint<0..65536>, minorVersion: Uint<0..65536>>',
2113
+ actual_0)
2114
+ }
2115
+ return _dummyContract._assertMatchingSchemaRefs_0(expected_0, actual_0);
2116
+ },
2117
+ assertValidProtocolMessageEnvelope: (...args_0) => {
2118
+ if (args_0.length !== 1) {
2119
+ throw new __compactRuntime.CompactError(`assertValidProtocolMessageEnvelope: expected 1 argument (as invoked from Typescript), received ${args_0.length}`);
2120
+ }
2121
+ const envelope_0 = args_0[0];
2122
+ if (!(typeof(envelope_0) === 'object' && typeof(envelope_0.version) === 'bigint' && envelope_0.version >= 0n && envelope_0.version <= 65535n && envelope_0.messageId.buffer instanceof ArrayBuffer && envelope_0.messageId.BYTES_PER_ELEMENT === 1 && envelope_0.messageId.length === 32 && envelope_0.threadId.buffer instanceof ArrayBuffer && envelope_0.threadId.BYTES_PER_ELEMENT === 1 && envelope_0.threadId.length === 32 && typeof(envelope_0.initialMessage) === 'boolean' && envelope_0.respondsToMessageId.buffer instanceof ArrayBuffer && envelope_0.respondsToMessageId.BYTES_PER_ELEMENT === 1 && envelope_0.respondsToMessageId.length === 32 && typeof(envelope_0.createdAt) === 'bigint' && envelope_0.createdAt >= 0n && envelope_0.createdAt <= 18446744073709551615n && typeof(envelope_0.hasExpiresAt) === 'boolean' && typeof(envelope_0.expiresAt) === 'bigint' && envelope_0.expiresAt >= 0n && envelope_0.expiresAt <= 18446744073709551615n)) {
2123
+ __compactRuntime.typeError('assertValidProtocolMessageEnvelope',
2124
+ 'argument 1',
2125
+ 'protocols.compact line 80 char 1',
2126
+ 'struct ProtocolMessageEnvelope<version: Uint<0..65536>, messageId: Bytes<32>, threadId: Bytes<32>, initialMessage: Boolean, respondsToMessageId: Bytes<32>, createdAt: Uint<0..18446744073709551616>, hasExpiresAt: Boolean, expiresAt: Uint<0..18446744073709551616>>',
2127
+ envelope_0)
2128
+ }
2129
+ return _dummyContract._assertValidProtocolMessageEnvelope_0(envelope_0);
2130
+ },
2131
+ assertProtocolResponseEnvelope: (...args_0) => {
2132
+ if (args_0.length !== 2) {
2133
+ throw new __compactRuntime.CompactError(`assertProtocolResponseEnvelope: expected 2 arguments (as invoked from Typescript), received ${args_0.length}`);
2134
+ }
2135
+ const requestEnvelope_0 = args_0[0];
2136
+ const responseEnvelope_0 = args_0[1];
2137
+ if (!(typeof(requestEnvelope_0) === 'object' && typeof(requestEnvelope_0.version) === 'bigint' && requestEnvelope_0.version >= 0n && requestEnvelope_0.version <= 65535n && requestEnvelope_0.messageId.buffer instanceof ArrayBuffer && requestEnvelope_0.messageId.BYTES_PER_ELEMENT === 1 && requestEnvelope_0.messageId.length === 32 && requestEnvelope_0.threadId.buffer instanceof ArrayBuffer && requestEnvelope_0.threadId.BYTES_PER_ELEMENT === 1 && requestEnvelope_0.threadId.length === 32 && typeof(requestEnvelope_0.initialMessage) === 'boolean' && requestEnvelope_0.respondsToMessageId.buffer instanceof ArrayBuffer && requestEnvelope_0.respondsToMessageId.BYTES_PER_ELEMENT === 1 && requestEnvelope_0.respondsToMessageId.length === 32 && typeof(requestEnvelope_0.createdAt) === 'bigint' && requestEnvelope_0.createdAt >= 0n && requestEnvelope_0.createdAt <= 18446744073709551615n && typeof(requestEnvelope_0.hasExpiresAt) === 'boolean' && typeof(requestEnvelope_0.expiresAt) === 'bigint' && requestEnvelope_0.expiresAt >= 0n && requestEnvelope_0.expiresAt <= 18446744073709551615n)) {
2138
+ __compactRuntime.typeError('assertProtocolResponseEnvelope',
2139
+ 'argument 1',
2140
+ 'protocols.compact line 106 char 1',
2141
+ 'struct ProtocolMessageEnvelope<version: Uint<0..65536>, messageId: Bytes<32>, threadId: Bytes<32>, initialMessage: Boolean, respondsToMessageId: Bytes<32>, createdAt: Uint<0..18446744073709551616>, hasExpiresAt: Boolean, expiresAt: Uint<0..18446744073709551616>>',
2142
+ requestEnvelope_0)
2143
+ }
2144
+ if (!(typeof(responseEnvelope_0) === 'object' && typeof(responseEnvelope_0.version) === 'bigint' && responseEnvelope_0.version >= 0n && responseEnvelope_0.version <= 65535n && responseEnvelope_0.messageId.buffer instanceof ArrayBuffer && responseEnvelope_0.messageId.BYTES_PER_ELEMENT === 1 && responseEnvelope_0.messageId.length === 32 && responseEnvelope_0.threadId.buffer instanceof ArrayBuffer && responseEnvelope_0.threadId.BYTES_PER_ELEMENT === 1 && responseEnvelope_0.threadId.length === 32 && typeof(responseEnvelope_0.initialMessage) === 'boolean' && responseEnvelope_0.respondsToMessageId.buffer instanceof ArrayBuffer && responseEnvelope_0.respondsToMessageId.BYTES_PER_ELEMENT === 1 && responseEnvelope_0.respondsToMessageId.length === 32 && typeof(responseEnvelope_0.createdAt) === 'bigint' && responseEnvelope_0.createdAt >= 0n && responseEnvelope_0.createdAt <= 18446744073709551615n && typeof(responseEnvelope_0.hasExpiresAt) === 'boolean' && typeof(responseEnvelope_0.expiresAt) === 'bigint' && responseEnvelope_0.expiresAt >= 0n && responseEnvelope_0.expiresAt <= 18446744073709551615n)) {
2145
+ __compactRuntime.typeError('assertProtocolResponseEnvelope',
2146
+ 'argument 2',
2147
+ 'protocols.compact line 106 char 1',
2148
+ 'struct ProtocolMessageEnvelope<version: Uint<0..65536>, messageId: Bytes<32>, threadId: Bytes<32>, initialMessage: Boolean, respondsToMessageId: Bytes<32>, createdAt: Uint<0..18446744073709551616>, hasExpiresAt: Boolean, expiresAt: Uint<0..18446744073709551616>>',
2149
+ responseEnvelope_0)
2150
+ }
2151
+ return _dummyContract._assertProtocolResponseEnvelope_0(requestEnvelope_0,
2152
+ responseEnvelope_0);
2153
+ },
2154
+ assertValidStatusRegistryRef: (...args_0) => {
2155
+ if (args_0.length !== 1) {
2156
+ throw new __compactRuntime.CompactError(`assertValidStatusRegistryRef: expected 1 argument (as invoked from Typescript), received ${args_0.length}`);
2157
+ }
2158
+ const registryRef_0 = args_0[0];
2159
+ if (!(typeof(registryRef_0) === 'object' && registryRef_0.registryId.buffer instanceof ArrayBuffer && registryRef_0.registryId.BYTES_PER_ELEMENT === 1 && registryRef_0.registryId.length === 32 && typeof(registryRef_0.authorityVerificationMethodRef) === 'object' && typeof(registryRef_0.authorityVerificationMethodRef.didContractAddress) === 'object' && registryRef_0.authorityVerificationMethodRef.didContractAddress.bytes.buffer instanceof ArrayBuffer && registryRef_0.authorityVerificationMethodRef.didContractAddress.bytes.BYTES_PER_ELEMENT === 1 && registryRef_0.authorityVerificationMethodRef.didContractAddress.bytes.length === 32 && registryRef_0.authorityVerificationMethodRef.methodId.buffer instanceof ArrayBuffer && registryRef_0.authorityVerificationMethodRef.methodId.BYTES_PER_ELEMENT === 1 && registryRef_0.authorityVerificationMethodRef.methodId.length === 32)) {
2160
+ __compactRuntime.typeError('assertValidStatusRegistryRef',
2161
+ 'argument 1',
2162
+ 'status-bindings.compact line 24 char 1',
2163
+ 'struct StatusRegistryRef<registryId: Bytes<32>, authorityVerificationMethodRef: struct VerificationMethodRef<didContractAddress: struct ContractAddress<bytes: Bytes<32>>, methodId: Bytes<32>>>',
2164
+ registryRef_0)
2165
+ }
2166
+ return _dummyContract._assertValidStatusRegistryRef_0(registryRef_0);
2167
+ },
2168
+ assertValidNoStatusBinding: (...args_0) => {
2169
+ if (args_0.length !== 1) {
2170
+ throw new __compactRuntime.CompactError(`assertValidNoStatusBinding: expected 1 argument (as invoked from Typescript), received ${args_0.length}`);
2171
+ }
2172
+ const binding_0 = args_0[0];
2173
+ if (!(typeof(binding_0) === 'object')) {
2174
+ __compactRuntime.typeError('assertValidNoStatusBinding',
2175
+ 'argument 1',
2176
+ 'status-bindings.compact line 34 char 1',
2177
+ 'struct NoStatusBinding<>',
2178
+ binding_0)
2179
+ }
2180
+ return _dummyContract._assertValidNoStatusBinding_0(binding_0);
2181
+ },
2182
+ assertValidRegistryBoundStatusBinding: (...args_0) => {
2183
+ if (args_0.length !== 1) {
2184
+ throw new __compactRuntime.CompactError(`assertValidRegistryBoundStatusBinding: expected 1 argument (as invoked from Typescript), received ${args_0.length}`);
2185
+ }
2186
+ const binding_0 = args_0[0];
2187
+ if (!(typeof(binding_0) === 'object' && typeof(binding_0.statusType) === 'number' && binding_0.statusType >= 0 && binding_0.statusType <= 0 && typeof(binding_0.registryRef) === 'object' && binding_0.registryRef.registryId.buffer instanceof ArrayBuffer && binding_0.registryRef.registryId.BYTES_PER_ELEMENT === 1 && binding_0.registryRef.registryId.length === 32 && typeof(binding_0.registryRef.authorityVerificationMethodRef) === 'object' && typeof(binding_0.registryRef.authorityVerificationMethodRef.didContractAddress) === 'object' && binding_0.registryRef.authorityVerificationMethodRef.didContractAddress.bytes.buffer instanceof ArrayBuffer && binding_0.registryRef.authorityVerificationMethodRef.didContractAddress.bytes.BYTES_PER_ELEMENT === 1 && binding_0.registryRef.authorityVerificationMethodRef.didContractAddress.bytes.length === 32 && binding_0.registryRef.authorityVerificationMethodRef.methodId.buffer instanceof ArrayBuffer && binding_0.registryRef.authorityVerificationMethodRef.methodId.BYTES_PER_ELEMENT === 1 && binding_0.registryRef.authorityVerificationMethodRef.methodId.length === 32 && binding_0.statusHandleCommitment.buffer instanceof ArrayBuffer && binding_0.statusHandleCommitment.BYTES_PER_ELEMENT === 1 && binding_0.statusHandleCommitment.length === 32)) {
2188
+ __compactRuntime.typeError('assertValidRegistryBoundStatusBinding',
2189
+ 'argument 1',
2190
+ 'status-bindings.compact line 41 char 1',
2191
+ 'struct RegistryBoundStatusBinding<statusType: Enum<StatusType, revocationRegistry>, registryRef: struct StatusRegistryRef<registryId: Bytes<32>, authorityVerificationMethodRef: struct VerificationMethodRef<didContractAddress: struct ContractAddress<bytes: Bytes<32>>, methodId: Bytes<32>>>, statusHandleCommitment: Bytes<32>>',
2192
+ binding_0)
2193
+ }
2194
+ return _dummyContract._assertValidRegistryBoundStatusBinding_0(binding_0);
2195
+ },
2196
+ registryBoundStatusBindingRoot: (...args_0) => {
2197
+ if (args_0.length !== 1) {
2198
+ throw new __compactRuntime.CompactError(`registryBoundStatusBindingRoot: expected 1 argument (as invoked from Typescript), received ${args_0.length}`);
2199
+ }
2200
+ const binding_0 = args_0[0];
2201
+ if (!(typeof(binding_0) === 'object' && typeof(binding_0.statusType) === 'number' && binding_0.statusType >= 0 && binding_0.statusType <= 0 && typeof(binding_0.registryRef) === 'object' && binding_0.registryRef.registryId.buffer instanceof ArrayBuffer && binding_0.registryRef.registryId.BYTES_PER_ELEMENT === 1 && binding_0.registryRef.registryId.length === 32 && typeof(binding_0.registryRef.authorityVerificationMethodRef) === 'object' && typeof(binding_0.registryRef.authorityVerificationMethodRef.didContractAddress) === 'object' && binding_0.registryRef.authorityVerificationMethodRef.didContractAddress.bytes.buffer instanceof ArrayBuffer && binding_0.registryRef.authorityVerificationMethodRef.didContractAddress.bytes.BYTES_PER_ELEMENT === 1 && binding_0.registryRef.authorityVerificationMethodRef.didContractAddress.bytes.length === 32 && binding_0.registryRef.authorityVerificationMethodRef.methodId.buffer instanceof ArrayBuffer && binding_0.registryRef.authorityVerificationMethodRef.methodId.BYTES_PER_ELEMENT === 1 && binding_0.registryRef.authorityVerificationMethodRef.methodId.length === 32 && binding_0.statusHandleCommitment.buffer instanceof ArrayBuffer && binding_0.statusHandleCommitment.BYTES_PER_ELEMENT === 1 && binding_0.statusHandleCommitment.length === 32)) {
2202
+ __compactRuntime.typeError('registryBoundStatusBindingRoot',
2203
+ 'argument 1',
2204
+ 'status-bindings.compact line 55 char 1',
2205
+ 'struct RegistryBoundStatusBinding<statusType: Enum<StatusType, revocationRegistry>, registryRef: struct StatusRegistryRef<registryId: Bytes<32>, authorityVerificationMethodRef: struct VerificationMethodRef<didContractAddress: struct ContractAddress<bytes: Bytes<32>>, methodId: Bytes<32>>>, statusHandleCommitment: Bytes<32>>',
2206
+ binding_0)
2207
+ }
2208
+ return _dummyContract._registryBoundStatusBindingRoot_0(binding_0);
2209
+ }
2210
+ };
2211
+ export const contractReferenceLocations =
2212
+ { tag: 'publicLedgerArray', indices: { } };
2213
+ //# sourceMappingURL=index.js.map