@midnight-ntwrk/midnight-did-contract 0.5.0-rc1

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 (68) hide show
  1. package/LICENSE +201 -0
  2. package/README.md +63 -0
  3. package/dist/controller-key.d.ts +2 -0
  4. package/dist/controller-key.d.ts.map +1 -0
  5. package/dist/controller-key.js +30 -0
  6. package/dist/controller-key.js.map +1 -0
  7. package/dist/did.compact +375 -0
  8. package/dist/index.d.ts +4 -0
  9. package/dist/index.d.ts.map +1 -0
  10. package/dist/index.js +18 -0
  11. package/dist/index.js.map +1 -0
  12. package/dist/managed/did/compiler/contract-info.json +481 -0
  13. package/dist/managed/did/contract/index.d.ts +233 -0
  14. package/dist/managed/did/contract/index.js +3658 -0
  15. package/dist/managed/did/contract/index.js.map +8 -0
  16. package/dist/managed/did/keys/deactivate.prover +0 -0
  17. package/dist/managed/did/keys/deactivate.verifier +0 -0
  18. package/dist/managed/did/keys/removeSchnorrJubjubVerificationMethod.prover +0 -0
  19. package/dist/managed/did/keys/removeSchnorrJubjubVerificationMethod.verifier +0 -0
  20. package/dist/managed/did/keys/removeService.prover +0 -0
  21. package/dist/managed/did/keys/removeService.verifier +0 -0
  22. package/dist/managed/did/keys/removeVerificationMethod.prover +0 -0
  23. package/dist/managed/did/keys/removeVerificationMethod.verifier +0 -0
  24. package/dist/managed/did/keys/rotateControllerKey.prover +0 -0
  25. package/dist/managed/did/keys/rotateControllerKey.verifier +0 -0
  26. package/dist/managed/did/keys/setAlsoKnownAs.prover +0 -0
  27. package/dist/managed/did/keys/setAlsoKnownAs.verifier +0 -0
  28. package/dist/managed/did/keys/setSchnorrJubjubVerificationMethod.prover +0 -0
  29. package/dist/managed/did/keys/setSchnorrJubjubVerificationMethod.verifier +0 -0
  30. package/dist/managed/did/keys/setService.prover +0 -0
  31. package/dist/managed/did/keys/setService.verifier +0 -0
  32. package/dist/managed/did/keys/setVerificationMethod.prover +0 -0
  33. package/dist/managed/did/keys/setVerificationMethod.verifier +0 -0
  34. package/dist/managed/did/keys/setVerificationMethodRelation.prover +0 -0
  35. package/dist/managed/did/keys/setVerificationMethodRelation.verifier +0 -0
  36. package/dist/managed/did/keys/verifySchnorrJubjubDigestSignature.prover +0 -0
  37. package/dist/managed/did/keys/verifySchnorrJubjubDigestSignature.verifier +0 -0
  38. package/dist/managed/did/zkir/deactivate.bzkir +0 -0
  39. package/dist/managed/did/zkir/deactivate.zkir +162 -0
  40. package/dist/managed/did/zkir/removeSchnorrJubjubVerificationMethod.bzkir +0 -0
  41. package/dist/managed/did/zkir/removeSchnorrJubjubVerificationMethod.zkir +299 -0
  42. package/dist/managed/did/zkir/removeService.bzkir +0 -0
  43. package/dist/managed/did/zkir/removeService.zkir +166 -0
  44. package/dist/managed/did/zkir/removeVerificationMethod.bzkir +0 -0
  45. package/dist/managed/did/zkir/removeVerificationMethod.zkir +300 -0
  46. package/dist/managed/did/zkir/rotateControllerKey.bzkir +0 -0
  47. package/dist/managed/did/zkir/rotateControllerKey.zkir +166 -0
  48. package/dist/managed/did/zkir/setAlsoKnownAs.bzkir +0 -0
  49. package/dist/managed/did/zkir/setAlsoKnownAs.zkir +258 -0
  50. package/dist/managed/did/zkir/setSchnorrJubjubVerificationMethod.bzkir +0 -0
  51. package/dist/managed/did/zkir/setSchnorrJubjubVerificationMethod.zkir +293 -0
  52. package/dist/managed/did/zkir/setService.bzkir +0 -0
  53. package/dist/managed/did/zkir/setService.zkir +256 -0
  54. package/dist/managed/did/zkir/setVerificationMethod.bzkir +0 -0
  55. package/dist/managed/did/zkir/setVerificationMethod.zkir +326 -0
  56. package/dist/managed/did/zkir/setVerificationMethodRelation.bzkir +0 -0
  57. package/dist/managed/did/zkir/setVerificationMethodRelation.zkir +683 -0
  58. package/dist/managed/did/zkir/verifySchnorrJubjubDigestSignature.bzkir +0 -0
  59. package/dist/managed/did/zkir/verifySchnorrJubjubDigestSignature.zkir +110 -0
  60. package/dist/witnesses.d.ts +11 -0
  61. package/dist/witnesses.d.ts.map +1 -0
  62. package/dist/witnesses.js +27 -0
  63. package/dist/witnesses.js.map +1 -0
  64. package/package.json +64 -0
  65. package/scripts/align-runtime-version.mjs +41 -0
  66. package/scripts/strip-managed-sourcemaps.mjs +30 -0
  67. package/tsconfig.build.json +24 -0
  68. package/tsconfig.json +37 -0
@@ -0,0 +1,3658 @@
1
+ import * as __compactRuntime from '@midnight-ntwrk/compact-runtime';
2
+ __compactRuntime.checkRuntimeVersion('0.15.0');
3
+
4
+ export var VerificationMethodType;
5
+ (function (VerificationMethodType) {
6
+ VerificationMethodType[VerificationMethodType['Undefined'] = 0] = 'Undefined';
7
+ VerificationMethodType[VerificationMethodType['JsonWebKey'] = 1] = 'JsonWebKey';
8
+ })(VerificationMethodType || (VerificationMethodType = {}));
9
+
10
+ export var VerificationMethodRelation;
11
+ (function (VerificationMethodRelation) {
12
+ VerificationMethodRelation[VerificationMethodRelation['Undefined'] = 0] = 'Undefined';
13
+ VerificationMethodRelation[VerificationMethodRelation['Authentication'] = 1] = 'Authentication';
14
+ VerificationMethodRelation[VerificationMethodRelation['AssertionMethod'] = 2] = 'AssertionMethod';
15
+ VerificationMethodRelation[VerificationMethodRelation['KeyAgreement'] = 3] = 'KeyAgreement';
16
+ VerificationMethodRelation[VerificationMethodRelation['CapabilityInvocation'] = 4] = 'CapabilityInvocation';
17
+ VerificationMethodRelation[VerificationMethodRelation['CapabilityDelegation'] = 5] = 'CapabilityDelegation';
18
+ })(VerificationMethodRelation || (VerificationMethodRelation = {}));
19
+
20
+ export var MapMutation;
21
+ (function (MapMutation) {
22
+ MapMutation[MapMutation['Undefined'] = 0] = 'Undefined';
23
+ MapMutation[MapMutation['Insert'] = 1] = 'Insert';
24
+ MapMutation[MapMutation['Update'] = 2] = 'Update';
25
+ })(MapMutation || (MapMutation = {}));
26
+
27
+ export var SetMutation;
28
+ (function (SetMutation) {
29
+ SetMutation[SetMutation['Undefined'] = 0] = 'Undefined';
30
+ SetMutation[SetMutation['Insert'] = 1] = 'Insert';
31
+ SetMutation[SetMutation['Remove'] = 2] = 'Remove';
32
+ })(SetMutation || (SetMutation = {}));
33
+
34
+ export var KeyType;
35
+ (function (KeyType) {
36
+ KeyType[KeyType['EC'] = 0] = 'EC';
37
+ KeyType[KeyType['RSA'] = 1] = 'RSA';
38
+ KeyType[KeyType['oct'] = 2] = 'oct';
39
+ KeyType[KeyType['OKP'] = 3] = 'OKP';
40
+ })(KeyType || (KeyType = {}));
41
+
42
+ export var CurveType;
43
+ (function (CurveType) {
44
+ CurveType[CurveType['Ed25519'] = 0] = 'Ed25519';
45
+ CurveType[CurveType['X25519'] = 1] = 'X25519';
46
+ CurveType[CurveType['Jubjub'] = 2] = 'Jubjub';
47
+ CurveType[CurveType['P256'] = 3] = 'P256';
48
+ CurveType[CurveType['Secp256k1'] = 4] = 'Secp256k1';
49
+ CurveType[CurveType['BLS12381G1'] = 5] = 'BLS12381G1';
50
+ CurveType[CurveType['BLS12381G2'] = 6] = 'BLS12381G2';
51
+ })(CurveType || (CurveType = {}));
52
+
53
+ const _descriptor_0 = __compactRuntime.CompactTypeOpaqueString;
54
+
55
+ class _Service_0 {
56
+ alignment() {
57
+ return _descriptor_0.alignment().concat(_descriptor_0.alignment().concat(_descriptor_0.alignment()));
58
+ }
59
+ fromValue(value_0) {
60
+ return {
61
+ id: _descriptor_0.fromValue(value_0),
62
+ typ: _descriptor_0.fromValue(value_0),
63
+ serviceEndpoint: _descriptor_0.fromValue(value_0)
64
+ }
65
+ }
66
+ toValue(value_0) {
67
+ return _descriptor_0.toValue(value_0.id).concat(_descriptor_0.toValue(value_0.typ).concat(_descriptor_0.toValue(value_0.serviceEndpoint)));
68
+ }
69
+ }
70
+
71
+ const _descriptor_1 = new _Service_0();
72
+
73
+ const _descriptor_2 = __compactRuntime.CompactTypeBoolean;
74
+
75
+ const _descriptor_3 = new __compactRuntime.CompactTypeEnum(5, 1);
76
+
77
+ const _descriptor_4 = new __compactRuntime.CompactTypeEnum(2, 1);
78
+
79
+ const _descriptor_5 = new __compactRuntime.CompactTypeEnum(2, 1);
80
+
81
+ const _descriptor_6 = __compactRuntime.CompactTypeJubjubPoint;
82
+
83
+ class _SchnorrJubjubVerificationMethod_0 {
84
+ alignment() {
85
+ return _descriptor_0.alignment().concat(_descriptor_6.alignment());
86
+ }
87
+ fromValue(value_0) {
88
+ return {
89
+ id: _descriptor_0.fromValue(value_0),
90
+ publicKey: _descriptor_6.fromValue(value_0)
91
+ }
92
+ }
93
+ toValue(value_0) {
94
+ return _descriptor_0.toValue(value_0.id).concat(_descriptor_6.toValue(value_0.publicKey));
95
+ }
96
+ }
97
+
98
+ const _descriptor_7 = new _SchnorrJubjubVerificationMethod_0();
99
+
100
+ const _descriptor_8 = __compactRuntime.CompactTypeField;
101
+
102
+ const _descriptor_9 = new __compactRuntime.CompactTypeVector(4, _descriptor_8);
103
+
104
+ class _SchnorrSignature_0 {
105
+ alignment() {
106
+ return _descriptor_6.alignment().concat(_descriptor_8.alignment());
107
+ }
108
+ fromValue(value_0) {
109
+ return {
110
+ announcement: _descriptor_6.fromValue(value_0),
111
+ response: _descriptor_8.fromValue(value_0)
112
+ }
113
+ }
114
+ toValue(value_0) {
115
+ return _descriptor_6.toValue(value_0.announcement).concat(_descriptor_8.toValue(value_0.response));
116
+ }
117
+ }
118
+
119
+ const _descriptor_10 = new _SchnorrSignature_0();
120
+
121
+ const _descriptor_11 = new __compactRuntime.CompactTypeEnum(1, 1);
122
+
123
+ const _descriptor_12 = new __compactRuntime.CompactTypeEnum(3, 1);
124
+
125
+ const _descriptor_13 = new __compactRuntime.CompactTypeEnum(6, 1);
126
+
127
+ class _PublicKeyJwk_0 {
128
+ alignment() {
129
+ return _descriptor_12.alignment().concat(_descriptor_13.alignment().concat(_descriptor_0.alignment().concat(_descriptor_0.alignment())));
130
+ }
131
+ fromValue(value_0) {
132
+ return {
133
+ kty: _descriptor_12.fromValue(value_0),
134
+ crv: _descriptor_13.fromValue(value_0),
135
+ x: _descriptor_0.fromValue(value_0),
136
+ y: _descriptor_0.fromValue(value_0)
137
+ }
138
+ }
139
+ toValue(value_0) {
140
+ return _descriptor_12.toValue(value_0.kty).concat(_descriptor_13.toValue(value_0.crv).concat(_descriptor_0.toValue(value_0.x).concat(_descriptor_0.toValue(value_0.y))));
141
+ }
142
+ }
143
+
144
+ const _descriptor_14 = new _PublicKeyJwk_0();
145
+
146
+ class _VerificationMethod_0 {
147
+ alignment() {
148
+ return _descriptor_0.alignment().concat(_descriptor_11.alignment().concat(_descriptor_14.alignment()));
149
+ }
150
+ fromValue(value_0) {
151
+ return {
152
+ id: _descriptor_0.fromValue(value_0),
153
+ typ: _descriptor_11.fromValue(value_0),
154
+ publicKeyJwk: _descriptor_14.fromValue(value_0)
155
+ }
156
+ }
157
+ toValue(value_0) {
158
+ return _descriptor_0.toValue(value_0.id).concat(_descriptor_11.toValue(value_0.typ).concat(_descriptor_14.toValue(value_0.publicKeyJwk)));
159
+ }
160
+ }
161
+
162
+ const _descriptor_15 = new _VerificationMethod_0();
163
+
164
+ const _descriptor_16 = new __compactRuntime.CompactTypeBytes(32);
165
+
166
+ const _descriptor_17 = new __compactRuntime.CompactTypeUnsignedInteger(18446744073709551615n, 8);
167
+
168
+ const _descriptor_18 = new __compactRuntime.CompactTypeUnsignedInteger(65535n, 2);
169
+
170
+ const _descriptor_19 = new __compactRuntime.CompactTypeUnsignedInteger(127n, 1);
171
+
172
+ const _descriptor_20 = new __compactRuntime.CompactTypeUnsignedInteger(452312848583266388373324160190187140051835877600158453279131187530910662655n, 31);
173
+
174
+ class _tuple_0 {
175
+ alignment() {
176
+ return _descriptor_19.alignment().concat(_descriptor_20.alignment());
177
+ }
178
+ fromValue(value_0) {
179
+ return [
180
+ _descriptor_19.fromValue(value_0),
181
+ _descriptor_20.fromValue(value_0)
182
+ ]
183
+ }
184
+ toValue(value_0) {
185
+ return _descriptor_19.toValue(value_0[0]).concat(_descriptor_20.toValue(value_0[1]));
186
+ }
187
+ }
188
+
189
+ const _descriptor_21 = new _tuple_0();
190
+
191
+ const _descriptor_22 = new __compactRuntime.CompactTypeVector(2, _descriptor_16);
192
+
193
+ class _SchnorrHashInput_0 {
194
+ alignment() {
195
+ return _descriptor_8.alignment().concat(_descriptor_8.alignment().concat(_descriptor_8.alignment().concat(_descriptor_8.alignment().concat(_descriptor_9.alignment()))));
196
+ }
197
+ fromValue(value_0) {
198
+ return {
199
+ ann_x: _descriptor_8.fromValue(value_0),
200
+ ann_y: _descriptor_8.fromValue(value_0),
201
+ pk_x: _descriptor_8.fromValue(value_0),
202
+ pk_y: _descriptor_8.fromValue(value_0),
203
+ msg: _descriptor_9.fromValue(value_0)
204
+ }
205
+ }
206
+ toValue(value_0) {
207
+ return _descriptor_8.toValue(value_0.ann_x).concat(_descriptor_8.toValue(value_0.ann_y).concat(_descriptor_8.toValue(value_0.pk_x).concat(_descriptor_8.toValue(value_0.pk_y).concat(_descriptor_9.toValue(value_0.msg)))));
208
+ }
209
+ }
210
+
211
+ const _descriptor_23 = new _SchnorrHashInput_0();
212
+
213
+ class _Either_0 {
214
+ alignment() {
215
+ return _descriptor_2.alignment().concat(_descriptor_16.alignment().concat(_descriptor_16.alignment()));
216
+ }
217
+ fromValue(value_0) {
218
+ return {
219
+ is_left: _descriptor_2.fromValue(value_0),
220
+ left: _descriptor_16.fromValue(value_0),
221
+ right: _descriptor_16.fromValue(value_0)
222
+ }
223
+ }
224
+ toValue(value_0) {
225
+ return _descriptor_2.toValue(value_0.is_left).concat(_descriptor_16.toValue(value_0.left).concat(_descriptor_16.toValue(value_0.right)));
226
+ }
227
+ }
228
+
229
+ const _descriptor_24 = new _Either_0();
230
+
231
+ const _descriptor_25 = new __compactRuntime.CompactTypeUnsignedInteger(340282366920938463463374607431768211455n, 16);
232
+
233
+ class _ContractAddress_0 {
234
+ alignment() {
235
+ return _descriptor_16.alignment();
236
+ }
237
+ fromValue(value_0) {
238
+ return {
239
+ bytes: _descriptor_16.fromValue(value_0)
240
+ }
241
+ }
242
+ toValue(value_0) {
243
+ return _descriptor_16.toValue(value_0.bytes);
244
+ }
245
+ }
246
+
247
+ const _descriptor_26 = new _ContractAddress_0();
248
+
249
+ const _descriptor_27 = new __compactRuntime.CompactTypeUnsignedInteger(4294967295n, 4);
250
+
251
+ const _descriptor_28 = new __compactRuntime.CompactTypeUnsignedInteger(255n, 1);
252
+
253
+ export class Contract {
254
+ witnesses;
255
+ constructor(...args_0) {
256
+ if (args_0.length !== 1) {
257
+ throw new __compactRuntime.CompactError(`Contract constructor: expected 1 argument, received ${args_0.length}`);
258
+ }
259
+ const witnesses_0 = args_0[0];
260
+ if (typeof(witnesses_0) !== 'object') {
261
+ throw new __compactRuntime.CompactError('first (witnesses) argument to Contract constructor is not an object');
262
+ }
263
+ if (typeof(witnesses_0.getSchnorrReduction) !== 'function') {
264
+ throw new __compactRuntime.CompactError('first (witnesses) argument to Contract constructor does not contain a function-valued field named getSchnorrReduction');
265
+ }
266
+ if (typeof(witnesses_0.localSecretKey) !== 'function') {
267
+ throw new __compactRuntime.CompactError('first (witnesses) argument to Contract constructor does not contain a function-valued field named localSecretKey');
268
+ }
269
+ if (typeof(witnesses_0.currentTimestamp) !== 'function') {
270
+ throw new __compactRuntime.CompactError('first (witnesses) argument to Contract constructor does not contain a function-valued field named currentTimestamp');
271
+ }
272
+ this.witnesses = witnesses_0;
273
+ this.circuits = {
274
+ rotateControllerKey: (...args_1) => {
275
+ if (args_1.length !== 2) {
276
+ throw new __compactRuntime.CompactError(`rotateControllerKey: expected 2 arguments (as invoked from Typescript), received ${args_1.length}`);
277
+ }
278
+ const contextOrig_0 = args_1[0];
279
+ const newControllerPublicKey_0 = args_1[1];
280
+ if (!(typeof(contextOrig_0) === 'object' && contextOrig_0.currentQueryContext != undefined)) {
281
+ __compactRuntime.typeError('rotateControllerKey',
282
+ 'argument 1 (as invoked from Typescript)',
283
+ 'did.compact line 221 char 1',
284
+ 'CircuitContext',
285
+ contextOrig_0)
286
+ }
287
+ if (!(newControllerPublicKey_0.buffer instanceof ArrayBuffer && newControllerPublicKey_0.BYTES_PER_ELEMENT === 1 && newControllerPublicKey_0.length === 32)) {
288
+ __compactRuntime.typeError('rotateControllerKey',
289
+ 'argument 1 (argument 2 as invoked from Typescript)',
290
+ 'did.compact line 221 char 1',
291
+ 'Bytes<32>',
292
+ newControllerPublicKey_0)
293
+ }
294
+ const context = { ...contextOrig_0, gasCost: __compactRuntime.emptyRunningCost() };
295
+ const partialProofData = {
296
+ input: {
297
+ value: _descriptor_16.toValue(newControllerPublicKey_0),
298
+ alignment: _descriptor_16.alignment()
299
+ },
300
+ output: undefined,
301
+ publicTranscript: [],
302
+ privateTranscriptOutputs: []
303
+ };
304
+ const result_0 = this._rotateControllerKey_0(context,
305
+ partialProofData,
306
+ newControllerPublicKey_0);
307
+ partialProofData.output = { value: [], alignment: [] };
308
+ return { result: result_0, context: context, proofData: partialProofData, gasCost: context.gasCost };
309
+ },
310
+ setAlsoKnownAs: (...args_1) => {
311
+ if (args_1.length !== 3) {
312
+ throw new __compactRuntime.CompactError(`setAlsoKnownAs: expected 3 arguments (as invoked from Typescript), received ${args_1.length}`);
313
+ }
314
+ const contextOrig_0 = args_1[0];
315
+ const value_0 = args_1[1];
316
+ const mutation_0 = args_1[2];
317
+ if (!(typeof(contextOrig_0) === 'object' && contextOrig_0.currentQueryContext != undefined)) {
318
+ __compactRuntime.typeError('setAlsoKnownAs',
319
+ 'argument 1 (as invoked from Typescript)',
320
+ 'did.compact line 230 char 1',
321
+ 'CircuitContext',
322
+ contextOrig_0)
323
+ }
324
+ if (!(typeof(mutation_0) === 'number' && mutation_0 >= 0 && mutation_0 <= 2)) {
325
+ __compactRuntime.typeError('setAlsoKnownAs',
326
+ 'argument 2 (argument 3 as invoked from Typescript)',
327
+ 'did.compact line 230 char 1',
328
+ 'Enum<SetMutation, Undefined, Insert, Remove>',
329
+ mutation_0)
330
+ }
331
+ const context = { ...contextOrig_0, gasCost: __compactRuntime.emptyRunningCost() };
332
+ const partialProofData = {
333
+ input: {
334
+ value: _descriptor_0.toValue(value_0).concat(_descriptor_4.toValue(mutation_0)),
335
+ alignment: _descriptor_0.alignment().concat(_descriptor_4.alignment())
336
+ },
337
+ output: undefined,
338
+ publicTranscript: [],
339
+ privateTranscriptOutputs: []
340
+ };
341
+ const result_0 = this._setAlsoKnownAs_0(context,
342
+ partialProofData,
343
+ value_0,
344
+ mutation_0);
345
+ partialProofData.output = { value: [], alignment: [] };
346
+ return { result: result_0, context: context, proofData: partialProofData, gasCost: context.gasCost };
347
+ },
348
+ setVerificationMethod: (...args_1) => {
349
+ if (args_1.length !== 3) {
350
+ throw new __compactRuntime.CompactError(`setVerificationMethod: expected 3 arguments (as invoked from Typescript), received ${args_1.length}`);
351
+ }
352
+ const contextOrig_0 = args_1[0];
353
+ const verificationMethod_0 = args_1[1];
354
+ const mutation_0 = args_1[2];
355
+ if (!(typeof(contextOrig_0) === 'object' && contextOrig_0.currentQueryContext != undefined)) {
356
+ __compactRuntime.typeError('setVerificationMethod',
357
+ 'argument 1 (as invoked from Typescript)',
358
+ 'did.compact line 246 char 1',
359
+ 'CircuitContext',
360
+ contextOrig_0)
361
+ }
362
+ if (!(typeof(verificationMethod_0) === 'object' && true && typeof(verificationMethod_0.typ) === 'number' && verificationMethod_0.typ >= 0 && verificationMethod_0.typ <= 1 && typeof(verificationMethod_0.publicKeyJwk) === 'object' && typeof(verificationMethod_0.publicKeyJwk.kty) === 'number' && verificationMethod_0.publicKeyJwk.kty >= 0 && verificationMethod_0.publicKeyJwk.kty <= 3 && typeof(verificationMethod_0.publicKeyJwk.crv) === 'number' && verificationMethod_0.publicKeyJwk.crv >= 0 && verificationMethod_0.publicKeyJwk.crv <= 6 && true && true)) {
363
+ __compactRuntime.typeError('setVerificationMethod',
364
+ 'argument 1 (argument 2 as invoked from Typescript)',
365
+ 'did.compact line 246 char 1',
366
+ 'struct VerificationMethod<id: Opaque<"string">, typ: Enum<VerificationMethodType, Undefined, JsonWebKey>, publicKeyJwk: struct PublicKeyJwk<kty: Enum<KeyType, EC, RSA, oct, OKP>, crv: Enum<CurveType, Ed25519, X25519, Jubjub, P256, Secp256k1, BLS12381G1, BLS12381G2>, x: Opaque<"string">, y: Opaque<"string">>>',
367
+ verificationMethod_0)
368
+ }
369
+ if (!(typeof(mutation_0) === 'number' && mutation_0 >= 0 && mutation_0 <= 2)) {
370
+ __compactRuntime.typeError('setVerificationMethod',
371
+ 'argument 2 (argument 3 as invoked from Typescript)',
372
+ 'did.compact line 246 char 1',
373
+ 'Enum<MapMutation, Undefined, Insert, Update>',
374
+ mutation_0)
375
+ }
376
+ const context = { ...contextOrig_0, gasCost: __compactRuntime.emptyRunningCost() };
377
+ const partialProofData = {
378
+ input: {
379
+ value: _descriptor_15.toValue(verificationMethod_0).concat(_descriptor_5.toValue(mutation_0)),
380
+ alignment: _descriptor_15.alignment().concat(_descriptor_5.alignment())
381
+ },
382
+ output: undefined,
383
+ publicTranscript: [],
384
+ privateTranscriptOutputs: []
385
+ };
386
+ const result_0 = this._setVerificationMethod_0(context,
387
+ partialProofData,
388
+ verificationMethod_0,
389
+ mutation_0);
390
+ partialProofData.output = { value: [], alignment: [] };
391
+ return { result: result_0, context: context, proofData: partialProofData, gasCost: context.gasCost };
392
+ },
393
+ removeVerificationMethod: (...args_1) => {
394
+ if (args_1.length !== 2) {
395
+ throw new __compactRuntime.CompactError(`removeVerificationMethod: expected 2 arguments (as invoked from Typescript), received ${args_1.length}`);
396
+ }
397
+ const contextOrig_0 = args_1[0];
398
+ const id_0 = args_1[1];
399
+ if (!(typeof(contextOrig_0) === 'object' && contextOrig_0.currentQueryContext != undefined)) {
400
+ __compactRuntime.typeError('removeVerificationMethod',
401
+ 'argument 1 (as invoked from Typescript)',
402
+ 'did.compact line 266 char 1',
403
+ 'CircuitContext',
404
+ contextOrig_0)
405
+ }
406
+ const context = { ...contextOrig_0, gasCost: __compactRuntime.emptyRunningCost() };
407
+ const partialProofData = {
408
+ input: {
409
+ value: _descriptor_0.toValue(id_0),
410
+ alignment: _descriptor_0.alignment()
411
+ },
412
+ output: undefined,
413
+ publicTranscript: [],
414
+ privateTranscriptOutputs: []
415
+ };
416
+ const result_0 = this._removeVerificationMethod_0(context,
417
+ partialProofData,
418
+ id_0);
419
+ partialProofData.output = { value: [], alignment: [] };
420
+ return { result: result_0, context: context, proofData: partialProofData, gasCost: context.gasCost };
421
+ },
422
+ setSchnorrJubjubVerificationMethod: (...args_1) => {
423
+ if (args_1.length !== 3) {
424
+ throw new __compactRuntime.CompactError(`setSchnorrJubjubVerificationMethod: expected 3 arguments (as invoked from Typescript), received ${args_1.length}`);
425
+ }
426
+ const contextOrig_0 = args_1[0];
427
+ const verificationMethod_0 = args_1[1];
428
+ const mutation_0 = args_1[2];
429
+ if (!(typeof(contextOrig_0) === 'object' && contextOrig_0.currentQueryContext != undefined)) {
430
+ __compactRuntime.typeError('setSchnorrJubjubVerificationMethod',
431
+ 'argument 1 (as invoked from Typescript)',
432
+ 'did.compact line 276 char 1',
433
+ 'CircuitContext',
434
+ contextOrig_0)
435
+ }
436
+ if (!(typeof(verificationMethod_0) === 'object' && true && true)) {
437
+ __compactRuntime.typeError('setSchnorrJubjubVerificationMethod',
438
+ 'argument 1 (argument 2 as invoked from Typescript)',
439
+ 'did.compact line 276 char 1',
440
+ 'struct SchnorrJubjubVerificationMethod<id: Opaque<"string">, publicKey: Opaque<"JubjubPoint">>',
441
+ verificationMethod_0)
442
+ }
443
+ if (!(typeof(mutation_0) === 'number' && mutation_0 >= 0 && mutation_0 <= 2)) {
444
+ __compactRuntime.typeError('setSchnorrJubjubVerificationMethod',
445
+ 'argument 2 (argument 3 as invoked from Typescript)',
446
+ 'did.compact line 276 char 1',
447
+ 'Enum<MapMutation, Undefined, Insert, Update>',
448
+ mutation_0)
449
+ }
450
+ const context = { ...contextOrig_0, gasCost: __compactRuntime.emptyRunningCost() };
451
+ const partialProofData = {
452
+ input: {
453
+ value: _descriptor_7.toValue(verificationMethod_0).concat(_descriptor_5.toValue(mutation_0)),
454
+ alignment: _descriptor_7.alignment().concat(_descriptor_5.alignment())
455
+ },
456
+ output: undefined,
457
+ publicTranscript: [],
458
+ privateTranscriptOutputs: []
459
+ };
460
+ const result_0 = this._setSchnorrJubjubVerificationMethod_0(context,
461
+ partialProofData,
462
+ verificationMethod_0,
463
+ mutation_0);
464
+ partialProofData.output = { value: [], alignment: [] };
465
+ return { result: result_0, context: context, proofData: partialProofData, gasCost: context.gasCost };
466
+ },
467
+ removeSchnorrJubjubVerificationMethod: (...args_1) => {
468
+ if (args_1.length !== 2) {
469
+ throw new __compactRuntime.CompactError(`removeSchnorrJubjubVerificationMethod: expected 2 arguments (as invoked from Typescript), received ${args_1.length}`);
470
+ }
471
+ const contextOrig_0 = args_1[0];
472
+ const id_0 = args_1[1];
473
+ if (!(typeof(contextOrig_0) === 'object' && contextOrig_0.currentQueryContext != undefined)) {
474
+ __compactRuntime.typeError('removeSchnorrJubjubVerificationMethod',
475
+ 'argument 1 (as invoked from Typescript)',
476
+ 'did.compact line 295 char 1',
477
+ 'CircuitContext',
478
+ contextOrig_0)
479
+ }
480
+ const context = { ...contextOrig_0, gasCost: __compactRuntime.emptyRunningCost() };
481
+ const partialProofData = {
482
+ input: {
483
+ value: _descriptor_0.toValue(id_0),
484
+ alignment: _descriptor_0.alignment()
485
+ },
486
+ output: undefined,
487
+ publicTranscript: [],
488
+ privateTranscriptOutputs: []
489
+ };
490
+ const result_0 = this._removeSchnorrJubjubVerificationMethod_0(context,
491
+ partialProofData,
492
+ id_0);
493
+ partialProofData.output = { value: [], alignment: [] };
494
+ return { result: result_0, context: context, proofData: partialProofData, gasCost: context.gasCost };
495
+ },
496
+ verifySchnorrJubjubDigestSignature: (...args_1) => {
497
+ if (args_1.length !== 4) {
498
+ throw new __compactRuntime.CompactError(`verifySchnorrJubjubDigestSignature: expected 4 arguments (as invoked from Typescript), received ${args_1.length}`);
499
+ }
500
+ const contextOrig_0 = args_1[0];
501
+ const methodId_0 = args_1[1];
502
+ const digest_0 = args_1[2];
503
+ const signature_0 = args_1[3];
504
+ if (!(typeof(contextOrig_0) === 'object' && contextOrig_0.currentQueryContext != undefined)) {
505
+ __compactRuntime.typeError('verifySchnorrJubjubDigestSignature',
506
+ 'argument 1 (as invoked from Typescript)',
507
+ 'did.compact line 307 char 1',
508
+ 'CircuitContext',
509
+ contextOrig_0)
510
+ }
511
+ if (!(Array.isArray(digest_0) && digest_0.length === 4 && digest_0.every((t) => typeof(t) === 'bigint' && t >= 0 && t <= __compactRuntime.MAX_FIELD))) {
512
+ __compactRuntime.typeError('verifySchnorrJubjubDigestSignature',
513
+ 'argument 2 (argument 3 as invoked from Typescript)',
514
+ 'did.compact line 307 char 1',
515
+ 'Vector<4, Field>',
516
+ digest_0)
517
+ }
518
+ if (!(typeof(signature_0) === 'object' && true && typeof(signature_0.response) === 'bigint' && signature_0.response >= 0 && signature_0.response <= __compactRuntime.MAX_FIELD)) {
519
+ __compactRuntime.typeError('verifySchnorrJubjubDigestSignature',
520
+ 'argument 3 (argument 4 as invoked from Typescript)',
521
+ 'did.compact line 307 char 1',
522
+ 'struct SchnorrSignature<announcement: Opaque<"JubjubPoint">, response: Field>',
523
+ signature_0)
524
+ }
525
+ const context = { ...contextOrig_0, gasCost: __compactRuntime.emptyRunningCost() };
526
+ const partialProofData = {
527
+ input: {
528
+ value: _descriptor_0.toValue(methodId_0).concat(_descriptor_9.toValue(digest_0).concat(_descriptor_10.toValue(signature_0))),
529
+ alignment: _descriptor_0.alignment().concat(_descriptor_9.alignment().concat(_descriptor_10.alignment()))
530
+ },
531
+ output: undefined,
532
+ publicTranscript: [],
533
+ privateTranscriptOutputs: []
534
+ };
535
+ const result_0 = this._verifySchnorrJubjubDigestSignature_0(context,
536
+ partialProofData,
537
+ methodId_0,
538
+ digest_0,
539
+ signature_0);
540
+ partialProofData.output = { value: [], alignment: [] };
541
+ return { result: result_0, context: context, proofData: partialProofData, gasCost: context.gasCost };
542
+ },
543
+ setVerificationMethodRelation: (...args_1) => {
544
+ if (args_1.length !== 4) {
545
+ throw new __compactRuntime.CompactError(`setVerificationMethodRelation: expected 4 arguments (as invoked from Typescript), received ${args_1.length}`);
546
+ }
547
+ const contextOrig_0 = args_1[0];
548
+ const relation_0 = args_1[1];
549
+ const methodId_0 = args_1[2];
550
+ const mutation_0 = args_1[3];
551
+ if (!(typeof(contextOrig_0) === 'object' && contextOrig_0.currentQueryContext != undefined)) {
552
+ __compactRuntime.typeError('setVerificationMethodRelation',
553
+ 'argument 1 (as invoked from Typescript)',
554
+ 'did.compact line 319 char 1',
555
+ 'CircuitContext',
556
+ contextOrig_0)
557
+ }
558
+ if (!(typeof(relation_0) === 'number' && relation_0 >= 0 && relation_0 <= 5)) {
559
+ __compactRuntime.typeError('setVerificationMethodRelation',
560
+ 'argument 1 (argument 2 as invoked from Typescript)',
561
+ 'did.compact line 319 char 1',
562
+ 'Enum<VerificationMethodRelation, Undefined, Authentication, AssertionMethod, KeyAgreement, CapabilityInvocation, CapabilityDelegation>',
563
+ relation_0)
564
+ }
565
+ if (!(typeof(mutation_0) === 'number' && mutation_0 >= 0 && mutation_0 <= 2)) {
566
+ __compactRuntime.typeError('setVerificationMethodRelation',
567
+ 'argument 3 (argument 4 as invoked from Typescript)',
568
+ 'did.compact line 319 char 1',
569
+ 'Enum<SetMutation, Undefined, Insert, Remove>',
570
+ mutation_0)
571
+ }
572
+ const context = { ...contextOrig_0, gasCost: __compactRuntime.emptyRunningCost() };
573
+ const partialProofData = {
574
+ input: {
575
+ value: _descriptor_3.toValue(relation_0).concat(_descriptor_0.toValue(methodId_0).concat(_descriptor_4.toValue(mutation_0))),
576
+ alignment: _descriptor_3.alignment().concat(_descriptor_0.alignment().concat(_descriptor_4.alignment()))
577
+ },
578
+ output: undefined,
579
+ publicTranscript: [],
580
+ privateTranscriptOutputs: []
581
+ };
582
+ const result_0 = this._setVerificationMethodRelation_0(context,
583
+ partialProofData,
584
+ relation_0,
585
+ methodId_0,
586
+ mutation_0);
587
+ partialProofData.output = { value: [], alignment: [] };
588
+ return { result: result_0, context: context, proofData: partialProofData, gasCost: context.gasCost };
589
+ },
590
+ setService: (...args_1) => {
591
+ if (args_1.length !== 3) {
592
+ throw new __compactRuntime.CompactError(`setService: expected 3 arguments (as invoked from Typescript), received ${args_1.length}`);
593
+ }
594
+ const contextOrig_0 = args_1[0];
595
+ const service_0 = args_1[1];
596
+ const mutation_0 = args_1[2];
597
+ if (!(typeof(contextOrig_0) === 'object' && contextOrig_0.currentQueryContext != undefined)) {
598
+ __compactRuntime.typeError('setService',
599
+ 'argument 1 (as invoked from Typescript)',
600
+ 'did.compact line 343 char 1',
601
+ 'CircuitContext',
602
+ contextOrig_0)
603
+ }
604
+ if (!(typeof(service_0) === 'object' && true && true && true)) {
605
+ __compactRuntime.typeError('setService',
606
+ 'argument 1 (argument 2 as invoked from Typescript)',
607
+ 'did.compact line 343 char 1',
608
+ 'struct Service<id: Opaque<"string">, typ: Opaque<"string">, serviceEndpoint: Opaque<"string">>',
609
+ service_0)
610
+ }
611
+ if (!(typeof(mutation_0) === 'number' && mutation_0 >= 0 && mutation_0 <= 2)) {
612
+ __compactRuntime.typeError('setService',
613
+ 'argument 2 (argument 3 as invoked from Typescript)',
614
+ 'did.compact line 343 char 1',
615
+ 'Enum<MapMutation, Undefined, Insert, Update>',
616
+ mutation_0)
617
+ }
618
+ const context = { ...contextOrig_0, gasCost: __compactRuntime.emptyRunningCost() };
619
+ const partialProofData = {
620
+ input: {
621
+ value: _descriptor_1.toValue(service_0).concat(_descriptor_5.toValue(mutation_0)),
622
+ alignment: _descriptor_1.alignment().concat(_descriptor_5.alignment())
623
+ },
624
+ output: undefined,
625
+ publicTranscript: [],
626
+ privateTranscriptOutputs: []
627
+ };
628
+ const result_0 = this._setService_0(context,
629
+ partialProofData,
630
+ service_0,
631
+ mutation_0);
632
+ partialProofData.output = { value: [], alignment: [] };
633
+ return { result: result_0, context: context, proofData: partialProofData, gasCost: context.gasCost };
634
+ },
635
+ removeService: (...args_1) => {
636
+ if (args_1.length !== 2) {
637
+ throw new __compactRuntime.CompactError(`removeService: expected 2 arguments (as invoked from Typescript), received ${args_1.length}`);
638
+ }
639
+ const contextOrig_0 = args_1[0];
640
+ const id_0 = args_1[1];
641
+ if (!(typeof(contextOrig_0) === 'object' && contextOrig_0.currentQueryContext != undefined)) {
642
+ __compactRuntime.typeError('removeService',
643
+ 'argument 1 (as invoked from Typescript)',
644
+ 'did.compact line 359 char 1',
645
+ 'CircuitContext',
646
+ contextOrig_0)
647
+ }
648
+ const context = { ...contextOrig_0, gasCost: __compactRuntime.emptyRunningCost() };
649
+ const partialProofData = {
650
+ input: {
651
+ value: _descriptor_0.toValue(id_0),
652
+ alignment: _descriptor_0.alignment()
653
+ },
654
+ output: undefined,
655
+ publicTranscript: [],
656
+ privateTranscriptOutputs: []
657
+ };
658
+ const result_0 = this._removeService_0(context, partialProofData, id_0);
659
+ partialProofData.output = { value: [], alignment: [] };
660
+ return { result: result_0, context: context, proofData: partialProofData, gasCost: context.gasCost };
661
+ },
662
+ deactivate: (...args_1) => {
663
+ if (args_1.length !== 1) {
664
+ throw new __compactRuntime.CompactError(`deactivate: expected 1 argument (as invoked from Typescript), received ${args_1.length}`);
665
+ }
666
+ const contextOrig_0 = args_1[0];
667
+ if (!(typeof(contextOrig_0) === 'object' && contextOrig_0.currentQueryContext != undefined)) {
668
+ __compactRuntime.typeError('deactivate',
669
+ 'argument 1 (as invoked from Typescript)',
670
+ 'did.compact line 368 char 1',
671
+ 'CircuitContext',
672
+ contextOrig_0)
673
+ }
674
+ const context = { ...contextOrig_0, gasCost: __compactRuntime.emptyRunningCost() };
675
+ const partialProofData = {
676
+ input: { value: [], alignment: [] },
677
+ output: undefined,
678
+ publicTranscript: [],
679
+ privateTranscriptOutputs: []
680
+ };
681
+ const result_0 = this._deactivate_0(context, partialProofData);
682
+ partialProofData.output = { value: [], alignment: [] };
683
+ return { result: result_0, context: context, proofData: partialProofData, gasCost: context.gasCost };
684
+ }
685
+ };
686
+ this.impureCircuits = {
687
+ rotateControllerKey: this.circuits.rotateControllerKey,
688
+ setAlsoKnownAs: this.circuits.setAlsoKnownAs,
689
+ setVerificationMethod: this.circuits.setVerificationMethod,
690
+ removeVerificationMethod: this.circuits.removeVerificationMethod,
691
+ setSchnorrJubjubVerificationMethod: this.circuits.setSchnorrJubjubVerificationMethod,
692
+ removeSchnorrJubjubVerificationMethod: this.circuits.removeSchnorrJubjubVerificationMethod,
693
+ verifySchnorrJubjubDigestSignature: this.circuits.verifySchnorrJubjubDigestSignature,
694
+ setVerificationMethodRelation: this.circuits.setVerificationMethodRelation,
695
+ setService: this.circuits.setService,
696
+ removeService: this.circuits.removeService,
697
+ deactivate: this.circuits.deactivate
698
+ };
699
+ this.provableCircuits = this.impureCircuits;
700
+ this.provableCircuits = {
701
+ rotateControllerKey: this.circuits.rotateControllerKey,
702
+ setAlsoKnownAs: this.circuits.setAlsoKnownAs,
703
+ setVerificationMethod: this.circuits.setVerificationMethod,
704
+ removeVerificationMethod: this.circuits.removeVerificationMethod,
705
+ setSchnorrJubjubVerificationMethod: this.circuits.setSchnorrJubjubVerificationMethod,
706
+ removeSchnorrJubjubVerificationMethod: this.circuits.removeSchnorrJubjubVerificationMethod,
707
+ verifySchnorrJubjubDigestSignature: this.circuits.verifySchnorrJubjubDigestSignature,
708
+ setVerificationMethodRelation: this.circuits.setVerificationMethodRelation,
709
+ setService: this.circuits.setService,
710
+ removeService: this.circuits.removeService,
711
+ deactivate: this.circuits.deactivate
712
+ };
713
+ }
714
+ initialState(...args_0) {
715
+ if (args_0.length !== 1) {
716
+ throw new __compactRuntime.CompactError(`Contract state constructor: expected 1 argument (as invoked from Typescript), received ${args_0.length}`);
717
+ }
718
+ const constructorContext_0 = args_0[0];
719
+ if (typeof(constructorContext_0) !== 'object') {
720
+ throw new __compactRuntime.CompactError(`Contract state constructor: expected 'constructorContext' in argument 1 (as invoked from Typescript) to be an object`);
721
+ }
722
+ if (!('initialPrivateState' in constructorContext_0)) {
723
+ throw new __compactRuntime.CompactError(`Contract state constructor: expected 'initialPrivateState' in argument 1 (as invoked from Typescript)`);
724
+ }
725
+ if (!('initialZswapLocalState' in constructorContext_0)) {
726
+ throw new __compactRuntime.CompactError(`Contract state constructor: expected 'initialZswapLocalState' in argument 1 (as invoked from Typescript)`);
727
+ }
728
+ if (typeof(constructorContext_0.initialZswapLocalState) !== 'object') {
729
+ throw new __compactRuntime.CompactError(`Contract state constructor: expected 'initialZswapLocalState' in argument 1 (as invoked from Typescript) to be an object`);
730
+ }
731
+ const state_0 = new __compactRuntime.ContractState();
732
+ let stateValue_0 = __compactRuntime.StateValue.newArray();
733
+ let stateValue_2 = __compactRuntime.StateValue.newArray();
734
+ stateValue_2 = stateValue_2.arrayPush(__compactRuntime.StateValue.newNull());
735
+ stateValue_2 = stateValue_2.arrayPush(__compactRuntime.StateValue.newNull());
736
+ stateValue_2 = stateValue_2.arrayPush(__compactRuntime.StateValue.newNull());
737
+ stateValue_0 = stateValue_0.arrayPush(stateValue_2);
738
+ let stateValue_1 = __compactRuntime.StateValue.newArray();
739
+ stateValue_1 = stateValue_1.arrayPush(__compactRuntime.StateValue.newNull());
740
+ stateValue_1 = stateValue_1.arrayPush(__compactRuntime.StateValue.newNull());
741
+ stateValue_1 = stateValue_1.arrayPush(__compactRuntime.StateValue.newNull());
742
+ stateValue_1 = stateValue_1.arrayPush(__compactRuntime.StateValue.newNull());
743
+ stateValue_1 = stateValue_1.arrayPush(__compactRuntime.StateValue.newNull());
744
+ stateValue_1 = stateValue_1.arrayPush(__compactRuntime.StateValue.newNull());
745
+ stateValue_1 = stateValue_1.arrayPush(__compactRuntime.StateValue.newNull());
746
+ stateValue_1 = stateValue_1.arrayPush(__compactRuntime.StateValue.newNull());
747
+ stateValue_1 = stateValue_1.arrayPush(__compactRuntime.StateValue.newNull());
748
+ stateValue_1 = stateValue_1.arrayPush(__compactRuntime.StateValue.newNull());
749
+ stateValue_1 = stateValue_1.arrayPush(__compactRuntime.StateValue.newNull());
750
+ stateValue_1 = stateValue_1.arrayPush(__compactRuntime.StateValue.newNull());
751
+ stateValue_1 = stateValue_1.arrayPush(__compactRuntime.StateValue.newNull());
752
+ stateValue_1 = stateValue_1.arrayPush(__compactRuntime.StateValue.newNull());
753
+ stateValue_1 = stateValue_1.arrayPush(__compactRuntime.StateValue.newNull());
754
+ stateValue_0 = stateValue_0.arrayPush(stateValue_1);
755
+ state_0.data = new __compactRuntime.ChargedState(stateValue_0);
756
+ state_0.setOperation('rotateControllerKey', new __compactRuntime.ContractOperation());
757
+ state_0.setOperation('setAlsoKnownAs', new __compactRuntime.ContractOperation());
758
+ state_0.setOperation('setVerificationMethod', new __compactRuntime.ContractOperation());
759
+ state_0.setOperation('removeVerificationMethod', new __compactRuntime.ContractOperation());
760
+ state_0.setOperation('setSchnorrJubjubVerificationMethod', new __compactRuntime.ContractOperation());
761
+ state_0.setOperation('removeSchnorrJubjubVerificationMethod', new __compactRuntime.ContractOperation());
762
+ state_0.setOperation('verifySchnorrJubjubDigestSignature', new __compactRuntime.ContractOperation());
763
+ state_0.setOperation('setVerificationMethodRelation', new __compactRuntime.ContractOperation());
764
+ state_0.setOperation('setService', new __compactRuntime.ContractOperation());
765
+ state_0.setOperation('removeService', new __compactRuntime.ContractOperation());
766
+ state_0.setOperation('deactivate', new __compactRuntime.ContractOperation());
767
+ const context = __compactRuntime.createCircuitContext(__compactRuntime.dummyContractAddress(), constructorContext_0.initialZswapLocalState.coinPublicKey, state_0.data, constructorContext_0.initialPrivateState);
768
+ const partialProofData = {
769
+ input: { value: [], alignment: [] },
770
+ output: undefined,
771
+ publicTranscript: [],
772
+ privateTranscriptOutputs: []
773
+ };
774
+ __compactRuntime.queryLedgerState(context,
775
+ partialProofData,
776
+ [
777
+ { idx: { cached: false,
778
+ pushPath: true,
779
+ path: [
780
+ { tag: 'value',
781
+ value: { value: _descriptor_28.toValue(0n),
782
+ alignment: _descriptor_28.alignment() } }] } },
783
+ { push: { storage: false,
784
+ value: __compactRuntime.StateValue.newCell({ value: _descriptor_28.toValue(0n),
785
+ alignment: _descriptor_28.alignment() }).encode() } },
786
+ { push: { storage: true,
787
+ value: __compactRuntime.StateValue.newCell({ value: _descriptor_27.toValue(0n),
788
+ alignment: _descriptor_27.alignment() }).encode() } },
789
+ { ins: { cached: false, n: 1 } },
790
+ { ins: { cached: true, n: 1 } }]);
791
+ __compactRuntime.queryLedgerState(context,
792
+ partialProofData,
793
+ [
794
+ { idx: { cached: false,
795
+ pushPath: true,
796
+ path: [
797
+ { tag: 'value',
798
+ value: { value: _descriptor_28.toValue(0n),
799
+ alignment: _descriptor_28.alignment() } }] } },
800
+ { push: { storage: false,
801
+ value: __compactRuntime.StateValue.newCell({ value: _descriptor_28.toValue(1n),
802
+ alignment: _descriptor_28.alignment() }).encode() } },
803
+ { push: { storage: true,
804
+ value: __compactRuntime.StateValue.newCell({ value: _descriptor_16.toValue(new Uint8Array(32)),
805
+ alignment: _descriptor_16.alignment() }).encode() } },
806
+ { ins: { cached: false, n: 1 } },
807
+ { ins: { cached: true, n: 1 } }]);
808
+ __compactRuntime.queryLedgerState(context,
809
+ partialProofData,
810
+ [
811
+ { idx: { cached: false,
812
+ pushPath: true,
813
+ path: [
814
+ { tag: 'value',
815
+ value: { value: _descriptor_28.toValue(0n),
816
+ alignment: _descriptor_28.alignment() } }] } },
817
+ { push: { storage: false,
818
+ value: __compactRuntime.StateValue.newCell({ value: _descriptor_28.toValue(2n),
819
+ alignment: _descriptor_28.alignment() }).encode() } },
820
+ { push: { storage: true,
821
+ value: __compactRuntime.StateValue.newCell({ value: _descriptor_26.toValue({ bytes: new Uint8Array(32) }),
822
+ alignment: _descriptor_26.alignment() }).encode() } },
823
+ { ins: { cached: false, n: 1 } },
824
+ { ins: { cached: true, n: 1 } }]);
825
+ __compactRuntime.queryLedgerState(context,
826
+ partialProofData,
827
+ [
828
+ { idx: { cached: false,
829
+ pushPath: true,
830
+ path: [
831
+ { tag: 'value',
832
+ value: { value: _descriptor_28.toValue(1n),
833
+ alignment: _descriptor_28.alignment() } }] } },
834
+ { push: { storage: false,
835
+ value: __compactRuntime.StateValue.newCell({ value: _descriptor_28.toValue(0n),
836
+ alignment: _descriptor_28.alignment() }).encode() } },
837
+ { push: { storage: true,
838
+ value: __compactRuntime.StateValue.newMap(
839
+ new __compactRuntime.StateMap()
840
+ ).encode() } },
841
+ { ins: { cached: false, n: 1 } },
842
+ { ins: { cached: true, n: 1 } }]);
843
+ __compactRuntime.queryLedgerState(context,
844
+ partialProofData,
845
+ [
846
+ { idx: { cached: false,
847
+ pushPath: true,
848
+ path: [
849
+ { tag: 'value',
850
+ value: { value: _descriptor_28.toValue(1n),
851
+ alignment: _descriptor_28.alignment() } }] } },
852
+ { push: { storage: false,
853
+ value: __compactRuntime.StateValue.newCell({ value: _descriptor_28.toValue(1n),
854
+ alignment: _descriptor_28.alignment() }).encode() } },
855
+ { push: { storage: true,
856
+ value: __compactRuntime.StateValue.newCell({ value: _descriptor_17.toValue(0n),
857
+ alignment: _descriptor_17.alignment() }).encode() } },
858
+ { ins: { cached: false, n: 1 } },
859
+ { ins: { cached: true, n: 1 } }]);
860
+ __compactRuntime.queryLedgerState(context,
861
+ partialProofData,
862
+ [
863
+ { idx: { cached: false,
864
+ pushPath: true,
865
+ path: [
866
+ { tag: 'value',
867
+ value: { value: _descriptor_28.toValue(1n),
868
+ alignment: _descriptor_28.alignment() } }] } },
869
+ { push: { storage: false,
870
+ value: __compactRuntime.StateValue.newCell({ value: _descriptor_28.toValue(2n),
871
+ alignment: _descriptor_28.alignment() }).encode() } },
872
+ { push: { storage: true,
873
+ value: __compactRuntime.StateValue.newCell({ value: _descriptor_17.toValue(0n),
874
+ alignment: _descriptor_17.alignment() }).encode() } },
875
+ { ins: { cached: false, n: 1 } },
876
+ { ins: { cached: true, n: 1 } }]);
877
+ __compactRuntime.queryLedgerState(context,
878
+ partialProofData,
879
+ [
880
+ { idx: { cached: false,
881
+ pushPath: true,
882
+ path: [
883
+ { tag: 'value',
884
+ value: { value: _descriptor_28.toValue(1n),
885
+ alignment: _descriptor_28.alignment() } }] } },
886
+ { push: { storage: false,
887
+ value: __compactRuntime.StateValue.newCell({ value: _descriptor_28.toValue(3n),
888
+ alignment: _descriptor_28.alignment() }).encode() } },
889
+ { push: { storage: true,
890
+ value: __compactRuntime.StateValue.newCell({ value: _descriptor_17.toValue(0n),
891
+ alignment: _descriptor_17.alignment() }).encode() } },
892
+ { ins: { cached: false, n: 1 } },
893
+ { ins: { cached: true, n: 1 } }]);
894
+ __compactRuntime.queryLedgerState(context,
895
+ partialProofData,
896
+ [
897
+ { idx: { cached: false,
898
+ pushPath: true,
899
+ path: [
900
+ { tag: 'value',
901
+ value: { value: _descriptor_28.toValue(1n),
902
+ alignment: _descriptor_28.alignment() } }] } },
903
+ { push: { storage: false,
904
+ value: __compactRuntime.StateValue.newCell({ value: _descriptor_28.toValue(4n),
905
+ alignment: _descriptor_28.alignment() }).encode() } },
906
+ { push: { storage: true,
907
+ value: __compactRuntime.StateValue.newCell({ value: _descriptor_2.toValue(false),
908
+ alignment: _descriptor_2.alignment() }).encode() } },
909
+ { ins: { cached: false, n: 1 } },
910
+ { ins: { cached: true, n: 1 } }]);
911
+ __compactRuntime.queryLedgerState(context,
912
+ partialProofData,
913
+ [
914
+ { idx: { cached: false,
915
+ pushPath: true,
916
+ path: [
917
+ { tag: 'value',
918
+ value: { value: _descriptor_28.toValue(1n),
919
+ alignment: _descriptor_28.alignment() } }] } },
920
+ { push: { storage: false,
921
+ value: __compactRuntime.StateValue.newCell({ value: _descriptor_28.toValue(5n),
922
+ alignment: _descriptor_28.alignment() }).encode() } },
923
+ { push: { storage: true,
924
+ value: __compactRuntime.StateValue.newCell({ value: _descriptor_2.toValue(false),
925
+ alignment: _descriptor_2.alignment() }).encode() } },
926
+ { ins: { cached: false, n: 1 } },
927
+ { ins: { cached: true, n: 1 } }]);
928
+ __compactRuntime.queryLedgerState(context,
929
+ partialProofData,
930
+ [
931
+ { idx: { cached: false,
932
+ pushPath: true,
933
+ path: [
934
+ { tag: 'value',
935
+ value: { value: _descriptor_28.toValue(1n),
936
+ alignment: _descriptor_28.alignment() } }] } },
937
+ { push: { storage: false,
938
+ value: __compactRuntime.StateValue.newCell({ value: _descriptor_28.toValue(6n),
939
+ alignment: _descriptor_28.alignment() }).encode() } },
940
+ { push: { storage: true,
941
+ value: __compactRuntime.StateValue.newCell({ value: _descriptor_17.toValue(0n),
942
+ alignment: _descriptor_17.alignment() }).encode() } },
943
+ { ins: { cached: false, n: 1 } },
944
+ { ins: { cached: true, n: 1 } }]);
945
+ __compactRuntime.queryLedgerState(context,
946
+ partialProofData,
947
+ [
948
+ { idx: { cached: false,
949
+ pushPath: true,
950
+ path: [
951
+ { tag: 'value',
952
+ value: { value: _descriptor_28.toValue(1n),
953
+ alignment: _descriptor_28.alignment() } }] } },
954
+ { push: { storage: false,
955
+ value: __compactRuntime.StateValue.newCell({ value: _descriptor_28.toValue(7n),
956
+ alignment: _descriptor_28.alignment() }).encode() } },
957
+ { push: { storage: true,
958
+ value: __compactRuntime.StateValue.newMap(
959
+ new __compactRuntime.StateMap()
960
+ ).encode() } },
961
+ { ins: { cached: false, n: 1 } },
962
+ { ins: { cached: true, n: 1 } }]);
963
+ __compactRuntime.queryLedgerState(context,
964
+ partialProofData,
965
+ [
966
+ { idx: { cached: false,
967
+ pushPath: true,
968
+ path: [
969
+ { tag: 'value',
970
+ value: { value: _descriptor_28.toValue(1n),
971
+ alignment: _descriptor_28.alignment() } }] } },
972
+ { push: { storage: false,
973
+ value: __compactRuntime.StateValue.newCell({ value: _descriptor_28.toValue(8n),
974
+ alignment: _descriptor_28.alignment() }).encode() } },
975
+ { push: { storage: true,
976
+ value: __compactRuntime.StateValue.newMap(
977
+ new __compactRuntime.StateMap()
978
+ ).encode() } },
979
+ { ins: { cached: false, n: 1 } },
980
+ { ins: { cached: true, n: 1 } }]);
981
+ __compactRuntime.queryLedgerState(context,
982
+ partialProofData,
983
+ [
984
+ { idx: { cached: false,
985
+ pushPath: true,
986
+ path: [
987
+ { tag: 'value',
988
+ value: { value: _descriptor_28.toValue(1n),
989
+ alignment: _descriptor_28.alignment() } }] } },
990
+ { push: { storage: false,
991
+ value: __compactRuntime.StateValue.newCell({ value: _descriptor_28.toValue(9n),
992
+ alignment: _descriptor_28.alignment() }).encode() } },
993
+ { push: { storage: true,
994
+ value: __compactRuntime.StateValue.newMap(
995
+ new __compactRuntime.StateMap()
996
+ ).encode() } },
997
+ { ins: { cached: false, n: 1 } },
998
+ { ins: { cached: true, n: 1 } }]);
999
+ __compactRuntime.queryLedgerState(context,
1000
+ partialProofData,
1001
+ [
1002
+ { idx: { cached: false,
1003
+ pushPath: true,
1004
+ path: [
1005
+ { tag: 'value',
1006
+ value: { value: _descriptor_28.toValue(1n),
1007
+ alignment: _descriptor_28.alignment() } }] } },
1008
+ { push: { storage: false,
1009
+ value: __compactRuntime.StateValue.newCell({ value: _descriptor_28.toValue(10n),
1010
+ alignment: _descriptor_28.alignment() }).encode() } },
1011
+ { push: { storage: true,
1012
+ value: __compactRuntime.StateValue.newMap(
1013
+ new __compactRuntime.StateMap()
1014
+ ).encode() } },
1015
+ { ins: { cached: false, n: 1 } },
1016
+ { ins: { cached: true, n: 1 } }]);
1017
+ __compactRuntime.queryLedgerState(context,
1018
+ partialProofData,
1019
+ [
1020
+ { idx: { cached: false,
1021
+ pushPath: true,
1022
+ path: [
1023
+ { tag: 'value',
1024
+ value: { value: _descriptor_28.toValue(1n),
1025
+ alignment: _descriptor_28.alignment() } }] } },
1026
+ { push: { storage: false,
1027
+ value: __compactRuntime.StateValue.newCell({ value: _descriptor_28.toValue(11n),
1028
+ alignment: _descriptor_28.alignment() }).encode() } },
1029
+ { push: { storage: true,
1030
+ value: __compactRuntime.StateValue.newMap(
1031
+ new __compactRuntime.StateMap()
1032
+ ).encode() } },
1033
+ { ins: { cached: false, n: 1 } },
1034
+ { ins: { cached: true, n: 1 } }]);
1035
+ __compactRuntime.queryLedgerState(context,
1036
+ partialProofData,
1037
+ [
1038
+ { idx: { cached: false,
1039
+ pushPath: true,
1040
+ path: [
1041
+ { tag: 'value',
1042
+ value: { value: _descriptor_28.toValue(1n),
1043
+ alignment: _descriptor_28.alignment() } }] } },
1044
+ { push: { storage: false,
1045
+ value: __compactRuntime.StateValue.newCell({ value: _descriptor_28.toValue(12n),
1046
+ alignment: _descriptor_28.alignment() }).encode() } },
1047
+ { push: { storage: true,
1048
+ value: __compactRuntime.StateValue.newMap(
1049
+ new __compactRuntime.StateMap()
1050
+ ).encode() } },
1051
+ { ins: { cached: false, n: 1 } },
1052
+ { ins: { cached: true, n: 1 } }]);
1053
+ __compactRuntime.queryLedgerState(context,
1054
+ partialProofData,
1055
+ [
1056
+ { idx: { cached: false,
1057
+ pushPath: true,
1058
+ path: [
1059
+ { tag: 'value',
1060
+ value: { value: _descriptor_28.toValue(1n),
1061
+ alignment: _descriptor_28.alignment() } }] } },
1062
+ { push: { storage: false,
1063
+ value: __compactRuntime.StateValue.newCell({ value: _descriptor_28.toValue(13n),
1064
+ alignment: _descriptor_28.alignment() }).encode() } },
1065
+ { push: { storage: true,
1066
+ value: __compactRuntime.StateValue.newMap(
1067
+ new __compactRuntime.StateMap()
1068
+ ).encode() } },
1069
+ { ins: { cached: false, n: 1 } },
1070
+ { ins: { cached: true, n: 1 } }]);
1071
+ __compactRuntime.queryLedgerState(context,
1072
+ partialProofData,
1073
+ [
1074
+ { idx: { cached: false,
1075
+ pushPath: true,
1076
+ path: [
1077
+ { tag: 'value',
1078
+ value: { value: _descriptor_28.toValue(1n),
1079
+ alignment: _descriptor_28.alignment() } }] } },
1080
+ { push: { storage: false,
1081
+ value: __compactRuntime.StateValue.newCell({ value: _descriptor_28.toValue(14n),
1082
+ alignment: _descriptor_28.alignment() }).encode() } },
1083
+ { push: { storage: true,
1084
+ value: __compactRuntime.StateValue.newMap(
1085
+ new __compactRuntime.StateMap()
1086
+ ).encode() } },
1087
+ { ins: { cached: false, n: 1 } },
1088
+ { ins: { cached: true, n: 1 } }]);
1089
+ const tmp_0 = 1n;
1090
+ __compactRuntime.queryLedgerState(context,
1091
+ partialProofData,
1092
+ [
1093
+ { idx: { cached: false,
1094
+ pushPath: true,
1095
+ path: [
1096
+ { tag: 'value',
1097
+ value: { value: _descriptor_28.toValue(0n),
1098
+ alignment: _descriptor_28.alignment() } }] } },
1099
+ { push: { storage: false,
1100
+ value: __compactRuntime.StateValue.newCell({ value: _descriptor_28.toValue(0n),
1101
+ alignment: _descriptor_28.alignment() }).encode() } },
1102
+ { push: { storage: true,
1103
+ value: __compactRuntime.StateValue.newCell({ value: _descriptor_27.toValue(tmp_0),
1104
+ alignment: _descriptor_27.alignment() }).encode() } },
1105
+ { ins: { cached: false, n: 1 } },
1106
+ { ins: { cached: true, n: 1 } }]);
1107
+ const tmp_1 = _descriptor_26.fromValue(__compactRuntime.queryLedgerState(context,
1108
+ partialProofData,
1109
+ [
1110
+ { dup: { n: 2 } },
1111
+ { idx: { cached: true,
1112
+ pushPath: false,
1113
+ path: [
1114
+ { tag: 'value',
1115
+ value: { value: _descriptor_28.toValue(0n),
1116
+ alignment: _descriptor_28.alignment() } }] } },
1117
+ { popeq: { cached: true,
1118
+ result: undefined } }]).value);
1119
+ __compactRuntime.queryLedgerState(context,
1120
+ partialProofData,
1121
+ [
1122
+ { idx: { cached: false,
1123
+ pushPath: true,
1124
+ path: [
1125
+ { tag: 'value',
1126
+ value: { value: _descriptor_28.toValue(0n),
1127
+ alignment: _descriptor_28.alignment() } }] } },
1128
+ { push: { storage: false,
1129
+ value: __compactRuntime.StateValue.newCell({ value: _descriptor_28.toValue(2n),
1130
+ alignment: _descriptor_28.alignment() }).encode() } },
1131
+ { push: { storage: true,
1132
+ value: __compactRuntime.StateValue.newCell({ value: _descriptor_26.toValue(tmp_1),
1133
+ alignment: _descriptor_26.alignment() }).encode() } },
1134
+ { ins: { cached: false, n: 1 } },
1135
+ { ins: { cached: true, n: 1 } }]);
1136
+ __compactRuntime.queryLedgerState(context,
1137
+ partialProofData,
1138
+ [
1139
+ { idx: { cached: false,
1140
+ pushPath: true,
1141
+ path: [
1142
+ { tag: 'value',
1143
+ value: { value: _descriptor_28.toValue(1n),
1144
+ alignment: _descriptor_28.alignment() } }] } },
1145
+ { push: { storage: false,
1146
+ value: __compactRuntime.StateValue.newCell({ value: _descriptor_28.toValue(5n),
1147
+ alignment: _descriptor_28.alignment() }).encode() } },
1148
+ { push: { storage: true,
1149
+ value: __compactRuntime.StateValue.newCell({ value: _descriptor_2.toValue(true),
1150
+ alignment: _descriptor_2.alignment() }).encode() } },
1151
+ { ins: { cached: false, n: 1 } },
1152
+ { ins: { cached: true, n: 1 } }]);
1153
+ __compactRuntime.queryLedgerState(context,
1154
+ partialProofData,
1155
+ [
1156
+ { idx: { cached: false,
1157
+ pushPath: true,
1158
+ path: [
1159
+ { tag: 'value',
1160
+ value: { value: _descriptor_28.toValue(1n),
1161
+ alignment: _descriptor_28.alignment() } }] } },
1162
+ { push: { storage: false,
1163
+ value: __compactRuntime.StateValue.newCell({ value: _descriptor_28.toValue(4n),
1164
+ alignment: _descriptor_28.alignment() }).encode() } },
1165
+ { push: { storage: true,
1166
+ value: __compactRuntime.StateValue.newCell({ value: _descriptor_2.toValue(false),
1167
+ alignment: _descriptor_2.alignment() }).encode() } },
1168
+ { ins: { cached: false, n: 1 } },
1169
+ { ins: { cached: true, n: 1 } }]);
1170
+ const tmp_2 = this._controllerKey_0(this._localSecretKey_0(context,
1171
+ partialProofData));
1172
+ __compactRuntime.queryLedgerState(context,
1173
+ partialProofData,
1174
+ [
1175
+ { idx: { cached: false,
1176
+ pushPath: true,
1177
+ path: [
1178
+ { tag: 'value',
1179
+ value: { value: _descriptor_28.toValue(0n),
1180
+ alignment: _descriptor_28.alignment() } }] } },
1181
+ { push: { storage: false,
1182
+ value: __compactRuntime.StateValue.newCell({ value: _descriptor_28.toValue(1n),
1183
+ alignment: _descriptor_28.alignment() }).encode() } },
1184
+ { push: { storage: true,
1185
+ value: __compactRuntime.StateValue.newCell({ value: _descriptor_16.toValue(tmp_2),
1186
+ alignment: _descriptor_16.alignment() }).encode() } },
1187
+ { ins: { cached: false, n: 1 } },
1188
+ { ins: { cached: true, n: 1 } }]);
1189
+ const timestamp_0 = this._currentTimestamp_0(context, partialProofData);
1190
+ __compactRuntime.queryLedgerState(context,
1191
+ partialProofData,
1192
+ [
1193
+ { idx: { cached: false,
1194
+ pushPath: true,
1195
+ path: [
1196
+ { tag: 'value',
1197
+ value: { value: _descriptor_28.toValue(1n),
1198
+ alignment: _descriptor_28.alignment() } }] } },
1199
+ { push: { storage: false,
1200
+ value: __compactRuntime.StateValue.newCell({ value: _descriptor_28.toValue(2n),
1201
+ alignment: _descriptor_28.alignment() }).encode() } },
1202
+ { push: { storage: true,
1203
+ value: __compactRuntime.StateValue.newCell({ value: _descriptor_17.toValue(timestamp_0),
1204
+ alignment: _descriptor_17.alignment() }).encode() } },
1205
+ { ins: { cached: false, n: 1 } },
1206
+ { ins: { cached: true, n: 1 } }]);
1207
+ __compactRuntime.queryLedgerState(context,
1208
+ partialProofData,
1209
+ [
1210
+ { idx: { cached: false,
1211
+ pushPath: true,
1212
+ path: [
1213
+ { tag: 'value',
1214
+ value: { value: _descriptor_28.toValue(1n),
1215
+ alignment: _descriptor_28.alignment() } }] } },
1216
+ { push: { storage: false,
1217
+ value: __compactRuntime.StateValue.newCell({ value: _descriptor_28.toValue(3n),
1218
+ alignment: _descriptor_28.alignment() }).encode() } },
1219
+ { push: { storage: true,
1220
+ value: __compactRuntime.StateValue.newCell({ value: _descriptor_17.toValue(timestamp_0),
1221
+ alignment: _descriptor_17.alignment() }).encode() } },
1222
+ { ins: { cached: false, n: 1 } },
1223
+ { ins: { cached: true, n: 1 } }]);
1224
+ state_0.data = new __compactRuntime.ChargedState(context.currentQueryContext.state.state);
1225
+ return {
1226
+ currentContractState: state_0,
1227
+ currentPrivateState: context.currentPrivateState,
1228
+ currentZswapLocalState: context.currentZswapLocalState
1229
+ }
1230
+ }
1231
+ _transientHash_0(value_0) {
1232
+ const result_0 = __compactRuntime.transientHash(_descriptor_23, value_0);
1233
+ return result_0;
1234
+ }
1235
+ _persistentHash_0(value_0) {
1236
+ const result_0 = __compactRuntime.persistentHash(_descriptor_22, value_0);
1237
+ return result_0;
1238
+ }
1239
+ _jubjubPointX_0(np_0) {
1240
+ const result_0 = __compactRuntime.jubjubPointX(np_0);
1241
+ return result_0;
1242
+ }
1243
+ _jubjubPointY_0(np_0) {
1244
+ const result_0 = __compactRuntime.jubjubPointY(np_0);
1245
+ return result_0;
1246
+ }
1247
+ _ecAdd_0(a_0, b_0) {
1248
+ const result_0 = __compactRuntime.ecAdd(a_0, b_0);
1249
+ return result_0;
1250
+ }
1251
+ _ecMul_0(a_0, b_0) {
1252
+ const result_0 = __compactRuntime.ecMul(a_0, b_0);
1253
+ return result_0;
1254
+ }
1255
+ _ecMulGenerator_0(b_0) {
1256
+ const result_0 = __compactRuntime.ecMulGenerator(b_0);
1257
+ return result_0;
1258
+ }
1259
+ _getSchnorrReduction_0(context, partialProofData, challengeHash_0) {
1260
+ const witnessContext_0 = __compactRuntime.createWitnessContext(ledger(context.currentQueryContext.state), context.currentPrivateState, context.currentQueryContext.address);
1261
+ const [nextPrivateState_0, result_0] = this.witnesses.getSchnorrReduction(witnessContext_0,
1262
+ challengeHash_0);
1263
+ context.currentPrivateState = nextPrivateState_0;
1264
+ if (!(Array.isArray(result_0) && result_0.length === 2 && typeof(result_0[0]) === 'bigint' && result_0[0] >= 0n && result_0[0] <= 127n && typeof(result_0[1]) === 'bigint' && result_0[1] >= 0n && result_0[1] <= 452312848583266388373324160190187140051835877600158453279131187530910662655n)) {
1265
+ __compactRuntime.typeError('getSchnorrReduction',
1266
+ 'return value',
1267
+ 'schnorr.compact line 32 char 3',
1268
+ '[Uint<0..128>, Uint<0..452312848583266388373324160190187140051835877600158453279131187530910662656>]',
1269
+ result_0)
1270
+ }
1271
+ partialProofData.privateTranscriptOutputs.push({
1272
+ value: _descriptor_21.toValue(result_0),
1273
+ alignment: _descriptor_21.alignment()
1274
+ });
1275
+ return result_0;
1276
+ }
1277
+ _schnorrVerify_0(context, partialProofData, msg_0, signature_0, pk_0) {
1278
+ const __compact_pattern_tmp2_0 = signature_0;
1279
+ const announcement_0 = __compact_pattern_tmp2_0.announcement;
1280
+ const response_0 = __compact_pattern_tmp2_0.response;
1281
+ const cFull_0 = this._transientHash_0({ ann_x:
1282
+ this._jubjubPointX_0(announcement_0),
1283
+ ann_y:
1284
+ this._jubjubPointY_0(announcement_0),
1285
+ pk_x: this._jubjubPointX_0(pk_0),
1286
+ pk_y: this._jubjubPointY_0(pk_0),
1287
+ msg: msg_0 });
1288
+ const TWO_248_0 = 452312848583266388373324160190187140051835877600158453279131187530910662656n;
1289
+ const __compact_pattern_tmp1_0 = this._getSchnorrReduction_0(context,
1290
+ partialProofData,
1291
+ cFull_0);
1292
+ const q_0 = __compact_pattern_tmp1_0[0];
1293
+ const cTruncated_0 = __compact_pattern_tmp1_0[1];
1294
+ let t_0;
1295
+ __compactRuntime.assert((t_0 = q_0, t_0 < 116n),
1296
+ 'Schnorr quotient out of range');
1297
+ __compactRuntime.assert(__compactRuntime.addField(__compactRuntime.mulField(q_0,
1298
+ TWO_248_0),
1299
+ cTruncated_0)
1300
+ ===
1301
+ cFull_0,
1302
+ 'Invalid challenge reduction');
1303
+ const c_0 = cTruncated_0;
1304
+ const lhs_0 = this._ecMulGenerator_0(response_0);
1305
+ const rhs_0 = this._ecAdd_0(announcement_0, this._ecMul_0(pk_0, c_0));
1306
+ __compactRuntime.assert(this._jubjubPointX_0(lhs_0)
1307
+ ===
1308
+ this._jubjubPointX_0(rhs_0)
1309
+ &&
1310
+ this._jubjubPointY_0(lhs_0)
1311
+ ===
1312
+ this._jubjubPointY_0(rhs_0),
1313
+ 'Invalid Jubjub Schnorr signature');
1314
+ return [];
1315
+ }
1316
+ _schnorrVerifyDigest_0(context, partialProofData, digest_0, signature_0, pk_0)
1317
+ {
1318
+ this._schnorrVerify_0(context, partialProofData, digest_0, signature_0, pk_0);
1319
+ return [];
1320
+ }
1321
+ _localSecretKey_0(context, partialProofData) {
1322
+ const witnessContext_0 = __compactRuntime.createWitnessContext(ledger(context.currentQueryContext.state), context.currentPrivateState, context.currentQueryContext.address);
1323
+ const [nextPrivateState_0, result_0] = this.witnesses.localSecretKey(witnessContext_0);
1324
+ context.currentPrivateState = nextPrivateState_0;
1325
+ if (!(result_0.buffer instanceof ArrayBuffer && result_0.BYTES_PER_ELEMENT === 1 && result_0.length === 32)) {
1326
+ __compactRuntime.typeError('localSecretKey',
1327
+ 'return value',
1328
+ 'did.compact line 44 char 1',
1329
+ 'Bytes<32>',
1330
+ result_0)
1331
+ }
1332
+ partialProofData.privateTranscriptOutputs.push({
1333
+ value: _descriptor_16.toValue(result_0),
1334
+ alignment: _descriptor_16.alignment()
1335
+ });
1336
+ return result_0;
1337
+ }
1338
+ _currentTimestamp_0(context, partialProofData) {
1339
+ const witnessContext_0 = __compactRuntime.createWitnessContext(ledger(context.currentQueryContext.state), context.currentPrivateState, context.currentQueryContext.address);
1340
+ const [nextPrivateState_0, result_0] = this.witnesses.currentTimestamp(witnessContext_0);
1341
+ context.currentPrivateState = nextPrivateState_0;
1342
+ if (!(typeof(result_0) === 'bigint' && result_0 >= 0n && result_0 <= 18446744073709551615n)) {
1343
+ __compactRuntime.typeError('currentTimestamp',
1344
+ 'return value',
1345
+ 'did.compact line 45 char 1',
1346
+ 'Uint<0..18446744073709551616>',
1347
+ result_0)
1348
+ }
1349
+ partialProofData.privateTranscriptOutputs.push({
1350
+ value: _descriptor_17.toValue(result_0),
1351
+ alignment: _descriptor_17.alignment()
1352
+ });
1353
+ return result_0;
1354
+ }
1355
+ _verificationMethodExists_0(context, partialProofData, id_0) {
1356
+ return _descriptor_2.fromValue(__compactRuntime.queryLedgerState(context,
1357
+ partialProofData,
1358
+ [
1359
+ { dup: { n: 0 } },
1360
+ { idx: { cached: false,
1361
+ pushPath: false,
1362
+ path: [
1363
+ { tag: 'value',
1364
+ value: { value: _descriptor_28.toValue(1n),
1365
+ alignment: _descriptor_28.alignment() } },
1366
+ { tag: 'value',
1367
+ value: { value: _descriptor_28.toValue(7n),
1368
+ alignment: _descriptor_28.alignment() } }] } },
1369
+ { push: { storage: false,
1370
+ value: __compactRuntime.StateValue.newCell({ value: _descriptor_0.toValue(id_0),
1371
+ alignment: _descriptor_0.alignment() }).encode() } },
1372
+ 'member',
1373
+ { popeq: { cached: true,
1374
+ result: undefined } }]).value)
1375
+ ||
1376
+ _descriptor_2.fromValue(__compactRuntime.queryLedgerState(context,
1377
+ partialProofData,
1378
+ [
1379
+ { dup: { n: 0 } },
1380
+ { idx: { cached: false,
1381
+ pushPath: false,
1382
+ path: [
1383
+ { tag: 'value',
1384
+ value: { value: _descriptor_28.toValue(1n),
1385
+ alignment: _descriptor_28.alignment() } },
1386
+ { tag: 'value',
1387
+ value: { value: _descriptor_28.toValue(8n),
1388
+ alignment: _descriptor_28.alignment() } }] } },
1389
+ { push: { storage: false,
1390
+ value: __compactRuntime.StateValue.newCell({ value: _descriptor_0.toValue(id_0),
1391
+ alignment: _descriptor_0.alignment() }).encode() } },
1392
+ 'member',
1393
+ { popeq: { cached: true,
1394
+ result: undefined } }]).value);
1395
+ }
1396
+ _controllerKey_0(sk_0) {
1397
+ return this._persistentHash_0([new Uint8Array([100, 105, 100, 58, 99, 111, 110, 116, 114, 111, 108, 108, 101, 114, 58, 112, 107, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]),
1398
+ sk_0]);
1399
+ }
1400
+ _assertController_0(context, partialProofData) {
1401
+ __compactRuntime.assert(this._equal_0(this._controllerKey_0(this._localSecretKey_0(context,
1402
+ partialProofData)),
1403
+ _descriptor_16.fromValue(__compactRuntime.queryLedgerState(context,
1404
+ partialProofData,
1405
+ [
1406
+ { dup: { n: 0 } },
1407
+ { idx: { cached: false,
1408
+ pushPath: false,
1409
+ path: [
1410
+ { tag: 'value',
1411
+ value: { value: _descriptor_28.toValue(0n),
1412
+ alignment: _descriptor_28.alignment() } },
1413
+ { tag: 'value',
1414
+ value: { value: _descriptor_28.toValue(1n),
1415
+ alignment: _descriptor_28.alignment() } }] } },
1416
+ { popeq: { cached: false,
1417
+ result: undefined } }]).value)),
1418
+ 'DID controller is allowed to update the DID only');
1419
+ return [];
1420
+ }
1421
+ _assertControllerCanUpdate_0(context, partialProofData) {
1422
+ this._assertController_0(context, partialProofData);
1423
+ __compactRuntime.assert(_descriptor_2.fromValue(__compactRuntime.queryLedgerState(context,
1424
+ partialProofData,
1425
+ [
1426
+ { dup: { n: 0 } },
1427
+ { idx: { cached: false,
1428
+ pushPath: false,
1429
+ path: [
1430
+ { tag: 'value',
1431
+ value: { value: _descriptor_28.toValue(1n),
1432
+ alignment: _descriptor_28.alignment() } },
1433
+ { tag: 'value',
1434
+ value: { value: _descriptor_28.toValue(5n),
1435
+ alignment: _descriptor_28.alignment() } }] } },
1436
+ { popeq: { cached: false,
1437
+ result: undefined } }]).value),
1438
+ 'Contract is not active');
1439
+ return [];
1440
+ }
1441
+ _recordUpdate_0(context, partialProofData) {
1442
+ const tmp_0 = 1n;
1443
+ __compactRuntime.queryLedgerState(context,
1444
+ partialProofData,
1445
+ [
1446
+ { idx: { cached: false,
1447
+ pushPath: true,
1448
+ path: [
1449
+ { tag: 'value',
1450
+ value: { value: _descriptor_28.toValue(1n),
1451
+ alignment: _descriptor_28.alignment() } },
1452
+ { tag: 'value',
1453
+ value: { value: _descriptor_28.toValue(6n),
1454
+ alignment: _descriptor_28.alignment() } }] } },
1455
+ { addi: { immediate: parseInt(__compactRuntime.valueToBigInt(
1456
+ { value: _descriptor_18.toValue(tmp_0),
1457
+ alignment: _descriptor_18.alignment() }
1458
+ .value
1459
+ )) } },
1460
+ { ins: { cached: true, n: 2 } }]);
1461
+ const tmp_1 = 1n;
1462
+ __compactRuntime.queryLedgerState(context,
1463
+ partialProofData,
1464
+ [
1465
+ { idx: { cached: false,
1466
+ pushPath: true,
1467
+ path: [
1468
+ { tag: 'value',
1469
+ value: { value: _descriptor_28.toValue(1n),
1470
+ alignment: _descriptor_28.alignment() } },
1471
+ { tag: 'value',
1472
+ value: { value: _descriptor_28.toValue(1n),
1473
+ alignment: _descriptor_28.alignment() } }] } },
1474
+ { addi: { immediate: parseInt(__compactRuntime.valueToBigInt(
1475
+ { value: _descriptor_18.toValue(tmp_1),
1476
+ alignment: _descriptor_18.alignment() }
1477
+ .value
1478
+ )) } },
1479
+ { ins: { cached: true, n: 2 } }]);
1480
+ const tmp_2 = this._currentTimestamp_0(context, partialProofData);
1481
+ __compactRuntime.queryLedgerState(context,
1482
+ partialProofData,
1483
+ [
1484
+ { idx: { cached: false,
1485
+ pushPath: true,
1486
+ path: [
1487
+ { tag: 'value',
1488
+ value: { value: _descriptor_28.toValue(1n),
1489
+ alignment: _descriptor_28.alignment() } }] } },
1490
+ { push: { storage: false,
1491
+ value: __compactRuntime.StateValue.newCell({ value: _descriptor_28.toValue(3n),
1492
+ alignment: _descriptor_28.alignment() }).encode() } },
1493
+ { push: { storage: true,
1494
+ value: __compactRuntime.StateValue.newCell({ value: _descriptor_17.toValue(tmp_2),
1495
+ alignment: _descriptor_17.alignment() }).encode() } },
1496
+ { ins: { cached: false, n: 1 } },
1497
+ { ins: { cached: true, n: 1 } }]);
1498
+ return [];
1499
+ }
1500
+ _assertMapMutationDefined_0(mutation_0) {
1501
+ __compactRuntime.assert(mutation_0 === 1 || mutation_0 === 2,
1502
+ 'Map mutation must be Insert or Update');
1503
+ return [];
1504
+ }
1505
+ _assertSetMutationDefined_0(mutation_0) {
1506
+ __compactRuntime.assert(mutation_0 === 1 || mutation_0 === 2,
1507
+ 'Set mutation must be Insert or Remove');
1508
+ return [];
1509
+ }
1510
+ _assertSupportedVerificationMethod_0(verificationMethod_0) {
1511
+ __compactRuntime.assert(verificationMethod_0.typ === 1,
1512
+ 'Only JsonWebKey verification methods are supported');
1513
+ if (verificationMethod_0.publicKeyJwk.kty === 3) {
1514
+ __compactRuntime.assert(verificationMethod_0.publicKeyJwk.crv === 0
1515
+ ||
1516
+ verificationMethod_0.publicKeyJwk.crv === 1
1517
+ ||
1518
+ verificationMethod_0.publicKeyJwk.crv === 5
1519
+ ||
1520
+ verificationMethod_0.publicKeyJwk.crv === 6,
1521
+ 'OKP keys must use Ed25519, X25519, BLS12381G1, or BLS12381G2');
1522
+ } else {
1523
+ if (verificationMethod_0.publicKeyJwk.kty === 0) {
1524
+ __compactRuntime.assert(verificationMethod_0.publicKeyJwk.crv === 3
1525
+ ||
1526
+ verificationMethod_0.publicKeyJwk.crv === 4,
1527
+ 'EC keys must use P-256 or secp256k1; use SchnorrJubjub methods for Jubjub');
1528
+ } else {
1529
+ __compactRuntime.assert(false,
1530
+ 'Only OKP (Ed25519/X25519/BLS12381G1/BLS12381G2) and EC (P-256/secp256k1) keys are supported');
1531
+ }
1532
+ }
1533
+ return [];
1534
+ }
1535
+ _verificationMethodRelationMember_0(context,
1536
+ partialProofData,
1537
+ relation_0,
1538
+ methodId_0)
1539
+ {
1540
+ if (relation_0 === 1) {
1541
+ return _descriptor_2.fromValue(__compactRuntime.queryLedgerState(context,
1542
+ partialProofData,
1543
+ [
1544
+ { dup: { n: 0 } },
1545
+ { idx: { cached: false,
1546
+ pushPath: false,
1547
+ path: [
1548
+ { tag: 'value',
1549
+ value: { value: _descriptor_28.toValue(1n),
1550
+ alignment: _descriptor_28.alignment() } },
1551
+ { tag: 'value',
1552
+ value: { value: _descriptor_28.toValue(9n),
1553
+ alignment: _descriptor_28.alignment() } }] } },
1554
+ { push: { storage: false,
1555
+ value: __compactRuntime.StateValue.newCell({ value: _descriptor_0.toValue(methodId_0),
1556
+ alignment: _descriptor_0.alignment() }).encode() } },
1557
+ 'member',
1558
+ { popeq: { cached: true,
1559
+ result: undefined } }]).value);
1560
+ } else {
1561
+ if (relation_0 === 2) {
1562
+ return _descriptor_2.fromValue(__compactRuntime.queryLedgerState(context,
1563
+ partialProofData,
1564
+ [
1565
+ { dup: { n: 0 } },
1566
+ { idx: { cached: false,
1567
+ pushPath: false,
1568
+ path: [
1569
+ { tag: 'value',
1570
+ value: { value: _descriptor_28.toValue(1n),
1571
+ alignment: _descriptor_28.alignment() } },
1572
+ { tag: 'value',
1573
+ value: { value: _descriptor_28.toValue(10n),
1574
+ alignment: _descriptor_28.alignment() } }] } },
1575
+ { push: { storage: false,
1576
+ value: __compactRuntime.StateValue.newCell({ value: _descriptor_0.toValue(methodId_0),
1577
+ alignment: _descriptor_0.alignment() }).encode() } },
1578
+ 'member',
1579
+ { popeq: { cached: true,
1580
+ result: undefined } }]).value);
1581
+ } else {
1582
+ if (relation_0 === 3) {
1583
+ return _descriptor_2.fromValue(__compactRuntime.queryLedgerState(context,
1584
+ partialProofData,
1585
+ [
1586
+ { dup: { n: 0 } },
1587
+ { idx: { cached: false,
1588
+ pushPath: false,
1589
+ path: [
1590
+ { tag: 'value',
1591
+ value: { value: _descriptor_28.toValue(1n),
1592
+ alignment: _descriptor_28.alignment() } },
1593
+ { tag: 'value',
1594
+ value: { value: _descriptor_28.toValue(11n),
1595
+ alignment: _descriptor_28.alignment() } }] } },
1596
+ { push: { storage: false,
1597
+ value: __compactRuntime.StateValue.newCell({ value: _descriptor_0.toValue(methodId_0),
1598
+ alignment: _descriptor_0.alignment() }).encode() } },
1599
+ 'member',
1600
+ { popeq: { cached: true,
1601
+ result: undefined } }]).value);
1602
+ } else {
1603
+ if (relation_0 === 4) {
1604
+ return _descriptor_2.fromValue(__compactRuntime.queryLedgerState(context,
1605
+ partialProofData,
1606
+ [
1607
+ { dup: { n: 0 } },
1608
+ { idx: { cached: false,
1609
+ pushPath: false,
1610
+ path: [
1611
+ { tag: 'value',
1612
+ value: { value: _descriptor_28.toValue(1n),
1613
+ alignment: _descriptor_28.alignment() } },
1614
+ { tag: 'value',
1615
+ value: { value: _descriptor_28.toValue(12n),
1616
+ alignment: _descriptor_28.alignment() } }] } },
1617
+ { push: { storage: false,
1618
+ value: __compactRuntime.StateValue.newCell({ value: _descriptor_0.toValue(methodId_0),
1619
+ alignment: _descriptor_0.alignment() }).encode() } },
1620
+ 'member',
1621
+ { popeq: { cached: true,
1622
+ result: undefined } }]).value);
1623
+ } else {
1624
+ if (relation_0 === 5) {
1625
+ return _descriptor_2.fromValue(__compactRuntime.queryLedgerState(context,
1626
+ partialProofData,
1627
+ [
1628
+ { dup: { n: 0 } },
1629
+ { idx: { cached: false,
1630
+ pushPath: false,
1631
+ path: [
1632
+ { tag: 'value',
1633
+ value: { value: _descriptor_28.toValue(1n),
1634
+ alignment: _descriptor_28.alignment() } },
1635
+ { tag: 'value',
1636
+ value: { value: _descriptor_28.toValue(13n),
1637
+ alignment: _descriptor_28.alignment() } }] } },
1638
+ { push: { storage: false,
1639
+ value: __compactRuntime.StateValue.newCell({ value: _descriptor_0.toValue(methodId_0),
1640
+ alignment: _descriptor_0.alignment() }).encode() } },
1641
+ 'member',
1642
+ { popeq: { cached: true,
1643
+ result: undefined } }]).value);
1644
+ } else {
1645
+ return false;
1646
+ }
1647
+ }
1648
+ }
1649
+ }
1650
+ }
1651
+ }
1652
+ _insertVerificationMethodRelation_0(context,
1653
+ partialProofData,
1654
+ relation_0,
1655
+ methodId_0)
1656
+ {
1657
+ if (relation_0 === 1) {
1658
+ __compactRuntime.queryLedgerState(context,
1659
+ partialProofData,
1660
+ [
1661
+ { idx: { cached: false,
1662
+ pushPath: true,
1663
+ path: [
1664
+ { tag: 'value',
1665
+ value: { value: _descriptor_28.toValue(1n),
1666
+ alignment: _descriptor_28.alignment() } },
1667
+ { tag: 'value',
1668
+ value: { value: _descriptor_28.toValue(9n),
1669
+ alignment: _descriptor_28.alignment() } }] } },
1670
+ { push: { storage: false,
1671
+ value: __compactRuntime.StateValue.newCell({ value: _descriptor_0.toValue(methodId_0),
1672
+ alignment: _descriptor_0.alignment() }).encode() } },
1673
+ { push: { storage: true,
1674
+ value: __compactRuntime.StateValue.newNull().encode() } },
1675
+ { ins: { cached: false, n: 1 } },
1676
+ { ins: { cached: true, n: 2 } }]);
1677
+ } else {
1678
+ if (relation_0 === 2) {
1679
+ __compactRuntime.queryLedgerState(context,
1680
+ partialProofData,
1681
+ [
1682
+ { idx: { cached: false,
1683
+ pushPath: true,
1684
+ path: [
1685
+ { tag: 'value',
1686
+ value: { value: _descriptor_28.toValue(1n),
1687
+ alignment: _descriptor_28.alignment() } },
1688
+ { tag: 'value',
1689
+ value: { value: _descriptor_28.toValue(10n),
1690
+ alignment: _descriptor_28.alignment() } }] } },
1691
+ { push: { storage: false,
1692
+ value: __compactRuntime.StateValue.newCell({ value: _descriptor_0.toValue(methodId_0),
1693
+ alignment: _descriptor_0.alignment() }).encode() } },
1694
+ { push: { storage: true,
1695
+ value: __compactRuntime.StateValue.newNull().encode() } },
1696
+ { ins: { cached: false, n: 1 } },
1697
+ { ins: { cached: true, n: 2 } }]);
1698
+ } else {
1699
+ if (relation_0 === 3) {
1700
+ __compactRuntime.queryLedgerState(context,
1701
+ partialProofData,
1702
+ [
1703
+ { idx: { cached: false,
1704
+ pushPath: true,
1705
+ path: [
1706
+ { tag: 'value',
1707
+ value: { value: _descriptor_28.toValue(1n),
1708
+ alignment: _descriptor_28.alignment() } },
1709
+ { tag: 'value',
1710
+ value: { value: _descriptor_28.toValue(11n),
1711
+ alignment: _descriptor_28.alignment() } }] } },
1712
+ { push: { storage: false,
1713
+ value: __compactRuntime.StateValue.newCell({ value: _descriptor_0.toValue(methodId_0),
1714
+ alignment: _descriptor_0.alignment() }).encode() } },
1715
+ { push: { storage: true,
1716
+ value: __compactRuntime.StateValue.newNull().encode() } },
1717
+ { ins: { cached: false, n: 1 } },
1718
+ { ins: { cached: true, n: 2 } }]);
1719
+ } else {
1720
+ if (relation_0 === 4) {
1721
+ __compactRuntime.queryLedgerState(context,
1722
+ partialProofData,
1723
+ [
1724
+ { idx: { cached: false,
1725
+ pushPath: true,
1726
+ path: [
1727
+ { tag: 'value',
1728
+ value: { value: _descriptor_28.toValue(1n),
1729
+ alignment: _descriptor_28.alignment() } },
1730
+ { tag: 'value',
1731
+ value: { value: _descriptor_28.toValue(12n),
1732
+ alignment: _descriptor_28.alignment() } }] } },
1733
+ { push: { storage: false,
1734
+ value: __compactRuntime.StateValue.newCell({ value: _descriptor_0.toValue(methodId_0),
1735
+ alignment: _descriptor_0.alignment() }).encode() } },
1736
+ { push: { storage: true,
1737
+ value: __compactRuntime.StateValue.newNull().encode() } },
1738
+ { ins: { cached: false, n: 1 } },
1739
+ { ins: { cached: true, n: 2 } }]);
1740
+ } else {
1741
+ if (relation_0 === 5) {
1742
+ __compactRuntime.queryLedgerState(context,
1743
+ partialProofData,
1744
+ [
1745
+ { idx: { cached: false,
1746
+ pushPath: true,
1747
+ path: [
1748
+ { tag: 'value',
1749
+ value: { value: _descriptor_28.toValue(1n),
1750
+ alignment: _descriptor_28.alignment() } },
1751
+ { tag: 'value',
1752
+ value: { value: _descriptor_28.toValue(13n),
1753
+ alignment: _descriptor_28.alignment() } }] } },
1754
+ { push: { storage: false,
1755
+ value: __compactRuntime.StateValue.newCell({ value: _descriptor_0.toValue(methodId_0),
1756
+ alignment: _descriptor_0.alignment() }).encode() } },
1757
+ { push: { storage: true,
1758
+ value: __compactRuntime.StateValue.newNull().encode() } },
1759
+ { ins: { cached: false, n: 1 } },
1760
+ { ins: { cached: true, n: 2 } }]);
1761
+ }
1762
+ }
1763
+ }
1764
+ }
1765
+ }
1766
+ return [];
1767
+ }
1768
+ _removeVerificationMethodRelationFromLedger_0(context,
1769
+ partialProofData,
1770
+ relation_0,
1771
+ methodId_0)
1772
+ {
1773
+ if (relation_0 === 1) {
1774
+ __compactRuntime.queryLedgerState(context,
1775
+ partialProofData,
1776
+ [
1777
+ { idx: { cached: false,
1778
+ pushPath: true,
1779
+ path: [
1780
+ { tag: 'value',
1781
+ value: { value: _descriptor_28.toValue(1n),
1782
+ alignment: _descriptor_28.alignment() } },
1783
+ { tag: 'value',
1784
+ value: { value: _descriptor_28.toValue(9n),
1785
+ alignment: _descriptor_28.alignment() } }] } },
1786
+ { push: { storage: false,
1787
+ value: __compactRuntime.StateValue.newCell({ value: _descriptor_0.toValue(methodId_0),
1788
+ alignment: _descriptor_0.alignment() }).encode() } },
1789
+ { rem: { cached: false } },
1790
+ { ins: { cached: true, n: 2 } }]);
1791
+ } else {
1792
+ if (relation_0 === 2) {
1793
+ __compactRuntime.queryLedgerState(context,
1794
+ partialProofData,
1795
+ [
1796
+ { idx: { cached: false,
1797
+ pushPath: true,
1798
+ path: [
1799
+ { tag: 'value',
1800
+ value: { value: _descriptor_28.toValue(1n),
1801
+ alignment: _descriptor_28.alignment() } },
1802
+ { tag: 'value',
1803
+ value: { value: _descriptor_28.toValue(10n),
1804
+ alignment: _descriptor_28.alignment() } }] } },
1805
+ { push: { storage: false,
1806
+ value: __compactRuntime.StateValue.newCell({ value: _descriptor_0.toValue(methodId_0),
1807
+ alignment: _descriptor_0.alignment() }).encode() } },
1808
+ { rem: { cached: false } },
1809
+ { ins: { cached: true, n: 2 } }]);
1810
+ } else {
1811
+ if (relation_0 === 3) {
1812
+ __compactRuntime.queryLedgerState(context,
1813
+ partialProofData,
1814
+ [
1815
+ { idx: { cached: false,
1816
+ pushPath: true,
1817
+ path: [
1818
+ { tag: 'value',
1819
+ value: { value: _descriptor_28.toValue(1n),
1820
+ alignment: _descriptor_28.alignment() } },
1821
+ { tag: 'value',
1822
+ value: { value: _descriptor_28.toValue(11n),
1823
+ alignment: _descriptor_28.alignment() } }] } },
1824
+ { push: { storage: false,
1825
+ value: __compactRuntime.StateValue.newCell({ value: _descriptor_0.toValue(methodId_0),
1826
+ alignment: _descriptor_0.alignment() }).encode() } },
1827
+ { rem: { cached: false } },
1828
+ { ins: { cached: true, n: 2 } }]);
1829
+ } else {
1830
+ if (relation_0 === 4) {
1831
+ __compactRuntime.queryLedgerState(context,
1832
+ partialProofData,
1833
+ [
1834
+ { idx: { cached: false,
1835
+ pushPath: true,
1836
+ path: [
1837
+ { tag: 'value',
1838
+ value: { value: _descriptor_28.toValue(1n),
1839
+ alignment: _descriptor_28.alignment() } },
1840
+ { tag: 'value',
1841
+ value: { value: _descriptor_28.toValue(12n),
1842
+ alignment: _descriptor_28.alignment() } }] } },
1843
+ { push: { storage: false,
1844
+ value: __compactRuntime.StateValue.newCell({ value: _descriptor_0.toValue(methodId_0),
1845
+ alignment: _descriptor_0.alignment() }).encode() } },
1846
+ { rem: { cached: false } },
1847
+ { ins: { cached: true, n: 2 } }]);
1848
+ } else {
1849
+ if (relation_0 === 5) {
1850
+ __compactRuntime.queryLedgerState(context,
1851
+ partialProofData,
1852
+ [
1853
+ { idx: { cached: false,
1854
+ pushPath: true,
1855
+ path: [
1856
+ { tag: 'value',
1857
+ value: { value: _descriptor_28.toValue(1n),
1858
+ alignment: _descriptor_28.alignment() } },
1859
+ { tag: 'value',
1860
+ value: { value: _descriptor_28.toValue(13n),
1861
+ alignment: _descriptor_28.alignment() } }] } },
1862
+ { push: { storage: false,
1863
+ value: __compactRuntime.StateValue.newCell({ value: _descriptor_0.toValue(methodId_0),
1864
+ alignment: _descriptor_0.alignment() }).encode() } },
1865
+ { rem: { cached: false } },
1866
+ { ins: { cached: true, n: 2 } }]);
1867
+ }
1868
+ }
1869
+ }
1870
+ }
1871
+ }
1872
+ return [];
1873
+ }
1874
+ _assertVerificationMethodIsNotReferenced_0(context, partialProofData, id_0) {
1875
+ __compactRuntime.assert(!_descriptor_2.fromValue(__compactRuntime.queryLedgerState(context,
1876
+ partialProofData,
1877
+ [
1878
+ { dup: { n: 0 } },
1879
+ { idx: { cached: false,
1880
+ pushPath: false,
1881
+ path: [
1882
+ { tag: 'value',
1883
+ value: { value: _descriptor_28.toValue(1n),
1884
+ alignment: _descriptor_28.alignment() } },
1885
+ { tag: 'value',
1886
+ value: { value: _descriptor_28.toValue(9n),
1887
+ alignment: _descriptor_28.alignment() } }] } },
1888
+ { push: { storage: false,
1889
+ value: __compactRuntime.StateValue.newCell({ value: _descriptor_0.toValue(id_0),
1890
+ alignment: _descriptor_0.alignment() }).encode() } },
1891
+ 'member',
1892
+ { popeq: { cached: true,
1893
+ result: undefined } }]).value),
1894
+ 'Verification method still referenced in authenticationRelation');
1895
+ __compactRuntime.assert(!_descriptor_2.fromValue(__compactRuntime.queryLedgerState(context,
1896
+ partialProofData,
1897
+ [
1898
+ { dup: { n: 0 } },
1899
+ { idx: { cached: false,
1900
+ pushPath: false,
1901
+ path: [
1902
+ { tag: 'value',
1903
+ value: { value: _descriptor_28.toValue(1n),
1904
+ alignment: _descriptor_28.alignment() } },
1905
+ { tag: 'value',
1906
+ value: { value: _descriptor_28.toValue(10n),
1907
+ alignment: _descriptor_28.alignment() } }] } },
1908
+ { push: { storage: false,
1909
+ value: __compactRuntime.StateValue.newCell({ value: _descriptor_0.toValue(id_0),
1910
+ alignment: _descriptor_0.alignment() }).encode() } },
1911
+ 'member',
1912
+ { popeq: { cached: true,
1913
+ result: undefined } }]).value),
1914
+ 'Verification method still referenced in assertionMethodRelation');
1915
+ __compactRuntime.assert(!_descriptor_2.fromValue(__compactRuntime.queryLedgerState(context,
1916
+ partialProofData,
1917
+ [
1918
+ { dup: { n: 0 } },
1919
+ { idx: { cached: false,
1920
+ pushPath: false,
1921
+ path: [
1922
+ { tag: 'value',
1923
+ value: { value: _descriptor_28.toValue(1n),
1924
+ alignment: _descriptor_28.alignment() } },
1925
+ { tag: 'value',
1926
+ value: { value: _descriptor_28.toValue(11n),
1927
+ alignment: _descriptor_28.alignment() } }] } },
1928
+ { push: { storage: false,
1929
+ value: __compactRuntime.StateValue.newCell({ value: _descriptor_0.toValue(id_0),
1930
+ alignment: _descriptor_0.alignment() }).encode() } },
1931
+ 'member',
1932
+ { popeq: { cached: true,
1933
+ result: undefined } }]).value),
1934
+ 'Verification method still referenced in keyAgreementRelation');
1935
+ __compactRuntime.assert(!_descriptor_2.fromValue(__compactRuntime.queryLedgerState(context,
1936
+ partialProofData,
1937
+ [
1938
+ { dup: { n: 0 } },
1939
+ { idx: { cached: false,
1940
+ pushPath: false,
1941
+ path: [
1942
+ { tag: 'value',
1943
+ value: { value: _descriptor_28.toValue(1n),
1944
+ alignment: _descriptor_28.alignment() } },
1945
+ { tag: 'value',
1946
+ value: { value: _descriptor_28.toValue(12n),
1947
+ alignment: _descriptor_28.alignment() } }] } },
1948
+ { push: { storage: false,
1949
+ value: __compactRuntime.StateValue.newCell({ value: _descriptor_0.toValue(id_0),
1950
+ alignment: _descriptor_0.alignment() }).encode() } },
1951
+ 'member',
1952
+ { popeq: { cached: true,
1953
+ result: undefined } }]).value),
1954
+ 'Verification method still referenced in capabilityInvocationRelation');
1955
+ __compactRuntime.assert(!_descriptor_2.fromValue(__compactRuntime.queryLedgerState(context,
1956
+ partialProofData,
1957
+ [
1958
+ { dup: { n: 0 } },
1959
+ { idx: { cached: false,
1960
+ pushPath: false,
1961
+ path: [
1962
+ { tag: 'value',
1963
+ value: { value: _descriptor_28.toValue(1n),
1964
+ alignment: _descriptor_28.alignment() } },
1965
+ { tag: 'value',
1966
+ value: { value: _descriptor_28.toValue(13n),
1967
+ alignment: _descriptor_28.alignment() } }] } },
1968
+ { push: { storage: false,
1969
+ value: __compactRuntime.StateValue.newCell({ value: _descriptor_0.toValue(id_0),
1970
+ alignment: _descriptor_0.alignment() }).encode() } },
1971
+ 'member',
1972
+ { popeq: { cached: true,
1973
+ result: undefined } }]).value),
1974
+ 'Verification method still referenced in capabilityDelegationRelation');
1975
+ return [];
1976
+ }
1977
+ _rotateControllerKey_0(context, partialProofData, newControllerPublicKey_0) {
1978
+ this._assertControllerCanUpdate_0(context, partialProofData);
1979
+ const disclosedNewControllerPublicKey_0 = newControllerPublicKey_0;
1980
+ __compactRuntime.assert(!this._equal_1(disclosedNewControllerPublicKey_0,
1981
+ _descriptor_16.fromValue(__compactRuntime.queryLedgerState(context,
1982
+ partialProofData,
1983
+ [
1984
+ { dup: { n: 0 } },
1985
+ { idx: { cached: false,
1986
+ pushPath: false,
1987
+ path: [
1988
+ { tag: 'value',
1989
+ value: { value: _descriptor_28.toValue(0n),
1990
+ alignment: _descriptor_28.alignment() } },
1991
+ { tag: 'value',
1992
+ value: { value: _descriptor_28.toValue(1n),
1993
+ alignment: _descriptor_28.alignment() } }] } },
1994
+ { popeq: { cached: false,
1995
+ result: undefined } }]).value)),
1996
+ 'New controller key matches current controller key');
1997
+ __compactRuntime.queryLedgerState(context,
1998
+ partialProofData,
1999
+ [
2000
+ { idx: { cached: false,
2001
+ pushPath: true,
2002
+ path: [
2003
+ { tag: 'value',
2004
+ value: { value: _descriptor_28.toValue(0n),
2005
+ alignment: _descriptor_28.alignment() } }] } },
2006
+ { push: { storage: false,
2007
+ value: __compactRuntime.StateValue.newCell({ value: _descriptor_28.toValue(1n),
2008
+ alignment: _descriptor_28.alignment() }).encode() } },
2009
+ { push: { storage: true,
2010
+ value: __compactRuntime.StateValue.newCell({ value: _descriptor_16.toValue(disclosedNewControllerPublicKey_0),
2011
+ alignment: _descriptor_16.alignment() }).encode() } },
2012
+ { ins: { cached: false, n: 1 } },
2013
+ { ins: { cached: true, n: 1 } }]);
2014
+ this._recordUpdate_0(context, partialProofData);
2015
+ return [];
2016
+ }
2017
+ _setAlsoKnownAs_0(context, partialProofData, value_0, mutation_0) {
2018
+ this._assertControllerCanUpdate_0(context, partialProofData);
2019
+ const disclosedMutation_0 = mutation_0;
2020
+ this._assertSetMutationDefined_0(disclosedMutation_0);
2021
+ const alias_0 = value_0;
2022
+ if (disclosedMutation_0 === 1) {
2023
+ __compactRuntime.assert(!_descriptor_2.fromValue(__compactRuntime.queryLedgerState(context,
2024
+ partialProofData,
2025
+ [
2026
+ { dup: { n: 0 } },
2027
+ { idx: { cached: false,
2028
+ pushPath: false,
2029
+ path: [
2030
+ { tag: 'value',
2031
+ value: { value: _descriptor_28.toValue(1n),
2032
+ alignment: _descriptor_28.alignment() } },
2033
+ { tag: 'value',
2034
+ value: { value: _descriptor_28.toValue(0n),
2035
+ alignment: _descriptor_28.alignment() } }] } },
2036
+ { push: { storage: false,
2037
+ value: __compactRuntime.StateValue.newCell({ value: _descriptor_0.toValue(alias_0),
2038
+ alignment: _descriptor_0.alignment() }).encode() } },
2039
+ 'member',
2040
+ { popeq: { cached: true,
2041
+ result: undefined } }]).value),
2042
+ 'alsoKnownAs value already exists');
2043
+ __compactRuntime.queryLedgerState(context,
2044
+ partialProofData,
2045
+ [
2046
+ { idx: { cached: false,
2047
+ pushPath: true,
2048
+ path: [
2049
+ { tag: 'value',
2050
+ value: { value: _descriptor_28.toValue(1n),
2051
+ alignment: _descriptor_28.alignment() } },
2052
+ { tag: 'value',
2053
+ value: { value: _descriptor_28.toValue(0n),
2054
+ alignment: _descriptor_28.alignment() } }] } },
2055
+ { push: { storage: false,
2056
+ value: __compactRuntime.StateValue.newCell({ value: _descriptor_0.toValue(alias_0),
2057
+ alignment: _descriptor_0.alignment() }).encode() } },
2058
+ { push: { storage: true,
2059
+ value: __compactRuntime.StateValue.newNull().encode() } },
2060
+ { ins: { cached: false, n: 1 } },
2061
+ { ins: { cached: true, n: 2 } }]);
2062
+ } else {
2063
+ if (disclosedMutation_0 === 2) {
2064
+ __compactRuntime.assert(_descriptor_2.fromValue(__compactRuntime.queryLedgerState(context,
2065
+ partialProofData,
2066
+ [
2067
+ { dup: { n: 0 } },
2068
+ { idx: { cached: false,
2069
+ pushPath: false,
2070
+ path: [
2071
+ { tag: 'value',
2072
+ value: { value: _descriptor_28.toValue(1n),
2073
+ alignment: _descriptor_28.alignment() } },
2074
+ { tag: 'value',
2075
+ value: { value: _descriptor_28.toValue(0n),
2076
+ alignment: _descriptor_28.alignment() } }] } },
2077
+ { push: { storage: false,
2078
+ value: __compactRuntime.StateValue.newCell({ value: _descriptor_0.toValue(alias_0),
2079
+ alignment: _descriptor_0.alignment() }).encode() } },
2080
+ 'member',
2081
+ { popeq: { cached: true,
2082
+ result: undefined } }]).value),
2083
+ 'alsoKnownAs value does not exist');
2084
+ __compactRuntime.queryLedgerState(context,
2085
+ partialProofData,
2086
+ [
2087
+ { idx: { cached: false,
2088
+ pushPath: true,
2089
+ path: [
2090
+ { tag: 'value',
2091
+ value: { value: _descriptor_28.toValue(1n),
2092
+ alignment: _descriptor_28.alignment() } },
2093
+ { tag: 'value',
2094
+ value: { value: _descriptor_28.toValue(0n),
2095
+ alignment: _descriptor_28.alignment() } }] } },
2096
+ { push: { storage: false,
2097
+ value: __compactRuntime.StateValue.newCell({ value: _descriptor_0.toValue(alias_0),
2098
+ alignment: _descriptor_0.alignment() }).encode() } },
2099
+ { rem: { cached: false } },
2100
+ { ins: { cached: true, n: 2 } }]);
2101
+ }
2102
+ }
2103
+ this._recordUpdate_0(context, partialProofData);
2104
+ return [];
2105
+ }
2106
+ _setVerificationMethod_0(context,
2107
+ partialProofData,
2108
+ verificationMethod_0,
2109
+ mutation_0)
2110
+ {
2111
+ this._assertControllerCanUpdate_0(context, partialProofData);
2112
+ const disclosedVerificationMethod_0 = verificationMethod_0;
2113
+ const disclosedMutation_0 = mutation_0;
2114
+ this._assertMapMutationDefined_0(disclosedMutation_0);
2115
+ this._assertSupportedVerificationMethod_0(disclosedVerificationMethod_0);
2116
+ if (disclosedMutation_0 === 2) {
2117
+ let tmp_0;
2118
+ __compactRuntime.assert((tmp_0 = disclosedVerificationMethod_0.id,
2119
+ _descriptor_2.fromValue(__compactRuntime.queryLedgerState(context,
2120
+ partialProofData,
2121
+ [
2122
+ { dup: { n: 0 } },
2123
+ { idx: { cached: false,
2124
+ pushPath: false,
2125
+ path: [
2126
+ { tag: 'value',
2127
+ value: { value: _descriptor_28.toValue(1n),
2128
+ alignment: _descriptor_28.alignment() } },
2129
+ { tag: 'value',
2130
+ value: { value: _descriptor_28.toValue(7n),
2131
+ alignment: _descriptor_28.alignment() } }] } },
2132
+ { push: { storage: false,
2133
+ value: __compactRuntime.StateValue.newCell({ value: _descriptor_0.toValue(tmp_0),
2134
+ alignment: _descriptor_0.alignment() }).encode() } },
2135
+ 'member',
2136
+ { popeq: { cached: true,
2137
+ result: undefined } }]).value)),
2138
+ 'Verification method does not exist');
2139
+ const tmp_1 = disclosedVerificationMethod_0.id;
2140
+ __compactRuntime.queryLedgerState(context,
2141
+ partialProofData,
2142
+ [
2143
+ { idx: { cached: false,
2144
+ pushPath: true,
2145
+ path: [
2146
+ { tag: 'value',
2147
+ value: { value: _descriptor_28.toValue(1n),
2148
+ alignment: _descriptor_28.alignment() } },
2149
+ { tag: 'value',
2150
+ value: { value: _descriptor_28.toValue(7n),
2151
+ alignment: _descriptor_28.alignment() } }] } },
2152
+ { push: { storage: false,
2153
+ value: __compactRuntime.StateValue.newCell({ value: _descriptor_0.toValue(tmp_1),
2154
+ alignment: _descriptor_0.alignment() }).encode() } },
2155
+ { rem: { cached: false } },
2156
+ { ins: { cached: true, n: 2 } }]);
2157
+ } else {
2158
+ if (disclosedMutation_0 === 1) {
2159
+ __compactRuntime.assert(!this._verificationMethodExists_0(context,
2160
+ partialProofData,
2161
+ disclosedVerificationMethod_0.id),
2162
+ 'Verification method already exists');
2163
+ }
2164
+ }
2165
+ const tmp_2 = disclosedVerificationMethod_0.id;
2166
+ __compactRuntime.queryLedgerState(context,
2167
+ partialProofData,
2168
+ [
2169
+ { idx: { cached: false,
2170
+ pushPath: true,
2171
+ path: [
2172
+ { tag: 'value',
2173
+ value: { value: _descriptor_28.toValue(1n),
2174
+ alignment: _descriptor_28.alignment() } },
2175
+ { tag: 'value',
2176
+ value: { value: _descriptor_28.toValue(7n),
2177
+ alignment: _descriptor_28.alignment() } }] } },
2178
+ { push: { storage: false,
2179
+ value: __compactRuntime.StateValue.newCell({ value: _descriptor_0.toValue(tmp_2),
2180
+ alignment: _descriptor_0.alignment() }).encode() } },
2181
+ { push: { storage: true,
2182
+ value: __compactRuntime.StateValue.newCell({ value: _descriptor_15.toValue(disclosedVerificationMethod_0),
2183
+ alignment: _descriptor_15.alignment() }).encode() } },
2184
+ { ins: { cached: false, n: 1 } },
2185
+ { ins: { cached: true, n: 2 } }]);
2186
+ this._recordUpdate_0(context, partialProofData);
2187
+ return [];
2188
+ }
2189
+ _removeVerificationMethod_0(context, partialProofData, id_0) {
2190
+ this._assertControllerCanUpdate_0(context, partialProofData);
2191
+ const disclosedId_0 = id_0;
2192
+ __compactRuntime.assert(_descriptor_2.fromValue(__compactRuntime.queryLedgerState(context,
2193
+ partialProofData,
2194
+ [
2195
+ { dup: { n: 0 } },
2196
+ { idx: { cached: false,
2197
+ pushPath: false,
2198
+ path: [
2199
+ { tag: 'value',
2200
+ value: { value: _descriptor_28.toValue(1n),
2201
+ alignment: _descriptor_28.alignment() } },
2202
+ { tag: 'value',
2203
+ value: { value: _descriptor_28.toValue(7n),
2204
+ alignment: _descriptor_28.alignment() } }] } },
2205
+ { push: { storage: false,
2206
+ value: __compactRuntime.StateValue.newCell({ value: _descriptor_0.toValue(disclosedId_0),
2207
+ alignment: _descriptor_0.alignment() }).encode() } },
2208
+ 'member',
2209
+ { popeq: { cached: true,
2210
+ result: undefined } }]).value),
2211
+ 'Verification method does not exist');
2212
+ this._assertVerificationMethodIsNotReferenced_0(context,
2213
+ partialProofData,
2214
+ disclosedId_0);
2215
+ __compactRuntime.queryLedgerState(context,
2216
+ partialProofData,
2217
+ [
2218
+ { idx: { cached: false,
2219
+ pushPath: true,
2220
+ path: [
2221
+ { tag: 'value',
2222
+ value: { value: _descriptor_28.toValue(1n),
2223
+ alignment: _descriptor_28.alignment() } },
2224
+ { tag: 'value',
2225
+ value: { value: _descriptor_28.toValue(7n),
2226
+ alignment: _descriptor_28.alignment() } }] } },
2227
+ { push: { storage: false,
2228
+ value: __compactRuntime.StateValue.newCell({ value: _descriptor_0.toValue(disclosedId_0),
2229
+ alignment: _descriptor_0.alignment() }).encode() } },
2230
+ { rem: { cached: false } },
2231
+ { ins: { cached: true, n: 2 } }]);
2232
+ this._recordUpdate_0(context, partialProofData);
2233
+ return [];
2234
+ }
2235
+ _setSchnorrJubjubVerificationMethod_0(context,
2236
+ partialProofData,
2237
+ verificationMethod_0,
2238
+ mutation_0)
2239
+ {
2240
+ this._assertControllerCanUpdate_0(context, partialProofData);
2241
+ const disclosedVerificationMethod_0 = verificationMethod_0;
2242
+ const disclosedMutation_0 = mutation_0;
2243
+ this._assertMapMutationDefined_0(disclosedMutation_0);
2244
+ if (disclosedMutation_0 === 2) {
2245
+ let tmp_0;
2246
+ __compactRuntime.assert((tmp_0 = disclosedVerificationMethod_0.id,
2247
+ _descriptor_2.fromValue(__compactRuntime.queryLedgerState(context,
2248
+ partialProofData,
2249
+ [
2250
+ { dup: { n: 0 } },
2251
+ { idx: { cached: false,
2252
+ pushPath: false,
2253
+ path: [
2254
+ { tag: 'value',
2255
+ value: { value: _descriptor_28.toValue(1n),
2256
+ alignment: _descriptor_28.alignment() } },
2257
+ { tag: 'value',
2258
+ value: { value: _descriptor_28.toValue(8n),
2259
+ alignment: _descriptor_28.alignment() } }] } },
2260
+ { push: { storage: false,
2261
+ value: __compactRuntime.StateValue.newCell({ value: _descriptor_0.toValue(tmp_0),
2262
+ alignment: _descriptor_0.alignment() }).encode() } },
2263
+ 'member',
2264
+ { popeq: { cached: true,
2265
+ result: undefined } }]).value)),
2266
+ 'Verification method does not exist');
2267
+ const tmp_1 = disclosedVerificationMethod_0.id;
2268
+ __compactRuntime.queryLedgerState(context,
2269
+ partialProofData,
2270
+ [
2271
+ { idx: { cached: false,
2272
+ pushPath: true,
2273
+ path: [
2274
+ { tag: 'value',
2275
+ value: { value: _descriptor_28.toValue(1n),
2276
+ alignment: _descriptor_28.alignment() } },
2277
+ { tag: 'value',
2278
+ value: { value: _descriptor_28.toValue(8n),
2279
+ alignment: _descriptor_28.alignment() } }] } },
2280
+ { push: { storage: false,
2281
+ value: __compactRuntime.StateValue.newCell({ value: _descriptor_0.toValue(tmp_1),
2282
+ alignment: _descriptor_0.alignment() }).encode() } },
2283
+ { rem: { cached: false } },
2284
+ { ins: { cached: true, n: 2 } }]);
2285
+ } else {
2286
+ if (disclosedMutation_0 === 1) {
2287
+ __compactRuntime.assert(!this._verificationMethodExists_0(context,
2288
+ partialProofData,
2289
+ disclosedVerificationMethod_0.id),
2290
+ 'Verification method already exists');
2291
+ }
2292
+ }
2293
+ const tmp_2 = disclosedVerificationMethod_0.id;
2294
+ __compactRuntime.queryLedgerState(context,
2295
+ partialProofData,
2296
+ [
2297
+ { idx: { cached: false,
2298
+ pushPath: true,
2299
+ path: [
2300
+ { tag: 'value',
2301
+ value: { value: _descriptor_28.toValue(1n),
2302
+ alignment: _descriptor_28.alignment() } },
2303
+ { tag: 'value',
2304
+ value: { value: _descriptor_28.toValue(8n),
2305
+ alignment: _descriptor_28.alignment() } }] } },
2306
+ { push: { storage: false,
2307
+ value: __compactRuntime.StateValue.newCell({ value: _descriptor_0.toValue(tmp_2),
2308
+ alignment: _descriptor_0.alignment() }).encode() } },
2309
+ { push: { storage: true,
2310
+ value: __compactRuntime.StateValue.newCell({ value: _descriptor_7.toValue(disclosedVerificationMethod_0),
2311
+ alignment: _descriptor_7.alignment() }).encode() } },
2312
+ { ins: { cached: false, n: 1 } },
2313
+ { ins: { cached: true, n: 2 } }]);
2314
+ this._recordUpdate_0(context, partialProofData);
2315
+ return [];
2316
+ }
2317
+ _removeSchnorrJubjubVerificationMethod_0(context, partialProofData, id_0) {
2318
+ this._assertControllerCanUpdate_0(context, partialProofData);
2319
+ const disclosedId_0 = id_0;
2320
+ __compactRuntime.assert(_descriptor_2.fromValue(__compactRuntime.queryLedgerState(context,
2321
+ partialProofData,
2322
+ [
2323
+ { dup: { n: 0 } },
2324
+ { idx: { cached: false,
2325
+ pushPath: false,
2326
+ path: [
2327
+ { tag: 'value',
2328
+ value: { value: _descriptor_28.toValue(1n),
2329
+ alignment: _descriptor_28.alignment() } },
2330
+ { tag: 'value',
2331
+ value: { value: _descriptor_28.toValue(8n),
2332
+ alignment: _descriptor_28.alignment() } }] } },
2333
+ { push: { storage: false,
2334
+ value: __compactRuntime.StateValue.newCell({ value: _descriptor_0.toValue(disclosedId_0),
2335
+ alignment: _descriptor_0.alignment() }).encode() } },
2336
+ 'member',
2337
+ { popeq: { cached: true,
2338
+ result: undefined } }]).value),
2339
+ 'Verification method does not exist');
2340
+ this._assertVerificationMethodIsNotReferenced_0(context,
2341
+ partialProofData,
2342
+ disclosedId_0);
2343
+ __compactRuntime.queryLedgerState(context,
2344
+ partialProofData,
2345
+ [
2346
+ { idx: { cached: false,
2347
+ pushPath: true,
2348
+ path: [
2349
+ { tag: 'value',
2350
+ value: { value: _descriptor_28.toValue(1n),
2351
+ alignment: _descriptor_28.alignment() } },
2352
+ { tag: 'value',
2353
+ value: { value: _descriptor_28.toValue(8n),
2354
+ alignment: _descriptor_28.alignment() } }] } },
2355
+ { push: { storage: false,
2356
+ value: __compactRuntime.StateValue.newCell({ value: _descriptor_0.toValue(disclosedId_0),
2357
+ alignment: _descriptor_0.alignment() }).encode() } },
2358
+ { rem: { cached: false } },
2359
+ { ins: { cached: true, n: 2 } }]);
2360
+ this._recordUpdate_0(context, partialProofData);
2361
+ return [];
2362
+ }
2363
+ _verifySchnorrJubjubDigestSignature_0(context,
2364
+ partialProofData,
2365
+ methodId_0,
2366
+ digest_0,
2367
+ signature_0)
2368
+ {
2369
+ __compactRuntime.assert(_descriptor_2.fromValue(__compactRuntime.queryLedgerState(context,
2370
+ partialProofData,
2371
+ [
2372
+ { dup: { n: 0 } },
2373
+ { idx: { cached: false,
2374
+ pushPath: false,
2375
+ path: [
2376
+ { tag: 'value',
2377
+ value: { value: _descriptor_28.toValue(1n),
2378
+ alignment: _descriptor_28.alignment() } },
2379
+ { tag: 'value',
2380
+ value: { value: _descriptor_28.toValue(5n),
2381
+ alignment: _descriptor_28.alignment() } }] } },
2382
+ { popeq: { cached: false,
2383
+ result: undefined } }]).value),
2384
+ 'Contract is not active');
2385
+ const disclosedMethodId_0 = methodId_0;
2386
+ __compactRuntime.assert(_descriptor_2.fromValue(__compactRuntime.queryLedgerState(context,
2387
+ partialProofData,
2388
+ [
2389
+ { dup: { n: 0 } },
2390
+ { idx: { cached: false,
2391
+ pushPath: false,
2392
+ path: [
2393
+ { tag: 'value',
2394
+ value: { value: _descriptor_28.toValue(1n),
2395
+ alignment: _descriptor_28.alignment() } },
2396
+ { tag: 'value',
2397
+ value: { value: _descriptor_28.toValue(8n),
2398
+ alignment: _descriptor_28.alignment() } }] } },
2399
+ { push: { storage: false,
2400
+ value: __compactRuntime.StateValue.newCell({ value: _descriptor_0.toValue(disclosedMethodId_0),
2401
+ alignment: _descriptor_0.alignment() }).encode() } },
2402
+ 'member',
2403
+ { popeq: { cached: true,
2404
+ result: undefined } }]).value),
2405
+ 'Verification method does not exist');
2406
+ const verificationMethod_0 = _descriptor_7.fromValue(__compactRuntime.queryLedgerState(context,
2407
+ partialProofData,
2408
+ [
2409
+ { dup: { n: 0 } },
2410
+ { idx: { cached: false,
2411
+ pushPath: false,
2412
+ path: [
2413
+ { tag: 'value',
2414
+ value: { value: _descriptor_28.toValue(1n),
2415
+ alignment: _descriptor_28.alignment() } },
2416
+ { tag: 'value',
2417
+ value: { value: _descriptor_28.toValue(8n),
2418
+ alignment: _descriptor_28.alignment() } }] } },
2419
+ { idx: { cached: false,
2420
+ pushPath: false,
2421
+ path: [
2422
+ { tag: 'value',
2423
+ value: { value: _descriptor_0.toValue(disclosedMethodId_0),
2424
+ alignment: _descriptor_0.alignment() } }] } },
2425
+ { popeq: { cached: false,
2426
+ result: undefined } }]).value);
2427
+ this._schnorrVerifyDigest_0(context,
2428
+ partialProofData,
2429
+ digest_0,
2430
+ signature_0,
2431
+ verificationMethod_0.publicKey);
2432
+ return [];
2433
+ }
2434
+ _setVerificationMethodRelation_0(context,
2435
+ partialProofData,
2436
+ relation_0,
2437
+ methodId_0,
2438
+ mutation_0)
2439
+ {
2440
+ this._assertControllerCanUpdate_0(context, partialProofData);
2441
+ const disclosedRelation_0 = relation_0;
2442
+ const disclosedMethodId_0 = methodId_0;
2443
+ const disclosedMutation_0 = mutation_0;
2444
+ this._assertSetMutationDefined_0(disclosedMutation_0);
2445
+ __compactRuntime.assert(this._verificationMethodExists_0(context,
2446
+ partialProofData,
2447
+ disclosedMethodId_0),
2448
+ 'Verification method does not exist');
2449
+ __compactRuntime.assert(disclosedRelation_0 !== 0,
2450
+ 'Verification relation must be defined');
2451
+ const currentPresent_0 = this._verificationMethodRelationMember_0(context,
2452
+ partialProofData,
2453
+ disclosedRelation_0,
2454
+ disclosedMethodId_0);
2455
+ if (disclosedMutation_0 === 1) {
2456
+ __compactRuntime.assert(!currentPresent_0,
2457
+ 'Verification method relation already exists');
2458
+ this._insertVerificationMethodRelation_0(context,
2459
+ partialProofData,
2460
+ disclosedRelation_0,
2461
+ disclosedMethodId_0);
2462
+ } else {
2463
+ if (disclosedMutation_0 === 2) {
2464
+ __compactRuntime.assert(currentPresent_0,
2465
+ 'Verification method relation does not exist');
2466
+ this._removeVerificationMethodRelationFromLedger_0(context,
2467
+ partialProofData,
2468
+ disclosedRelation_0,
2469
+ disclosedMethodId_0);
2470
+ }
2471
+ }
2472
+ this._recordUpdate_0(context, partialProofData);
2473
+ return [];
2474
+ }
2475
+ _setService_0(context, partialProofData, service_0, mutation_0) {
2476
+ this._assertControllerCanUpdate_0(context, partialProofData);
2477
+ const disclosedService_0 = service_0;
2478
+ const disclosedMutation_0 = mutation_0;
2479
+ this._assertMapMutationDefined_0(disclosedMutation_0);
2480
+ if (disclosedMutation_0 === 2) {
2481
+ let tmp_0;
2482
+ __compactRuntime.assert((tmp_0 = disclosedService_0.id,
2483
+ _descriptor_2.fromValue(__compactRuntime.queryLedgerState(context,
2484
+ partialProofData,
2485
+ [
2486
+ { dup: { n: 0 } },
2487
+ { idx: { cached: false,
2488
+ pushPath: false,
2489
+ path: [
2490
+ { tag: 'value',
2491
+ value: { value: _descriptor_28.toValue(1n),
2492
+ alignment: _descriptor_28.alignment() } },
2493
+ { tag: 'value',
2494
+ value: { value: _descriptor_28.toValue(14n),
2495
+ alignment: _descriptor_28.alignment() } }] } },
2496
+ { push: { storage: false,
2497
+ value: __compactRuntime.StateValue.newCell({ value: _descriptor_0.toValue(tmp_0),
2498
+ alignment: _descriptor_0.alignment() }).encode() } },
2499
+ 'member',
2500
+ { popeq: { cached: true,
2501
+ result: undefined } }]).value)),
2502
+ 'Service with a given id does not exist');
2503
+ const tmp_1 = disclosedService_0.id;
2504
+ __compactRuntime.queryLedgerState(context,
2505
+ partialProofData,
2506
+ [
2507
+ { idx: { cached: false,
2508
+ pushPath: true,
2509
+ path: [
2510
+ { tag: 'value',
2511
+ value: { value: _descriptor_28.toValue(1n),
2512
+ alignment: _descriptor_28.alignment() } },
2513
+ { tag: 'value',
2514
+ value: { value: _descriptor_28.toValue(14n),
2515
+ alignment: _descriptor_28.alignment() } }] } },
2516
+ { push: { storage: false,
2517
+ value: __compactRuntime.StateValue.newCell({ value: _descriptor_0.toValue(tmp_1),
2518
+ alignment: _descriptor_0.alignment() }).encode() } },
2519
+ { rem: { cached: false } },
2520
+ { ins: { cached: true, n: 2 } }]);
2521
+ } else {
2522
+ if (disclosedMutation_0 === 1) {
2523
+ let tmp_2;
2524
+ __compactRuntime.assert(!(tmp_2 = disclosedService_0.id,
2525
+ _descriptor_2.fromValue(__compactRuntime.queryLedgerState(context,
2526
+ partialProofData,
2527
+ [
2528
+ { dup: { n: 0 } },
2529
+ { idx: { cached: false,
2530
+ pushPath: false,
2531
+ path: [
2532
+ { tag: 'value',
2533
+ value: { value: _descriptor_28.toValue(1n),
2534
+ alignment: _descriptor_28.alignment() } },
2535
+ { tag: 'value',
2536
+ value: { value: _descriptor_28.toValue(14n),
2537
+ alignment: _descriptor_28.alignment() } }] } },
2538
+ { push: { storage: false,
2539
+ value: __compactRuntime.StateValue.newCell({ value: _descriptor_0.toValue(tmp_2),
2540
+ alignment: _descriptor_0.alignment() }).encode() } },
2541
+ 'member',
2542
+ { popeq: { cached: true,
2543
+ result: undefined } }]).value)),
2544
+ 'Service with a given id already exists');
2545
+ }
2546
+ }
2547
+ const tmp_3 = disclosedService_0.id;
2548
+ __compactRuntime.queryLedgerState(context,
2549
+ partialProofData,
2550
+ [
2551
+ { idx: { cached: false,
2552
+ pushPath: true,
2553
+ path: [
2554
+ { tag: 'value',
2555
+ value: { value: _descriptor_28.toValue(1n),
2556
+ alignment: _descriptor_28.alignment() } },
2557
+ { tag: 'value',
2558
+ value: { value: _descriptor_28.toValue(14n),
2559
+ alignment: _descriptor_28.alignment() } }] } },
2560
+ { push: { storage: false,
2561
+ value: __compactRuntime.StateValue.newCell({ value: _descriptor_0.toValue(tmp_3),
2562
+ alignment: _descriptor_0.alignment() }).encode() } },
2563
+ { push: { storage: true,
2564
+ value: __compactRuntime.StateValue.newCell({ value: _descriptor_1.toValue(disclosedService_0),
2565
+ alignment: _descriptor_1.alignment() }).encode() } },
2566
+ { ins: { cached: false, n: 1 } },
2567
+ { ins: { cached: true, n: 2 } }]);
2568
+ this._recordUpdate_0(context, partialProofData);
2569
+ return [];
2570
+ }
2571
+ _removeService_0(context, partialProofData, id_0) {
2572
+ this._assertControllerCanUpdate_0(context, partialProofData);
2573
+ const disclosedId_0 = id_0;
2574
+ __compactRuntime.assert(_descriptor_2.fromValue(__compactRuntime.queryLedgerState(context,
2575
+ partialProofData,
2576
+ [
2577
+ { dup: { n: 0 } },
2578
+ { idx: { cached: false,
2579
+ pushPath: false,
2580
+ path: [
2581
+ { tag: 'value',
2582
+ value: { value: _descriptor_28.toValue(1n),
2583
+ alignment: _descriptor_28.alignment() } },
2584
+ { tag: 'value',
2585
+ value: { value: _descriptor_28.toValue(14n),
2586
+ alignment: _descriptor_28.alignment() } }] } },
2587
+ { push: { storage: false,
2588
+ value: __compactRuntime.StateValue.newCell({ value: _descriptor_0.toValue(disclosedId_0),
2589
+ alignment: _descriptor_0.alignment() }).encode() } },
2590
+ 'member',
2591
+ { popeq: { cached: true,
2592
+ result: undefined } }]).value),
2593
+ 'Service with a given id does not exist');
2594
+ __compactRuntime.queryLedgerState(context,
2595
+ partialProofData,
2596
+ [
2597
+ { idx: { cached: false,
2598
+ pushPath: true,
2599
+ path: [
2600
+ { tag: 'value',
2601
+ value: { value: _descriptor_28.toValue(1n),
2602
+ alignment: _descriptor_28.alignment() } },
2603
+ { tag: 'value',
2604
+ value: { value: _descriptor_28.toValue(14n),
2605
+ alignment: _descriptor_28.alignment() } }] } },
2606
+ { push: { storage: false,
2607
+ value: __compactRuntime.StateValue.newCell({ value: _descriptor_0.toValue(disclosedId_0),
2608
+ alignment: _descriptor_0.alignment() }).encode() } },
2609
+ { rem: { cached: false } },
2610
+ { ins: { cached: true, n: 2 } }]);
2611
+ this._recordUpdate_0(context, partialProofData);
2612
+ return [];
2613
+ }
2614
+ _deactivate_0(context, partialProofData) {
2615
+ this._assertController_0(context, partialProofData);
2616
+ __compactRuntime.assert(_descriptor_2.fromValue(__compactRuntime.queryLedgerState(context,
2617
+ partialProofData,
2618
+ [
2619
+ { dup: { n: 0 } },
2620
+ { idx: { cached: false,
2621
+ pushPath: false,
2622
+ path: [
2623
+ { tag: 'value',
2624
+ value: { value: _descriptor_28.toValue(1n),
2625
+ alignment: _descriptor_28.alignment() } },
2626
+ { tag: 'value',
2627
+ value: { value: _descriptor_28.toValue(5n),
2628
+ alignment: _descriptor_28.alignment() } }] } },
2629
+ { popeq: { cached: false,
2630
+ result: undefined } }]).value),
2631
+ 'DID is already inactive');
2632
+ __compactRuntime.queryLedgerState(context,
2633
+ partialProofData,
2634
+ [
2635
+ { idx: { cached: false,
2636
+ pushPath: true,
2637
+ path: [
2638
+ { tag: 'value',
2639
+ value: { value: _descriptor_28.toValue(1n),
2640
+ alignment: _descriptor_28.alignment() } }] } },
2641
+ { push: { storage: false,
2642
+ value: __compactRuntime.StateValue.newCell({ value: _descriptor_28.toValue(5n),
2643
+ alignment: _descriptor_28.alignment() }).encode() } },
2644
+ { push: { storage: true,
2645
+ value: __compactRuntime.StateValue.newCell({ value: _descriptor_2.toValue(false),
2646
+ alignment: _descriptor_2.alignment() }).encode() } },
2647
+ { ins: { cached: false, n: 1 } },
2648
+ { ins: { cached: true, n: 1 } }]);
2649
+ __compactRuntime.queryLedgerState(context,
2650
+ partialProofData,
2651
+ [
2652
+ { idx: { cached: false,
2653
+ pushPath: true,
2654
+ path: [
2655
+ { tag: 'value',
2656
+ value: { value: _descriptor_28.toValue(1n),
2657
+ alignment: _descriptor_28.alignment() } }] } },
2658
+ { push: { storage: false,
2659
+ value: __compactRuntime.StateValue.newCell({ value: _descriptor_28.toValue(4n),
2660
+ alignment: _descriptor_28.alignment() }).encode() } },
2661
+ { push: { storage: true,
2662
+ value: __compactRuntime.StateValue.newCell({ value: _descriptor_2.toValue(true),
2663
+ alignment: _descriptor_2.alignment() }).encode() } },
2664
+ { ins: { cached: false, n: 1 } },
2665
+ { ins: { cached: true, n: 1 } }]);
2666
+ this._recordUpdate_0(context, partialProofData);
2667
+ return [];
2668
+ }
2669
+ _equal_0(x0, y0) {
2670
+ if (!x0.every((x, i) => y0[i] === x)) { return false; }
2671
+ return true;
2672
+ }
2673
+ _equal_1(x0, y0) {
2674
+ if (!x0.every((x, i) => y0[i] === x)) { return false; }
2675
+ return true;
2676
+ }
2677
+ }
2678
+ export function ledger(stateOrChargedState) {
2679
+ const state = stateOrChargedState instanceof __compactRuntime.StateValue ? stateOrChargedState : stateOrChargedState.state;
2680
+ const chargedState = stateOrChargedState instanceof __compactRuntime.StateValue ? new __compactRuntime.ChargedState(stateOrChargedState) : stateOrChargedState;
2681
+ const context = {
2682
+ currentQueryContext: new __compactRuntime.QueryContext(chargedState, __compactRuntime.dummyContractAddress()),
2683
+ costModel: __compactRuntime.CostModel.initialCostModel()
2684
+ };
2685
+ const partialProofData = {
2686
+ input: { value: [], alignment: [] },
2687
+ output: undefined,
2688
+ publicTranscript: [],
2689
+ privateTranscriptOutputs: []
2690
+ };
2691
+ return {
2692
+ get contractVersion() {
2693
+ return _descriptor_27.fromValue(__compactRuntime.queryLedgerState(context,
2694
+ partialProofData,
2695
+ [
2696
+ { dup: { n: 0 } },
2697
+ { idx: { cached: false,
2698
+ pushPath: false,
2699
+ path: [
2700
+ { tag: 'value',
2701
+ value: { value: _descriptor_28.toValue(0n),
2702
+ alignment: _descriptor_28.alignment() } },
2703
+ { tag: 'value',
2704
+ value: { value: _descriptor_28.toValue(0n),
2705
+ alignment: _descriptor_28.alignment() } }] } },
2706
+ { popeq: { cached: false,
2707
+ result: undefined } }]).value);
2708
+ },
2709
+ get controllerPublicKey() {
2710
+ return _descriptor_16.fromValue(__compactRuntime.queryLedgerState(context,
2711
+ partialProofData,
2712
+ [
2713
+ { dup: { n: 0 } },
2714
+ { idx: { cached: false,
2715
+ pushPath: false,
2716
+ path: [
2717
+ { tag: 'value',
2718
+ value: { value: _descriptor_28.toValue(0n),
2719
+ alignment: _descriptor_28.alignment() } },
2720
+ { tag: 'value',
2721
+ value: { value: _descriptor_28.toValue(1n),
2722
+ alignment: _descriptor_28.alignment() } }] } },
2723
+ { popeq: { cached: false,
2724
+ result: undefined } }]).value);
2725
+ },
2726
+ get id() {
2727
+ return _descriptor_26.fromValue(__compactRuntime.queryLedgerState(context,
2728
+ partialProofData,
2729
+ [
2730
+ { dup: { n: 0 } },
2731
+ { idx: { cached: false,
2732
+ pushPath: false,
2733
+ path: [
2734
+ { tag: 'value',
2735
+ value: { value: _descriptor_28.toValue(0n),
2736
+ alignment: _descriptor_28.alignment() } },
2737
+ { tag: 'value',
2738
+ value: { value: _descriptor_28.toValue(2n),
2739
+ alignment: _descriptor_28.alignment() } }] } },
2740
+ { popeq: { cached: false,
2741
+ result: undefined } }]).value);
2742
+ },
2743
+ alsoKnownAs: {
2744
+ isEmpty(...args_0) {
2745
+ if (args_0.length !== 0) {
2746
+ throw new __compactRuntime.CompactError(`isEmpty: expected 0 arguments, received ${args_0.length}`);
2747
+ }
2748
+ return _descriptor_2.fromValue(__compactRuntime.queryLedgerState(context,
2749
+ partialProofData,
2750
+ [
2751
+ { dup: { n: 0 } },
2752
+ { idx: { cached: false,
2753
+ pushPath: false,
2754
+ path: [
2755
+ { tag: 'value',
2756
+ value: { value: _descriptor_28.toValue(1n),
2757
+ alignment: _descriptor_28.alignment() } },
2758
+ { tag: 'value',
2759
+ value: { value: _descriptor_28.toValue(0n),
2760
+ alignment: _descriptor_28.alignment() } }] } },
2761
+ 'size',
2762
+ { push: { storage: false,
2763
+ value: __compactRuntime.StateValue.newCell({ value: _descriptor_17.toValue(0n),
2764
+ alignment: _descriptor_17.alignment() }).encode() } },
2765
+ 'eq',
2766
+ { popeq: { cached: true,
2767
+ result: undefined } }]).value);
2768
+ },
2769
+ size(...args_0) {
2770
+ if (args_0.length !== 0) {
2771
+ throw new __compactRuntime.CompactError(`size: expected 0 arguments, received ${args_0.length}`);
2772
+ }
2773
+ return _descriptor_17.fromValue(__compactRuntime.queryLedgerState(context,
2774
+ partialProofData,
2775
+ [
2776
+ { dup: { n: 0 } },
2777
+ { idx: { cached: false,
2778
+ pushPath: false,
2779
+ path: [
2780
+ { tag: 'value',
2781
+ value: { value: _descriptor_28.toValue(1n),
2782
+ alignment: _descriptor_28.alignment() } },
2783
+ { tag: 'value',
2784
+ value: { value: _descriptor_28.toValue(0n),
2785
+ alignment: _descriptor_28.alignment() } }] } },
2786
+ 'size',
2787
+ { popeq: { cached: true,
2788
+ result: undefined } }]).value);
2789
+ },
2790
+ member(...args_0) {
2791
+ if (args_0.length !== 1) {
2792
+ throw new __compactRuntime.CompactError(`member: expected 1 argument, received ${args_0.length}`);
2793
+ }
2794
+ const elem_0 = args_0[0];
2795
+ return _descriptor_2.fromValue(__compactRuntime.queryLedgerState(context,
2796
+ partialProofData,
2797
+ [
2798
+ { dup: { n: 0 } },
2799
+ { idx: { cached: false,
2800
+ pushPath: false,
2801
+ path: [
2802
+ { tag: 'value',
2803
+ value: { value: _descriptor_28.toValue(1n),
2804
+ alignment: _descriptor_28.alignment() } },
2805
+ { tag: 'value',
2806
+ value: { value: _descriptor_28.toValue(0n),
2807
+ alignment: _descriptor_28.alignment() } }] } },
2808
+ { push: { storage: false,
2809
+ value: __compactRuntime.StateValue.newCell({ value: _descriptor_0.toValue(elem_0),
2810
+ alignment: _descriptor_0.alignment() }).encode() } },
2811
+ 'member',
2812
+ { popeq: { cached: true,
2813
+ result: undefined } }]).value);
2814
+ },
2815
+ [Symbol.iterator](...args_0) {
2816
+ if (args_0.length !== 0) {
2817
+ throw new __compactRuntime.CompactError(`iter: expected 0 arguments, received ${args_0.length}`);
2818
+ }
2819
+ const self_0 = state.asArray()[1].asArray()[0];
2820
+ return self_0.asMap().keys().map((elem) => _descriptor_0.fromValue(elem.value))[Symbol.iterator]();
2821
+ }
2822
+ },
2823
+ get version() {
2824
+ return _descriptor_17.fromValue(__compactRuntime.queryLedgerState(context,
2825
+ partialProofData,
2826
+ [
2827
+ { dup: { n: 0 } },
2828
+ { idx: { cached: false,
2829
+ pushPath: false,
2830
+ path: [
2831
+ { tag: 'value',
2832
+ value: { value: _descriptor_28.toValue(1n),
2833
+ alignment: _descriptor_28.alignment() } },
2834
+ { tag: 'value',
2835
+ value: { value: _descriptor_28.toValue(1n),
2836
+ alignment: _descriptor_28.alignment() } }] } },
2837
+ { popeq: { cached: true,
2838
+ result: undefined } }]).value);
2839
+ },
2840
+ get created() {
2841
+ return _descriptor_17.fromValue(__compactRuntime.queryLedgerState(context,
2842
+ partialProofData,
2843
+ [
2844
+ { dup: { n: 0 } },
2845
+ { idx: { cached: false,
2846
+ pushPath: false,
2847
+ path: [
2848
+ { tag: 'value',
2849
+ value: { value: _descriptor_28.toValue(1n),
2850
+ alignment: _descriptor_28.alignment() } },
2851
+ { tag: 'value',
2852
+ value: { value: _descriptor_28.toValue(2n),
2853
+ alignment: _descriptor_28.alignment() } }] } },
2854
+ { popeq: { cached: false,
2855
+ result: undefined } }]).value);
2856
+ },
2857
+ get updated() {
2858
+ return _descriptor_17.fromValue(__compactRuntime.queryLedgerState(context,
2859
+ partialProofData,
2860
+ [
2861
+ { dup: { n: 0 } },
2862
+ { idx: { cached: false,
2863
+ pushPath: false,
2864
+ path: [
2865
+ { tag: 'value',
2866
+ value: { value: _descriptor_28.toValue(1n),
2867
+ alignment: _descriptor_28.alignment() } },
2868
+ { tag: 'value',
2869
+ value: { value: _descriptor_28.toValue(3n),
2870
+ alignment: _descriptor_28.alignment() } }] } },
2871
+ { popeq: { cached: false,
2872
+ result: undefined } }]).value);
2873
+ },
2874
+ get deactivated() {
2875
+ return _descriptor_2.fromValue(__compactRuntime.queryLedgerState(context,
2876
+ partialProofData,
2877
+ [
2878
+ { dup: { n: 0 } },
2879
+ { idx: { cached: false,
2880
+ pushPath: false,
2881
+ path: [
2882
+ { tag: 'value',
2883
+ value: { value: _descriptor_28.toValue(1n),
2884
+ alignment: _descriptor_28.alignment() } },
2885
+ { tag: 'value',
2886
+ value: { value: _descriptor_28.toValue(4n),
2887
+ alignment: _descriptor_28.alignment() } }] } },
2888
+ { popeq: { cached: false,
2889
+ result: undefined } }]).value);
2890
+ },
2891
+ get active() {
2892
+ return _descriptor_2.fromValue(__compactRuntime.queryLedgerState(context,
2893
+ partialProofData,
2894
+ [
2895
+ { dup: { n: 0 } },
2896
+ { idx: { cached: false,
2897
+ pushPath: false,
2898
+ path: [
2899
+ { tag: 'value',
2900
+ value: { value: _descriptor_28.toValue(1n),
2901
+ alignment: _descriptor_28.alignment() } },
2902
+ { tag: 'value',
2903
+ value: { value: _descriptor_28.toValue(5n),
2904
+ alignment: _descriptor_28.alignment() } }] } },
2905
+ { popeq: { cached: false,
2906
+ result: undefined } }]).value);
2907
+ },
2908
+ get operationCount() {
2909
+ return _descriptor_17.fromValue(__compactRuntime.queryLedgerState(context,
2910
+ partialProofData,
2911
+ [
2912
+ { dup: { n: 0 } },
2913
+ { idx: { cached: false,
2914
+ pushPath: false,
2915
+ path: [
2916
+ { tag: 'value',
2917
+ value: { value: _descriptor_28.toValue(1n),
2918
+ alignment: _descriptor_28.alignment() } },
2919
+ { tag: 'value',
2920
+ value: { value: _descriptor_28.toValue(6n),
2921
+ alignment: _descriptor_28.alignment() } }] } },
2922
+ { popeq: { cached: true,
2923
+ result: undefined } }]).value);
2924
+ },
2925
+ verificationMethods: {
2926
+ isEmpty(...args_0) {
2927
+ if (args_0.length !== 0) {
2928
+ throw new __compactRuntime.CompactError(`isEmpty: expected 0 arguments, received ${args_0.length}`);
2929
+ }
2930
+ return _descriptor_2.fromValue(__compactRuntime.queryLedgerState(context,
2931
+ partialProofData,
2932
+ [
2933
+ { dup: { n: 0 } },
2934
+ { idx: { cached: false,
2935
+ pushPath: false,
2936
+ path: [
2937
+ { tag: 'value',
2938
+ value: { value: _descriptor_28.toValue(1n),
2939
+ alignment: _descriptor_28.alignment() } },
2940
+ { tag: 'value',
2941
+ value: { value: _descriptor_28.toValue(7n),
2942
+ alignment: _descriptor_28.alignment() } }] } },
2943
+ 'size',
2944
+ { push: { storage: false,
2945
+ value: __compactRuntime.StateValue.newCell({ value: _descriptor_17.toValue(0n),
2946
+ alignment: _descriptor_17.alignment() }).encode() } },
2947
+ 'eq',
2948
+ { popeq: { cached: true,
2949
+ result: undefined } }]).value);
2950
+ },
2951
+ size(...args_0) {
2952
+ if (args_0.length !== 0) {
2953
+ throw new __compactRuntime.CompactError(`size: expected 0 arguments, received ${args_0.length}`);
2954
+ }
2955
+ return _descriptor_17.fromValue(__compactRuntime.queryLedgerState(context,
2956
+ partialProofData,
2957
+ [
2958
+ { dup: { n: 0 } },
2959
+ { idx: { cached: false,
2960
+ pushPath: false,
2961
+ path: [
2962
+ { tag: 'value',
2963
+ value: { value: _descriptor_28.toValue(1n),
2964
+ alignment: _descriptor_28.alignment() } },
2965
+ { tag: 'value',
2966
+ value: { value: _descriptor_28.toValue(7n),
2967
+ alignment: _descriptor_28.alignment() } }] } },
2968
+ 'size',
2969
+ { popeq: { cached: true,
2970
+ result: undefined } }]).value);
2971
+ },
2972
+ member(...args_0) {
2973
+ if (args_0.length !== 1) {
2974
+ throw new __compactRuntime.CompactError(`member: expected 1 argument, received ${args_0.length}`);
2975
+ }
2976
+ const key_0 = args_0[0];
2977
+ return _descriptor_2.fromValue(__compactRuntime.queryLedgerState(context,
2978
+ partialProofData,
2979
+ [
2980
+ { dup: { n: 0 } },
2981
+ { idx: { cached: false,
2982
+ pushPath: false,
2983
+ path: [
2984
+ { tag: 'value',
2985
+ value: { value: _descriptor_28.toValue(1n),
2986
+ alignment: _descriptor_28.alignment() } },
2987
+ { tag: 'value',
2988
+ value: { value: _descriptor_28.toValue(7n),
2989
+ alignment: _descriptor_28.alignment() } }] } },
2990
+ { push: { storage: false,
2991
+ value: __compactRuntime.StateValue.newCell({ value: _descriptor_0.toValue(key_0),
2992
+ alignment: _descriptor_0.alignment() }).encode() } },
2993
+ 'member',
2994
+ { popeq: { cached: true,
2995
+ result: undefined } }]).value);
2996
+ },
2997
+ lookup(...args_0) {
2998
+ if (args_0.length !== 1) {
2999
+ throw new __compactRuntime.CompactError(`lookup: expected 1 argument, received ${args_0.length}`);
3000
+ }
3001
+ const key_0 = args_0[0];
3002
+ return _descriptor_15.fromValue(__compactRuntime.queryLedgerState(context,
3003
+ partialProofData,
3004
+ [
3005
+ { dup: { n: 0 } },
3006
+ { idx: { cached: false,
3007
+ pushPath: false,
3008
+ path: [
3009
+ { tag: 'value',
3010
+ value: { value: _descriptor_28.toValue(1n),
3011
+ alignment: _descriptor_28.alignment() } },
3012
+ { tag: 'value',
3013
+ value: { value: _descriptor_28.toValue(7n),
3014
+ alignment: _descriptor_28.alignment() } }] } },
3015
+ { idx: { cached: false,
3016
+ pushPath: false,
3017
+ path: [
3018
+ { tag: 'value',
3019
+ value: { value: _descriptor_0.toValue(key_0),
3020
+ alignment: _descriptor_0.alignment() } }] } },
3021
+ { popeq: { cached: false,
3022
+ result: undefined } }]).value);
3023
+ },
3024
+ [Symbol.iterator](...args_0) {
3025
+ if (args_0.length !== 0) {
3026
+ throw new __compactRuntime.CompactError(`iter: expected 0 arguments, received ${args_0.length}`);
3027
+ }
3028
+ const self_0 = state.asArray()[1].asArray()[7];
3029
+ return self_0.asMap().keys().map( (key) => { const value = self_0.asMap().get(key).asCell(); return [ _descriptor_0.fromValue(key.value), _descriptor_15.fromValue(value.value) ]; })[Symbol.iterator]();
3030
+ }
3031
+ },
3032
+ schnorrJubjubVerificationMethods: {
3033
+ isEmpty(...args_0) {
3034
+ if (args_0.length !== 0) {
3035
+ throw new __compactRuntime.CompactError(`isEmpty: expected 0 arguments, received ${args_0.length}`);
3036
+ }
3037
+ return _descriptor_2.fromValue(__compactRuntime.queryLedgerState(context,
3038
+ partialProofData,
3039
+ [
3040
+ { dup: { n: 0 } },
3041
+ { idx: { cached: false,
3042
+ pushPath: false,
3043
+ path: [
3044
+ { tag: 'value',
3045
+ value: { value: _descriptor_28.toValue(1n),
3046
+ alignment: _descriptor_28.alignment() } },
3047
+ { tag: 'value',
3048
+ value: { value: _descriptor_28.toValue(8n),
3049
+ alignment: _descriptor_28.alignment() } }] } },
3050
+ 'size',
3051
+ { push: { storage: false,
3052
+ value: __compactRuntime.StateValue.newCell({ value: _descriptor_17.toValue(0n),
3053
+ alignment: _descriptor_17.alignment() }).encode() } },
3054
+ 'eq',
3055
+ { popeq: { cached: true,
3056
+ result: undefined } }]).value);
3057
+ },
3058
+ size(...args_0) {
3059
+ if (args_0.length !== 0) {
3060
+ throw new __compactRuntime.CompactError(`size: expected 0 arguments, received ${args_0.length}`);
3061
+ }
3062
+ return _descriptor_17.fromValue(__compactRuntime.queryLedgerState(context,
3063
+ partialProofData,
3064
+ [
3065
+ { dup: { n: 0 } },
3066
+ { idx: { cached: false,
3067
+ pushPath: false,
3068
+ path: [
3069
+ { tag: 'value',
3070
+ value: { value: _descriptor_28.toValue(1n),
3071
+ alignment: _descriptor_28.alignment() } },
3072
+ { tag: 'value',
3073
+ value: { value: _descriptor_28.toValue(8n),
3074
+ alignment: _descriptor_28.alignment() } }] } },
3075
+ 'size',
3076
+ { popeq: { cached: true,
3077
+ result: undefined } }]).value);
3078
+ },
3079
+ member(...args_0) {
3080
+ if (args_0.length !== 1) {
3081
+ throw new __compactRuntime.CompactError(`member: expected 1 argument, received ${args_0.length}`);
3082
+ }
3083
+ const key_0 = args_0[0];
3084
+ return _descriptor_2.fromValue(__compactRuntime.queryLedgerState(context,
3085
+ partialProofData,
3086
+ [
3087
+ { dup: { n: 0 } },
3088
+ { idx: { cached: false,
3089
+ pushPath: false,
3090
+ path: [
3091
+ { tag: 'value',
3092
+ value: { value: _descriptor_28.toValue(1n),
3093
+ alignment: _descriptor_28.alignment() } },
3094
+ { tag: 'value',
3095
+ value: { value: _descriptor_28.toValue(8n),
3096
+ alignment: _descriptor_28.alignment() } }] } },
3097
+ { push: { storage: false,
3098
+ value: __compactRuntime.StateValue.newCell({ value: _descriptor_0.toValue(key_0),
3099
+ alignment: _descriptor_0.alignment() }).encode() } },
3100
+ 'member',
3101
+ { popeq: { cached: true,
3102
+ result: undefined } }]).value);
3103
+ },
3104
+ lookup(...args_0) {
3105
+ if (args_0.length !== 1) {
3106
+ throw new __compactRuntime.CompactError(`lookup: expected 1 argument, received ${args_0.length}`);
3107
+ }
3108
+ const key_0 = args_0[0];
3109
+ return _descriptor_7.fromValue(__compactRuntime.queryLedgerState(context,
3110
+ partialProofData,
3111
+ [
3112
+ { dup: { n: 0 } },
3113
+ { idx: { cached: false,
3114
+ pushPath: false,
3115
+ path: [
3116
+ { tag: 'value',
3117
+ value: { value: _descriptor_28.toValue(1n),
3118
+ alignment: _descriptor_28.alignment() } },
3119
+ { tag: 'value',
3120
+ value: { value: _descriptor_28.toValue(8n),
3121
+ alignment: _descriptor_28.alignment() } }] } },
3122
+ { idx: { cached: false,
3123
+ pushPath: false,
3124
+ path: [
3125
+ { tag: 'value',
3126
+ value: { value: _descriptor_0.toValue(key_0),
3127
+ alignment: _descriptor_0.alignment() } }] } },
3128
+ { popeq: { cached: false,
3129
+ result: undefined } }]).value);
3130
+ },
3131
+ [Symbol.iterator](...args_0) {
3132
+ if (args_0.length !== 0) {
3133
+ throw new __compactRuntime.CompactError(`iter: expected 0 arguments, received ${args_0.length}`);
3134
+ }
3135
+ const self_0 = state.asArray()[1].asArray()[8];
3136
+ return self_0.asMap().keys().map( (key) => { const value = self_0.asMap().get(key).asCell(); return [ _descriptor_0.fromValue(key.value), _descriptor_7.fromValue(value.value) ]; })[Symbol.iterator]();
3137
+ }
3138
+ },
3139
+ authenticationRelation: {
3140
+ isEmpty(...args_0) {
3141
+ if (args_0.length !== 0) {
3142
+ throw new __compactRuntime.CompactError(`isEmpty: expected 0 arguments, received ${args_0.length}`);
3143
+ }
3144
+ return _descriptor_2.fromValue(__compactRuntime.queryLedgerState(context,
3145
+ partialProofData,
3146
+ [
3147
+ { dup: { n: 0 } },
3148
+ { idx: { cached: false,
3149
+ pushPath: false,
3150
+ path: [
3151
+ { tag: 'value',
3152
+ value: { value: _descriptor_28.toValue(1n),
3153
+ alignment: _descriptor_28.alignment() } },
3154
+ { tag: 'value',
3155
+ value: { value: _descriptor_28.toValue(9n),
3156
+ alignment: _descriptor_28.alignment() } }] } },
3157
+ 'size',
3158
+ { push: { storage: false,
3159
+ value: __compactRuntime.StateValue.newCell({ value: _descriptor_17.toValue(0n),
3160
+ alignment: _descriptor_17.alignment() }).encode() } },
3161
+ 'eq',
3162
+ { popeq: { cached: true,
3163
+ result: undefined } }]).value);
3164
+ },
3165
+ size(...args_0) {
3166
+ if (args_0.length !== 0) {
3167
+ throw new __compactRuntime.CompactError(`size: expected 0 arguments, received ${args_0.length}`);
3168
+ }
3169
+ return _descriptor_17.fromValue(__compactRuntime.queryLedgerState(context,
3170
+ partialProofData,
3171
+ [
3172
+ { dup: { n: 0 } },
3173
+ { idx: { cached: false,
3174
+ pushPath: false,
3175
+ path: [
3176
+ { tag: 'value',
3177
+ value: { value: _descriptor_28.toValue(1n),
3178
+ alignment: _descriptor_28.alignment() } },
3179
+ { tag: 'value',
3180
+ value: { value: _descriptor_28.toValue(9n),
3181
+ alignment: _descriptor_28.alignment() } }] } },
3182
+ 'size',
3183
+ { popeq: { cached: true,
3184
+ result: undefined } }]).value);
3185
+ },
3186
+ member(...args_0) {
3187
+ if (args_0.length !== 1) {
3188
+ throw new __compactRuntime.CompactError(`member: expected 1 argument, received ${args_0.length}`);
3189
+ }
3190
+ const elem_0 = args_0[0];
3191
+ return _descriptor_2.fromValue(__compactRuntime.queryLedgerState(context,
3192
+ partialProofData,
3193
+ [
3194
+ { dup: { n: 0 } },
3195
+ { idx: { cached: false,
3196
+ pushPath: false,
3197
+ path: [
3198
+ { tag: 'value',
3199
+ value: { value: _descriptor_28.toValue(1n),
3200
+ alignment: _descriptor_28.alignment() } },
3201
+ { tag: 'value',
3202
+ value: { value: _descriptor_28.toValue(9n),
3203
+ alignment: _descriptor_28.alignment() } }] } },
3204
+ { push: { storage: false,
3205
+ value: __compactRuntime.StateValue.newCell({ value: _descriptor_0.toValue(elem_0),
3206
+ alignment: _descriptor_0.alignment() }).encode() } },
3207
+ 'member',
3208
+ { popeq: { cached: true,
3209
+ result: undefined } }]).value);
3210
+ },
3211
+ [Symbol.iterator](...args_0) {
3212
+ if (args_0.length !== 0) {
3213
+ throw new __compactRuntime.CompactError(`iter: expected 0 arguments, received ${args_0.length}`);
3214
+ }
3215
+ const self_0 = state.asArray()[1].asArray()[9];
3216
+ return self_0.asMap().keys().map((elem) => _descriptor_0.fromValue(elem.value))[Symbol.iterator]();
3217
+ }
3218
+ },
3219
+ assertionMethodRelation: {
3220
+ isEmpty(...args_0) {
3221
+ if (args_0.length !== 0) {
3222
+ throw new __compactRuntime.CompactError(`isEmpty: expected 0 arguments, received ${args_0.length}`);
3223
+ }
3224
+ return _descriptor_2.fromValue(__compactRuntime.queryLedgerState(context,
3225
+ partialProofData,
3226
+ [
3227
+ { dup: { n: 0 } },
3228
+ { idx: { cached: false,
3229
+ pushPath: false,
3230
+ path: [
3231
+ { tag: 'value',
3232
+ value: { value: _descriptor_28.toValue(1n),
3233
+ alignment: _descriptor_28.alignment() } },
3234
+ { tag: 'value',
3235
+ value: { value: _descriptor_28.toValue(10n),
3236
+ alignment: _descriptor_28.alignment() } }] } },
3237
+ 'size',
3238
+ { push: { storage: false,
3239
+ value: __compactRuntime.StateValue.newCell({ value: _descriptor_17.toValue(0n),
3240
+ alignment: _descriptor_17.alignment() }).encode() } },
3241
+ 'eq',
3242
+ { popeq: { cached: true,
3243
+ result: undefined } }]).value);
3244
+ },
3245
+ size(...args_0) {
3246
+ if (args_0.length !== 0) {
3247
+ throw new __compactRuntime.CompactError(`size: expected 0 arguments, received ${args_0.length}`);
3248
+ }
3249
+ return _descriptor_17.fromValue(__compactRuntime.queryLedgerState(context,
3250
+ partialProofData,
3251
+ [
3252
+ { dup: { n: 0 } },
3253
+ { idx: { cached: false,
3254
+ pushPath: false,
3255
+ path: [
3256
+ { tag: 'value',
3257
+ value: { value: _descriptor_28.toValue(1n),
3258
+ alignment: _descriptor_28.alignment() } },
3259
+ { tag: 'value',
3260
+ value: { value: _descriptor_28.toValue(10n),
3261
+ alignment: _descriptor_28.alignment() } }] } },
3262
+ 'size',
3263
+ { popeq: { cached: true,
3264
+ result: undefined } }]).value);
3265
+ },
3266
+ member(...args_0) {
3267
+ if (args_0.length !== 1) {
3268
+ throw new __compactRuntime.CompactError(`member: expected 1 argument, received ${args_0.length}`);
3269
+ }
3270
+ const elem_0 = args_0[0];
3271
+ return _descriptor_2.fromValue(__compactRuntime.queryLedgerState(context,
3272
+ partialProofData,
3273
+ [
3274
+ { dup: { n: 0 } },
3275
+ { idx: { cached: false,
3276
+ pushPath: false,
3277
+ path: [
3278
+ { tag: 'value',
3279
+ value: { value: _descriptor_28.toValue(1n),
3280
+ alignment: _descriptor_28.alignment() } },
3281
+ { tag: 'value',
3282
+ value: { value: _descriptor_28.toValue(10n),
3283
+ alignment: _descriptor_28.alignment() } }] } },
3284
+ { push: { storage: false,
3285
+ value: __compactRuntime.StateValue.newCell({ value: _descriptor_0.toValue(elem_0),
3286
+ alignment: _descriptor_0.alignment() }).encode() } },
3287
+ 'member',
3288
+ { popeq: { cached: true,
3289
+ result: undefined } }]).value);
3290
+ },
3291
+ [Symbol.iterator](...args_0) {
3292
+ if (args_0.length !== 0) {
3293
+ throw new __compactRuntime.CompactError(`iter: expected 0 arguments, received ${args_0.length}`);
3294
+ }
3295
+ const self_0 = state.asArray()[1].asArray()[10];
3296
+ return self_0.asMap().keys().map((elem) => _descriptor_0.fromValue(elem.value))[Symbol.iterator]();
3297
+ }
3298
+ },
3299
+ keyAgreementRelation: {
3300
+ isEmpty(...args_0) {
3301
+ if (args_0.length !== 0) {
3302
+ throw new __compactRuntime.CompactError(`isEmpty: expected 0 arguments, received ${args_0.length}`);
3303
+ }
3304
+ return _descriptor_2.fromValue(__compactRuntime.queryLedgerState(context,
3305
+ partialProofData,
3306
+ [
3307
+ { dup: { n: 0 } },
3308
+ { idx: { cached: false,
3309
+ pushPath: false,
3310
+ path: [
3311
+ { tag: 'value',
3312
+ value: { value: _descriptor_28.toValue(1n),
3313
+ alignment: _descriptor_28.alignment() } },
3314
+ { tag: 'value',
3315
+ value: { value: _descriptor_28.toValue(11n),
3316
+ alignment: _descriptor_28.alignment() } }] } },
3317
+ 'size',
3318
+ { push: { storage: false,
3319
+ value: __compactRuntime.StateValue.newCell({ value: _descriptor_17.toValue(0n),
3320
+ alignment: _descriptor_17.alignment() }).encode() } },
3321
+ 'eq',
3322
+ { popeq: { cached: true,
3323
+ result: undefined } }]).value);
3324
+ },
3325
+ size(...args_0) {
3326
+ if (args_0.length !== 0) {
3327
+ throw new __compactRuntime.CompactError(`size: expected 0 arguments, received ${args_0.length}`);
3328
+ }
3329
+ return _descriptor_17.fromValue(__compactRuntime.queryLedgerState(context,
3330
+ partialProofData,
3331
+ [
3332
+ { dup: { n: 0 } },
3333
+ { idx: { cached: false,
3334
+ pushPath: false,
3335
+ path: [
3336
+ { tag: 'value',
3337
+ value: { value: _descriptor_28.toValue(1n),
3338
+ alignment: _descriptor_28.alignment() } },
3339
+ { tag: 'value',
3340
+ value: { value: _descriptor_28.toValue(11n),
3341
+ alignment: _descriptor_28.alignment() } }] } },
3342
+ 'size',
3343
+ { popeq: { cached: true,
3344
+ result: undefined } }]).value);
3345
+ },
3346
+ member(...args_0) {
3347
+ if (args_0.length !== 1) {
3348
+ throw new __compactRuntime.CompactError(`member: expected 1 argument, received ${args_0.length}`);
3349
+ }
3350
+ const elem_0 = args_0[0];
3351
+ return _descriptor_2.fromValue(__compactRuntime.queryLedgerState(context,
3352
+ partialProofData,
3353
+ [
3354
+ { dup: { n: 0 } },
3355
+ { idx: { cached: false,
3356
+ pushPath: false,
3357
+ path: [
3358
+ { tag: 'value',
3359
+ value: { value: _descriptor_28.toValue(1n),
3360
+ alignment: _descriptor_28.alignment() } },
3361
+ { tag: 'value',
3362
+ value: { value: _descriptor_28.toValue(11n),
3363
+ alignment: _descriptor_28.alignment() } }] } },
3364
+ { push: { storage: false,
3365
+ value: __compactRuntime.StateValue.newCell({ value: _descriptor_0.toValue(elem_0),
3366
+ alignment: _descriptor_0.alignment() }).encode() } },
3367
+ 'member',
3368
+ { popeq: { cached: true,
3369
+ result: undefined } }]).value);
3370
+ },
3371
+ [Symbol.iterator](...args_0) {
3372
+ if (args_0.length !== 0) {
3373
+ throw new __compactRuntime.CompactError(`iter: expected 0 arguments, received ${args_0.length}`);
3374
+ }
3375
+ const self_0 = state.asArray()[1].asArray()[11];
3376
+ return self_0.asMap().keys().map((elem) => _descriptor_0.fromValue(elem.value))[Symbol.iterator]();
3377
+ }
3378
+ },
3379
+ capabilityInvocationRelation: {
3380
+ isEmpty(...args_0) {
3381
+ if (args_0.length !== 0) {
3382
+ throw new __compactRuntime.CompactError(`isEmpty: expected 0 arguments, received ${args_0.length}`);
3383
+ }
3384
+ return _descriptor_2.fromValue(__compactRuntime.queryLedgerState(context,
3385
+ partialProofData,
3386
+ [
3387
+ { dup: { n: 0 } },
3388
+ { idx: { cached: false,
3389
+ pushPath: false,
3390
+ path: [
3391
+ { tag: 'value',
3392
+ value: { value: _descriptor_28.toValue(1n),
3393
+ alignment: _descriptor_28.alignment() } },
3394
+ { tag: 'value',
3395
+ value: { value: _descriptor_28.toValue(12n),
3396
+ alignment: _descriptor_28.alignment() } }] } },
3397
+ 'size',
3398
+ { push: { storage: false,
3399
+ value: __compactRuntime.StateValue.newCell({ value: _descriptor_17.toValue(0n),
3400
+ alignment: _descriptor_17.alignment() }).encode() } },
3401
+ 'eq',
3402
+ { popeq: { cached: true,
3403
+ result: undefined } }]).value);
3404
+ },
3405
+ size(...args_0) {
3406
+ if (args_0.length !== 0) {
3407
+ throw new __compactRuntime.CompactError(`size: expected 0 arguments, received ${args_0.length}`);
3408
+ }
3409
+ return _descriptor_17.fromValue(__compactRuntime.queryLedgerState(context,
3410
+ partialProofData,
3411
+ [
3412
+ { dup: { n: 0 } },
3413
+ { idx: { cached: false,
3414
+ pushPath: false,
3415
+ path: [
3416
+ { tag: 'value',
3417
+ value: { value: _descriptor_28.toValue(1n),
3418
+ alignment: _descriptor_28.alignment() } },
3419
+ { tag: 'value',
3420
+ value: { value: _descriptor_28.toValue(12n),
3421
+ alignment: _descriptor_28.alignment() } }] } },
3422
+ 'size',
3423
+ { popeq: { cached: true,
3424
+ result: undefined } }]).value);
3425
+ },
3426
+ member(...args_0) {
3427
+ if (args_0.length !== 1) {
3428
+ throw new __compactRuntime.CompactError(`member: expected 1 argument, received ${args_0.length}`);
3429
+ }
3430
+ const elem_0 = args_0[0];
3431
+ return _descriptor_2.fromValue(__compactRuntime.queryLedgerState(context,
3432
+ partialProofData,
3433
+ [
3434
+ { dup: { n: 0 } },
3435
+ { idx: { cached: false,
3436
+ pushPath: false,
3437
+ path: [
3438
+ { tag: 'value',
3439
+ value: { value: _descriptor_28.toValue(1n),
3440
+ alignment: _descriptor_28.alignment() } },
3441
+ { tag: 'value',
3442
+ value: { value: _descriptor_28.toValue(12n),
3443
+ alignment: _descriptor_28.alignment() } }] } },
3444
+ { push: { storage: false,
3445
+ value: __compactRuntime.StateValue.newCell({ value: _descriptor_0.toValue(elem_0),
3446
+ alignment: _descriptor_0.alignment() }).encode() } },
3447
+ 'member',
3448
+ { popeq: { cached: true,
3449
+ result: undefined } }]).value);
3450
+ },
3451
+ [Symbol.iterator](...args_0) {
3452
+ if (args_0.length !== 0) {
3453
+ throw new __compactRuntime.CompactError(`iter: expected 0 arguments, received ${args_0.length}`);
3454
+ }
3455
+ const self_0 = state.asArray()[1].asArray()[12];
3456
+ return self_0.asMap().keys().map((elem) => _descriptor_0.fromValue(elem.value))[Symbol.iterator]();
3457
+ }
3458
+ },
3459
+ capabilityDelegationRelation: {
3460
+ isEmpty(...args_0) {
3461
+ if (args_0.length !== 0) {
3462
+ throw new __compactRuntime.CompactError(`isEmpty: expected 0 arguments, received ${args_0.length}`);
3463
+ }
3464
+ return _descriptor_2.fromValue(__compactRuntime.queryLedgerState(context,
3465
+ partialProofData,
3466
+ [
3467
+ { dup: { n: 0 } },
3468
+ { idx: { cached: false,
3469
+ pushPath: false,
3470
+ path: [
3471
+ { tag: 'value',
3472
+ value: { value: _descriptor_28.toValue(1n),
3473
+ alignment: _descriptor_28.alignment() } },
3474
+ { tag: 'value',
3475
+ value: { value: _descriptor_28.toValue(13n),
3476
+ alignment: _descriptor_28.alignment() } }] } },
3477
+ 'size',
3478
+ { push: { storage: false,
3479
+ value: __compactRuntime.StateValue.newCell({ value: _descriptor_17.toValue(0n),
3480
+ alignment: _descriptor_17.alignment() }).encode() } },
3481
+ 'eq',
3482
+ { popeq: { cached: true,
3483
+ result: undefined } }]).value);
3484
+ },
3485
+ size(...args_0) {
3486
+ if (args_0.length !== 0) {
3487
+ throw new __compactRuntime.CompactError(`size: expected 0 arguments, received ${args_0.length}`);
3488
+ }
3489
+ return _descriptor_17.fromValue(__compactRuntime.queryLedgerState(context,
3490
+ partialProofData,
3491
+ [
3492
+ { dup: { n: 0 } },
3493
+ { idx: { cached: false,
3494
+ pushPath: false,
3495
+ path: [
3496
+ { tag: 'value',
3497
+ value: { value: _descriptor_28.toValue(1n),
3498
+ alignment: _descriptor_28.alignment() } },
3499
+ { tag: 'value',
3500
+ value: { value: _descriptor_28.toValue(13n),
3501
+ alignment: _descriptor_28.alignment() } }] } },
3502
+ 'size',
3503
+ { popeq: { cached: true,
3504
+ result: undefined } }]).value);
3505
+ },
3506
+ member(...args_0) {
3507
+ if (args_0.length !== 1) {
3508
+ throw new __compactRuntime.CompactError(`member: expected 1 argument, received ${args_0.length}`);
3509
+ }
3510
+ const elem_0 = args_0[0];
3511
+ return _descriptor_2.fromValue(__compactRuntime.queryLedgerState(context,
3512
+ partialProofData,
3513
+ [
3514
+ { dup: { n: 0 } },
3515
+ { idx: { cached: false,
3516
+ pushPath: false,
3517
+ path: [
3518
+ { tag: 'value',
3519
+ value: { value: _descriptor_28.toValue(1n),
3520
+ alignment: _descriptor_28.alignment() } },
3521
+ { tag: 'value',
3522
+ value: { value: _descriptor_28.toValue(13n),
3523
+ alignment: _descriptor_28.alignment() } }] } },
3524
+ { push: { storage: false,
3525
+ value: __compactRuntime.StateValue.newCell({ value: _descriptor_0.toValue(elem_0),
3526
+ alignment: _descriptor_0.alignment() }).encode() } },
3527
+ 'member',
3528
+ { popeq: { cached: true,
3529
+ result: undefined } }]).value);
3530
+ },
3531
+ [Symbol.iterator](...args_0) {
3532
+ if (args_0.length !== 0) {
3533
+ throw new __compactRuntime.CompactError(`iter: expected 0 arguments, received ${args_0.length}`);
3534
+ }
3535
+ const self_0 = state.asArray()[1].asArray()[13];
3536
+ return self_0.asMap().keys().map((elem) => _descriptor_0.fromValue(elem.value))[Symbol.iterator]();
3537
+ }
3538
+ },
3539
+ services: {
3540
+ isEmpty(...args_0) {
3541
+ if (args_0.length !== 0) {
3542
+ throw new __compactRuntime.CompactError(`isEmpty: expected 0 arguments, received ${args_0.length}`);
3543
+ }
3544
+ return _descriptor_2.fromValue(__compactRuntime.queryLedgerState(context,
3545
+ partialProofData,
3546
+ [
3547
+ { dup: { n: 0 } },
3548
+ { idx: { cached: false,
3549
+ pushPath: false,
3550
+ path: [
3551
+ { tag: 'value',
3552
+ value: { value: _descriptor_28.toValue(1n),
3553
+ alignment: _descriptor_28.alignment() } },
3554
+ { tag: 'value',
3555
+ value: { value: _descriptor_28.toValue(14n),
3556
+ alignment: _descriptor_28.alignment() } }] } },
3557
+ 'size',
3558
+ { push: { storage: false,
3559
+ value: __compactRuntime.StateValue.newCell({ value: _descriptor_17.toValue(0n),
3560
+ alignment: _descriptor_17.alignment() }).encode() } },
3561
+ 'eq',
3562
+ { popeq: { cached: true,
3563
+ result: undefined } }]).value);
3564
+ },
3565
+ size(...args_0) {
3566
+ if (args_0.length !== 0) {
3567
+ throw new __compactRuntime.CompactError(`size: expected 0 arguments, received ${args_0.length}`);
3568
+ }
3569
+ return _descriptor_17.fromValue(__compactRuntime.queryLedgerState(context,
3570
+ partialProofData,
3571
+ [
3572
+ { dup: { n: 0 } },
3573
+ { idx: { cached: false,
3574
+ pushPath: false,
3575
+ path: [
3576
+ { tag: 'value',
3577
+ value: { value: _descriptor_28.toValue(1n),
3578
+ alignment: _descriptor_28.alignment() } },
3579
+ { tag: 'value',
3580
+ value: { value: _descriptor_28.toValue(14n),
3581
+ alignment: _descriptor_28.alignment() } }] } },
3582
+ 'size',
3583
+ { popeq: { cached: true,
3584
+ result: undefined } }]).value);
3585
+ },
3586
+ member(...args_0) {
3587
+ if (args_0.length !== 1) {
3588
+ throw new __compactRuntime.CompactError(`member: expected 1 argument, received ${args_0.length}`);
3589
+ }
3590
+ const key_0 = args_0[0];
3591
+ return _descriptor_2.fromValue(__compactRuntime.queryLedgerState(context,
3592
+ partialProofData,
3593
+ [
3594
+ { dup: { n: 0 } },
3595
+ { idx: { cached: false,
3596
+ pushPath: false,
3597
+ path: [
3598
+ { tag: 'value',
3599
+ value: { value: _descriptor_28.toValue(1n),
3600
+ alignment: _descriptor_28.alignment() } },
3601
+ { tag: 'value',
3602
+ value: { value: _descriptor_28.toValue(14n),
3603
+ alignment: _descriptor_28.alignment() } }] } },
3604
+ { push: { storage: false,
3605
+ value: __compactRuntime.StateValue.newCell({ value: _descriptor_0.toValue(key_0),
3606
+ alignment: _descriptor_0.alignment() }).encode() } },
3607
+ 'member',
3608
+ { popeq: { cached: true,
3609
+ result: undefined } }]).value);
3610
+ },
3611
+ lookup(...args_0) {
3612
+ if (args_0.length !== 1) {
3613
+ throw new __compactRuntime.CompactError(`lookup: expected 1 argument, received ${args_0.length}`);
3614
+ }
3615
+ const key_0 = args_0[0];
3616
+ return _descriptor_1.fromValue(__compactRuntime.queryLedgerState(context,
3617
+ partialProofData,
3618
+ [
3619
+ { dup: { n: 0 } },
3620
+ { idx: { cached: false,
3621
+ pushPath: false,
3622
+ path: [
3623
+ { tag: 'value',
3624
+ value: { value: _descriptor_28.toValue(1n),
3625
+ alignment: _descriptor_28.alignment() } },
3626
+ { tag: 'value',
3627
+ value: { value: _descriptor_28.toValue(14n),
3628
+ alignment: _descriptor_28.alignment() } }] } },
3629
+ { idx: { cached: false,
3630
+ pushPath: false,
3631
+ path: [
3632
+ { tag: 'value',
3633
+ value: { value: _descriptor_0.toValue(key_0),
3634
+ alignment: _descriptor_0.alignment() } }] } },
3635
+ { popeq: { cached: false,
3636
+ result: undefined } }]).value);
3637
+ },
3638
+ [Symbol.iterator](...args_0) {
3639
+ if (args_0.length !== 0) {
3640
+ throw new __compactRuntime.CompactError(`iter: expected 0 arguments, received ${args_0.length}`);
3641
+ }
3642
+ const self_0 = state.asArray()[1].asArray()[14];
3643
+ return self_0.asMap().keys().map( (key) => { const value = self_0.asMap().get(key).asCell(); return [ _descriptor_0.fromValue(key.value), _descriptor_1.fromValue(value.value) ]; })[Symbol.iterator]();
3644
+ }
3645
+ }
3646
+ };
3647
+ }
3648
+ const _emptyContext = {
3649
+ currentQueryContext: new __compactRuntime.QueryContext(new __compactRuntime.ContractState().data, __compactRuntime.dummyContractAddress())
3650
+ };
3651
+ const _dummyContract = new Contract({
3652
+ getSchnorrReduction: (...args) => undefined,
3653
+ localSecretKey: (...args) => undefined,
3654
+ currentTimestamp: (...args) => undefined
3655
+ });
3656
+ export const pureCircuits = {};
3657
+ export const contractReferenceLocations =
3658
+ { tag: 'publicLedgerArray', indices: { } };