@sig-net/midnight 0.23.0 → 0.24.0-rc.2

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 (50) hide show
  1. package/README.md +10 -7
  2. package/dist/compact-descriptors.d.ts +8 -6
  3. package/dist/compact-descriptors.d.ts.map +1 -1
  4. package/dist/compact-descriptors.js +26 -8
  5. package/dist/compact-descriptors.js.map +1 -1
  6. package/dist/constants.d.ts +2 -21
  7. package/dist/constants.d.ts.map +1 -1
  8. package/dist/constants.js +2 -24
  9. package/dist/constants.js.map +1 -1
  10. package/dist/ecdsa-attestation.d.ts +41 -11
  11. package/dist/ecdsa-attestation.d.ts.map +1 -1
  12. package/dist/ecdsa-attestation.js +45 -12
  13. package/dist/ecdsa-attestation.js.map +1 -1
  14. package/dist/index.d.ts +5 -5
  15. package/dist/index.d.ts.map +1 -1
  16. package/dist/index.js +4 -4
  17. package/dist/index.js.map +1 -1
  18. package/dist/managed/compiler/contract-info.json +290 -6
  19. package/dist/managed/compiler/contract-manifest.json +8 -8
  20. package/dist/managed/contract/index.d.ts +69 -5
  21. package/dist/managed/contract/index.js +436 -154
  22. package/dist/managed/contract/index.js.map +1 -1
  23. package/dist/signature-requests-state-reader.d.ts +6 -13
  24. package/dist/signature-requests-state-reader.d.ts.map +1 -1
  25. package/dist/signature-requests-state-reader.js +9 -15
  26. package/dist/signature-requests-state-reader.js.map +1 -1
  27. package/dist/signet-contract-events.d.ts +39 -9
  28. package/dist/signet-contract-events.d.ts.map +1 -1
  29. package/dist/signet-contract-events.js +79 -29
  30. package/dist/signet-contract-events.js.map +1 -1
  31. package/dist/signet-evtype2tx-record-decoding.js +4 -4
  32. package/dist/signet-evtype2tx-record-decoding.js.map +1 -1
  33. package/dist/signet-request-id.d.ts +2 -1
  34. package/dist/signet-request-id.d.ts.map +1 -1
  35. package/dist/signet-request-id.js +13 -3
  36. package/dist/signet-request-id.js.map +1 -1
  37. package/dist/signet-request-response-reader.d.ts.map +1 -1
  38. package/dist/signet-request-response-reader.js +5 -6
  39. package/dist/signet-request-response-reader.js.map +1 -1
  40. package/dist/signet-requests.d.ts +43 -10
  41. package/dist/signet-requests.d.ts.map +1 -1
  42. package/dist/signet-requests.js +24 -5
  43. package/dist/signet-requests.js.map +1 -1
  44. package/dist/testing.d.ts +1 -1
  45. package/dist/testing.d.ts.map +1 -1
  46. package/dist/testing.js +3 -8
  47. package/dist/testing.js.map +1 -1
  48. package/package.json +2 -2
  49. package/src/Signet.compact +107 -39
  50. package/src/circuits.compact +37 -9
@@ -163,6 +163,54 @@
163
163
  "type-name": "Boolean"
164
164
  }
165
165
  },
166
+ {
167
+ "name": "calculateSignetAttestationDigest0",
168
+ "pure": true,
169
+ "proof": false,
170
+ "arguments": [
171
+ {
172
+ "name": "requestId",
173
+ "type": {
174
+ "type-name": "Alias",
175
+ "name": "RequestId",
176
+ "type": {
177
+ "type-name": "Bytes",
178
+ "length": 32
179
+ }
180
+ }
181
+ },
182
+ {
183
+ "name": "blockHeight",
184
+ "type": {
185
+ "type-name": "Uint",
186
+ "maxval": 18446744073709551615
187
+ }
188
+ },
189
+ {
190
+ "name": "outputKind",
191
+ "type": {
192
+ "type-name": "Enum",
193
+ "name": "OutputKind",
194
+ "elements": [
195
+ "executed",
196
+ "failed",
197
+ "unviable"
198
+ ]
199
+ }
200
+ },
201
+ {
202
+ "name": "serializedOutput",
203
+ "type": {
204
+ "type-name": "Bytes",
205
+ "length": 0
206
+ }
207
+ }
208
+ ],
209
+ "result-type": {
210
+ "type-name": "Bytes",
211
+ "length": 32
212
+ }
213
+ },
166
214
  {
167
215
  "name": "calculateSignetAttestationDigest1",
168
216
  "pure": true,
@@ -179,6 +227,25 @@
179
227
  }
180
228
  }
181
229
  },
230
+ {
231
+ "name": "blockHeight",
232
+ "type": {
233
+ "type-name": "Uint",
234
+ "maxval": 18446744073709551615
235
+ }
236
+ },
237
+ {
238
+ "name": "outputKind",
239
+ "type": {
240
+ "type-name": "Enum",
241
+ "name": "OutputKind",
242
+ "elements": [
243
+ "executed",
244
+ "failed",
245
+ "unviable"
246
+ ]
247
+ }
248
+ },
182
249
  {
183
250
  "name": "serializedOutput",
184
251
  "type": {
@@ -208,6 +275,25 @@
208
275
  }
209
276
  }
210
277
  },
278
+ {
279
+ "name": "blockHeight",
280
+ "type": {
281
+ "type-name": "Uint",
282
+ "maxval": 18446744073709551615
283
+ }
284
+ },
285
+ {
286
+ "name": "outputKind",
287
+ "type": {
288
+ "type-name": "Enum",
289
+ "name": "OutputKind",
290
+ "elements": [
291
+ "executed",
292
+ "failed",
293
+ "unviable"
294
+ ]
295
+ }
296
+ },
211
297
  {
212
298
  "name": "serializedOutput",
213
299
  "type": {
@@ -237,6 +323,25 @@
237
323
  }
238
324
  }
239
325
  },
326
+ {
327
+ "name": "blockHeight",
328
+ "type": {
329
+ "type-name": "Uint",
330
+ "maxval": 18446744073709551615
331
+ }
332
+ },
333
+ {
334
+ "name": "outputKind",
335
+ "type": {
336
+ "type-name": "Enum",
337
+ "name": "OutputKind",
338
+ "elements": [
339
+ "executed",
340
+ "failed",
341
+ "unviable"
342
+ ]
343
+ }
344
+ },
240
345
  {
241
346
  "name": "serializedOutput",
242
347
  "type": {
@@ -266,6 +371,25 @@
266
371
  }
267
372
  }
268
373
  },
374
+ {
375
+ "name": "blockHeight",
376
+ "type": {
377
+ "type-name": "Uint",
378
+ "maxval": 18446744073709551615
379
+ }
380
+ },
381
+ {
382
+ "name": "outputKind",
383
+ "type": {
384
+ "type-name": "Enum",
385
+ "name": "OutputKind",
386
+ "elements": [
387
+ "executed",
388
+ "failed",
389
+ "unviable"
390
+ ]
391
+ }
392
+ },
269
393
  {
270
394
  "name": "serializedOutput",
271
395
  "type": {
@@ -280,21 +404,137 @@
280
404
  }
281
405
  },
282
406
  {
283
- "name": "verifyRespondBidirectionalEvent32",
407
+ "name": "verifyRespondBidirectionalEvent0",
284
408
  "pure": true,
285
409
  "proof": false,
286
410
  "arguments": [
287
411
  {
288
- "name": "requestId",
412
+ "name": "serializedOutput",
413
+ "type": {
414
+ "type-name": "Bytes",
415
+ "length": 0
416
+ }
417
+ },
418
+ {
419
+ "name": "respondBidirectionalEvent",
420
+ "type": {
421
+ "type-name": "Struct",
422
+ "name": "RespondBidirectionalEvent",
423
+ "elements": [
424
+ {
425
+ "name": "requestId",
426
+ "type": {
427
+ "type-name": "Alias",
428
+ "name": "RequestId",
429
+ "type": {
430
+ "type-name": "Bytes",
431
+ "length": 32
432
+ }
433
+ }
434
+ },
435
+ {
436
+ "name": "blockHeight",
437
+ "type": {
438
+ "type-name": "Uint",
439
+ "maxval": 18446744073709551615
440
+ }
441
+ },
442
+ {
443
+ "name": "outputKind",
444
+ "type": {
445
+ "type-name": "Enum",
446
+ "name": "OutputKind",
447
+ "elements": [
448
+ "executed",
449
+ "failed",
450
+ "unviable"
451
+ ]
452
+ }
453
+ },
454
+ {
455
+ "name": "serializedOutputLength",
456
+ "type": {
457
+ "type-name": "Uint",
458
+ "maxval": 18446744073709551615
459
+ }
460
+ },
461
+ {
462
+ "name": "digest",
463
+ "type": {
464
+ "type-name": "Bytes",
465
+ "length": 32
466
+ }
467
+ },
468
+ {
469
+ "name": "signature",
470
+ "type": {
471
+ "type-name": "Struct",
472
+ "name": "Signature",
473
+ "elements": [
474
+ {
475
+ "name": "bigR",
476
+ "type": {
477
+ "type-name": "Struct",
478
+ "name": "AffinePoint",
479
+ "elements": [
480
+ {
481
+ "name": "x",
482
+ "type": {
483
+ "type-name": "Bytes",
484
+ "length": 32
485
+ }
486
+ },
487
+ {
488
+ "name": "y",
489
+ "type": {
490
+ "type-name": "Bytes",
491
+ "length": 32
492
+ }
493
+ }
494
+ ]
495
+ }
496
+ },
497
+ {
498
+ "name": "s",
499
+ "type": {
500
+ "type-name": "Bytes",
501
+ "length": 32
502
+ }
503
+ },
504
+ {
505
+ "name": "recoveryId",
506
+ "type": {
507
+ "type-name": "Uint",
508
+ "maxval": 255
509
+ }
510
+ }
511
+ ]
512
+ }
513
+ }
514
+ ]
515
+ }
516
+ },
517
+ {
518
+ "name": "mpcResponseKey",
289
519
  "type": {
290
520
  "type-name": "Alias",
291
- "name": "RequestId",
521
+ "name": "Secp256k1Point",
292
522
  "type": {
293
- "type-name": "Bytes",
294
- "length": 32
523
+ "type-name": "Opaque",
524
+ "tsType": "Secp256k1Point"
295
525
  }
296
526
  }
297
- },
527
+ }
528
+ ],
529
+ "result-type": {
530
+ "type-name": "Boolean"
531
+ }
532
+ },
533
+ {
534
+ "name": "verifyRespondBidirectionalEvent32",
535
+ "pure": true,
536
+ "proof": false,
537
+ "arguments": [
298
538
  {
299
539
  "name": "serializedOutput",
300
540
  "type": {
@@ -308,6 +548,50 @@
308
548
  "type-name": "Struct",
309
549
  "name": "RespondBidirectionalEvent",
310
550
  "elements": [
551
+ {
552
+ "name": "requestId",
553
+ "type": {
554
+ "type-name": "Alias",
555
+ "name": "RequestId",
556
+ "type": {
557
+ "type-name": "Bytes",
558
+ "length": 32
559
+ }
560
+ }
561
+ },
562
+ {
563
+ "name": "blockHeight",
564
+ "type": {
565
+ "type-name": "Uint",
566
+ "maxval": 18446744073709551615
567
+ }
568
+ },
569
+ {
570
+ "name": "outputKind",
571
+ "type": {
572
+ "type-name": "Enum",
573
+ "name": "OutputKind",
574
+ "elements": [
575
+ "executed",
576
+ "failed",
577
+ "unviable"
578
+ ]
579
+ }
580
+ },
581
+ {
582
+ "name": "serializedOutputLength",
583
+ "type": {
584
+ "type-name": "Uint",
585
+ "maxval": 18446744073709551615
586
+ }
587
+ },
588
+ {
589
+ "name": "digest",
590
+ "type": {
591
+ "type-name": "Bytes",
592
+ "length": 32
593
+ }
594
+ },
311
595
  {
312
596
  "name": "signature",
313
597
  "type": {
@@ -7,26 +7,26 @@
7
7
  "type": "directory",
8
8
  "contract-info.json": {
9
9
  "type": "file",
10
- "size": 8556,
11
- "hash": "7c47d2270aa2ea14342613bd428f575d633670cc941d12de3cdbdd69270decd7"
10
+ "size": 15932,
11
+ "hash": "3b8f4f67d354e15c7d993847ccc7eaad3d2b44b1f28aa2440942228f3574b970"
12
12
  }
13
13
  },
14
14
  "contract": {
15
15
  "type": "directory",
16
16
  "index.d.ts": {
17
17
  "type": "file",
18
- "size": 6842,
19
- "hash": "b6d45b68e32185fc3ebfcc50630dfdec409c9a6bb5ebc8b6d5c40f6480a903dd"
18
+ "size": 11942,
19
+ "hash": "d630431aa643e6d90a7a77a944bdcdd45b2d143a87a2409d647261266a5c0b5f"
20
20
  },
21
21
  "index.js": {
22
22
  "type": "file",
23
- "size": 42847,
24
- "hash": "73f5b3be89aee3b115afb2dc52ca4dfe8c862a39dcfb626b407c2894c2ba43c6"
23
+ "size": 62804,
24
+ "hash": "e8fdd71f38998f06b27df9bc57e4ffacf7085ff8252eb501001637fe23ef80e8"
25
25
  },
26
26
  "index.js.map": {
27
27
  "type": "file",
28
- "size": 4704,
29
- "hash": "24823832e1f686bbcc7fcc0aaef591efe9d2b082957191f8745cdd2bf80adedf"
28
+ "size": 6253,
29
+ "hash": "9087ad1a8910d5ea37000a6148a9b8950247668a9170b57bca108bcd6771b130"
30
30
  }
31
31
  }
32
32
  }
@@ -1,5 +1,7 @@
1
1
  import type * as __compactRuntime from '@midnight-ntwrk/compact-runtime';
2
2
 
3
+ export enum OutputKind { executed = 0, failed = 1, unviable = 2 }
4
+
3
5
  export type Witnesses<PS> = {
4
6
  }
5
7
 
@@ -22,17 +24,47 @@ export type PureCircuits = {
22
24
  boolAbiWord(value_0: boolean): Uint8Array;
23
25
  abiWordToUint128(word_0: Uint8Array): bigint;
24
26
  abiWordToBool(word_0: Uint8Array): boolean;
27
+ calculateSignetAttestationDigest0(requestId_0: Uint8Array,
28
+ blockHeight_0: bigint,
29
+ outputKind_0: OutputKind,
30
+ serializedOutput_0: Uint8Array): Uint8Array;
25
31
  calculateSignetAttestationDigest1(requestId_0: Uint8Array,
32
+ blockHeight_0: bigint,
33
+ outputKind_0: OutputKind,
26
34
  serializedOutput_0: Uint8Array): Uint8Array;
27
35
  calculateSignetAttestationDigest2(requestId_0: Uint8Array,
36
+ blockHeight_0: bigint,
37
+ outputKind_0: OutputKind,
28
38
  serializedOutput_0: Uint8Array): Uint8Array;
29
39
  calculateSignetAttestationDigest32(requestId_0: Uint8Array,
40
+ blockHeight_0: bigint,
41
+ outputKind_0: OutputKind,
30
42
  serializedOutput_0: Uint8Array): Uint8Array;
31
43
  calculateSignetAttestationDigest100(requestId_0: Uint8Array,
44
+ blockHeight_0: bigint,
45
+ outputKind_0: OutputKind,
32
46
  serializedOutput_0: Uint8Array): Uint8Array;
33
- verifyRespondBidirectionalEvent32(requestId_0: Uint8Array,
34
- serializedOutput_0: Uint8Array,
35
- respondBidirectionalEvent_0: { signature: { bigR: { x: Uint8Array,
47
+ verifyRespondBidirectionalEvent0(serializedOutput_0: Uint8Array,
48
+ respondBidirectionalEvent_0: { requestId: Uint8Array,
49
+ blockHeight: bigint,
50
+ outputKind: OutputKind,
51
+ serializedOutputLength: bigint,
52
+ digest: Uint8Array,
53
+ signature: { bigR: { x: Uint8Array,
54
+ y: Uint8Array
55
+ },
56
+ s: Uint8Array,
57
+ recoveryId: bigint
58
+ }
59
+ },
60
+ mpcResponseKey_0: __compactRuntime.Secp256k1Point): boolean;
61
+ verifyRespondBidirectionalEvent32(serializedOutput_0: Uint8Array,
62
+ respondBidirectionalEvent_0: { requestId: Uint8Array,
63
+ blockHeight: bigint,
64
+ outputKind: OutputKind,
65
+ serializedOutputLength: bigint,
66
+ digest: Uint8Array,
67
+ signature: { bigR: { x: Uint8Array,
36
68
  y: Uint8Array
37
69
  },
38
70
  s: Uint8Array,
@@ -58,22 +90,54 @@ export type Circuits<PS> = {
58
90
  abiWordToUint128(context: __compactRuntime.CircuitContext<PS>,
59
91
  word_0: Uint8Array): Promise<__compactRuntime.CircuitResults<PS, bigint>>;
60
92
  abiWordToBool(context: __compactRuntime.CircuitContext<PS>, word_0: Uint8Array): Promise<__compactRuntime.CircuitResults<PS, boolean>>;
93
+ calculateSignetAttestationDigest0(context: __compactRuntime.CircuitContext<PS>,
94
+ requestId_0: Uint8Array,
95
+ blockHeight_0: bigint,
96
+ outputKind_0: OutputKind,
97
+ serializedOutput_0: Uint8Array): Promise<__compactRuntime.CircuitResults<PS, Uint8Array>>;
61
98
  calculateSignetAttestationDigest1(context: __compactRuntime.CircuitContext<PS>,
62
99
  requestId_0: Uint8Array,
100
+ blockHeight_0: bigint,
101
+ outputKind_0: OutputKind,
63
102
  serializedOutput_0: Uint8Array): Promise<__compactRuntime.CircuitResults<PS, Uint8Array>>;
64
103
  calculateSignetAttestationDigest2(context: __compactRuntime.CircuitContext<PS>,
65
104
  requestId_0: Uint8Array,
105
+ blockHeight_0: bigint,
106
+ outputKind_0: OutputKind,
66
107
  serializedOutput_0: Uint8Array): Promise<__compactRuntime.CircuitResults<PS, Uint8Array>>;
67
108
  calculateSignetAttestationDigest32(context: __compactRuntime.CircuitContext<PS>,
68
109
  requestId_0: Uint8Array,
110
+ blockHeight_0: bigint,
111
+ outputKind_0: OutputKind,
69
112
  serializedOutput_0: Uint8Array): Promise<__compactRuntime.CircuitResults<PS, Uint8Array>>;
70
113
  calculateSignetAttestationDigest100(context: __compactRuntime.CircuitContext<PS>,
71
114
  requestId_0: Uint8Array,
115
+ blockHeight_0: bigint,
116
+ outputKind_0: OutputKind,
72
117
  serializedOutput_0: Uint8Array): Promise<__compactRuntime.CircuitResults<PS, Uint8Array>>;
118
+ verifyRespondBidirectionalEvent0(context: __compactRuntime.CircuitContext<PS>,
119
+ serializedOutput_0: Uint8Array,
120
+ respondBidirectionalEvent_0: { requestId: Uint8Array,
121
+ blockHeight: bigint,
122
+ outputKind: OutputKind,
123
+ serializedOutputLength: bigint,
124
+ digest: Uint8Array,
125
+ signature: { bigR: { x: Uint8Array,
126
+ y: Uint8Array
127
+ },
128
+ s: Uint8Array,
129
+ recoveryId: bigint
130
+ }
131
+ },
132
+ mpcResponseKey_0: __compactRuntime.Secp256k1Point): Promise<__compactRuntime.CircuitResults<PS, boolean>>;
73
133
  verifyRespondBidirectionalEvent32(context: __compactRuntime.CircuitContext<PS>,
74
- requestId_0: Uint8Array,
75
134
  serializedOutput_0: Uint8Array,
76
- respondBidirectionalEvent_0: { signature: { bigR: { x: Uint8Array,
135
+ respondBidirectionalEvent_0: { requestId: Uint8Array,
136
+ blockHeight: bigint,
137
+ outputKind: OutputKind,
138
+ serializedOutputLength: bigint,
139
+ digest: Uint8Array,
140
+ signature: { bigR: { x: Uint8Array,
77
141
  y: Uint8Array
78
142
  },
79
143
  s: Uint8Array,