@sig-net/midnight 0.11.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 (48) hide show
  1. package/README.md +9 -9
  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 +38 -18
  11. package/dist/ecdsa-attestation.d.ts.map +1 -1
  12. package/dist/ecdsa-attestation.js +52 -25
  13. package/dist/ecdsa-attestation.js.map +1 -1
  14. package/dist/epsilon-derivation.js +1 -1
  15. package/dist/epsilon-derivation.js.map +1 -1
  16. package/dist/index.d.ts +1 -0
  17. package/dist/index.d.ts.map +1 -1
  18. package/dist/index.js +1 -0
  19. package/dist/index.js.map +1 -1
  20. package/dist/managed/compiler/contract-info.json +180 -122
  21. package/dist/managed/compiler/contract-manifest.json +8 -8
  22. package/dist/managed/contract/index.d.ts +38 -28
  23. package/dist/managed/contract/index.js +302 -149
  24. package/dist/managed/contract/index.js.map +1 -1
  25. package/dist/signature-requests-state-reader.d.ts +13 -13
  26. package/dist/signature-requests-state-reader.js +22 -22
  27. package/dist/signature-requests-state-reader.js.map +1 -1
  28. package/dist/signature-response-verification.d.ts +1 -1
  29. package/dist/signature-response-verification.js +3 -3
  30. package/dist/signature-response-verification.js.map +1 -1
  31. package/dist/signet-contract-state-reader.d.ts +33 -36
  32. package/dist/signet-contract-state-reader.d.ts.map +1 -1
  33. package/dist/signet-contract-state-reader.js +26 -28
  34. package/dist/signet-contract-state-reader.js.map +1 -1
  35. package/dist/signet-evtype2tx-requests.d.ts +21 -21
  36. package/dist/signet-evtype2tx-requests.js +16 -16
  37. package/dist/signet-evtype2tx-requests.js.map +1 -1
  38. package/dist/signet-request-response-reader.d.ts +23 -23
  39. package/dist/signet-request-response-reader.d.ts.map +1 -1
  40. package/dist/signet-request-response-reader.js +28 -28
  41. package/dist/signet-request-response-reader.js.map +1 -1
  42. package/dist/signet-requests.d.ts +27 -27
  43. package/dist/signet-requests.d.ts.map +1 -1
  44. package/dist/signet-requests.js +28 -29
  45. package/dist/signet-requests.js.map +1 -1
  46. package/package.json +3 -2
  47. package/src/Signet.compact +78 -63
  48. package/src/circuits.compact +45 -2
@@ -54,7 +54,146 @@
54
54
  }
55
55
  },
56
56
  {
57
- "name": "signetAttestationDigest",
57
+ "name": "signetKeyHash",
58
+ "pure": true,
59
+ "proof": false,
60
+ "arguments": [
61
+ {
62
+ "name": "pk",
63
+ "type": {
64
+ "type-name": "Alias",
65
+ "name": "Secp256k1Point",
66
+ "type": {
67
+ "type-name": "Opaque",
68
+ "tsType": "Secp256k1Point"
69
+ }
70
+ }
71
+ }
72
+ ],
73
+ "result-type": {
74
+ "type-name": "Bytes",
75
+ "length": 32
76
+ }
77
+ },
78
+ {
79
+ "name": "evmAddressAbiWord",
80
+ "pure": true,
81
+ "proof": false,
82
+ "arguments": [
83
+ {
84
+ "name": "addr",
85
+ "type": {
86
+ "type-name": "Bytes",
87
+ "length": 20
88
+ }
89
+ }
90
+ ],
91
+ "result-type": {
92
+ "type-name": "Bytes",
93
+ "length": 32
94
+ }
95
+ },
96
+ {
97
+ "name": "numericAbiWord",
98
+ "pure": true,
99
+ "proof": false,
100
+ "arguments": [
101
+ {
102
+ "name": "value",
103
+ "type": {
104
+ "type-name": "Uint",
105
+ "maxval": 340282366920938463463374607431768211455
106
+ }
107
+ }
108
+ ],
109
+ "result-type": {
110
+ "type-name": "Bytes",
111
+ "length": 32
112
+ }
113
+ },
114
+ {
115
+ "name": "boolAbiWord",
116
+ "pure": true,
117
+ "proof": false,
118
+ "arguments": [
119
+ {
120
+ "name": "value",
121
+ "type": {
122
+ "type-name": "Boolean"
123
+ }
124
+ }
125
+ ],
126
+ "result-type": {
127
+ "type-name": "Bytes",
128
+ "length": 32
129
+ }
130
+ },
131
+ {
132
+ "name": "abiWordToUint128",
133
+ "pure": true,
134
+ "proof": false,
135
+ "arguments": [
136
+ {
137
+ "name": "word",
138
+ "type": {
139
+ "type-name": "Bytes",
140
+ "length": 32
141
+ }
142
+ }
143
+ ],
144
+ "result-type": {
145
+ "type-name": "Uint",
146
+ "maxval": 340282366920938463463374607431768211455
147
+ }
148
+ },
149
+ {
150
+ "name": "abiWordToBool",
151
+ "pure": true,
152
+ "proof": false,
153
+ "arguments": [
154
+ {
155
+ "name": "word",
156
+ "type": {
157
+ "type-name": "Bytes",
158
+ "length": 32
159
+ }
160
+ }
161
+ ],
162
+ "result-type": {
163
+ "type-name": "Boolean"
164
+ }
165
+ },
166
+ {
167
+ "name": "calculateSignetAttestationDigest1",
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": "serializedOutput",
184
+ "type": {
185
+ "type-name": "Bytes",
186
+ "length": 1
187
+ }
188
+ }
189
+ ],
190
+ "result-type": {
191
+ "type-name": "Bytes",
192
+ "length": 32
193
+ }
194
+ },
195
+ {
196
+ "name": "calculateSignetAttestationDigest32",
58
197
  "pure": true,
59
198
  "proof": false,
60
199
  "arguments": [
@@ -73,7 +212,7 @@
73
212
  "name": "serializedOutput",
74
213
  "type": {
75
214
  "type-name": "Bytes",
76
- "length": 128
215
+ "length": 32
77
216
  }
78
217
  }
79
218
  ],
@@ -83,7 +222,7 @@
83
222
  }
84
223
  },
85
224
  {
86
- "name": "verifyRespondBidirectionalEvent",
225
+ "name": "calculateSignetAttestationDigest100",
87
226
  "pure": true,
88
227
  "proof": false,
89
228
  "arguments": [
@@ -98,6 +237,42 @@
98
237
  }
99
238
  }
100
239
  },
240
+ {
241
+ "name": "serializedOutput",
242
+ "type": {
243
+ "type-name": "Bytes",
244
+ "length": 100
245
+ }
246
+ }
247
+ ],
248
+ "result-type": {
249
+ "type-name": "Bytes",
250
+ "length": 32
251
+ }
252
+ },
253
+ {
254
+ "name": "verifyRespondBidirectionalEvent32",
255
+ "pure": true,
256
+ "proof": false,
257
+ "arguments": [
258
+ {
259
+ "name": "requestId",
260
+ "type": {
261
+ "type-name": "Alias",
262
+ "name": "RequestId",
263
+ "type": {
264
+ "type-name": "Bytes",
265
+ "length": 32
266
+ }
267
+ }
268
+ },
269
+ {
270
+ "name": "serializedOutput",
271
+ "type": {
272
+ "type-name": "Bytes",
273
+ "length": 32
274
+ }
275
+ },
101
276
  {
102
277
  "name": "respondBidirectionalEvent",
103
278
  "type": {
@@ -105,17 +280,10 @@
105
280
  "name": "RespondBidirectionalEvent",
106
281
  "elements": [
107
282
  {
108
- "name": "serializedOutput",
283
+ "name": "attestationDigest",
109
284
  "type": {
110
285
  "type-name": "Bytes",
111
- "length": 128
112
- }
113
- },
114
- {
115
- "name": "outputLen",
116
- "type": {
117
- "type-name": "Uint",
118
- "maxval": 255
286
+ "length": 32
119
287
  }
120
288
  },
121
289
  {
@@ -182,116 +350,6 @@
182
350
  "result-type": {
183
351
  "type-name": "Boolean"
184
352
  }
185
- },
186
- {
187
- "name": "signetKeyHash",
188
- "pure": true,
189
- "proof": false,
190
- "arguments": [
191
- {
192
- "name": "pk",
193
- "type": {
194
- "type-name": "Alias",
195
- "name": "Secp256k1Point",
196
- "type": {
197
- "type-name": "Opaque",
198
- "tsType": "Secp256k1Point"
199
- }
200
- }
201
- }
202
- ],
203
- "result-type": {
204
- "type-name": "Bytes",
205
- "length": 32
206
- }
207
- },
208
- {
209
- "name": "evmAddressAbiWord",
210
- "pure": true,
211
- "proof": false,
212
- "arguments": [
213
- {
214
- "name": "addr",
215
- "type": {
216
- "type-name": "Bytes",
217
- "length": 20
218
- }
219
- }
220
- ],
221
- "result-type": {
222
- "type-name": "Bytes",
223
- "length": 32
224
- }
225
- },
226
- {
227
- "name": "numericAbiWord",
228
- "pure": true,
229
- "proof": false,
230
- "arguments": [
231
- {
232
- "name": "value",
233
- "type": {
234
- "type-name": "Uint",
235
- "maxval": 340282366920938463463374607431768211455
236
- }
237
- }
238
- ],
239
- "result-type": {
240
- "type-name": "Bytes",
241
- "length": 32
242
- }
243
- },
244
- {
245
- "name": "boolAbiWord",
246
- "pure": true,
247
- "proof": false,
248
- "arguments": [
249
- {
250
- "name": "value",
251
- "type": {
252
- "type-name": "Boolean"
253
- }
254
- }
255
- ],
256
- "result-type": {
257
- "type-name": "Bytes",
258
- "length": 32
259
- }
260
- },
261
- {
262
- "name": "abiWordToUint128",
263
- "pure": true,
264
- "proof": false,
265
- "arguments": [
266
- {
267
- "name": "word",
268
- "type": {
269
- "type-name": "Bytes",
270
- "length": 32
271
- }
272
- }
273
- ],
274
- "result-type": {
275
- "type-name": "Uint",
276
- "maxval": 340282366920938463463374607431768211455
277
- }
278
- },
279
- {
280
- "name": "abiWordToBool",
281
- "pure": true,
282
- "proof": false,
283
- "arguments": [
284
- {
285
- "name": "word",
286
- "type": {
287
- "type-name": "Bytes",
288
- "length": 32
289
- }
290
- }
291
- ],
292
- "result-type": {
293
- "type-name": "Boolean"
294
- }
295
353
  }
296
354
  ],
297
355
  "witnesses": [
@@ -7,26 +7,26 @@
7
7
  "type": "directory",
8
8
  "contract-info.json": {
9
9
  "type": "file",
10
- "size": 6935,
11
- "hash": "fd5062d1dd4a2e8f0a6295dd28e33631aac7829d6ae4c5f07acdc1be2c57d218"
10
+ "size": 8148,
11
+ "hash": "715bcde3bb79588f8a61c282f9ca5ad16a13e357222e01679205ba9f669cad52"
12
12
  }
13
13
  },
14
14
  "contract": {
15
15
  "type": "directory",
16
16
  "index.d.ts": {
17
17
  "type": "file",
18
- "size": 5683,
19
- "hash": "b974f22abb20ac4d35a8b532dfee9becdcc17f2f7d4b4ab3eea480b584de087e"
18
+ "size": 6584,
19
+ "hash": "c5acb7266f73191c6e488fc8452f7b47c8250692665f3ca3cc65aa762a3464ca"
20
20
  },
21
21
  "index.js": {
22
22
  "type": "file",
23
- "size": 43240,
24
- "hash": "88f3c259fe0a38d3b6a88fc497a36c28b2908e9ac4acde7f478537c4da9e1de5"
23
+ "size": 49879,
24
+ "hash": "aafe79ad986e0eaef36ff12177899256eb447007f9d431dcab0a37c03bdc722a"
25
25
  },
26
26
  "index.js.map": {
27
27
  "type": "file",
28
- "size": 3820,
29
- "hash": "0201ceb0f1f99727aec454888c558105ef8e1f4fde7a4ae8ea87245876269303"
28
+ "size": 4740,
29
+ "hash": "efbfa3604e2fab40308e84e9d174e4cd7f47dcc88684338af779ef54eb749847"
30
30
  }
31
31
  }
32
32
  }
@@ -15,25 +15,29 @@ export type PureCircuits = {
15
15
  requestsIndexField_0: bigint): { version: bigint,
16
16
  payload: Uint8Array
17
17
  };
18
- signetAttestationDigest(requestId_0: Uint8Array,
19
- serializedOutput_0: Uint8Array): Uint8Array;
20
- verifyRespondBidirectionalEvent(requestId_0: Uint8Array,
21
- respondBidirectionalEvent_0: { serializedOutput: Uint8Array,
22
- outputLen: bigint,
23
- signature: { bigR: { x: Uint8Array,
24
- y: Uint8Array
25
- },
26
- s: Uint8Array,
27
- recoveryId: bigint
28
- }
29
- },
30
- mpcResponseKey_0: __compactRuntime.Secp256k1Point): boolean;
31
18
  signetKeyHash(pk_0: __compactRuntime.Secp256k1Point): Uint8Array;
32
19
  evmAddressAbiWord(addr_0: Uint8Array): Uint8Array;
33
20
  numericAbiWord(value_0: bigint): Uint8Array;
34
21
  boolAbiWord(value_0: boolean): Uint8Array;
35
22
  abiWordToUint128(word_0: Uint8Array): bigint;
36
23
  abiWordToBool(word_0: Uint8Array): boolean;
24
+ calculateSignetAttestationDigest1(requestId_0: Uint8Array,
25
+ serializedOutput_0: Uint8Array): Uint8Array;
26
+ calculateSignetAttestationDigest32(requestId_0: Uint8Array,
27
+ serializedOutput_0: Uint8Array): Uint8Array;
28
+ calculateSignetAttestationDigest100(requestId_0: Uint8Array,
29
+ serializedOutput_0: Uint8Array): Uint8Array;
30
+ verifyRespondBidirectionalEvent32(requestId_0: Uint8Array,
31
+ serializedOutput_0: Uint8Array,
32
+ respondBidirectionalEvent_0: { attestationDigest: Uint8Array,
33
+ signature: { bigR: { x: Uint8Array,
34
+ y: Uint8Array
35
+ },
36
+ s: Uint8Array,
37
+ recoveryId: bigint
38
+ }
39
+ },
40
+ mpcResponseKey_0: __compactRuntime.Secp256k1Point): boolean;
37
41
  }
38
42
 
39
43
  export type Circuits<PS> = {
@@ -43,21 +47,6 @@ export type Circuits<PS> = {
43
47
  requestsIndexField_0: bigint): Promise<__compactRuntime.CircuitResults<PS, { version: bigint,
44
48
  payload: Uint8Array
45
49
  }>>;
46
- signetAttestationDigest(context: __compactRuntime.CircuitContext<PS>,
47
- requestId_0: Uint8Array,
48
- serializedOutput_0: Uint8Array): Promise<__compactRuntime.CircuitResults<PS, Uint8Array>>;
49
- verifyRespondBidirectionalEvent(context: __compactRuntime.CircuitContext<PS>,
50
- requestId_0: Uint8Array,
51
- respondBidirectionalEvent_0: { serializedOutput: Uint8Array,
52
- outputLen: bigint,
53
- signature: { bigR: { x: Uint8Array,
54
- y: Uint8Array
55
- },
56
- s: Uint8Array,
57
- recoveryId: bigint
58
- }
59
- },
60
- mpcResponseKey_0: __compactRuntime.Secp256k1Point): Promise<__compactRuntime.CircuitResults<PS, boolean>>;
61
50
  signetKeyHash(context: __compactRuntime.CircuitContext<PS>,
62
51
  pk_0: __compactRuntime.Secp256k1Point): Promise<__compactRuntime.CircuitResults<PS, Uint8Array>>;
63
52
  evmAddressAbiWord(context: __compactRuntime.CircuitContext<PS>,
@@ -67,6 +56,27 @@ export type Circuits<PS> = {
67
56
  abiWordToUint128(context: __compactRuntime.CircuitContext<PS>,
68
57
  word_0: Uint8Array): Promise<__compactRuntime.CircuitResults<PS, bigint>>;
69
58
  abiWordToBool(context: __compactRuntime.CircuitContext<PS>, word_0: Uint8Array): Promise<__compactRuntime.CircuitResults<PS, boolean>>;
59
+ calculateSignetAttestationDigest1(context: __compactRuntime.CircuitContext<PS>,
60
+ requestId_0: Uint8Array,
61
+ serializedOutput_0: Uint8Array): Promise<__compactRuntime.CircuitResults<PS, Uint8Array>>;
62
+ calculateSignetAttestationDigest32(context: __compactRuntime.CircuitContext<PS>,
63
+ requestId_0: Uint8Array,
64
+ serializedOutput_0: Uint8Array): Promise<__compactRuntime.CircuitResults<PS, Uint8Array>>;
65
+ calculateSignetAttestationDigest100(context: __compactRuntime.CircuitContext<PS>,
66
+ requestId_0: Uint8Array,
67
+ serializedOutput_0: Uint8Array): Promise<__compactRuntime.CircuitResults<PS, Uint8Array>>;
68
+ verifyRespondBidirectionalEvent32(context: __compactRuntime.CircuitContext<PS>,
69
+ requestId_0: Uint8Array,
70
+ serializedOutput_0: Uint8Array,
71
+ respondBidirectionalEvent_0: { attestationDigest: Uint8Array,
72
+ signature: { bigR: { x: Uint8Array,
73
+ y: Uint8Array
74
+ },
75
+ s: Uint8Array,
76
+ recoveryId: bigint
77
+ }
78
+ },
79
+ mpcResponseKey_0: __compactRuntime.Secp256k1Point): Promise<__compactRuntime.CircuitResults<PS, boolean>>;
70
80
  }
71
81
 
72
82
  export type Ledger = {