@sig-net/midnight 0.24.0-rc.1 → 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.
- package/README.md +11 -8
- package/dist/compact-descriptors.d.ts +8 -6
- package/dist/compact-descriptors.d.ts.map +1 -1
- package/dist/compact-descriptors.js +18 -7
- package/dist/compact-descriptors.js.map +1 -1
- package/dist/constants.d.ts +2 -21
- package/dist/constants.d.ts.map +1 -1
- package/dist/constants.js +2 -24
- package/dist/constants.js.map +1 -1
- package/dist/ecdsa-attestation.d.ts +41 -13
- package/dist/ecdsa-attestation.d.ts.map +1 -1
- package/dist/ecdsa-attestation.js +44 -14
- package/dist/ecdsa-attestation.js.map +1 -1
- package/dist/index.d.ts +5 -5
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +4 -4
- package/dist/index.js.map +1 -1
- package/dist/managed/compiler/contract-info.json +258 -9
- package/dist/managed/compiler/contract-manifest.json +8 -8
- package/dist/managed/contract/index.d.ts +61 -7
- package/dist/managed/contract/index.js +357 -160
- package/dist/managed/contract/index.js.map +1 -1
- package/dist/mpc-output-cache.d.ts +5 -29
- package/dist/mpc-output-cache.d.ts.map +1 -1
- package/dist/mpc-output-cache.js +6 -40
- package/dist/mpc-output-cache.js.map +1 -1
- package/dist/signet-contract-events.d.ts +39 -9
- package/dist/signet-contract-events.d.ts.map +1 -1
- package/dist/signet-contract-events.js +79 -29
- package/dist/signet-contract-events.js.map +1 -1
- package/dist/signet-evtype2tx-record-decoding.js +2 -2
- package/dist/signet-evtype2tx-record-decoding.js.map +1 -1
- package/dist/signet-request-id.d.ts +2 -1
- package/dist/signet-request-id.d.ts.map +1 -1
- package/dist/signet-request-id.js +13 -3
- package/dist/signet-request-id.js.map +1 -1
- package/dist/signet-request-response-reader.d.ts +2 -4
- package/dist/signet-request-response-reader.d.ts.map +1 -1
- package/dist/signet-request-response-reader.js +7 -11
- package/dist/signet-request-response-reader.js.map +1 -1
- package/dist/signet-requests.d.ts +43 -8
- package/dist/signet-requests.d.ts.map +1 -1
- package/dist/signet-requests.js +23 -3
- package/dist/signet-requests.js.map +1 -1
- package/dist/testing.d.ts +1 -1
- package/dist/testing.d.ts.map +1 -1
- package/dist/testing.js +3 -8
- package/dist/testing.js.map +1 -1
- package/package.json +2 -2
- package/src/Signet.compact +107 -38
- package/src/circuits.compact +33 -11
|
@@ -1,232 +1,272 @@
|
|
|
1
1
|
import * as __compactRuntime from '@midnight-ntwrk/compact-runtime';
|
|
2
2
|
__compactRuntime.checkRuntimeVersion('0.18.0-rc.1');
|
|
3
3
|
|
|
4
|
-
|
|
4
|
+
export var OutputKind;
|
|
5
|
+
(function (OutputKind) {
|
|
6
|
+
OutputKind[OutputKind['executed'] = 0] = 'executed';
|
|
7
|
+
OutputKind[OutputKind['failed'] = 1] = 'failed';
|
|
8
|
+
OutputKind[OutputKind['unviable'] = 2] = 'unviable';
|
|
9
|
+
})(OutputKind || (OutputKind = {}));
|
|
5
10
|
|
|
6
|
-
const
|
|
11
|
+
const _descriptor_0 = new __compactRuntime.CompactTypeBytes(0);
|
|
7
12
|
|
|
8
|
-
const
|
|
13
|
+
const _descriptor_1 = new __compactRuntime.CompactTypeBytes(32);
|
|
14
|
+
|
|
15
|
+
const _descriptor_2 = new __compactRuntime.CompactTypeUnsignedInteger(18446744073709551615n, 8);
|
|
16
|
+
|
|
17
|
+
const _descriptor_3 = new __compactRuntime.CompactTypeEnum(2, 1);
|
|
9
18
|
|
|
10
19
|
class _AffinePoint_0 {
|
|
11
20
|
alignment() {
|
|
12
|
-
return
|
|
21
|
+
return _descriptor_1.alignment().concat(_descriptor_1.alignment());
|
|
13
22
|
}
|
|
14
23
|
fromValue(value_0) {
|
|
15
24
|
return {
|
|
16
|
-
x:
|
|
17
|
-
y:
|
|
25
|
+
x: _descriptor_1.fromValue(value_0),
|
|
26
|
+
y: _descriptor_1.fromValue(value_0)
|
|
18
27
|
}
|
|
19
28
|
}
|
|
20
29
|
toValue(value_0) {
|
|
21
|
-
return
|
|
30
|
+
return _descriptor_1.toValue(value_0.x).concat(_descriptor_1.toValue(value_0.y));
|
|
22
31
|
}
|
|
23
32
|
}
|
|
24
33
|
|
|
25
|
-
const
|
|
34
|
+
const _descriptor_4 = new _AffinePoint_0();
|
|
26
35
|
|
|
27
|
-
const
|
|
36
|
+
const _descriptor_5 = new __compactRuntime.CompactTypeUnsignedInteger(255n, 1);
|
|
28
37
|
|
|
29
38
|
class _Signature_0 {
|
|
30
39
|
alignment() {
|
|
31
|
-
return
|
|
40
|
+
return _descriptor_4.alignment().concat(_descriptor_1.alignment().concat(_descriptor_5.alignment()));
|
|
32
41
|
}
|
|
33
42
|
fromValue(value_0) {
|
|
34
43
|
return {
|
|
35
|
-
bigR:
|
|
36
|
-
s:
|
|
37
|
-
recoveryId:
|
|
44
|
+
bigR: _descriptor_4.fromValue(value_0),
|
|
45
|
+
s: _descriptor_1.fromValue(value_0),
|
|
46
|
+
recoveryId: _descriptor_5.fromValue(value_0)
|
|
38
47
|
}
|
|
39
48
|
}
|
|
40
49
|
toValue(value_0) {
|
|
41
|
-
return
|
|
50
|
+
return _descriptor_4.toValue(value_0.bigR).concat(_descriptor_1.toValue(value_0.s).concat(_descriptor_5.toValue(value_0.recoveryId)));
|
|
42
51
|
}
|
|
43
52
|
}
|
|
44
53
|
|
|
45
|
-
const
|
|
54
|
+
const _descriptor_6 = new _Signature_0();
|
|
46
55
|
|
|
47
56
|
class _RespondBidirectionalEvent_0 {
|
|
48
57
|
alignment() {
|
|
49
|
-
return
|
|
58
|
+
return _descriptor_1.alignment().concat(_descriptor_2.alignment().concat(_descriptor_3.alignment().concat(_descriptor_2.alignment().concat(_descriptor_1.alignment().concat(_descriptor_6.alignment())))));
|
|
50
59
|
}
|
|
51
60
|
fromValue(value_0) {
|
|
52
61
|
return {
|
|
53
|
-
|
|
62
|
+
requestId: _descriptor_1.fromValue(value_0),
|
|
63
|
+
blockHeight: _descriptor_2.fromValue(value_0),
|
|
64
|
+
outputKind: _descriptor_3.fromValue(value_0),
|
|
65
|
+
serializedOutputLength: _descriptor_2.fromValue(value_0),
|
|
66
|
+
digest: _descriptor_1.fromValue(value_0),
|
|
67
|
+
signature: _descriptor_6.fromValue(value_0)
|
|
54
68
|
}
|
|
55
69
|
}
|
|
56
70
|
toValue(value_0) {
|
|
57
|
-
return
|
|
71
|
+
return _descriptor_1.toValue(value_0.requestId).concat(_descriptor_2.toValue(value_0.blockHeight).concat(_descriptor_3.toValue(value_0.outputKind).concat(_descriptor_2.toValue(value_0.serializedOutputLength).concat(_descriptor_1.toValue(value_0.digest).concat(_descriptor_6.toValue(value_0.signature))))));
|
|
58
72
|
}
|
|
59
73
|
}
|
|
60
74
|
|
|
61
|
-
const
|
|
75
|
+
const _descriptor_7 = new _RespondBidirectionalEvent_0();
|
|
76
|
+
|
|
77
|
+
const _descriptor_8 = __compactRuntime.CompactTypeSecp256k1Point;
|
|
62
78
|
|
|
63
|
-
const
|
|
79
|
+
const _descriptor_9 = __compactRuntime.CompactTypeBoolean;
|
|
64
80
|
|
|
65
|
-
const
|
|
81
|
+
const _descriptor_10 = new __compactRuntime.CompactTypeBytes(100);
|
|
66
82
|
|
|
67
|
-
const
|
|
83
|
+
const _descriptor_11 = new __compactRuntime.CompactTypeBytes(1);
|
|
68
84
|
|
|
69
|
-
const
|
|
85
|
+
const _descriptor_12 = new __compactRuntime.CompactTypeBytes(2);
|
|
70
86
|
|
|
71
|
-
const
|
|
87
|
+
const _descriptor_13 = new __compactRuntime.CompactTypeUnsignedInteger(340282366920938463463374607431768211455n, 16);
|
|
72
88
|
|
|
73
|
-
const
|
|
89
|
+
const _descriptor_14 = new __compactRuntime.CompactTypeBytes(20);
|
|
74
90
|
|
|
75
|
-
const
|
|
91
|
+
const _descriptor_15 = __compactRuntime.CompactTypeSecp256k1Scalar;
|
|
76
92
|
|
|
77
93
|
class _ContractAddress_0 {
|
|
78
94
|
alignment() {
|
|
79
|
-
return
|
|
95
|
+
return _descriptor_1.alignment();
|
|
80
96
|
}
|
|
81
97
|
fromValue(value_0) {
|
|
82
98
|
return {
|
|
83
|
-
bytes:
|
|
99
|
+
bytes: _descriptor_1.fromValue(value_0)
|
|
84
100
|
}
|
|
85
101
|
}
|
|
86
102
|
toValue(value_0) {
|
|
87
|
-
return
|
|
103
|
+
return _descriptor_1.toValue(value_0.bytes);
|
|
88
104
|
}
|
|
89
105
|
}
|
|
90
106
|
|
|
91
|
-
const
|
|
107
|
+
const _descriptor_16 = new _ContractAddress_0();
|
|
92
108
|
|
|
93
|
-
const
|
|
109
|
+
const _descriptor_17 = new __compactRuntime.CompactTypeVector(4, _descriptor_5);
|
|
94
110
|
|
|
95
|
-
const
|
|
111
|
+
const _descriptor_18 = new __compactRuntime.CompactTypeBytes(128);
|
|
96
112
|
|
|
97
113
|
class _SignBidirectionalEventNotification_0 {
|
|
98
114
|
alignment() {
|
|
99
|
-
return
|
|
115
|
+
return _descriptor_5.alignment().concat(_descriptor_18.alignment());
|
|
100
116
|
}
|
|
101
117
|
fromValue(value_0) {
|
|
102
118
|
return {
|
|
103
|
-
version:
|
|
104
|
-
payload:
|
|
119
|
+
version: _descriptor_5.fromValue(value_0),
|
|
120
|
+
payload: _descriptor_18.fromValue(value_0)
|
|
105
121
|
}
|
|
106
122
|
}
|
|
107
123
|
toValue(value_0) {
|
|
108
|
-
return
|
|
124
|
+
return _descriptor_5.toValue(value_0.version).concat(_descriptor_18.toValue(value_0.payload));
|
|
109
125
|
}
|
|
110
126
|
}
|
|
111
127
|
|
|
112
|
-
const
|
|
128
|
+
const _descriptor_19 = new _SignBidirectionalEventNotification_0();
|
|
113
129
|
|
|
114
|
-
const
|
|
130
|
+
const _descriptor_20 = __compactRuntime.CompactTypeSecp256k1Base;
|
|
115
131
|
|
|
116
|
-
const
|
|
132
|
+
const _descriptor_21 = __compactRuntime.CompactTypeField;
|
|
117
133
|
|
|
118
134
|
class _tuple_0 {
|
|
119
135
|
alignment() {
|
|
120
|
-
return
|
|
136
|
+
return _descriptor_1.alignment().concat(_descriptor_2.alignment().concat(_descriptor_3.alignment().concat(_descriptor_2.alignment().concat(_descriptor_0.alignment()))));
|
|
121
137
|
}
|
|
122
138
|
fromValue(value_0) {
|
|
123
139
|
return [
|
|
124
|
-
_descriptor_0.fromValue(value_0),
|
|
125
140
|
_descriptor_1.fromValue(value_0),
|
|
126
|
-
|
|
127
|
-
|
|
141
|
+
_descriptor_2.fromValue(value_0),
|
|
142
|
+
_descriptor_3.fromValue(value_0),
|
|
143
|
+
_descriptor_2.fromValue(value_0),
|
|
144
|
+
_descriptor_0.fromValue(value_0)
|
|
128
145
|
]
|
|
129
146
|
}
|
|
130
147
|
toValue(value_0) {
|
|
131
|
-
return
|
|
148
|
+
return _descriptor_1.toValue(value_0[0]).concat(_descriptor_2.toValue(value_0[1]).concat(_descriptor_3.toValue(value_0[2]).concat(_descriptor_2.toValue(value_0[3]).concat(_descriptor_0.toValue(value_0[4])))));
|
|
132
149
|
}
|
|
133
150
|
}
|
|
134
151
|
|
|
135
|
-
const
|
|
152
|
+
const _descriptor_22 = new _tuple_0();
|
|
136
153
|
|
|
137
154
|
class _tuple_1 {
|
|
138
155
|
alignment() {
|
|
139
|
-
return
|
|
156
|
+
return _descriptor_1.alignment().concat(_descriptor_2.alignment().concat(_descriptor_3.alignment().concat(_descriptor_2.alignment().concat(_descriptor_1.alignment()))));
|
|
140
157
|
}
|
|
141
158
|
fromValue(value_0) {
|
|
142
159
|
return [
|
|
143
|
-
_descriptor_0.fromValue(value_0),
|
|
144
160
|
_descriptor_1.fromValue(value_0),
|
|
145
|
-
|
|
146
|
-
|
|
161
|
+
_descriptor_2.fromValue(value_0),
|
|
162
|
+
_descriptor_3.fromValue(value_0),
|
|
163
|
+
_descriptor_2.fromValue(value_0),
|
|
164
|
+
_descriptor_1.fromValue(value_0)
|
|
147
165
|
]
|
|
148
166
|
}
|
|
149
167
|
toValue(value_0) {
|
|
150
|
-
return
|
|
168
|
+
return _descriptor_1.toValue(value_0[0]).concat(_descriptor_2.toValue(value_0[1]).concat(_descriptor_3.toValue(value_0[2]).concat(_descriptor_2.toValue(value_0[3]).concat(_descriptor_1.toValue(value_0[4])))));
|
|
151
169
|
}
|
|
152
170
|
}
|
|
153
171
|
|
|
154
|
-
const
|
|
172
|
+
const _descriptor_23 = new _tuple_1();
|
|
155
173
|
|
|
156
174
|
class _tuple_2 {
|
|
157
175
|
alignment() {
|
|
158
|
-
return
|
|
176
|
+
return _descriptor_1.alignment().concat(_descriptor_2.alignment().concat(_descriptor_3.alignment().concat(_descriptor_2.alignment().concat(_descriptor_12.alignment()))));
|
|
159
177
|
}
|
|
160
178
|
fromValue(value_0) {
|
|
161
179
|
return [
|
|
162
|
-
_descriptor_0.fromValue(value_0),
|
|
163
180
|
_descriptor_1.fromValue(value_0),
|
|
164
|
-
|
|
165
|
-
|
|
181
|
+
_descriptor_2.fromValue(value_0),
|
|
182
|
+
_descriptor_3.fromValue(value_0),
|
|
183
|
+
_descriptor_2.fromValue(value_0),
|
|
184
|
+
_descriptor_12.fromValue(value_0)
|
|
166
185
|
]
|
|
167
186
|
}
|
|
168
187
|
toValue(value_0) {
|
|
169
|
-
return
|
|
188
|
+
return _descriptor_1.toValue(value_0[0]).concat(_descriptor_2.toValue(value_0[1]).concat(_descriptor_3.toValue(value_0[2]).concat(_descriptor_2.toValue(value_0[3]).concat(_descriptor_12.toValue(value_0[4])))));
|
|
170
189
|
}
|
|
171
190
|
}
|
|
172
191
|
|
|
173
|
-
const
|
|
192
|
+
const _descriptor_24 = new _tuple_2();
|
|
174
193
|
|
|
175
194
|
class _tuple_3 {
|
|
176
195
|
alignment() {
|
|
177
|
-
return
|
|
196
|
+
return _descriptor_1.alignment().concat(_descriptor_2.alignment().concat(_descriptor_3.alignment().concat(_descriptor_2.alignment().concat(_descriptor_10.alignment()))));
|
|
178
197
|
}
|
|
179
198
|
fromValue(value_0) {
|
|
180
199
|
return [
|
|
181
|
-
_descriptor_0.fromValue(value_0),
|
|
182
200
|
_descriptor_1.fromValue(value_0),
|
|
183
|
-
|
|
184
|
-
|
|
201
|
+
_descriptor_2.fromValue(value_0),
|
|
202
|
+
_descriptor_3.fromValue(value_0),
|
|
203
|
+
_descriptor_2.fromValue(value_0),
|
|
204
|
+
_descriptor_10.fromValue(value_0)
|
|
185
205
|
]
|
|
186
206
|
}
|
|
187
207
|
toValue(value_0) {
|
|
188
|
-
return
|
|
208
|
+
return _descriptor_1.toValue(value_0[0]).concat(_descriptor_2.toValue(value_0[1]).concat(_descriptor_3.toValue(value_0[2]).concat(_descriptor_2.toValue(value_0[3]).concat(_descriptor_10.toValue(value_0[4])))));
|
|
189
209
|
}
|
|
190
210
|
}
|
|
191
211
|
|
|
192
|
-
const
|
|
212
|
+
const _descriptor_25 = new _tuple_3();
|
|
193
213
|
|
|
194
214
|
class _Secp256k1EcdsaSignature_0 {
|
|
195
215
|
alignment() {
|
|
196
|
-
return
|
|
216
|
+
return _descriptor_15.alignment().concat(_descriptor_15.alignment());
|
|
197
217
|
}
|
|
198
218
|
fromValue(value_0) {
|
|
199
219
|
return {
|
|
200
|
-
r:
|
|
201
|
-
s:
|
|
220
|
+
r: _descriptor_15.fromValue(value_0),
|
|
221
|
+
s: _descriptor_15.fromValue(value_0)
|
|
202
222
|
}
|
|
203
223
|
}
|
|
204
224
|
toValue(value_0) {
|
|
205
|
-
return
|
|
225
|
+
return _descriptor_15.toValue(value_0.r).concat(_descriptor_15.toValue(value_0.s));
|
|
226
|
+
}
|
|
227
|
+
}
|
|
228
|
+
|
|
229
|
+
const _descriptor_26 = new _Secp256k1EcdsaSignature_0();
|
|
230
|
+
|
|
231
|
+
class _tuple_4 {
|
|
232
|
+
alignment() {
|
|
233
|
+
return _descriptor_1.alignment().concat(_descriptor_2.alignment().concat(_descriptor_3.alignment().concat(_descriptor_2.alignment().concat(_descriptor_11.alignment()))));
|
|
234
|
+
}
|
|
235
|
+
fromValue(value_0) {
|
|
236
|
+
return [
|
|
237
|
+
_descriptor_1.fromValue(value_0),
|
|
238
|
+
_descriptor_2.fromValue(value_0),
|
|
239
|
+
_descriptor_3.fromValue(value_0),
|
|
240
|
+
_descriptor_2.fromValue(value_0),
|
|
241
|
+
_descriptor_11.fromValue(value_0)
|
|
242
|
+
]
|
|
243
|
+
}
|
|
244
|
+
toValue(value_0) {
|
|
245
|
+
return _descriptor_1.toValue(value_0[0]).concat(_descriptor_2.toValue(value_0[1]).concat(_descriptor_3.toValue(value_0[2]).concat(_descriptor_2.toValue(value_0[3]).concat(_descriptor_11.toValue(value_0[4])))));
|
|
206
246
|
}
|
|
207
247
|
}
|
|
208
248
|
|
|
209
|
-
const
|
|
249
|
+
const _descriptor_27 = new _tuple_4();
|
|
210
250
|
|
|
211
251
|
class _Either_0 {
|
|
212
252
|
alignment() {
|
|
213
|
-
return
|
|
253
|
+
return _descriptor_9.alignment().concat(_descriptor_1.alignment().concat(_descriptor_1.alignment()));
|
|
214
254
|
}
|
|
215
255
|
fromValue(value_0) {
|
|
216
256
|
return {
|
|
217
|
-
is_left:
|
|
218
|
-
left:
|
|
219
|
-
right:
|
|
257
|
+
is_left: _descriptor_9.fromValue(value_0),
|
|
258
|
+
left: _descriptor_1.fromValue(value_0),
|
|
259
|
+
right: _descriptor_1.fromValue(value_0)
|
|
220
260
|
}
|
|
221
261
|
}
|
|
222
262
|
toValue(value_0) {
|
|
223
|
-
return
|
|
263
|
+
return _descriptor_9.toValue(value_0.is_left).concat(_descriptor_1.toValue(value_0.left).concat(_descriptor_1.toValue(value_0.right)));
|
|
224
264
|
}
|
|
225
265
|
}
|
|
226
266
|
|
|
227
|
-
const
|
|
267
|
+
const _descriptor_28 = new _Either_0();
|
|
228
268
|
|
|
229
|
-
const
|
|
269
|
+
const _descriptor_29 = new __compactRuntime.CompactTypeUnsignedInteger(4294967295n, 4);
|
|
230
270
|
|
|
231
271
|
export class Contract {
|
|
232
272
|
witnesses;
|
|
@@ -261,6 +301,9 @@ export class Contract {
|
|
|
261
301
|
async abiWordToBool(context, ...args_1) {
|
|
262
302
|
return { result: pureCircuits.abiWordToBool(...args_1), context };
|
|
263
303
|
},
|
|
304
|
+
async calculateSignetAttestationDigest0(context, ...args_1) {
|
|
305
|
+
return { result: pureCircuits.calculateSignetAttestationDigest0(...args_1), context };
|
|
306
|
+
},
|
|
264
307
|
async calculateSignetAttestationDigest1(context, ...args_1) {
|
|
265
308
|
return { result: pureCircuits.calculateSignetAttestationDigest1(...args_1), context };
|
|
266
309
|
},
|
|
@@ -273,6 +316,9 @@ export class Contract {
|
|
|
273
316
|
async calculateSignetAttestationDigest100(context, ...args_1) {
|
|
274
317
|
return { result: pureCircuits.calculateSignetAttestationDigest100(...args_1), context };
|
|
275
318
|
},
|
|
319
|
+
async verifyRespondBidirectionalEvent0(context, ...args_1) {
|
|
320
|
+
return { result: pureCircuits.verifyRespondBidirectionalEvent0(...args_1), context };
|
|
321
|
+
},
|
|
276
322
|
async verifyRespondBidirectionalEvent32(context, ...args_1) {
|
|
277
323
|
return { result: pureCircuits.verifyRespondBidirectionalEvent32(...args_1), context };
|
|
278
324
|
}
|
|
@@ -373,19 +419,23 @@ export class Contract {
|
|
|
373
419
|
r_0;
|
|
374
420
|
}
|
|
375
421
|
_transientHash_0(value_0) {
|
|
376
|
-
const result_0 = __compactRuntime.transientHash(
|
|
422
|
+
const result_0 = __compactRuntime.transientHash(_descriptor_27, value_0);
|
|
377
423
|
return result_0;
|
|
378
424
|
}
|
|
379
425
|
_transientHash_1(value_0) {
|
|
380
|
-
const result_0 = __compactRuntime.transientHash(
|
|
426
|
+
const result_0 = __compactRuntime.transientHash(_descriptor_24, value_0);
|
|
381
427
|
return result_0;
|
|
382
428
|
}
|
|
383
429
|
_transientHash_2(value_0) {
|
|
384
|
-
const result_0 = __compactRuntime.transientHash(
|
|
430
|
+
const result_0 = __compactRuntime.transientHash(_descriptor_25, value_0);
|
|
385
431
|
return result_0;
|
|
386
432
|
}
|
|
387
433
|
_transientHash_3(value_0) {
|
|
388
|
-
const result_0 = __compactRuntime.transientHash(
|
|
434
|
+
const result_0 = __compactRuntime.transientHash(_descriptor_22, value_0);
|
|
435
|
+
return result_0;
|
|
436
|
+
}
|
|
437
|
+
_transientHash_4(value_0) {
|
|
438
|
+
const result_0 = __compactRuntime.transientHash(_descriptor_23, value_0);
|
|
389
439
|
return result_0;
|
|
390
440
|
}
|
|
391
441
|
_upgradeFromTransient_0(x_0) {
|
|
@@ -433,48 +483,89 @@ export class Contract {
|
|
|
433
483
|
}
|
|
434
484
|
_calculateSignetAttestationDigest_0(requestId_0,
|
|
435
485
|
blockHeight_0,
|
|
486
|
+
outputKind_0,
|
|
436
487
|
serializedOutput_0)
|
|
437
488
|
{
|
|
438
489
|
return this._upgradeFromTransient_0(this._transientHash_0([requestId_0,
|
|
439
490
|
blockHeight_0,
|
|
491
|
+
outputKind_0,
|
|
440
492
|
1n,
|
|
441
493
|
serializedOutput_0]));
|
|
442
494
|
}
|
|
443
495
|
_calculateSignetAttestationDigest_1(requestId_0,
|
|
444
496
|
blockHeight_0,
|
|
497
|
+
outputKind_0,
|
|
445
498
|
serializedOutput_0)
|
|
446
499
|
{
|
|
447
500
|
return this._upgradeFromTransient_0(this._transientHash_1([requestId_0,
|
|
448
501
|
blockHeight_0,
|
|
502
|
+
outputKind_0,
|
|
449
503
|
2n,
|
|
450
504
|
serializedOutput_0]));
|
|
451
505
|
}
|
|
452
506
|
_calculateSignetAttestationDigest_2(requestId_0,
|
|
453
507
|
blockHeight_0,
|
|
508
|
+
outputKind_0,
|
|
454
509
|
serializedOutput_0)
|
|
455
510
|
{
|
|
456
511
|
return this._upgradeFromTransient_0(this._transientHash_2([requestId_0,
|
|
457
512
|
blockHeight_0,
|
|
513
|
+
outputKind_0,
|
|
458
514
|
100n,
|
|
459
515
|
serializedOutput_0]));
|
|
460
516
|
}
|
|
461
517
|
_calculateSignetAttestationDigest_3(requestId_0,
|
|
462
518
|
blockHeight_0,
|
|
519
|
+
outputKind_0,
|
|
463
520
|
serializedOutput_0)
|
|
464
521
|
{
|
|
465
522
|
return this._upgradeFromTransient_0(this._transientHash_3([requestId_0,
|
|
466
523
|
blockHeight_0,
|
|
524
|
+
outputKind_0,
|
|
525
|
+
0n,
|
|
526
|
+
serializedOutput_0]));
|
|
527
|
+
}
|
|
528
|
+
_calculateSignetAttestationDigest_4(requestId_0,
|
|
529
|
+
blockHeight_0,
|
|
530
|
+
outputKind_0,
|
|
531
|
+
serializedOutput_0)
|
|
532
|
+
{
|
|
533
|
+
return this._upgradeFromTransient_0(this._transientHash_4([requestId_0,
|
|
534
|
+
blockHeight_0,
|
|
535
|
+
outputKind_0,
|
|
467
536
|
32n,
|
|
468
537
|
serializedOutput_0]));
|
|
469
538
|
}
|
|
470
|
-
_verifyRespondBidirectionalEvent_0(
|
|
471
|
-
|
|
472
|
-
|
|
539
|
+
_verifyRespondBidirectionalEvent_0(serializedOutput_0,
|
|
540
|
+
respondBidirectionalEvent_0,
|
|
541
|
+
mpcResponseKey_0)
|
|
542
|
+
{
|
|
543
|
+
const digest_0 = this._calculateSignetAttestationDigest_3(respondBidirectionalEvent_0.requestId,
|
|
544
|
+
respondBidirectionalEvent_0.blockHeight,
|
|
545
|
+
respondBidirectionalEvent_0.outputKind,
|
|
546
|
+
serializedOutput_0);
|
|
547
|
+
return this._secp256k1EcdsaVerify_0(digest_0,
|
|
548
|
+
{ r:
|
|
549
|
+
__compactRuntime.convertBytesToField(115792089237316195423570985008687907852837564279074904382605163141518161494336n,
|
|
550
|
+
32,
|
|
551
|
+
respondBidirectionalEvent_0.signature.bigR.x,
|
|
552
|
+
'Secp256k1Scalar',
|
|
553
|
+
'Signet.compact line 415 char 12'),
|
|
554
|
+
s:
|
|
555
|
+
__compactRuntime.convertBytesToField(115792089237316195423570985008687907852837564279074904382605163141518161494336n,
|
|
556
|
+
32,
|
|
557
|
+
respondBidirectionalEvent_0.signature.s,
|
|
558
|
+
'Secp256k1Scalar',
|
|
559
|
+
'Signet.compact line 416 char 12') },
|
|
560
|
+
mpcResponseKey_0);
|
|
561
|
+
}
|
|
562
|
+
_verifyRespondBidirectionalEvent_1(serializedOutput_0,
|
|
473
563
|
respondBidirectionalEvent_0,
|
|
474
564
|
mpcResponseKey_0)
|
|
475
565
|
{
|
|
476
|
-
const digest_0 = this.
|
|
477
|
-
|
|
566
|
+
const digest_0 = this._calculateSignetAttestationDigest_4(respondBidirectionalEvent_0.requestId,
|
|
567
|
+
respondBidirectionalEvent_0.blockHeight,
|
|
568
|
+
respondBidirectionalEvent_0.outputKind,
|
|
478
569
|
serializedOutput_0);
|
|
479
570
|
return this._secp256k1EcdsaVerify_0(digest_0,
|
|
480
571
|
{ r:
|
|
@@ -482,13 +573,13 @@ export class Contract {
|
|
|
482
573
|
32,
|
|
483
574
|
respondBidirectionalEvent_0.signature.bigR.x,
|
|
484
575
|
'Secp256k1Scalar',
|
|
485
|
-
'Signet.compact line
|
|
576
|
+
'Signet.compact line 415 char 12'),
|
|
486
577
|
s:
|
|
487
578
|
__compactRuntime.convertBytesToField(115792089237316195423570985008687907852837564279074904382605163141518161494336n,
|
|
488
579
|
32,
|
|
489
580
|
respondBidirectionalEvent_0.signature.s,
|
|
490
581
|
'Secp256k1Scalar',
|
|
491
|
-
'Signet.compact line
|
|
582
|
+
'Signet.compact line 416 char 12') },
|
|
492
583
|
mpcResponseKey_0);
|
|
493
584
|
}
|
|
494
585
|
_ethereumCaip2Id_0() {
|
|
@@ -502,7 +593,7 @@ export class Contract {
|
|
|
502
593
|
_numericAbiWord_0(value_0) {
|
|
503
594
|
const le_0 = Array.from(__compactRuntime.convertBigintToBytes(16,
|
|
504
595
|
value_0,
|
|
505
|
-
'Signet.compact line
|
|
596
|
+
'Signet.compact line 505 char 17'),
|
|
506
597
|
BigInt);
|
|
507
598
|
return Uint8Array.from([...Array.from(new Uint8Array(16), BigInt),
|
|
508
599
|
le_0[15],
|
|
@@ -584,7 +675,7 @@ export class Contract {
|
|
|
584
675
|
v_0[31]);
|
|
585
676
|
return ((t1) => {
|
|
586
677
|
if (t1 > 340282366920938463463374607431768211455n) {
|
|
587
|
-
throw new __compactRuntime.CompactError('Signet.compact line
|
|
678
|
+
throw new __compactRuntime.CompactError('Signet.compact line 557 char 12: cast from Field or Uint value to smaller Uint value failed: ' + t1 + ' is greater than 340282366920938463463374607431768211455');
|
|
588
679
|
}
|
|
589
680
|
return t1;
|
|
590
681
|
})(b15_0);
|
|
@@ -595,7 +686,7 @@ export class Contract {
|
|
|
595
686
|
((e, i) => e.slice(i, i+31))(word_0,
|
|
596
687
|
Number(0n)),
|
|
597
688
|
'Field',
|
|
598
|
-
'Signet.compact line
|
|
689
|
+
'Signet.compact line 563 char 12')
|
|
599
690
|
===
|
|
600
691
|
0n,
|
|
601
692
|
'ABI word is not a canonical Boolean');
|
|
@@ -604,52 +695,74 @@ export class Contract {
|
|
|
604
695
|
((e, i) => e.slice(i, i+1))(word_0,
|
|
605
696
|
Number(31n)),
|
|
606
697
|
'Field',
|
|
607
|
-
'Signet.compact line
|
|
698
|
+
'Signet.compact line 564 char 18');
|
|
608
699
|
__compactRuntime.assert(last_0 === 0n || last_0 === 1n,
|
|
609
700
|
'ABI word is not a canonical Boolean');
|
|
610
701
|
return last_0 === 1n;
|
|
611
702
|
}
|
|
703
|
+
_calculateSignetAttestationDigest0_0(requestId_0,
|
|
704
|
+
blockHeight_0,
|
|
705
|
+
outputKind_0,
|
|
706
|
+
serializedOutput_0)
|
|
707
|
+
{
|
|
708
|
+
return this._calculateSignetAttestationDigest_3(requestId_0,
|
|
709
|
+
blockHeight_0,
|
|
710
|
+
outputKind_0,
|
|
711
|
+
serializedOutput_0);
|
|
712
|
+
}
|
|
612
713
|
_calculateSignetAttestationDigest1_0(requestId_0,
|
|
613
714
|
blockHeight_0,
|
|
715
|
+
outputKind_0,
|
|
614
716
|
serializedOutput_0)
|
|
615
717
|
{
|
|
616
718
|
return this._calculateSignetAttestationDigest_0(requestId_0,
|
|
617
719
|
blockHeight_0,
|
|
720
|
+
outputKind_0,
|
|
618
721
|
serializedOutput_0);
|
|
619
722
|
}
|
|
620
723
|
_calculateSignetAttestationDigest2_0(requestId_0,
|
|
621
724
|
blockHeight_0,
|
|
725
|
+
outputKind_0,
|
|
622
726
|
serializedOutput_0)
|
|
623
727
|
{
|
|
624
728
|
return this._calculateSignetAttestationDigest_1(requestId_0,
|
|
625
729
|
blockHeight_0,
|
|
730
|
+
outputKind_0,
|
|
626
731
|
serializedOutput_0);
|
|
627
732
|
}
|
|
628
733
|
_calculateSignetAttestationDigest32_0(requestId_0,
|
|
629
734
|
blockHeight_0,
|
|
735
|
+
outputKind_0,
|
|
630
736
|
serializedOutput_0)
|
|
631
737
|
{
|
|
632
|
-
return this.
|
|
738
|
+
return this._calculateSignetAttestationDigest_4(requestId_0,
|
|
633
739
|
blockHeight_0,
|
|
740
|
+
outputKind_0,
|
|
634
741
|
serializedOutput_0);
|
|
635
742
|
}
|
|
636
743
|
_calculateSignetAttestationDigest100_0(requestId_0,
|
|
637
744
|
blockHeight_0,
|
|
745
|
+
outputKind_0,
|
|
638
746
|
serializedOutput_0)
|
|
639
747
|
{
|
|
640
748
|
return this._calculateSignetAttestationDigest_2(requestId_0,
|
|
641
749
|
blockHeight_0,
|
|
750
|
+
outputKind_0,
|
|
642
751
|
serializedOutput_0);
|
|
643
752
|
}
|
|
644
|
-
|
|
645
|
-
|
|
646
|
-
|
|
753
|
+
_verifyRespondBidirectionalEvent0_0(serializedOutput_0,
|
|
754
|
+
respondBidirectionalEvent_0,
|
|
755
|
+
mpcResponseKey_0)
|
|
756
|
+
{
|
|
757
|
+
return this._verifyRespondBidirectionalEvent_0(serializedOutput_0,
|
|
758
|
+
respondBidirectionalEvent_0,
|
|
759
|
+
mpcResponseKey_0);
|
|
760
|
+
}
|
|
761
|
+
_verifyRespondBidirectionalEvent32_0(serializedOutput_0,
|
|
647
762
|
respondBidirectionalEvent_0,
|
|
648
763
|
mpcResponseKey_0)
|
|
649
764
|
{
|
|
650
|
-
return this.
|
|
651
|
-
blockHeight_0,
|
|
652
|
-
serializedOutput_0,
|
|
765
|
+
return this._verifyRespondBidirectionalEvent_1(serializedOutput_0,
|
|
653
766
|
respondBidirectionalEvent_0,
|
|
654
767
|
mpcResponseKey_0);
|
|
655
768
|
}
|
|
@@ -685,21 +798,21 @@ export const pureCircuits = {
|
|
|
685
798
|
if (!(typeof(callerAddress_0) === 'object' && callerAddress_0.bytes.buffer instanceof ArrayBuffer && callerAddress_0.bytes.BYTES_PER_ELEMENT === 1 && callerAddress_0.bytes.length === 32)) {
|
|
686
799
|
__compactRuntime.typeError('constructSignBidirectionalEventNotificationV1',
|
|
687
800
|
'argument 1',
|
|
688
|
-
'Signet.compact line
|
|
801
|
+
'Signet.compact line 268 char 3',
|
|
689
802
|
'struct ContractAddress<bytes: Bytes<32>>',
|
|
690
803
|
callerAddress_0)
|
|
691
804
|
}
|
|
692
805
|
if (!(typeof(requestsPathDepth_0) === 'bigint' && requestsPathDepth_0 >= 0n && requestsPathDepth_0 <= 255n)) {
|
|
693
806
|
__compactRuntime.typeError('constructSignBidirectionalEventNotificationV1',
|
|
694
807
|
'argument 2',
|
|
695
|
-
'Signet.compact line
|
|
808
|
+
'Signet.compact line 268 char 3',
|
|
696
809
|
'Uint<0..256>',
|
|
697
810
|
requestsPathDepth_0)
|
|
698
811
|
}
|
|
699
812
|
if (!(Array.isArray(requestsPath_0) && requestsPath_0.length === 4 && requestsPath_0.every((t) => typeof(t) === 'bigint' && t >= 0n && t <= 255n))) {
|
|
700
813
|
__compactRuntime.typeError('constructSignBidirectionalEventNotificationV1',
|
|
701
814
|
'argument 3',
|
|
702
|
-
'Signet.compact line
|
|
815
|
+
'Signet.compact line 268 char 3',
|
|
703
816
|
'Vector<4, Uint<0..256>>',
|
|
704
817
|
requestsPath_0)
|
|
705
818
|
}
|
|
@@ -721,7 +834,7 @@ export const pureCircuits = {
|
|
|
721
834
|
if (!(addr_0.buffer instanceof ArrayBuffer && addr_0.BYTES_PER_ELEMENT === 1 && addr_0.length === 20)) {
|
|
722
835
|
__compactRuntime.typeError('evmAddressAbiWord',
|
|
723
836
|
'argument 1',
|
|
724
|
-
'Signet.compact line
|
|
837
|
+
'Signet.compact line 496 char 3',
|
|
725
838
|
'Bytes<20>',
|
|
726
839
|
addr_0)
|
|
727
840
|
}
|
|
@@ -735,7 +848,7 @@ export const pureCircuits = {
|
|
|
735
848
|
if (!(typeof(value_0) === 'bigint' && value_0 >= 0n && value_0 <= 340282366920938463463374607431768211455n)) {
|
|
736
849
|
__compactRuntime.typeError('numericAbiWord',
|
|
737
850
|
'argument 1',
|
|
738
|
-
'Signet.compact line
|
|
851
|
+
'Signet.compact line 502 char 3',
|
|
739
852
|
'Uint<0..340282366920938463463374607431768211456>',
|
|
740
853
|
value_0)
|
|
741
854
|
}
|
|
@@ -749,7 +862,7 @@ export const pureCircuits = {
|
|
|
749
862
|
if (!(typeof(value_0) === 'boolean')) {
|
|
750
863
|
__compactRuntime.typeError('boolAbiWord',
|
|
751
864
|
'argument 1',
|
|
752
|
-
'Signet.compact line
|
|
865
|
+
'Signet.compact line 515 char 3',
|
|
753
866
|
'Boolean',
|
|
754
867
|
value_0)
|
|
755
868
|
}
|
|
@@ -763,7 +876,7 @@ export const pureCircuits = {
|
|
|
763
876
|
if (!(word_0.buffer instanceof ArrayBuffer && word_0.BYTES_PER_ELEMENT === 1 && word_0.length === 32)) {
|
|
764
877
|
__compactRuntime.typeError('abiWordToUint128',
|
|
765
878
|
'argument 1',
|
|
766
|
-
'Signet.compact line
|
|
879
|
+
'Signet.compact line 523 char 3',
|
|
767
880
|
'Bytes<32>',
|
|
768
881
|
word_0)
|
|
769
882
|
}
|
|
@@ -777,180 +890,264 @@ export const pureCircuits = {
|
|
|
777
890
|
if (!(word_0.buffer instanceof ArrayBuffer && word_0.BYTES_PER_ELEMENT === 1 && word_0.length === 32)) {
|
|
778
891
|
__compactRuntime.typeError('abiWordToBool',
|
|
779
892
|
'argument 1',
|
|
780
|
-
'Signet.compact line
|
|
893
|
+
'Signet.compact line 562 char 3',
|
|
781
894
|
'Bytes<32>',
|
|
782
895
|
word_0)
|
|
783
896
|
}
|
|
784
897
|
return _dummyContract._abiWordToBool_0(word_0);
|
|
785
898
|
},
|
|
899
|
+
calculateSignetAttestationDigest0: (...args_0) => {
|
|
900
|
+
if (args_0.length !== 4) {
|
|
901
|
+
throw new __compactRuntime.CompactError(`calculateSignetAttestationDigest0: expected 4 arguments (as invoked from Typescript), received ${args_0.length}`);
|
|
902
|
+
}
|
|
903
|
+
const requestId_0 = args_0[0];
|
|
904
|
+
const blockHeight_0 = args_0[1];
|
|
905
|
+
const outputKind_0 = args_0[2];
|
|
906
|
+
const serializedOutput_0 = args_0[3];
|
|
907
|
+
if (!(requestId_0.buffer instanceof ArrayBuffer && requestId_0.BYTES_PER_ELEMENT === 1 && requestId_0.length === 32)) {
|
|
908
|
+
__compactRuntime.typeError('calculateSignetAttestationDigest0',
|
|
909
|
+
'argument 1',
|
|
910
|
+
'circuits.compact line 29 char 1',
|
|
911
|
+
'Bytes<32>',
|
|
912
|
+
requestId_0)
|
|
913
|
+
}
|
|
914
|
+
if (!(typeof(blockHeight_0) === 'bigint' && blockHeight_0 >= 0n && blockHeight_0 <= 18446744073709551615n)) {
|
|
915
|
+
__compactRuntime.typeError('calculateSignetAttestationDigest0',
|
|
916
|
+
'argument 2',
|
|
917
|
+
'circuits.compact line 29 char 1',
|
|
918
|
+
'Uint<0..18446744073709551616>',
|
|
919
|
+
blockHeight_0)
|
|
920
|
+
}
|
|
921
|
+
if (!(typeof(outputKind_0) === 'number' && outputKind_0 >= 0 && outputKind_0 <= 2)) {
|
|
922
|
+
__compactRuntime.typeError('calculateSignetAttestationDigest0',
|
|
923
|
+
'argument 3',
|
|
924
|
+
'circuits.compact line 29 char 1',
|
|
925
|
+
'Enum<OutputKind, executed, failed, unviable>',
|
|
926
|
+
outputKind_0)
|
|
927
|
+
}
|
|
928
|
+
if (!(serializedOutput_0.buffer instanceof ArrayBuffer && serializedOutput_0.BYTES_PER_ELEMENT === 1 && serializedOutput_0.length === 0)) {
|
|
929
|
+
__compactRuntime.typeError('calculateSignetAttestationDigest0',
|
|
930
|
+
'argument 4',
|
|
931
|
+
'circuits.compact line 29 char 1',
|
|
932
|
+
'Bytes<0>',
|
|
933
|
+
serializedOutput_0)
|
|
934
|
+
}
|
|
935
|
+
return _dummyContract._calculateSignetAttestationDigest0_0(requestId_0,
|
|
936
|
+
blockHeight_0,
|
|
937
|
+
outputKind_0,
|
|
938
|
+
serializedOutput_0);
|
|
939
|
+
},
|
|
786
940
|
calculateSignetAttestationDigest1: (...args_0) => {
|
|
787
|
-
if (args_0.length !==
|
|
788
|
-
throw new __compactRuntime.CompactError(`calculateSignetAttestationDigest1: expected
|
|
941
|
+
if (args_0.length !== 4) {
|
|
942
|
+
throw new __compactRuntime.CompactError(`calculateSignetAttestationDigest1: expected 4 arguments (as invoked from Typescript), received ${args_0.length}`);
|
|
789
943
|
}
|
|
790
944
|
const requestId_0 = args_0[0];
|
|
791
945
|
const blockHeight_0 = args_0[1];
|
|
792
|
-
const
|
|
946
|
+
const outputKind_0 = args_0[2];
|
|
947
|
+
const serializedOutput_0 = args_0[3];
|
|
793
948
|
if (!(requestId_0.buffer instanceof ArrayBuffer && requestId_0.BYTES_PER_ELEMENT === 1 && requestId_0.length === 32)) {
|
|
794
949
|
__compactRuntime.typeError('calculateSignetAttestationDigest1',
|
|
795
950
|
'argument 1',
|
|
796
|
-
'circuits.compact line
|
|
951
|
+
'circuits.compact line 38 char 1',
|
|
797
952
|
'Bytes<32>',
|
|
798
953
|
requestId_0)
|
|
799
954
|
}
|
|
800
955
|
if (!(typeof(blockHeight_0) === 'bigint' && blockHeight_0 >= 0n && blockHeight_0 <= 18446744073709551615n)) {
|
|
801
956
|
__compactRuntime.typeError('calculateSignetAttestationDigest1',
|
|
802
957
|
'argument 2',
|
|
803
|
-
'circuits.compact line
|
|
958
|
+
'circuits.compact line 38 char 1',
|
|
804
959
|
'Uint<0..18446744073709551616>',
|
|
805
960
|
blockHeight_0)
|
|
806
961
|
}
|
|
807
|
-
if (!(
|
|
962
|
+
if (!(typeof(outputKind_0) === 'number' && outputKind_0 >= 0 && outputKind_0 <= 2)) {
|
|
808
963
|
__compactRuntime.typeError('calculateSignetAttestationDigest1',
|
|
809
964
|
'argument 3',
|
|
810
|
-
'circuits.compact line
|
|
965
|
+
'circuits.compact line 38 char 1',
|
|
966
|
+
'Enum<OutputKind, executed, failed, unviable>',
|
|
967
|
+
outputKind_0)
|
|
968
|
+
}
|
|
969
|
+
if (!(serializedOutput_0.buffer instanceof ArrayBuffer && serializedOutput_0.BYTES_PER_ELEMENT === 1 && serializedOutput_0.length === 1)) {
|
|
970
|
+
__compactRuntime.typeError('calculateSignetAttestationDigest1',
|
|
971
|
+
'argument 4',
|
|
972
|
+
'circuits.compact line 38 char 1',
|
|
811
973
|
'Bytes<1>',
|
|
812
974
|
serializedOutput_0)
|
|
813
975
|
}
|
|
814
976
|
return _dummyContract._calculateSignetAttestationDigest1_0(requestId_0,
|
|
815
977
|
blockHeight_0,
|
|
978
|
+
outputKind_0,
|
|
816
979
|
serializedOutput_0);
|
|
817
980
|
},
|
|
818
981
|
calculateSignetAttestationDigest2: (...args_0) => {
|
|
819
|
-
if (args_0.length !==
|
|
820
|
-
throw new __compactRuntime.CompactError(`calculateSignetAttestationDigest2: expected
|
|
982
|
+
if (args_0.length !== 4) {
|
|
983
|
+
throw new __compactRuntime.CompactError(`calculateSignetAttestationDigest2: expected 4 arguments (as invoked from Typescript), received ${args_0.length}`);
|
|
821
984
|
}
|
|
822
985
|
const requestId_0 = args_0[0];
|
|
823
986
|
const blockHeight_0 = args_0[1];
|
|
824
|
-
const
|
|
987
|
+
const outputKind_0 = args_0[2];
|
|
988
|
+
const serializedOutput_0 = args_0[3];
|
|
825
989
|
if (!(requestId_0.buffer instanceof ArrayBuffer && requestId_0.BYTES_PER_ELEMENT === 1 && requestId_0.length === 32)) {
|
|
826
990
|
__compactRuntime.typeError('calculateSignetAttestationDigest2',
|
|
827
991
|
'argument 1',
|
|
828
|
-
'circuits.compact line
|
|
992
|
+
'circuits.compact line 47 char 1',
|
|
829
993
|
'Bytes<32>',
|
|
830
994
|
requestId_0)
|
|
831
995
|
}
|
|
832
996
|
if (!(typeof(blockHeight_0) === 'bigint' && blockHeight_0 >= 0n && blockHeight_0 <= 18446744073709551615n)) {
|
|
833
997
|
__compactRuntime.typeError('calculateSignetAttestationDigest2',
|
|
834
998
|
'argument 2',
|
|
835
|
-
'circuits.compact line
|
|
999
|
+
'circuits.compact line 47 char 1',
|
|
836
1000
|
'Uint<0..18446744073709551616>',
|
|
837
1001
|
blockHeight_0)
|
|
838
1002
|
}
|
|
839
|
-
if (!(
|
|
1003
|
+
if (!(typeof(outputKind_0) === 'number' && outputKind_0 >= 0 && outputKind_0 <= 2)) {
|
|
840
1004
|
__compactRuntime.typeError('calculateSignetAttestationDigest2',
|
|
841
1005
|
'argument 3',
|
|
842
|
-
'circuits.compact line
|
|
1006
|
+
'circuits.compact line 47 char 1',
|
|
1007
|
+
'Enum<OutputKind, executed, failed, unviable>',
|
|
1008
|
+
outputKind_0)
|
|
1009
|
+
}
|
|
1010
|
+
if (!(serializedOutput_0.buffer instanceof ArrayBuffer && serializedOutput_0.BYTES_PER_ELEMENT === 1 && serializedOutput_0.length === 2)) {
|
|
1011
|
+
__compactRuntime.typeError('calculateSignetAttestationDigest2',
|
|
1012
|
+
'argument 4',
|
|
1013
|
+
'circuits.compact line 47 char 1',
|
|
843
1014
|
'Bytes<2>',
|
|
844
1015
|
serializedOutput_0)
|
|
845
1016
|
}
|
|
846
1017
|
return _dummyContract._calculateSignetAttestationDigest2_0(requestId_0,
|
|
847
1018
|
blockHeight_0,
|
|
1019
|
+
outputKind_0,
|
|
848
1020
|
serializedOutput_0);
|
|
849
1021
|
},
|
|
850
1022
|
calculateSignetAttestationDigest32: (...args_0) => {
|
|
851
|
-
if (args_0.length !==
|
|
852
|
-
throw new __compactRuntime.CompactError(`calculateSignetAttestationDigest32: expected
|
|
1023
|
+
if (args_0.length !== 4) {
|
|
1024
|
+
throw new __compactRuntime.CompactError(`calculateSignetAttestationDigest32: expected 4 arguments (as invoked from Typescript), received ${args_0.length}`);
|
|
853
1025
|
}
|
|
854
1026
|
const requestId_0 = args_0[0];
|
|
855
1027
|
const blockHeight_0 = args_0[1];
|
|
856
|
-
const
|
|
1028
|
+
const outputKind_0 = args_0[2];
|
|
1029
|
+
const serializedOutput_0 = args_0[3];
|
|
857
1030
|
if (!(requestId_0.buffer instanceof ArrayBuffer && requestId_0.BYTES_PER_ELEMENT === 1 && requestId_0.length === 32)) {
|
|
858
1031
|
__compactRuntime.typeError('calculateSignetAttestationDigest32',
|
|
859
1032
|
'argument 1',
|
|
860
|
-
'circuits.compact line
|
|
1033
|
+
'circuits.compact line 56 char 1',
|
|
861
1034
|
'Bytes<32>',
|
|
862
1035
|
requestId_0)
|
|
863
1036
|
}
|
|
864
1037
|
if (!(typeof(blockHeight_0) === 'bigint' && blockHeight_0 >= 0n && blockHeight_0 <= 18446744073709551615n)) {
|
|
865
1038
|
__compactRuntime.typeError('calculateSignetAttestationDigest32',
|
|
866
1039
|
'argument 2',
|
|
867
|
-
'circuits.compact line
|
|
1040
|
+
'circuits.compact line 56 char 1',
|
|
868
1041
|
'Uint<0..18446744073709551616>',
|
|
869
1042
|
blockHeight_0)
|
|
870
1043
|
}
|
|
871
|
-
if (!(
|
|
1044
|
+
if (!(typeof(outputKind_0) === 'number' && outputKind_0 >= 0 && outputKind_0 <= 2)) {
|
|
872
1045
|
__compactRuntime.typeError('calculateSignetAttestationDigest32',
|
|
873
1046
|
'argument 3',
|
|
874
|
-
'circuits.compact line
|
|
1047
|
+
'circuits.compact line 56 char 1',
|
|
1048
|
+
'Enum<OutputKind, executed, failed, unviable>',
|
|
1049
|
+
outputKind_0)
|
|
1050
|
+
}
|
|
1051
|
+
if (!(serializedOutput_0.buffer instanceof ArrayBuffer && serializedOutput_0.BYTES_PER_ELEMENT === 1 && serializedOutput_0.length === 32)) {
|
|
1052
|
+
__compactRuntime.typeError('calculateSignetAttestationDigest32',
|
|
1053
|
+
'argument 4',
|
|
1054
|
+
'circuits.compact line 56 char 1',
|
|
875
1055
|
'Bytes<32>',
|
|
876
1056
|
serializedOutput_0)
|
|
877
1057
|
}
|
|
878
1058
|
return _dummyContract._calculateSignetAttestationDigest32_0(requestId_0,
|
|
879
1059
|
blockHeight_0,
|
|
1060
|
+
outputKind_0,
|
|
880
1061
|
serializedOutput_0);
|
|
881
1062
|
},
|
|
882
1063
|
calculateSignetAttestationDigest100: (...args_0) => {
|
|
883
|
-
if (args_0.length !==
|
|
884
|
-
throw new __compactRuntime.CompactError(`calculateSignetAttestationDigest100: expected
|
|
1064
|
+
if (args_0.length !== 4) {
|
|
1065
|
+
throw new __compactRuntime.CompactError(`calculateSignetAttestationDigest100: expected 4 arguments (as invoked from Typescript), received ${args_0.length}`);
|
|
885
1066
|
}
|
|
886
1067
|
const requestId_0 = args_0[0];
|
|
887
1068
|
const blockHeight_0 = args_0[1];
|
|
888
|
-
const
|
|
1069
|
+
const outputKind_0 = args_0[2];
|
|
1070
|
+
const serializedOutput_0 = args_0[3];
|
|
889
1071
|
if (!(requestId_0.buffer instanceof ArrayBuffer && requestId_0.BYTES_PER_ELEMENT === 1 && requestId_0.length === 32)) {
|
|
890
1072
|
__compactRuntime.typeError('calculateSignetAttestationDigest100',
|
|
891
1073
|
'argument 1',
|
|
892
|
-
'circuits.compact line
|
|
1074
|
+
'circuits.compact line 65 char 1',
|
|
893
1075
|
'Bytes<32>',
|
|
894
1076
|
requestId_0)
|
|
895
1077
|
}
|
|
896
1078
|
if (!(typeof(blockHeight_0) === 'bigint' && blockHeight_0 >= 0n && blockHeight_0 <= 18446744073709551615n)) {
|
|
897
1079
|
__compactRuntime.typeError('calculateSignetAttestationDigest100',
|
|
898
1080
|
'argument 2',
|
|
899
|
-
'circuits.compact line
|
|
1081
|
+
'circuits.compact line 65 char 1',
|
|
900
1082
|
'Uint<0..18446744073709551616>',
|
|
901
1083
|
blockHeight_0)
|
|
902
1084
|
}
|
|
903
|
-
if (!(
|
|
1085
|
+
if (!(typeof(outputKind_0) === 'number' && outputKind_0 >= 0 && outputKind_0 <= 2)) {
|
|
904
1086
|
__compactRuntime.typeError('calculateSignetAttestationDigest100',
|
|
905
1087
|
'argument 3',
|
|
906
|
-
'circuits.compact line
|
|
1088
|
+
'circuits.compact line 65 char 1',
|
|
1089
|
+
'Enum<OutputKind, executed, failed, unviable>',
|
|
1090
|
+
outputKind_0)
|
|
1091
|
+
}
|
|
1092
|
+
if (!(serializedOutput_0.buffer instanceof ArrayBuffer && serializedOutput_0.BYTES_PER_ELEMENT === 1 && serializedOutput_0.length === 100)) {
|
|
1093
|
+
__compactRuntime.typeError('calculateSignetAttestationDigest100',
|
|
1094
|
+
'argument 4',
|
|
1095
|
+
'circuits.compact line 65 char 1',
|
|
907
1096
|
'Bytes<100>',
|
|
908
1097
|
serializedOutput_0)
|
|
909
1098
|
}
|
|
910
1099
|
return _dummyContract._calculateSignetAttestationDigest100_0(requestId_0,
|
|
911
1100
|
blockHeight_0,
|
|
1101
|
+
outputKind_0,
|
|
912
1102
|
serializedOutput_0);
|
|
913
1103
|
},
|
|
914
|
-
|
|
915
|
-
if (args_0.length !==
|
|
916
|
-
throw new __compactRuntime.CompactError(`
|
|
1104
|
+
verifyRespondBidirectionalEvent0: (...args_0) => {
|
|
1105
|
+
if (args_0.length !== 3) {
|
|
1106
|
+
throw new __compactRuntime.CompactError(`verifyRespondBidirectionalEvent0: expected 3 arguments (as invoked from Typescript), received ${args_0.length}`);
|
|
917
1107
|
}
|
|
918
|
-
const
|
|
919
|
-
const
|
|
920
|
-
const
|
|
921
|
-
|
|
922
|
-
|
|
923
|
-
if (!(requestId_0.buffer instanceof ArrayBuffer && requestId_0.BYTES_PER_ELEMENT === 1 && requestId_0.length === 32)) {
|
|
924
|
-
__compactRuntime.typeError('verifyRespondBidirectionalEvent32',
|
|
1108
|
+
const serializedOutput_0 = args_0[0];
|
|
1109
|
+
const respondBidirectionalEvent_0 = args_0[1];
|
|
1110
|
+
const mpcResponseKey_0 = args_0[2];
|
|
1111
|
+
if (!(serializedOutput_0.buffer instanceof ArrayBuffer && serializedOutput_0.BYTES_PER_ELEMENT === 1 && serializedOutput_0.length === 0)) {
|
|
1112
|
+
__compactRuntime.typeError('verifyRespondBidirectionalEvent0',
|
|
925
1113
|
'argument 1',
|
|
926
|
-
'circuits.compact line
|
|
927
|
-
'Bytes<
|
|
928
|
-
|
|
1114
|
+
'circuits.compact line 74 char 1',
|
|
1115
|
+
'Bytes<0>',
|
|
1116
|
+
serializedOutput_0)
|
|
929
1117
|
}
|
|
930
|
-
if (!(typeof(
|
|
931
|
-
__compactRuntime.typeError('
|
|
1118
|
+
if (!(typeof(respondBidirectionalEvent_0) === 'object' && respondBidirectionalEvent_0.requestId.buffer instanceof ArrayBuffer && respondBidirectionalEvent_0.requestId.BYTES_PER_ELEMENT === 1 && respondBidirectionalEvent_0.requestId.length === 32 && typeof(respondBidirectionalEvent_0.blockHeight) === 'bigint' && respondBidirectionalEvent_0.blockHeight >= 0n && respondBidirectionalEvent_0.blockHeight <= 18446744073709551615n && typeof(respondBidirectionalEvent_0.outputKind) === 'number' && respondBidirectionalEvent_0.outputKind >= 0 && respondBidirectionalEvent_0.outputKind <= 2 && typeof(respondBidirectionalEvent_0.serializedOutputLength) === 'bigint' && respondBidirectionalEvent_0.serializedOutputLength >= 0n && respondBidirectionalEvent_0.serializedOutputLength <= 18446744073709551615n && respondBidirectionalEvent_0.digest.buffer instanceof ArrayBuffer && respondBidirectionalEvent_0.digest.BYTES_PER_ELEMENT === 1 && respondBidirectionalEvent_0.digest.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)) {
|
|
1119
|
+
__compactRuntime.typeError('verifyRespondBidirectionalEvent0',
|
|
932
1120
|
'argument 2',
|
|
933
|
-
'circuits.compact line
|
|
934
|
-
'Uint<0..18446744073709551616
|
|
935
|
-
|
|
1121
|
+
'circuits.compact line 74 char 1',
|
|
1122
|
+
'struct RespondBidirectionalEvent<requestId: Bytes<32>, blockHeight: Uint<0..18446744073709551616>, outputKind: Enum<OutputKind, executed, failed, unviable>, serializedOutputLength: Uint<0..18446744073709551616>, digest: Bytes<32>, signature: struct Signature<bigR: struct AffinePoint<x: Bytes<32>, y: Bytes<32>>, s: Bytes<32>, recoveryId: Uint<0..256>>>',
|
|
1123
|
+
respondBidirectionalEvent_0)
|
|
1124
|
+
}
|
|
1125
|
+
return _dummyContract._verifyRespondBidirectionalEvent0_0(serializedOutput_0,
|
|
1126
|
+
respondBidirectionalEvent_0,
|
|
1127
|
+
mpcResponseKey_0);
|
|
1128
|
+
},
|
|
1129
|
+
verifyRespondBidirectionalEvent32: (...args_0) => {
|
|
1130
|
+
if (args_0.length !== 3) {
|
|
1131
|
+
throw new __compactRuntime.CompactError(`verifyRespondBidirectionalEvent32: expected 3 arguments (as invoked from Typescript), received ${args_0.length}`);
|
|
936
1132
|
}
|
|
1133
|
+
const serializedOutput_0 = args_0[0];
|
|
1134
|
+
const respondBidirectionalEvent_0 = args_0[1];
|
|
1135
|
+
const mpcResponseKey_0 = args_0[2];
|
|
937
1136
|
if (!(serializedOutput_0.buffer instanceof ArrayBuffer && serializedOutput_0.BYTES_PER_ELEMENT === 1 && serializedOutput_0.length === 32)) {
|
|
938
1137
|
__compactRuntime.typeError('verifyRespondBidirectionalEvent32',
|
|
939
|
-
'argument
|
|
940
|
-
'circuits.compact line
|
|
1138
|
+
'argument 1',
|
|
1139
|
+
'circuits.compact line 86 char 1',
|
|
941
1140
|
'Bytes<32>',
|
|
942
1141
|
serializedOutput_0)
|
|
943
1142
|
}
|
|
944
|
-
if (!(typeof(respondBidirectionalEvent_0) === 'object' && 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)) {
|
|
1143
|
+
if (!(typeof(respondBidirectionalEvent_0) === 'object' && respondBidirectionalEvent_0.requestId.buffer instanceof ArrayBuffer && respondBidirectionalEvent_0.requestId.BYTES_PER_ELEMENT === 1 && respondBidirectionalEvent_0.requestId.length === 32 && typeof(respondBidirectionalEvent_0.blockHeight) === 'bigint' && respondBidirectionalEvent_0.blockHeight >= 0n && respondBidirectionalEvent_0.blockHeight <= 18446744073709551615n && typeof(respondBidirectionalEvent_0.outputKind) === 'number' && respondBidirectionalEvent_0.outputKind >= 0 && respondBidirectionalEvent_0.outputKind <= 2 && typeof(respondBidirectionalEvent_0.serializedOutputLength) === 'bigint' && respondBidirectionalEvent_0.serializedOutputLength >= 0n && respondBidirectionalEvent_0.serializedOutputLength <= 18446744073709551615n && respondBidirectionalEvent_0.digest.buffer instanceof ArrayBuffer && respondBidirectionalEvent_0.digest.BYTES_PER_ELEMENT === 1 && respondBidirectionalEvent_0.digest.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)) {
|
|
945
1144
|
__compactRuntime.typeError('verifyRespondBidirectionalEvent32',
|
|
946
|
-
'argument
|
|
947
|
-
'circuits.compact line
|
|
948
|
-
'struct RespondBidirectionalEvent<signature: struct Signature<bigR: struct AffinePoint<x: Bytes<32>, y: Bytes<32>>, s: Bytes<32>, recoveryId: Uint<0..256>>>',
|
|
1145
|
+
'argument 2',
|
|
1146
|
+
'circuits.compact line 86 char 1',
|
|
1147
|
+
'struct RespondBidirectionalEvent<requestId: Bytes<32>, blockHeight: Uint<0..18446744073709551616>, outputKind: Enum<OutputKind, executed, failed, unviable>, serializedOutputLength: Uint<0..18446744073709551616>, digest: Bytes<32>, signature: struct Signature<bigR: struct AffinePoint<x: Bytes<32>, y: Bytes<32>>, s: Bytes<32>, recoveryId: Uint<0..256>>>',
|
|
949
1148
|
respondBidirectionalEvent_0)
|
|
950
1149
|
}
|
|
951
|
-
return _dummyContract._verifyRespondBidirectionalEvent32_0(
|
|
952
|
-
blockHeight_0,
|
|
953
|
-
serializedOutput_0,
|
|
1150
|
+
return _dummyContract._verifyRespondBidirectionalEvent32_0(serializedOutput_0,
|
|
954
1151
|
respondBidirectionalEvent_0,
|
|
955
1152
|
mpcResponseKey_0);
|
|
956
1153
|
}
|