@sig-net/midnight 0.10.0 → 0.12.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (52) hide show
  1. package/README.md +17 -17
  2. package/dist/abi-serde.d.ts +89 -0
  3. package/dist/abi-serde.d.ts.map +1 -0
  4. package/dist/abi-serde.js +393 -0
  5. package/dist/abi-serde.js.map +1 -0
  6. package/dist/constants.d.ts +23 -14
  7. package/dist/constants.d.ts.map +1 -1
  8. package/dist/constants.js +28 -20
  9. package/dist/constants.js.map +1 -1
  10. package/dist/ecdsa-attestation.d.ts +81 -9
  11. package/dist/ecdsa-attestation.d.ts.map +1 -1
  12. package/dist/ecdsa-attestation.js +137 -18
  13. package/dist/ecdsa-attestation.js.map +1 -1
  14. package/dist/epsilon-derivation.d.ts +8 -8
  15. package/dist/epsilon-derivation.d.ts.map +1 -1
  16. package/dist/epsilon-derivation.js +16 -18
  17. package/dist/epsilon-derivation.js.map +1 -1
  18. package/dist/index.d.ts +1 -0
  19. package/dist/index.d.ts.map +1 -1
  20. package/dist/index.js +1 -0
  21. package/dist/index.js.map +1 -1
  22. package/dist/managed/compiler/contract-info.json +180 -104
  23. package/dist/managed/compiler/contract-manifest.json +8 -8
  24. package/dist/managed/contract/index.d.ts +38 -24
  25. package/dist/managed/contract/index.js +363 -154
  26. package/dist/managed/contract/index.js.map +1 -1
  27. package/dist/signature-requests-state-reader.d.ts +15 -15
  28. package/dist/signature-requests-state-reader.d.ts.map +1 -1
  29. package/dist/signature-requests-state-reader.js +51 -34
  30. package/dist/signature-requests-state-reader.js.map +1 -1
  31. package/dist/signature-response-verification.d.ts +2 -2
  32. package/dist/signature-response-verification.js +8 -8
  33. package/dist/signature-response-verification.js.map +1 -1
  34. package/dist/signet-contract-state-reader.d.ts +74 -58
  35. package/dist/signet-contract-state-reader.d.ts.map +1 -1
  36. package/dist/signet-contract-state-reader.js +76 -58
  37. package/dist/signet-contract-state-reader.js.map +1 -1
  38. package/dist/signet-evtype2tx-requests.d.ts +62 -59
  39. package/dist/signet-evtype2tx-requests.d.ts.map +1 -1
  40. package/dist/signet-evtype2tx-requests.js +58 -90
  41. package/dist/signet-evtype2tx-requests.js.map +1 -1
  42. package/dist/signet-request-response-reader.d.ts +26 -26
  43. package/dist/signet-request-response-reader.d.ts.map +1 -1
  44. package/dist/signet-request-response-reader.js +37 -37
  45. package/dist/signet-request-response-reader.js.map +1 -1
  46. package/dist/signet-requests.d.ts +30 -30
  47. package/dist/signet-requests.d.ts.map +1 -1
  48. package/dist/signet-requests.js +29 -30
  49. package/dist/signet-requests.js.map +1 -1
  50. package/package.json +3 -2
  51. package/src/Signet.compact +137 -88
  52. package/src/circuits.compact +45 -2
@@ -3,39 +3,71 @@ __compactRuntime.checkRuntimeVersion('0.18.0-rc.1');
3
3
 
4
4
  const _descriptor_0 = new __compactRuntime.CompactTypeBytes(32);
5
5
 
6
- const _descriptor_1 = new __compactRuntime.CompactTypeUnsignedInteger(340282366920938463463374607431768211455n, 16);
6
+ const _descriptor_1 = new __compactRuntime.CompactTypeBytes(100);
7
7
 
8
- const _descriptor_2 = __compactRuntime.CompactTypeBoolean;
8
+ class _AffinePoint_0 {
9
+ alignment() {
10
+ return _descriptor_0.alignment().concat(_descriptor_0.alignment());
11
+ }
12
+ fromValue(value_0) {
13
+ return {
14
+ x: _descriptor_0.fromValue(value_0),
15
+ y: _descriptor_0.fromValue(value_0)
16
+ }
17
+ }
18
+ toValue(value_0) {
19
+ return _descriptor_0.toValue(value_0.x).concat(_descriptor_0.toValue(value_0.y));
20
+ }
21
+ }
9
22
 
10
- const _descriptor_3 = __compactRuntime.CompactTypeSecp256k1Point;
23
+ const _descriptor_2 = new _AffinePoint_0();
11
24
 
12
- const _descriptor_4 = new __compactRuntime.CompactTypeBytes(20);
25
+ const _descriptor_3 = new __compactRuntime.CompactTypeUnsignedInteger(255n, 1);
13
26
 
14
- const _descriptor_5 = new __compactRuntime.CompactTypeBytes(128);
27
+ class _Signature_0 {
28
+ alignment() {
29
+ return _descriptor_2.alignment().concat(_descriptor_0.alignment().concat(_descriptor_3.alignment()));
30
+ }
31
+ fromValue(value_0) {
32
+ return {
33
+ bigR: _descriptor_2.fromValue(value_0),
34
+ s: _descriptor_0.fromValue(value_0),
35
+ recoveryId: _descriptor_3.fromValue(value_0)
36
+ }
37
+ }
38
+ toValue(value_0) {
39
+ return _descriptor_2.toValue(value_0.bigR).concat(_descriptor_0.toValue(value_0.s).concat(_descriptor_3.toValue(value_0.recoveryId)));
40
+ }
41
+ }
15
42
 
16
- const _descriptor_6 = new __compactRuntime.CompactTypeUnsignedInteger(255n, 1);
43
+ const _descriptor_4 = new _Signature_0();
17
44
 
18
45
  class _RespondBidirectionalEvent_0 {
19
46
  alignment() {
20
- return _descriptor_5.alignment().concat(_descriptor_6.alignment().concat(_descriptor_0.alignment().concat(_descriptor_0.alignment().concat(_descriptor_6.alignment()))));
47
+ return _descriptor_0.alignment().concat(_descriptor_4.alignment());
21
48
  }
22
49
  fromValue(value_0) {
23
50
  return {
24
- serializedOutput: _descriptor_5.fromValue(value_0),
25
- outputLen: _descriptor_6.fromValue(value_0),
26
- r: _descriptor_0.fromValue(value_0),
27
- s: _descriptor_0.fromValue(value_0),
28
- recoveryId: _descriptor_6.fromValue(value_0)
51
+ attestationDigest: _descriptor_0.fromValue(value_0),
52
+ signature: _descriptor_4.fromValue(value_0)
29
53
  }
30
54
  }
31
55
  toValue(value_0) {
32
- return _descriptor_5.toValue(value_0.serializedOutput).concat(_descriptor_6.toValue(value_0.outputLen).concat(_descriptor_0.toValue(value_0.r).concat(_descriptor_0.toValue(value_0.s).concat(_descriptor_6.toValue(value_0.recoveryId)))));
56
+ return _descriptor_0.toValue(value_0.attestationDigest).concat(_descriptor_4.toValue(value_0.signature));
33
57
  }
34
58
  }
35
59
 
36
- const _descriptor_7 = new _RespondBidirectionalEvent_0();
60
+ const _descriptor_5 = new _RespondBidirectionalEvent_0();
61
+
62
+ const _descriptor_6 = __compactRuntime.CompactTypeSecp256k1Point;
63
+
64
+ const _descriptor_7 = __compactRuntime.CompactTypeBoolean;
65
+
66
+ const _descriptor_8 = new __compactRuntime.CompactTypeBytes(1);
67
+
68
+ const _descriptor_9 = new __compactRuntime.CompactTypeUnsignedInteger(340282366920938463463374607431768211455n, 16);
37
69
 
38
- const _descriptor_8 = __compactRuntime.CompactTypeSecp256k1Scalar;
70
+ const _descriptor_10 = new __compactRuntime.CompactTypeBytes(20);
39
71
 
40
72
  class _ContractAddress_0 {
41
73
  alignment() {
@@ -51,67 +83,120 @@ class _ContractAddress_0 {
51
83
  }
52
84
  }
53
85
 
54
- const _descriptor_9 = new _ContractAddress_0();
86
+ const _descriptor_11 = new _ContractAddress_0();
87
+
88
+ const _descriptor_12 = new __compactRuntime.CompactTypeBytes(128);
55
89
 
56
90
  class _SignBidirectionalEventNotification_0 {
57
91
  alignment() {
58
- return _descriptor_6.alignment().concat(_descriptor_5.alignment());
92
+ return _descriptor_3.alignment().concat(_descriptor_12.alignment());
59
93
  }
60
94
  fromValue(value_0) {
61
95
  return {
62
- version: _descriptor_6.fromValue(value_0),
63
- payload: _descriptor_5.fromValue(value_0)
96
+ version: _descriptor_3.fromValue(value_0),
97
+ payload: _descriptor_12.fromValue(value_0)
64
98
  }
65
99
  }
66
100
  toValue(value_0) {
67
- return _descriptor_6.toValue(value_0.version).concat(_descriptor_5.toValue(value_0.payload));
101
+ return _descriptor_3.toValue(value_0.version).concat(_descriptor_12.toValue(value_0.payload));
68
102
  }
69
103
  }
70
104
 
71
- const _descriptor_10 = new _SignBidirectionalEventNotification_0();
105
+ const _descriptor_13 = new _SignBidirectionalEventNotification_0();
72
106
 
73
- const _descriptor_11 = __compactRuntime.CompactTypeSecp256k1Base;
107
+ const _descriptor_14 = __compactRuntime.CompactTypeSecp256k1Scalar;
74
108
 
75
- const _descriptor_12 = new __compactRuntime.CompactTypeVector(2, _descriptor_0);
109
+ const _descriptor_15 = __compactRuntime.CompactTypeSecp256k1Base;
110
+
111
+ class _tuple_0 {
112
+ alignment() {
113
+ return _descriptor_0.alignment().concat(_descriptor_1.alignment());
114
+ }
115
+ fromValue(value_0) {
116
+ return [
117
+ _descriptor_0.fromValue(value_0),
118
+ _descriptor_1.fromValue(value_0)
119
+ ]
120
+ }
121
+ toValue(value_0) {
122
+ return _descriptor_0.toValue(value_0[0]).concat(_descriptor_1.toValue(value_0[1]));
123
+ }
124
+ }
125
+
126
+ const _descriptor_16 = new _tuple_0();
127
+
128
+ class _tuple_1 {
129
+ alignment() {
130
+ return _descriptor_0.alignment().concat(_descriptor_0.alignment());
131
+ }
132
+ fromValue(value_0) {
133
+ return [
134
+ _descriptor_0.fromValue(value_0),
135
+ _descriptor_0.fromValue(value_0)
136
+ ]
137
+ }
138
+ toValue(value_0) {
139
+ return _descriptor_0.toValue(value_0[0]).concat(_descriptor_0.toValue(value_0[1]));
140
+ }
141
+ }
142
+
143
+ const _descriptor_17 = new _tuple_1();
144
+
145
+ class _tuple_2 {
146
+ alignment() {
147
+ return _descriptor_0.alignment().concat(_descriptor_8.alignment());
148
+ }
149
+ fromValue(value_0) {
150
+ return [
151
+ _descriptor_0.fromValue(value_0),
152
+ _descriptor_8.fromValue(value_0)
153
+ ]
154
+ }
155
+ toValue(value_0) {
156
+ return _descriptor_0.toValue(value_0[0]).concat(_descriptor_8.toValue(value_0[1]));
157
+ }
158
+ }
159
+
160
+ const _descriptor_18 = new _tuple_2();
76
161
 
77
162
  class _Secp256k1EcdsaSignature_0 {
78
163
  alignment() {
79
- return _descriptor_8.alignment().concat(_descriptor_8.alignment());
164
+ return _descriptor_14.alignment().concat(_descriptor_14.alignment());
80
165
  }
81
166
  fromValue(value_0) {
82
167
  return {
83
- r: _descriptor_8.fromValue(value_0),
84
- s: _descriptor_8.fromValue(value_0)
168
+ r: _descriptor_14.fromValue(value_0),
169
+ s: _descriptor_14.fromValue(value_0)
85
170
  }
86
171
  }
87
172
  toValue(value_0) {
88
- return _descriptor_8.toValue(value_0.r).concat(_descriptor_8.toValue(value_0.s));
173
+ return _descriptor_14.toValue(value_0.r).concat(_descriptor_14.toValue(value_0.s));
89
174
  }
90
175
  }
91
176
 
92
- const _descriptor_13 = new _Secp256k1EcdsaSignature_0();
177
+ const _descriptor_19 = new _Secp256k1EcdsaSignature_0();
93
178
 
94
- const _descriptor_14 = new __compactRuntime.CompactTypeUnsignedInteger(18446744073709551615n, 8);
179
+ const _descriptor_20 = new __compactRuntime.CompactTypeUnsignedInteger(18446744073709551615n, 8);
95
180
 
96
181
  class _Either_0 {
97
182
  alignment() {
98
- return _descriptor_2.alignment().concat(_descriptor_0.alignment().concat(_descriptor_0.alignment()));
183
+ return _descriptor_7.alignment().concat(_descriptor_0.alignment().concat(_descriptor_0.alignment()));
99
184
  }
100
185
  fromValue(value_0) {
101
186
  return {
102
- is_left: _descriptor_2.fromValue(value_0),
187
+ is_left: _descriptor_7.fromValue(value_0),
103
188
  left: _descriptor_0.fromValue(value_0),
104
189
  right: _descriptor_0.fromValue(value_0)
105
190
  }
106
191
  }
107
192
  toValue(value_0) {
108
- return _descriptor_2.toValue(value_0.is_left).concat(_descriptor_0.toValue(value_0.left).concat(_descriptor_0.toValue(value_0.right)));
193
+ return _descriptor_7.toValue(value_0.is_left).concat(_descriptor_0.toValue(value_0.left).concat(_descriptor_0.toValue(value_0.right)));
109
194
  }
110
195
  }
111
196
 
112
- const _descriptor_15 = new _Either_0();
197
+ const _descriptor_21 = new _Either_0();
113
198
 
114
- const _descriptor_16 = new __compactRuntime.CompactTypeUnsignedInteger(4294967295n, 4);
199
+ const _descriptor_22 = new __compactRuntime.CompactTypeUnsignedInteger(4294967295n, 4);
115
200
 
116
201
  export class Contract {
117
202
  witnesses;
@@ -128,12 +213,6 @@ export class Contract {
128
213
  async constructSignBidirectionalEventNotificationV1(context, ...args_1) {
129
214
  return { result: pureCircuits.constructSignBidirectionalEventNotificationV1(...args_1), context };
130
215
  },
131
- async signetAttestationDigest(context, ...args_1) {
132
- return { result: pureCircuits.signetAttestationDigest(...args_1), context };
133
- },
134
- async verifyRespondBidirectionalEvent(context, ...args_1) {
135
- return { result: pureCircuits.verifyRespondBidirectionalEvent(...args_1), context };
136
- },
137
216
  async signetKeyHash(context, ...args_1) {
138
217
  return { result: pureCircuits.signetKeyHash(...args_1), context };
139
218
  },
@@ -151,6 +230,18 @@ export class Contract {
151
230
  },
152
231
  async abiWordToBool(context, ...args_1) {
153
232
  return { result: pureCircuits.abiWordToBool(...args_1), context };
233
+ },
234
+ async calculateSignetAttestationDigest1(context, ...args_1) {
235
+ return { result: pureCircuits.calculateSignetAttestationDigest1(...args_1), context };
236
+ },
237
+ async calculateSignetAttestationDigest32(context, ...args_1) {
238
+ return { result: pureCircuits.calculateSignetAttestationDigest32(...args_1), context };
239
+ },
240
+ async calculateSignetAttestationDigest100(context, ...args_1) {
241
+ return { result: pureCircuits.calculateSignetAttestationDigest100(...args_1), context };
242
+ },
243
+ async verifyRespondBidirectionalEvent32(context, ...args_1) {
244
+ return { result: pureCircuits.verifyRespondBidirectionalEvent32(...args_1), context };
154
245
  }
155
246
  };
156
247
  this.impureCircuits = {};
@@ -249,15 +340,19 @@ export class Contract {
249
340
  r_0;
250
341
  }
251
342
  _persistentHash_0(value_0) {
252
- const result_0 = __compactRuntime.persistentHash(_descriptor_12, value_0);
343
+ const result_0 = __compactRuntime.persistentHash(_descriptor_6, value_0);
344
+ return result_0;
345
+ }
346
+ _keccak256_0(value_0) {
347
+ const result_0 = __compactRuntime.keccak256(_descriptor_18, value_0);
253
348
  return result_0;
254
349
  }
255
- _persistentHash_1(value_0) {
256
- const result_0 = __compactRuntime.persistentHash(_descriptor_5, value_0);
350
+ _keccak256_1(value_0) {
351
+ const result_0 = __compactRuntime.keccak256(_descriptor_16, value_0);
257
352
  return result_0;
258
353
  }
259
- _persistentHash_2(value_0) {
260
- const result_0 = __compactRuntime.persistentHash(_descriptor_3, value_0);
354
+ _keccak256_2(value_0) {
355
+ const result_0 = __compactRuntime.keccak256(_descriptor_17, value_0);
261
356
  return result_0;
262
357
  }
263
358
  _mul_0(x_0, y_0) {
@@ -294,35 +389,77 @@ export class Contract {
294
389
  ...Array.from(new Uint8Array(95), BigInt)],
295
390
  Number) };
296
391
  }
297
- _signetAttestationDigest_0(requestId_0, serializedOutput_0, outputLen_0) {
298
- const outHash_0 = this._persistentHash_0([this._persistentHash_1(serializedOutput_0),
299
- __compactRuntime.convertBigintToBytes(32,
300
- outputLen_0,
301
- 'Signet.compact line 287 char 7')]);
302
- return this._persistentHash_0([requestId_0, outHash_0]);
392
+ _calculateSignetAttestationDigest_0(requestId_0, serializedOutput_0) {
393
+ return this._keccak256_0([requestId_0, serializedOutput_0]);
394
+ }
395
+ _calculateSignetAttestationDigest_1(requestId_0, serializedOutput_0) {
396
+ return this._keccak256_1([requestId_0, serializedOutput_0]);
397
+ }
398
+ _calculateSignetAttestationDigest_2(requestId_0, serializedOutput_0) {
399
+ return this._keccak256_2([requestId_0, serializedOutput_0]);
400
+ }
401
+ _reverseBytes32_0(b_0) {
402
+ const v_0 = Array.from(b_0, BigInt);
403
+ return Uint8Array.from([v_0[31],
404
+ v_0[30],
405
+ v_0[29],
406
+ v_0[28],
407
+ v_0[27],
408
+ v_0[26],
409
+ v_0[25],
410
+ v_0[24],
411
+ v_0[23],
412
+ v_0[22],
413
+ v_0[21],
414
+ v_0[20],
415
+ v_0[19],
416
+ v_0[18],
417
+ v_0[17],
418
+ v_0[16],
419
+ v_0[15],
420
+ v_0[14],
421
+ v_0[13],
422
+ v_0[12],
423
+ v_0[11],
424
+ v_0[10],
425
+ v_0[9],
426
+ v_0[8],
427
+ v_0[7],
428
+ v_0[6],
429
+ v_0[5],
430
+ v_0[4],
431
+ v_0[3],
432
+ v_0[2],
433
+ v_0[1],
434
+ v_0[0]],
435
+ Number);
303
436
  }
304
437
  _verifyRespondBidirectionalEvent_0(requestId_0,
438
+ serializedOutput_0,
305
439
  respondBidirectionalEvent_0,
306
440
  mpcResponseKey_0)
307
441
  {
308
- return this._secp256k1EcdsaVerify_0(this._signetAttestationDigest_0(requestId_0,
309
- respondBidirectionalEvent_0.serializedOutput,
310
- respondBidirectionalEvent_0.outputLen),
311
- { r:
312
- __compactRuntime.convertBytesToField(115792089237316195423570985008687907852837564279074904382605163141518161494336n,
313
- 32,
314
- respondBidirectionalEvent_0.r,
315
- 'Secp256k1Scalar',
316
- 'Signet.compact line 310 char 12'),
317
- s:
318
- __compactRuntime.convertBytesToField(115792089237316195423570985008687907852837564279074904382605163141518161494336n,
319
- 32,
320
- respondBidirectionalEvent_0.s,
321
- 'Secp256k1Scalar',
322
- 'Signet.compact line 311 char 12') },
323
- mpcResponseKey_0);
324
- }
325
- _signetKeyHash_0(pk_0) { return this._persistentHash_2(pk_0); }
442
+ const digest_0 = this._calculateSignetAttestationDigest_2(requestId_0,
443
+ serializedOutput_0);
444
+ const checkpointMatches_0 = this._equal_0(digest_0,
445
+ respondBidirectionalEvent_0.attestationDigest);
446
+ const signatureValid_0 = this._secp256k1EcdsaVerify_0(digest_0,
447
+ { r:
448
+ __compactRuntime.convertBytesToField(115792089237316195423570985008687907852837564279074904382605163141518161494336n,
449
+ 32,
450
+ this._reverseBytes32_0(respondBidirectionalEvent_0.signature.bigR.x),
451
+ 'Secp256k1Scalar',
452
+ 'Signet.compact line 356 char 12'),
453
+ s:
454
+ __compactRuntime.convertBytesToField(115792089237316195423570985008687907852837564279074904382605163141518161494336n,
455
+ 32,
456
+ this._reverseBytes32_0(respondBidirectionalEvent_0.signature.s),
457
+ 'Secp256k1Scalar',
458
+ 'Signet.compact line 357 char 12') },
459
+ mpcResponseKey_0);
460
+ return checkpointMatches_0 && signatureValid_0;
461
+ }
462
+ _signetKeyHash_0(pk_0) { return this._persistentHash_0(pk_0); }
326
463
  _evmAddressAbiWord_0(addr_0) {
327
464
  return Uint8Array.from([...Array.from(new Uint8Array(12), BigInt),
328
465
  ...Array.from(addr_0, BigInt)],
@@ -331,7 +468,7 @@ export class Contract {
331
468
  _numericAbiWord_0(value_0) {
332
469
  const le_0 = Array.from(__compactRuntime.convertBigintToBytes(16,
333
470
  value_0,
334
- 'Signet.compact line 390 char 17'),
471
+ 'Signet.compact line 439 char 17'),
335
472
  BigInt);
336
473
  return Uint8Array.from([...Array.from(new Uint8Array(16), BigInt),
337
474
  le_0[15],
@@ -363,7 +500,7 @@ export class Contract {
363
500
  ((e, i) => e.slice(i, i+16))(word_0,
364
501
  Number(0n)),
365
502
  'Field',
366
- 'Signet.compact line 409 char 12')
503
+ 'Signet.compact line 458 char 12')
367
504
  ===
368
505
  0n,
369
506
  'ABI word exceeds Uint<128>');
@@ -372,77 +509,77 @@ export class Contract {
372
509
  ((e, i) => e.slice(i, i+1))(word_0,
373
510
  Number(16n)),
374
511
  'Field',
375
- 'Signet.compact line 410 char 17');
512
+ 'Signet.compact line 459 char 17');
376
513
  const b1_0 = __compactRuntime.addField(__compactRuntime.mulField(b0_0, 256n),
377
514
  __compactRuntime.convertBytesToUint(52435875175126190479447740508185965837690552500527637822603658699938581184512n,
378
515
  1,
379
516
  ((e, i) => e.slice(i, i+1))(word_0,
380
517
  Number(17n)),
381
518
  'Field',
382
- 'Signet.compact line 411 char 30'));
519
+ 'Signet.compact line 460 char 30'));
383
520
  const b2_0 = __compactRuntime.addField(__compactRuntime.mulField(b1_0, 256n),
384
521
  __compactRuntime.convertBytesToUint(52435875175126190479447740508185965837690552500527637822603658699938581184512n,
385
522
  1,
386
523
  ((e, i) => e.slice(i, i+1))(word_0,
387
524
  Number(18n)),
388
525
  'Field',
389
- 'Signet.compact line 412 char 30'));
526
+ 'Signet.compact line 461 char 30'));
390
527
  const b3_0 = __compactRuntime.addField(__compactRuntime.mulField(b2_0, 256n),
391
528
  __compactRuntime.convertBytesToUint(52435875175126190479447740508185965837690552500527637822603658699938581184512n,
392
529
  1,
393
530
  ((e, i) => e.slice(i, i+1))(word_0,
394
531
  Number(19n)),
395
532
  'Field',
396
- 'Signet.compact line 413 char 30'));
533
+ 'Signet.compact line 462 char 30'));
397
534
  const b4_0 = __compactRuntime.addField(__compactRuntime.mulField(b3_0, 256n),
398
535
  __compactRuntime.convertBytesToUint(52435875175126190479447740508185965837690552500527637822603658699938581184512n,
399
536
  1,
400
537
  ((e, i) => e.slice(i, i+1))(word_0,
401
538
  Number(20n)),
402
539
  'Field',
403
- 'Signet.compact line 414 char 30'));
540
+ 'Signet.compact line 463 char 30'));
404
541
  const b5_0 = __compactRuntime.addField(__compactRuntime.mulField(b4_0, 256n),
405
542
  __compactRuntime.convertBytesToUint(52435875175126190479447740508185965837690552500527637822603658699938581184512n,
406
543
  1,
407
544
  ((e, i) => e.slice(i, i+1))(word_0,
408
545
  Number(21n)),
409
546
  'Field',
410
- 'Signet.compact line 415 char 30'));
547
+ 'Signet.compact line 464 char 30'));
411
548
  const b6_0 = __compactRuntime.addField(__compactRuntime.mulField(b5_0, 256n),
412
549
  __compactRuntime.convertBytesToUint(52435875175126190479447740508185965837690552500527637822603658699938581184512n,
413
550
  1,
414
551
  ((e, i) => e.slice(i, i+1))(word_0,
415
552
  Number(22n)),
416
553
  'Field',
417
- 'Signet.compact line 416 char 30'));
554
+ 'Signet.compact line 465 char 30'));
418
555
  const b7_0 = __compactRuntime.addField(__compactRuntime.mulField(b6_0, 256n),
419
556
  __compactRuntime.convertBytesToUint(52435875175126190479447740508185965837690552500527637822603658699938581184512n,
420
557
  1,
421
558
  ((e, i) => e.slice(i, i+1))(word_0,
422
559
  Number(23n)),
423
560
  'Field',
424
- 'Signet.compact line 417 char 30'));
561
+ 'Signet.compact line 466 char 30'));
425
562
  const b8_0 = __compactRuntime.addField(__compactRuntime.mulField(b7_0, 256n),
426
563
  __compactRuntime.convertBytesToUint(52435875175126190479447740508185965837690552500527637822603658699938581184512n,
427
564
  1,
428
565
  ((e, i) => e.slice(i, i+1))(word_0,
429
566
  Number(24n)),
430
567
  'Field',
431
- 'Signet.compact line 418 char 30'));
568
+ 'Signet.compact line 467 char 30'));
432
569
  const b9_0 = __compactRuntime.addField(__compactRuntime.mulField(b8_0, 256n),
433
570
  __compactRuntime.convertBytesToUint(52435875175126190479447740508185965837690552500527637822603658699938581184512n,
434
571
  1,
435
572
  ((e, i) => e.slice(i, i+1))(word_0,
436
573
  Number(25n)),
437
574
  'Field',
438
- 'Signet.compact line 419 char 30'));
575
+ 'Signet.compact line 468 char 30'));
439
576
  const b10_0 = __compactRuntime.addField(__compactRuntime.mulField(b9_0, 256n),
440
577
  __compactRuntime.convertBytesToUint(52435875175126190479447740508185965837690552500527637822603658699938581184512n,
441
578
  1,
442
579
  ((e, i) => e.slice(i, i+1))(word_0,
443
580
  Number(26n)),
444
581
  'Field',
445
- 'Signet.compact line 420 char 30'));
582
+ 'Signet.compact line 469 char 30'));
446
583
  const b11_0 = __compactRuntime.addField(__compactRuntime.mulField(b10_0,
447
584
  256n),
448
585
  __compactRuntime.convertBytesToUint(52435875175126190479447740508185965837690552500527637822603658699938581184512n,
@@ -450,7 +587,7 @@ export class Contract {
450
587
  ((e, i) => e.slice(i, i+1))(word_0,
451
588
  Number(27n)),
452
589
  'Field',
453
- 'Signet.compact line 421 char 30'));
590
+ 'Signet.compact line 470 char 30'));
454
591
  const b12_0 = __compactRuntime.addField(__compactRuntime.mulField(b11_0,
455
592
  256n),
456
593
  __compactRuntime.convertBytesToUint(52435875175126190479447740508185965837690552500527637822603658699938581184512n,
@@ -458,7 +595,7 @@ export class Contract {
458
595
  ((e, i) => e.slice(i, i+1))(word_0,
459
596
  Number(28n)),
460
597
  'Field',
461
- 'Signet.compact line 422 char 30'));
598
+ 'Signet.compact line 471 char 30'));
462
599
  const b13_0 = __compactRuntime.addField(__compactRuntime.mulField(b12_0,
463
600
  256n),
464
601
  __compactRuntime.convertBytesToUint(52435875175126190479447740508185965837690552500527637822603658699938581184512n,
@@ -466,7 +603,7 @@ export class Contract {
466
603
  ((e, i) => e.slice(i, i+1))(word_0,
467
604
  Number(29n)),
468
605
  'Field',
469
- 'Signet.compact line 423 char 30'));
606
+ 'Signet.compact line 472 char 30'));
470
607
  const b14_0 = __compactRuntime.addField(__compactRuntime.mulField(b13_0,
471
608
  256n),
472
609
  __compactRuntime.convertBytesToUint(52435875175126190479447740508185965837690552500527637822603658699938581184512n,
@@ -474,7 +611,7 @@ export class Contract {
474
611
  ((e, i) => e.slice(i, i+1))(word_0,
475
612
  Number(30n)),
476
613
  'Field',
477
- 'Signet.compact line 424 char 30'));
614
+ 'Signet.compact line 473 char 30'));
478
615
  const b15_0 = __compactRuntime.addField(__compactRuntime.mulField(b14_0,
479
616
  256n),
480
617
  __compactRuntime.convertBytesToUint(52435875175126190479447740508185965837690552500527637822603658699938581184512n,
@@ -482,10 +619,10 @@ export class Contract {
482
619
  ((e, i) => e.slice(i, i+1))(word_0,
483
620
  Number(31n)),
484
621
  'Field',
485
- 'Signet.compact line 425 char 30'));
622
+ 'Signet.compact line 474 char 30'));
486
623
  return ((t1) => {
487
624
  if (t1 > 340282366920938463463374607431768211455n) {
488
- throw new __compactRuntime.CompactError('Signet.compact line 426 char 12: cast from Field or Uint value to smaller Uint value failed: ' + t1 + ' is greater than 340282366920938463463374607431768211455');
625
+ throw new __compactRuntime.CompactError('Signet.compact line 475 char 12: cast from Field or Uint value to smaller Uint value failed: ' + t1 + ' is greater than 340282366920938463463374607431768211455');
489
626
  }
490
627
  return t1;
491
628
  })(b15_0);
@@ -496,7 +633,7 @@ export class Contract {
496
633
  ((e, i) => e.slice(i, i+31))(word_0,
497
634
  Number(0n)),
498
635
  'Field',
499
- 'Signet.compact line 432 char 12')
636
+ 'Signet.compact line 481 char 12')
500
637
  ===
501
638
  0n,
502
639
  'ABI word is not a canonical Boolean');
@@ -505,11 +642,37 @@ export class Contract {
505
642
  ((e, i) => e.slice(i, i+1))(word_0,
506
643
  Number(31n)),
507
644
  'Field',
508
- 'Signet.compact line 433 char 18');
645
+ 'Signet.compact line 482 char 18');
509
646
  __compactRuntime.assert(last_0 === 0n || last_0 === 1n,
510
647
  'ABI word is not a canonical Boolean');
511
648
  return last_0 === 1n;
512
649
  }
650
+ _calculateSignetAttestationDigest1_0(requestId_0, serializedOutput_0) {
651
+ return this._calculateSignetAttestationDigest_0(requestId_0,
652
+ serializedOutput_0);
653
+ }
654
+ _calculateSignetAttestationDigest32_0(requestId_0, serializedOutput_0) {
655
+ return this._calculateSignetAttestationDigest_2(requestId_0,
656
+ serializedOutput_0);
657
+ }
658
+ _calculateSignetAttestationDigest100_0(requestId_0, serializedOutput_0) {
659
+ return this._calculateSignetAttestationDigest_1(requestId_0,
660
+ serializedOutput_0);
661
+ }
662
+ _verifyRespondBidirectionalEvent32_0(requestId_0,
663
+ serializedOutput_0,
664
+ respondBidirectionalEvent_0,
665
+ mpcResponseKey_0)
666
+ {
667
+ return this._verifyRespondBidirectionalEvent_0(requestId_0,
668
+ serializedOutput_0,
669
+ respondBidirectionalEvent_0,
670
+ mpcResponseKey_0);
671
+ }
672
+ _equal_0(x0, y0) {
673
+ if (!x0.every((x, i) => y0[i] === x)) { return false; }
674
+ return true;
675
+ }
513
676
  }
514
677
  export function ledger(stateOrChargedState) {
515
678
  const state = stateOrChargedState instanceof __compactRuntime.StateValue ? stateOrChargedState : stateOrChargedState.state;
@@ -541,77 +704,20 @@ export const pureCircuits = {
541
704
  if (!(typeof(callerAddress_0) === 'object' && callerAddress_0.bytes.buffer instanceof ArrayBuffer && callerAddress_0.bytes.BYTES_PER_ELEMENT === 1 && callerAddress_0.bytes.length === 32)) {
542
705
  __compactRuntime.typeError('constructSignBidirectionalEventNotificationV1',
543
706
  'argument 1',
544
- 'Signet.compact line 211 char 3',
707
+ 'Signet.compact line 214 char 3',
545
708
  'struct ContractAddress<bytes: Bytes<32>>',
546
709
  callerAddress_0)
547
710
  }
548
711
  if (!(typeof(requestsIndexField_0) === 'bigint' && requestsIndexField_0 >= 0n && requestsIndexField_0 <= 255n)) {
549
712
  __compactRuntime.typeError('constructSignBidirectionalEventNotificationV1',
550
713
  'argument 2',
551
- 'Signet.compact line 211 char 3',
714
+ 'Signet.compact line 214 char 3',
552
715
  'Uint<0..256>',
553
716
  requestsIndexField_0)
554
717
  }
555
718
  return _dummyContract._constructSignBidirectionalEventNotificationV1_0(callerAddress_0,
556
719
  requestsIndexField_0);
557
720
  },
558
- signetAttestationDigest: (...args_0) => {
559
- if (args_0.length !== 3) {
560
- throw new __compactRuntime.CompactError(`signetAttestationDigest: expected 3 arguments (as invoked from Typescript), received ${args_0.length}`);
561
- }
562
- const requestId_0 = args_0[0];
563
- const serializedOutput_0 = args_0[1];
564
- const outputLen_0 = args_0[2];
565
- if (!(requestId_0.buffer instanceof ArrayBuffer && requestId_0.BYTES_PER_ELEMENT === 1 && requestId_0.length === 32)) {
566
- __compactRuntime.typeError('signetAttestationDigest',
567
- 'argument 1',
568
- 'Signet.compact line 280 char 3',
569
- 'Bytes<32>',
570
- requestId_0)
571
- }
572
- if (!(serializedOutput_0.buffer instanceof ArrayBuffer && serializedOutput_0.BYTES_PER_ELEMENT === 1 && serializedOutput_0.length === 128)) {
573
- __compactRuntime.typeError('signetAttestationDigest',
574
- 'argument 2',
575
- 'Signet.compact line 280 char 3',
576
- 'Bytes<128>',
577
- serializedOutput_0)
578
- }
579
- if (!(typeof(outputLen_0) === 'bigint' && outputLen_0 >= 0n && outputLen_0 <= 255n)) {
580
- __compactRuntime.typeError('signetAttestationDigest',
581
- 'argument 3',
582
- 'Signet.compact line 280 char 3',
583
- 'Uint<0..256>',
584
- outputLen_0)
585
- }
586
- return _dummyContract._signetAttestationDigest_0(requestId_0,
587
- serializedOutput_0,
588
- outputLen_0);
589
- },
590
- verifyRespondBidirectionalEvent: (...args_0) => {
591
- if (args_0.length !== 3) {
592
- throw new __compactRuntime.CompactError(`verifyRespondBidirectionalEvent: expected 3 arguments (as invoked from Typescript), received ${args_0.length}`);
593
- }
594
- const requestId_0 = args_0[0];
595
- const respondBidirectionalEvent_0 = args_0[1];
596
- const mpcResponseKey_0 = args_0[2];
597
- if (!(requestId_0.buffer instanceof ArrayBuffer && requestId_0.BYTES_PER_ELEMENT === 1 && requestId_0.length === 32)) {
598
- __compactRuntime.typeError('verifyRespondBidirectionalEvent',
599
- 'argument 1',
600
- 'Signet.compact line 298 char 3',
601
- 'Bytes<32>',
602
- requestId_0)
603
- }
604
- if (!(typeof(respondBidirectionalEvent_0) === 'object' && respondBidirectionalEvent_0.serializedOutput.buffer instanceof ArrayBuffer && respondBidirectionalEvent_0.serializedOutput.BYTES_PER_ELEMENT === 1 && respondBidirectionalEvent_0.serializedOutput.length === 128 && typeof(respondBidirectionalEvent_0.outputLen) === 'bigint' && respondBidirectionalEvent_0.outputLen >= 0n && respondBidirectionalEvent_0.outputLen <= 255n && respondBidirectionalEvent_0.r.buffer instanceof ArrayBuffer && respondBidirectionalEvent_0.r.BYTES_PER_ELEMENT === 1 && respondBidirectionalEvent_0.r.length === 32 && respondBidirectionalEvent_0.s.buffer instanceof ArrayBuffer && respondBidirectionalEvent_0.s.BYTES_PER_ELEMENT === 1 && respondBidirectionalEvent_0.s.length === 32 && typeof(respondBidirectionalEvent_0.recoveryId) === 'bigint' && respondBidirectionalEvent_0.recoveryId >= 0n && respondBidirectionalEvent_0.recoveryId <= 255n)) {
605
- __compactRuntime.typeError('verifyRespondBidirectionalEvent',
606
- 'argument 2',
607
- 'Signet.compact line 298 char 3',
608
- 'struct RespondBidirectionalEvent<serializedOutput: Bytes<128>, outputLen: Uint<0..256>, r: Bytes<32>, s: Bytes<32>, recoveryId: Uint<0..256>>',
609
- respondBidirectionalEvent_0)
610
- }
611
- return _dummyContract._verifyRespondBidirectionalEvent_0(requestId_0,
612
- respondBidirectionalEvent_0,
613
- mpcResponseKey_0);
614
- },
615
721
  signetKeyHash: (...args_0) => {
616
722
  if (args_0.length !== 1) {
617
723
  throw new __compactRuntime.CompactError(`signetKeyHash: expected 1 argument (as invoked from Typescript), received ${args_0.length}`);
@@ -627,7 +733,7 @@ export const pureCircuits = {
627
733
  if (!(addr_0.buffer instanceof ArrayBuffer && addr_0.BYTES_PER_ELEMENT === 1 && addr_0.length === 20)) {
628
734
  __compactRuntime.typeError('evmAddressAbiWord',
629
735
  'argument 1',
630
- 'Signet.compact line 381 char 3',
736
+ 'Signet.compact line 430 char 3',
631
737
  'Bytes<20>',
632
738
  addr_0)
633
739
  }
@@ -641,7 +747,7 @@ export const pureCircuits = {
641
747
  if (!(typeof(value_0) === 'bigint' && value_0 >= 0n && value_0 <= 340282366920938463463374607431768211455n)) {
642
748
  __compactRuntime.typeError('numericAbiWord',
643
749
  'argument 1',
644
- 'Signet.compact line 387 char 3',
750
+ 'Signet.compact line 436 char 3',
645
751
  'Uint<0..340282366920938463463374607431768211456>',
646
752
  value_0)
647
753
  }
@@ -655,7 +761,7 @@ export const pureCircuits = {
655
761
  if (!(typeof(value_0) === 'boolean')) {
656
762
  __compactRuntime.typeError('boolAbiWord',
657
763
  'argument 1',
658
- 'Signet.compact line 400 char 3',
764
+ 'Signet.compact line 449 char 3',
659
765
  'Boolean',
660
766
  value_0)
661
767
  }
@@ -669,7 +775,7 @@ export const pureCircuits = {
669
775
  if (!(word_0.buffer instanceof ArrayBuffer && word_0.BYTES_PER_ELEMENT === 1 && word_0.length === 32)) {
670
776
  __compactRuntime.typeError('abiWordToUint128',
671
777
  'argument 1',
672
- 'Signet.compact line 408 char 3',
778
+ 'Signet.compact line 457 char 3',
673
779
  'Bytes<32>',
674
780
  word_0)
675
781
  }
@@ -683,11 +789,114 @@ export const pureCircuits = {
683
789
  if (!(word_0.buffer instanceof ArrayBuffer && word_0.BYTES_PER_ELEMENT === 1 && word_0.length === 32)) {
684
790
  __compactRuntime.typeError('abiWordToBool',
685
791
  'argument 1',
686
- 'Signet.compact line 431 char 3',
792
+ 'Signet.compact line 480 char 3',
687
793
  'Bytes<32>',
688
794
  word_0)
689
795
  }
690
796
  return _dummyContract._abiWordToBool_0(word_0);
797
+ },
798
+ calculateSignetAttestationDigest1: (...args_0) => {
799
+ if (args_0.length !== 2) {
800
+ throw new __compactRuntime.CompactError(`calculateSignetAttestationDigest1: expected 2 arguments (as invoked from Typescript), received ${args_0.length}`);
801
+ }
802
+ const requestId_0 = args_0[0];
803
+ const serializedOutput_0 = args_0[1];
804
+ if (!(requestId_0.buffer instanceof ArrayBuffer && requestId_0.BYTES_PER_ELEMENT === 1 && requestId_0.length === 32)) {
805
+ __compactRuntime.typeError('calculateSignetAttestationDigest1',
806
+ 'argument 1',
807
+ 'circuits.compact line 34 char 1',
808
+ 'Bytes<32>',
809
+ requestId_0)
810
+ }
811
+ if (!(serializedOutput_0.buffer instanceof ArrayBuffer && serializedOutput_0.BYTES_PER_ELEMENT === 1 && serializedOutput_0.length === 1)) {
812
+ __compactRuntime.typeError('calculateSignetAttestationDigest1',
813
+ 'argument 2',
814
+ 'circuits.compact line 34 char 1',
815
+ 'Bytes<1>',
816
+ serializedOutput_0)
817
+ }
818
+ return _dummyContract._calculateSignetAttestationDigest1_0(requestId_0,
819
+ serializedOutput_0);
820
+ },
821
+ calculateSignetAttestationDigest32: (...args_0) => {
822
+ if (args_0.length !== 2) {
823
+ throw new __compactRuntime.CompactError(`calculateSignetAttestationDigest32: expected 2 arguments (as invoked from Typescript), received ${args_0.length}`);
824
+ }
825
+ const requestId_0 = args_0[0];
826
+ const serializedOutput_0 = args_0[1];
827
+ if (!(requestId_0.buffer instanceof ArrayBuffer && requestId_0.BYTES_PER_ELEMENT === 1 && requestId_0.length === 32)) {
828
+ __compactRuntime.typeError('calculateSignetAttestationDigest32',
829
+ 'argument 1',
830
+ 'circuits.compact line 41 char 1',
831
+ 'Bytes<32>',
832
+ requestId_0)
833
+ }
834
+ if (!(serializedOutput_0.buffer instanceof ArrayBuffer && serializedOutput_0.BYTES_PER_ELEMENT === 1 && serializedOutput_0.length === 32)) {
835
+ __compactRuntime.typeError('calculateSignetAttestationDigest32',
836
+ 'argument 2',
837
+ 'circuits.compact line 41 char 1',
838
+ 'Bytes<32>',
839
+ serializedOutput_0)
840
+ }
841
+ return _dummyContract._calculateSignetAttestationDigest32_0(requestId_0,
842
+ serializedOutput_0);
843
+ },
844
+ calculateSignetAttestationDigest100: (...args_0) => {
845
+ if (args_0.length !== 2) {
846
+ throw new __compactRuntime.CompactError(`calculateSignetAttestationDigest100: expected 2 arguments (as invoked from Typescript), received ${args_0.length}`);
847
+ }
848
+ const requestId_0 = args_0[0];
849
+ const serializedOutput_0 = args_0[1];
850
+ if (!(requestId_0.buffer instanceof ArrayBuffer && requestId_0.BYTES_PER_ELEMENT === 1 && requestId_0.length === 32)) {
851
+ __compactRuntime.typeError('calculateSignetAttestationDigest100',
852
+ 'argument 1',
853
+ 'circuits.compact line 48 char 1',
854
+ 'Bytes<32>',
855
+ requestId_0)
856
+ }
857
+ if (!(serializedOutput_0.buffer instanceof ArrayBuffer && serializedOutput_0.BYTES_PER_ELEMENT === 1 && serializedOutput_0.length === 100)) {
858
+ __compactRuntime.typeError('calculateSignetAttestationDigest100',
859
+ 'argument 2',
860
+ 'circuits.compact line 48 char 1',
861
+ 'Bytes<100>',
862
+ serializedOutput_0)
863
+ }
864
+ return _dummyContract._calculateSignetAttestationDigest100_0(requestId_0,
865
+ serializedOutput_0);
866
+ },
867
+ verifyRespondBidirectionalEvent32: (...args_0) => {
868
+ if (args_0.length !== 4) {
869
+ throw new __compactRuntime.CompactError(`verifyRespondBidirectionalEvent32: expected 4 arguments (as invoked from Typescript), received ${args_0.length}`);
870
+ }
871
+ const requestId_0 = args_0[0];
872
+ const serializedOutput_0 = args_0[1];
873
+ const respondBidirectionalEvent_0 = args_0[2];
874
+ const mpcResponseKey_0 = args_0[3];
875
+ if (!(requestId_0.buffer instanceof ArrayBuffer && requestId_0.BYTES_PER_ELEMENT === 1 && requestId_0.length === 32)) {
876
+ __compactRuntime.typeError('verifyRespondBidirectionalEvent32',
877
+ 'argument 1',
878
+ 'circuits.compact line 55 char 1',
879
+ 'Bytes<32>',
880
+ requestId_0)
881
+ }
882
+ if (!(serializedOutput_0.buffer instanceof ArrayBuffer && serializedOutput_0.BYTES_PER_ELEMENT === 1 && serializedOutput_0.length === 32)) {
883
+ __compactRuntime.typeError('verifyRespondBidirectionalEvent32',
884
+ 'argument 2',
885
+ 'circuits.compact line 55 char 1',
886
+ 'Bytes<32>',
887
+ serializedOutput_0)
888
+ }
889
+ if (!(typeof(respondBidirectionalEvent_0) === 'object' && respondBidirectionalEvent_0.attestationDigest.buffer instanceof ArrayBuffer && respondBidirectionalEvent_0.attestationDigest.BYTES_PER_ELEMENT === 1 && respondBidirectionalEvent_0.attestationDigest.length === 32 && typeof(respondBidirectionalEvent_0.signature) === 'object' && typeof(respondBidirectionalEvent_0.signature.bigR) === 'object' && respondBidirectionalEvent_0.signature.bigR.x.buffer instanceof ArrayBuffer && respondBidirectionalEvent_0.signature.bigR.x.BYTES_PER_ELEMENT === 1 && respondBidirectionalEvent_0.signature.bigR.x.length === 32 && respondBidirectionalEvent_0.signature.bigR.y.buffer instanceof ArrayBuffer && respondBidirectionalEvent_0.signature.bigR.y.BYTES_PER_ELEMENT === 1 && respondBidirectionalEvent_0.signature.bigR.y.length === 32 && respondBidirectionalEvent_0.signature.s.buffer instanceof ArrayBuffer && respondBidirectionalEvent_0.signature.s.BYTES_PER_ELEMENT === 1 && respondBidirectionalEvent_0.signature.s.length === 32 && typeof(respondBidirectionalEvent_0.signature.recoveryId) === 'bigint' && respondBidirectionalEvent_0.signature.recoveryId >= 0n && respondBidirectionalEvent_0.signature.recoveryId <= 255n)) {
890
+ __compactRuntime.typeError('verifyRespondBidirectionalEvent32',
891
+ 'argument 3',
892
+ 'circuits.compact line 55 char 1',
893
+ 'struct RespondBidirectionalEvent<attestationDigest: Bytes<32>, signature: struct Signature<bigR: struct AffinePoint<x: Bytes<32>, y: Bytes<32>>, s: Bytes<32>, recoveryId: Uint<0..256>>>',
894
+ respondBidirectionalEvent_0)
895
+ }
896
+ return _dummyContract._verifyRespondBidirectionalEvent32_0(requestId_0,
897
+ serializedOutput_0,
898
+ respondBidirectionalEvent_0,
899
+ mpcResponseKey_0);
691
900
  }
692
901
  };
693
902
  export const contractReferenceLocations =