@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.
- package/README.md +10 -7
- package/dist/compact-descriptors.d.ts +8 -6
- package/dist/compact-descriptors.d.ts.map +1 -1
- package/dist/compact-descriptors.js +26 -8
- 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 -11
- package/dist/ecdsa-attestation.d.ts.map +1 -1
- package/dist/ecdsa-attestation.js +45 -12
- 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 +290 -6
- package/dist/managed/compiler/contract-manifest.json +8 -8
- package/dist/managed/contract/index.d.ts +69 -5
- package/dist/managed/contract/index.js +436 -154
- package/dist/managed/contract/index.js.map +1 -1
- package/dist/signature-requests-state-reader.d.ts +6 -13
- package/dist/signature-requests-state-reader.d.ts.map +1 -1
- package/dist/signature-requests-state-reader.js +9 -15
- package/dist/signature-requests-state-reader.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 +4 -4
- 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.map +1 -1
- package/dist/signet-request-response-reader.js +5 -6
- package/dist/signet-request-response-reader.js.map +1 -1
- package/dist/signet-requests.d.ts +43 -10
- package/dist/signet-requests.d.ts.map +1 -1
- package/dist/signet-requests.js +24 -5
- 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 -39
- package/src/circuits.compact +37 -9
|
@@ -1,228 +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);
|
|
12
|
+
|
|
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);
|
|
7
18
|
|
|
8
19
|
class _AffinePoint_0 {
|
|
9
20
|
alignment() {
|
|
10
|
-
return
|
|
21
|
+
return _descriptor_1.alignment().concat(_descriptor_1.alignment());
|
|
11
22
|
}
|
|
12
23
|
fromValue(value_0) {
|
|
13
24
|
return {
|
|
14
|
-
x:
|
|
15
|
-
y:
|
|
25
|
+
x: _descriptor_1.fromValue(value_0),
|
|
26
|
+
y: _descriptor_1.fromValue(value_0)
|
|
16
27
|
}
|
|
17
28
|
}
|
|
18
29
|
toValue(value_0) {
|
|
19
|
-
return
|
|
30
|
+
return _descriptor_1.toValue(value_0.x).concat(_descriptor_1.toValue(value_0.y));
|
|
20
31
|
}
|
|
21
32
|
}
|
|
22
33
|
|
|
23
|
-
const
|
|
34
|
+
const _descriptor_4 = new _AffinePoint_0();
|
|
24
35
|
|
|
25
|
-
const
|
|
36
|
+
const _descriptor_5 = new __compactRuntime.CompactTypeUnsignedInteger(255n, 1);
|
|
26
37
|
|
|
27
38
|
class _Signature_0 {
|
|
28
39
|
alignment() {
|
|
29
|
-
return
|
|
40
|
+
return _descriptor_4.alignment().concat(_descriptor_1.alignment().concat(_descriptor_5.alignment()));
|
|
30
41
|
}
|
|
31
42
|
fromValue(value_0) {
|
|
32
43
|
return {
|
|
33
|
-
bigR:
|
|
34
|
-
s:
|
|
35
|
-
recoveryId:
|
|
44
|
+
bigR: _descriptor_4.fromValue(value_0),
|
|
45
|
+
s: _descriptor_1.fromValue(value_0),
|
|
46
|
+
recoveryId: _descriptor_5.fromValue(value_0)
|
|
36
47
|
}
|
|
37
48
|
}
|
|
38
49
|
toValue(value_0) {
|
|
39
|
-
return
|
|
50
|
+
return _descriptor_4.toValue(value_0.bigR).concat(_descriptor_1.toValue(value_0.s).concat(_descriptor_5.toValue(value_0.recoveryId)));
|
|
40
51
|
}
|
|
41
52
|
}
|
|
42
53
|
|
|
43
|
-
const
|
|
54
|
+
const _descriptor_6 = new _Signature_0();
|
|
44
55
|
|
|
45
56
|
class _RespondBidirectionalEvent_0 {
|
|
46
57
|
alignment() {
|
|
47
|
-
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())))));
|
|
48
59
|
}
|
|
49
60
|
fromValue(value_0) {
|
|
50
61
|
return {
|
|
51
|
-
|
|
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)
|
|
52
68
|
}
|
|
53
69
|
}
|
|
54
70
|
toValue(value_0) {
|
|
55
|
-
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))))));
|
|
56
72
|
}
|
|
57
73
|
}
|
|
58
74
|
|
|
59
|
-
const
|
|
75
|
+
const _descriptor_7 = new _RespondBidirectionalEvent_0();
|
|
60
76
|
|
|
61
|
-
const
|
|
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);
|
|
90
|
+
|
|
91
|
+
const _descriptor_15 = __compactRuntime.CompactTypeSecp256k1Scalar;
|
|
74
92
|
|
|
75
93
|
class _ContractAddress_0 {
|
|
76
94
|
alignment() {
|
|
77
|
-
return
|
|
95
|
+
return _descriptor_1.alignment();
|
|
78
96
|
}
|
|
79
97
|
fromValue(value_0) {
|
|
80
98
|
return {
|
|
81
|
-
bytes:
|
|
99
|
+
bytes: _descriptor_1.fromValue(value_0)
|
|
82
100
|
}
|
|
83
101
|
}
|
|
84
102
|
toValue(value_0) {
|
|
85
|
-
return
|
|
103
|
+
return _descriptor_1.toValue(value_0.bytes);
|
|
86
104
|
}
|
|
87
105
|
}
|
|
88
106
|
|
|
89
|
-
const
|
|
107
|
+
const _descriptor_16 = new _ContractAddress_0();
|
|
90
108
|
|
|
91
|
-
const
|
|
109
|
+
const _descriptor_17 = new __compactRuntime.CompactTypeVector(4, _descriptor_5);
|
|
92
110
|
|
|
93
|
-
const
|
|
111
|
+
const _descriptor_18 = new __compactRuntime.CompactTypeBytes(128);
|
|
94
112
|
|
|
95
113
|
class _SignBidirectionalEventNotification_0 {
|
|
96
114
|
alignment() {
|
|
97
|
-
return
|
|
115
|
+
return _descriptor_5.alignment().concat(_descriptor_18.alignment());
|
|
98
116
|
}
|
|
99
117
|
fromValue(value_0) {
|
|
100
118
|
return {
|
|
101
|
-
version:
|
|
102
|
-
payload:
|
|
119
|
+
version: _descriptor_5.fromValue(value_0),
|
|
120
|
+
payload: _descriptor_18.fromValue(value_0)
|
|
103
121
|
}
|
|
104
122
|
}
|
|
105
123
|
toValue(value_0) {
|
|
106
|
-
return
|
|
124
|
+
return _descriptor_5.toValue(value_0.version).concat(_descriptor_18.toValue(value_0.payload));
|
|
107
125
|
}
|
|
108
126
|
}
|
|
109
127
|
|
|
110
|
-
const
|
|
111
|
-
|
|
112
|
-
const _descriptor_17 = __compactRuntime.CompactTypeSecp256k1Base;
|
|
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
|
-
|
|
125
|
-
|
|
126
|
-
|
|
140
|
+
_descriptor_1.fromValue(value_0),
|
|
141
|
+
_descriptor_2.fromValue(value_0),
|
|
142
|
+
_descriptor_3.fromValue(value_0),
|
|
143
|
+
_descriptor_2.fromValue(value_0),
|
|
144
|
+
_descriptor_0.fromValue(value_0)
|
|
127
145
|
]
|
|
128
146
|
}
|
|
129
147
|
toValue(value_0) {
|
|
130
|
-
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])))));
|
|
131
149
|
}
|
|
132
150
|
}
|
|
133
151
|
|
|
134
|
-
const
|
|
152
|
+
const _descriptor_22 = new _tuple_0();
|
|
135
153
|
|
|
136
154
|
class _tuple_1 {
|
|
137
155
|
alignment() {
|
|
138
|
-
return
|
|
156
|
+
return _descriptor_1.alignment().concat(_descriptor_2.alignment().concat(_descriptor_3.alignment().concat(_descriptor_2.alignment().concat(_descriptor_1.alignment()))));
|
|
139
157
|
}
|
|
140
158
|
fromValue(value_0) {
|
|
141
159
|
return [
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
160
|
+
_descriptor_1.fromValue(value_0),
|
|
161
|
+
_descriptor_2.fromValue(value_0),
|
|
162
|
+
_descriptor_3.fromValue(value_0),
|
|
163
|
+
_descriptor_2.fromValue(value_0),
|
|
164
|
+
_descriptor_1.fromValue(value_0)
|
|
145
165
|
]
|
|
146
166
|
}
|
|
147
167
|
toValue(value_0) {
|
|
148
|
-
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])))));
|
|
149
169
|
}
|
|
150
170
|
}
|
|
151
171
|
|
|
152
|
-
const
|
|
172
|
+
const _descriptor_23 = new _tuple_1();
|
|
153
173
|
|
|
154
174
|
class _tuple_2 {
|
|
155
175
|
alignment() {
|
|
156
|
-
return
|
|
176
|
+
return _descriptor_1.alignment().concat(_descriptor_2.alignment().concat(_descriptor_3.alignment().concat(_descriptor_2.alignment().concat(_descriptor_12.alignment()))));
|
|
157
177
|
}
|
|
158
178
|
fromValue(value_0) {
|
|
159
179
|
return [
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
180
|
+
_descriptor_1.fromValue(value_0),
|
|
181
|
+
_descriptor_2.fromValue(value_0),
|
|
182
|
+
_descriptor_3.fromValue(value_0),
|
|
183
|
+
_descriptor_2.fromValue(value_0),
|
|
184
|
+
_descriptor_12.fromValue(value_0)
|
|
163
185
|
]
|
|
164
186
|
}
|
|
165
187
|
toValue(value_0) {
|
|
166
|
-
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])))));
|
|
167
189
|
}
|
|
168
190
|
}
|
|
169
191
|
|
|
170
|
-
const
|
|
192
|
+
const _descriptor_24 = new _tuple_2();
|
|
171
193
|
|
|
172
194
|
class _tuple_3 {
|
|
173
195
|
alignment() {
|
|
174
|
-
return
|
|
196
|
+
return _descriptor_1.alignment().concat(_descriptor_2.alignment().concat(_descriptor_3.alignment().concat(_descriptor_2.alignment().concat(_descriptor_10.alignment()))));
|
|
175
197
|
}
|
|
176
198
|
fromValue(value_0) {
|
|
177
199
|
return [
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
200
|
+
_descriptor_1.fromValue(value_0),
|
|
201
|
+
_descriptor_2.fromValue(value_0),
|
|
202
|
+
_descriptor_3.fromValue(value_0),
|
|
203
|
+
_descriptor_2.fromValue(value_0),
|
|
204
|
+
_descriptor_10.fromValue(value_0)
|
|
181
205
|
]
|
|
182
206
|
}
|
|
183
207
|
toValue(value_0) {
|
|
184
|
-
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])))));
|
|
185
209
|
}
|
|
186
210
|
}
|
|
187
211
|
|
|
188
|
-
const
|
|
212
|
+
const _descriptor_25 = new _tuple_3();
|
|
189
213
|
|
|
190
214
|
class _Secp256k1EcdsaSignature_0 {
|
|
191
215
|
alignment() {
|
|
192
|
-
return
|
|
216
|
+
return _descriptor_15.alignment().concat(_descriptor_15.alignment());
|
|
193
217
|
}
|
|
194
218
|
fromValue(value_0) {
|
|
195
219
|
return {
|
|
196
|
-
r:
|
|
197
|
-
s:
|
|
220
|
+
r: _descriptor_15.fromValue(value_0),
|
|
221
|
+
s: _descriptor_15.fromValue(value_0)
|
|
198
222
|
}
|
|
199
223
|
}
|
|
200
224
|
toValue(value_0) {
|
|
201
|
-
return
|
|
225
|
+
return _descriptor_15.toValue(value_0.r).concat(_descriptor_15.toValue(value_0.s));
|
|
202
226
|
}
|
|
203
227
|
}
|
|
204
228
|
|
|
205
|
-
const
|
|
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])))));
|
|
246
|
+
}
|
|
247
|
+
}
|
|
248
|
+
|
|
249
|
+
const _descriptor_27 = new _tuple_4();
|
|
206
250
|
|
|
207
251
|
class _Either_0 {
|
|
208
252
|
alignment() {
|
|
209
|
-
return
|
|
253
|
+
return _descriptor_9.alignment().concat(_descriptor_1.alignment().concat(_descriptor_1.alignment()));
|
|
210
254
|
}
|
|
211
255
|
fromValue(value_0) {
|
|
212
256
|
return {
|
|
213
|
-
is_left:
|
|
214
|
-
left:
|
|
215
|
-
right:
|
|
257
|
+
is_left: _descriptor_9.fromValue(value_0),
|
|
258
|
+
left: _descriptor_1.fromValue(value_0),
|
|
259
|
+
right: _descriptor_1.fromValue(value_0)
|
|
216
260
|
}
|
|
217
261
|
}
|
|
218
262
|
toValue(value_0) {
|
|
219
|
-
return
|
|
263
|
+
return _descriptor_9.toValue(value_0.is_left).concat(_descriptor_1.toValue(value_0.left).concat(_descriptor_1.toValue(value_0.right)));
|
|
220
264
|
}
|
|
221
265
|
}
|
|
222
266
|
|
|
223
|
-
const
|
|
267
|
+
const _descriptor_28 = new _Either_0();
|
|
224
268
|
|
|
225
|
-
const
|
|
269
|
+
const _descriptor_29 = new __compactRuntime.CompactTypeUnsignedInteger(4294967295n, 4);
|
|
226
270
|
|
|
227
271
|
export class Contract {
|
|
228
272
|
witnesses;
|
|
@@ -257,6 +301,9 @@ export class Contract {
|
|
|
257
301
|
async abiWordToBool(context, ...args_1) {
|
|
258
302
|
return { result: pureCircuits.abiWordToBool(...args_1), context };
|
|
259
303
|
},
|
|
304
|
+
async calculateSignetAttestationDigest0(context, ...args_1) {
|
|
305
|
+
return { result: pureCircuits.calculateSignetAttestationDigest0(...args_1), context };
|
|
306
|
+
},
|
|
260
307
|
async calculateSignetAttestationDigest1(context, ...args_1) {
|
|
261
308
|
return { result: pureCircuits.calculateSignetAttestationDigest1(...args_1), context };
|
|
262
309
|
},
|
|
@@ -269,6 +316,9 @@ export class Contract {
|
|
|
269
316
|
async calculateSignetAttestationDigest100(context, ...args_1) {
|
|
270
317
|
return { result: pureCircuits.calculateSignetAttestationDigest100(...args_1), context };
|
|
271
318
|
},
|
|
319
|
+
async verifyRespondBidirectionalEvent0(context, ...args_1) {
|
|
320
|
+
return { result: pureCircuits.verifyRespondBidirectionalEvent0(...args_1), context };
|
|
321
|
+
},
|
|
272
322
|
async verifyRespondBidirectionalEvent32(context, ...args_1) {
|
|
273
323
|
return { result: pureCircuits.verifyRespondBidirectionalEvent32(...args_1), context };
|
|
274
324
|
}
|
|
@@ -369,19 +419,23 @@ export class Contract {
|
|
|
369
419
|
r_0;
|
|
370
420
|
}
|
|
371
421
|
_transientHash_0(value_0) {
|
|
372
|
-
const result_0 = __compactRuntime.transientHash(
|
|
422
|
+
const result_0 = __compactRuntime.transientHash(_descriptor_27, value_0);
|
|
373
423
|
return result_0;
|
|
374
424
|
}
|
|
375
425
|
_transientHash_1(value_0) {
|
|
376
|
-
const result_0 = __compactRuntime.transientHash(
|
|
426
|
+
const result_0 = __compactRuntime.transientHash(_descriptor_24, value_0);
|
|
377
427
|
return result_0;
|
|
378
428
|
}
|
|
379
429
|
_transientHash_2(value_0) {
|
|
380
|
-
const result_0 = __compactRuntime.transientHash(
|
|
430
|
+
const result_0 = __compactRuntime.transientHash(_descriptor_25, value_0);
|
|
381
431
|
return result_0;
|
|
382
432
|
}
|
|
383
433
|
_transientHash_3(value_0) {
|
|
384
|
-
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);
|
|
385
439
|
return result_0;
|
|
386
440
|
}
|
|
387
441
|
_upgradeFromTransient_0(x_0) {
|
|
@@ -427,32 +481,68 @@ export class Contract {
|
|
|
427
481
|
...Array.from(new Uint8Array(91), BigInt)],
|
|
428
482
|
Number) };
|
|
429
483
|
}
|
|
430
|
-
_calculateSignetAttestationDigest_0(requestId_0,
|
|
484
|
+
_calculateSignetAttestationDigest_0(requestId_0,
|
|
485
|
+
blockHeight_0,
|
|
486
|
+
outputKind_0,
|
|
487
|
+
serializedOutput_0)
|
|
488
|
+
{
|
|
431
489
|
return this._upgradeFromTransient_0(this._transientHash_0([requestId_0,
|
|
490
|
+
blockHeight_0,
|
|
491
|
+
outputKind_0,
|
|
432
492
|
1n,
|
|
433
493
|
serializedOutput_0]));
|
|
434
494
|
}
|
|
435
|
-
_calculateSignetAttestationDigest_1(requestId_0,
|
|
495
|
+
_calculateSignetAttestationDigest_1(requestId_0,
|
|
496
|
+
blockHeight_0,
|
|
497
|
+
outputKind_0,
|
|
498
|
+
serializedOutput_0)
|
|
499
|
+
{
|
|
436
500
|
return this._upgradeFromTransient_0(this._transientHash_1([requestId_0,
|
|
501
|
+
blockHeight_0,
|
|
502
|
+
outputKind_0,
|
|
437
503
|
2n,
|
|
438
504
|
serializedOutput_0]));
|
|
439
505
|
}
|
|
440
|
-
_calculateSignetAttestationDigest_2(requestId_0,
|
|
506
|
+
_calculateSignetAttestationDigest_2(requestId_0,
|
|
507
|
+
blockHeight_0,
|
|
508
|
+
outputKind_0,
|
|
509
|
+
serializedOutput_0)
|
|
510
|
+
{
|
|
441
511
|
return this._upgradeFromTransient_0(this._transientHash_2([requestId_0,
|
|
512
|
+
blockHeight_0,
|
|
513
|
+
outputKind_0,
|
|
442
514
|
100n,
|
|
443
515
|
serializedOutput_0]));
|
|
444
516
|
}
|
|
445
|
-
_calculateSignetAttestationDigest_3(requestId_0,
|
|
517
|
+
_calculateSignetAttestationDigest_3(requestId_0,
|
|
518
|
+
blockHeight_0,
|
|
519
|
+
outputKind_0,
|
|
520
|
+
serializedOutput_0)
|
|
521
|
+
{
|
|
446
522
|
return this._upgradeFromTransient_0(this._transientHash_3([requestId_0,
|
|
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,
|
|
447
536
|
32n,
|
|
448
537
|
serializedOutput_0]));
|
|
449
538
|
}
|
|
450
|
-
_verifyRespondBidirectionalEvent_0(
|
|
451
|
-
serializedOutput_0,
|
|
539
|
+
_verifyRespondBidirectionalEvent_0(serializedOutput_0,
|
|
452
540
|
respondBidirectionalEvent_0,
|
|
453
541
|
mpcResponseKey_0)
|
|
454
542
|
{
|
|
455
|
-
const digest_0 = this._calculateSignetAttestationDigest_3(
|
|
543
|
+
const digest_0 = this._calculateSignetAttestationDigest_3(respondBidirectionalEvent_0.requestId,
|
|
544
|
+
respondBidirectionalEvent_0.blockHeight,
|
|
545
|
+
respondBidirectionalEvent_0.outputKind,
|
|
456
546
|
serializedOutput_0);
|
|
457
547
|
return this._secp256k1EcdsaVerify_0(digest_0,
|
|
458
548
|
{ r:
|
|
@@ -460,13 +550,36 @@ export class Contract {
|
|
|
460
550
|
32,
|
|
461
551
|
respondBidirectionalEvent_0.signature.bigR.x,
|
|
462
552
|
'Secp256k1Scalar',
|
|
463
|
-
'Signet.compact line
|
|
553
|
+
'Signet.compact line 415 char 12'),
|
|
464
554
|
s:
|
|
465
555
|
__compactRuntime.convertBytesToField(115792089237316195423570985008687907852837564279074904382605163141518161494336n,
|
|
466
556
|
32,
|
|
467
557
|
respondBidirectionalEvent_0.signature.s,
|
|
468
558
|
'Secp256k1Scalar',
|
|
469
|
-
'Signet.compact line
|
|
559
|
+
'Signet.compact line 416 char 12') },
|
|
560
|
+
mpcResponseKey_0);
|
|
561
|
+
}
|
|
562
|
+
_verifyRespondBidirectionalEvent_1(serializedOutput_0,
|
|
563
|
+
respondBidirectionalEvent_0,
|
|
564
|
+
mpcResponseKey_0)
|
|
565
|
+
{
|
|
566
|
+
const digest_0 = this._calculateSignetAttestationDigest_4(respondBidirectionalEvent_0.requestId,
|
|
567
|
+
respondBidirectionalEvent_0.blockHeight,
|
|
568
|
+
respondBidirectionalEvent_0.outputKind,
|
|
569
|
+
serializedOutput_0);
|
|
570
|
+
return this._secp256k1EcdsaVerify_0(digest_0,
|
|
571
|
+
{ r:
|
|
572
|
+
__compactRuntime.convertBytesToField(115792089237316195423570985008687907852837564279074904382605163141518161494336n,
|
|
573
|
+
32,
|
|
574
|
+
respondBidirectionalEvent_0.signature.bigR.x,
|
|
575
|
+
'Secp256k1Scalar',
|
|
576
|
+
'Signet.compact line 415 char 12'),
|
|
577
|
+
s:
|
|
578
|
+
__compactRuntime.convertBytesToField(115792089237316195423570985008687907852837564279074904382605163141518161494336n,
|
|
579
|
+
32,
|
|
580
|
+
respondBidirectionalEvent_0.signature.s,
|
|
581
|
+
'Secp256k1Scalar',
|
|
582
|
+
'Signet.compact line 416 char 12') },
|
|
470
583
|
mpcResponseKey_0);
|
|
471
584
|
}
|
|
472
585
|
_ethereumCaip2Id_0() {
|
|
@@ -480,7 +593,7 @@ export class Contract {
|
|
|
480
593
|
_numericAbiWord_0(value_0) {
|
|
481
594
|
const le_0 = Array.from(__compactRuntime.convertBigintToBytes(16,
|
|
482
595
|
value_0,
|
|
483
|
-
'Signet.compact line
|
|
596
|
+
'Signet.compact line 505 char 17'),
|
|
484
597
|
BigInt);
|
|
485
598
|
return Uint8Array.from([...Array.from(new Uint8Array(16), BigInt),
|
|
486
599
|
le_0[15],
|
|
@@ -562,7 +675,7 @@ export class Contract {
|
|
|
562
675
|
v_0[31]);
|
|
563
676
|
return ((t1) => {
|
|
564
677
|
if (t1 > 340282366920938463463374607431768211455n) {
|
|
565
|
-
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');
|
|
566
679
|
}
|
|
567
680
|
return t1;
|
|
568
681
|
})(b15_0);
|
|
@@ -573,7 +686,7 @@ export class Contract {
|
|
|
573
686
|
((e, i) => e.slice(i, i+31))(word_0,
|
|
574
687
|
Number(0n)),
|
|
575
688
|
'Field',
|
|
576
|
-
'Signet.compact line
|
|
689
|
+
'Signet.compact line 563 char 12')
|
|
577
690
|
===
|
|
578
691
|
0n,
|
|
579
692
|
'ABI word is not a canonical Boolean');
|
|
@@ -582,34 +695,74 @@ export class Contract {
|
|
|
582
695
|
((e, i) => e.slice(i, i+1))(word_0,
|
|
583
696
|
Number(31n)),
|
|
584
697
|
'Field',
|
|
585
|
-
'Signet.compact line
|
|
698
|
+
'Signet.compact line 564 char 18');
|
|
586
699
|
__compactRuntime.assert(last_0 === 0n || last_0 === 1n,
|
|
587
700
|
'ABI word is not a canonical Boolean');
|
|
588
701
|
return last_0 === 1n;
|
|
589
702
|
}
|
|
590
|
-
|
|
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
|
+
}
|
|
713
|
+
_calculateSignetAttestationDigest1_0(requestId_0,
|
|
714
|
+
blockHeight_0,
|
|
715
|
+
outputKind_0,
|
|
716
|
+
serializedOutput_0)
|
|
717
|
+
{
|
|
591
718
|
return this._calculateSignetAttestationDigest_0(requestId_0,
|
|
719
|
+
blockHeight_0,
|
|
720
|
+
outputKind_0,
|
|
592
721
|
serializedOutput_0);
|
|
593
722
|
}
|
|
594
|
-
_calculateSignetAttestationDigest2_0(requestId_0,
|
|
723
|
+
_calculateSignetAttestationDigest2_0(requestId_0,
|
|
724
|
+
blockHeight_0,
|
|
725
|
+
outputKind_0,
|
|
726
|
+
serializedOutput_0)
|
|
727
|
+
{
|
|
595
728
|
return this._calculateSignetAttestationDigest_1(requestId_0,
|
|
729
|
+
blockHeight_0,
|
|
730
|
+
outputKind_0,
|
|
596
731
|
serializedOutput_0);
|
|
597
732
|
}
|
|
598
|
-
_calculateSignetAttestationDigest32_0(requestId_0,
|
|
599
|
-
|
|
733
|
+
_calculateSignetAttestationDigest32_0(requestId_0,
|
|
734
|
+
blockHeight_0,
|
|
735
|
+
outputKind_0,
|
|
736
|
+
serializedOutput_0)
|
|
737
|
+
{
|
|
738
|
+
return this._calculateSignetAttestationDigest_4(requestId_0,
|
|
739
|
+
blockHeight_0,
|
|
740
|
+
outputKind_0,
|
|
600
741
|
serializedOutput_0);
|
|
601
742
|
}
|
|
602
|
-
_calculateSignetAttestationDigest100_0(requestId_0,
|
|
743
|
+
_calculateSignetAttestationDigest100_0(requestId_0,
|
|
744
|
+
blockHeight_0,
|
|
745
|
+
outputKind_0,
|
|
746
|
+
serializedOutput_0)
|
|
747
|
+
{
|
|
603
748
|
return this._calculateSignetAttestationDigest_2(requestId_0,
|
|
749
|
+
blockHeight_0,
|
|
750
|
+
outputKind_0,
|
|
604
751
|
serializedOutput_0);
|
|
605
752
|
}
|
|
606
|
-
|
|
607
|
-
|
|
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,
|
|
608
762
|
respondBidirectionalEvent_0,
|
|
609
763
|
mpcResponseKey_0)
|
|
610
764
|
{
|
|
611
|
-
return this.
|
|
612
|
-
serializedOutput_0,
|
|
765
|
+
return this._verifyRespondBidirectionalEvent_1(serializedOutput_0,
|
|
613
766
|
respondBidirectionalEvent_0,
|
|
614
767
|
mpcResponseKey_0);
|
|
615
768
|
}
|
|
@@ -645,21 +798,21 @@ export const pureCircuits = {
|
|
|
645
798
|
if (!(typeof(callerAddress_0) === 'object' && callerAddress_0.bytes.buffer instanceof ArrayBuffer && callerAddress_0.bytes.BYTES_PER_ELEMENT === 1 && callerAddress_0.bytes.length === 32)) {
|
|
646
799
|
__compactRuntime.typeError('constructSignBidirectionalEventNotificationV1',
|
|
647
800
|
'argument 1',
|
|
648
|
-
'Signet.compact line
|
|
801
|
+
'Signet.compact line 268 char 3',
|
|
649
802
|
'struct ContractAddress<bytes: Bytes<32>>',
|
|
650
803
|
callerAddress_0)
|
|
651
804
|
}
|
|
652
805
|
if (!(typeof(requestsPathDepth_0) === 'bigint' && requestsPathDepth_0 >= 0n && requestsPathDepth_0 <= 255n)) {
|
|
653
806
|
__compactRuntime.typeError('constructSignBidirectionalEventNotificationV1',
|
|
654
807
|
'argument 2',
|
|
655
|
-
'Signet.compact line
|
|
808
|
+
'Signet.compact line 268 char 3',
|
|
656
809
|
'Uint<0..256>',
|
|
657
810
|
requestsPathDepth_0)
|
|
658
811
|
}
|
|
659
812
|
if (!(Array.isArray(requestsPath_0) && requestsPath_0.length === 4 && requestsPath_0.every((t) => typeof(t) === 'bigint' && t >= 0n && t <= 255n))) {
|
|
660
813
|
__compactRuntime.typeError('constructSignBidirectionalEventNotificationV1',
|
|
661
814
|
'argument 3',
|
|
662
|
-
'Signet.compact line
|
|
815
|
+
'Signet.compact line 268 char 3',
|
|
663
816
|
'Vector<4, Uint<0..256>>',
|
|
664
817
|
requestsPath_0)
|
|
665
818
|
}
|
|
@@ -681,7 +834,7 @@ export const pureCircuits = {
|
|
|
681
834
|
if (!(addr_0.buffer instanceof ArrayBuffer && addr_0.BYTES_PER_ELEMENT === 1 && addr_0.length === 20)) {
|
|
682
835
|
__compactRuntime.typeError('evmAddressAbiWord',
|
|
683
836
|
'argument 1',
|
|
684
|
-
'Signet.compact line
|
|
837
|
+
'Signet.compact line 496 char 3',
|
|
685
838
|
'Bytes<20>',
|
|
686
839
|
addr_0)
|
|
687
840
|
}
|
|
@@ -695,7 +848,7 @@ export const pureCircuits = {
|
|
|
695
848
|
if (!(typeof(value_0) === 'bigint' && value_0 >= 0n && value_0 <= 340282366920938463463374607431768211455n)) {
|
|
696
849
|
__compactRuntime.typeError('numericAbiWord',
|
|
697
850
|
'argument 1',
|
|
698
|
-
'Signet.compact line
|
|
851
|
+
'Signet.compact line 502 char 3',
|
|
699
852
|
'Uint<0..340282366920938463463374607431768211456>',
|
|
700
853
|
value_0)
|
|
701
854
|
}
|
|
@@ -709,7 +862,7 @@ export const pureCircuits = {
|
|
|
709
862
|
if (!(typeof(value_0) === 'boolean')) {
|
|
710
863
|
__compactRuntime.typeError('boolAbiWord',
|
|
711
864
|
'argument 1',
|
|
712
|
-
'Signet.compact line
|
|
865
|
+
'Signet.compact line 515 char 3',
|
|
713
866
|
'Boolean',
|
|
714
867
|
value_0)
|
|
715
868
|
}
|
|
@@ -723,7 +876,7 @@ export const pureCircuits = {
|
|
|
723
876
|
if (!(word_0.buffer instanceof ArrayBuffer && word_0.BYTES_PER_ELEMENT === 1 && word_0.length === 32)) {
|
|
724
877
|
__compactRuntime.typeError('abiWordToUint128',
|
|
725
878
|
'argument 1',
|
|
726
|
-
'Signet.compact line
|
|
879
|
+
'Signet.compact line 523 char 3',
|
|
727
880
|
'Bytes<32>',
|
|
728
881
|
word_0)
|
|
729
882
|
}
|
|
@@ -737,135 +890,264 @@ export const pureCircuits = {
|
|
|
737
890
|
if (!(word_0.buffer instanceof ArrayBuffer && word_0.BYTES_PER_ELEMENT === 1 && word_0.length === 32)) {
|
|
738
891
|
__compactRuntime.typeError('abiWordToBool',
|
|
739
892
|
'argument 1',
|
|
740
|
-
'Signet.compact line
|
|
893
|
+
'Signet.compact line 562 char 3',
|
|
741
894
|
'Bytes<32>',
|
|
742
895
|
word_0)
|
|
743
896
|
}
|
|
744
897
|
return _dummyContract._abiWordToBool_0(word_0);
|
|
745
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
|
+
},
|
|
746
940
|
calculateSignetAttestationDigest1: (...args_0) => {
|
|
747
|
-
if (args_0.length !==
|
|
748
|
-
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}`);
|
|
749
943
|
}
|
|
750
944
|
const requestId_0 = args_0[0];
|
|
751
|
-
const
|
|
945
|
+
const blockHeight_0 = args_0[1];
|
|
946
|
+
const outputKind_0 = args_0[2];
|
|
947
|
+
const serializedOutput_0 = args_0[3];
|
|
752
948
|
if (!(requestId_0.buffer instanceof ArrayBuffer && requestId_0.BYTES_PER_ELEMENT === 1 && requestId_0.length === 32)) {
|
|
753
949
|
__compactRuntime.typeError('calculateSignetAttestationDigest1',
|
|
754
950
|
'argument 1',
|
|
755
|
-
'circuits.compact line
|
|
951
|
+
'circuits.compact line 38 char 1',
|
|
756
952
|
'Bytes<32>',
|
|
757
953
|
requestId_0)
|
|
758
954
|
}
|
|
759
|
-
if (!(
|
|
955
|
+
if (!(typeof(blockHeight_0) === 'bigint' && blockHeight_0 >= 0n && blockHeight_0 <= 18446744073709551615n)) {
|
|
760
956
|
__compactRuntime.typeError('calculateSignetAttestationDigest1',
|
|
761
957
|
'argument 2',
|
|
762
|
-
'circuits.compact line
|
|
958
|
+
'circuits.compact line 38 char 1',
|
|
959
|
+
'Uint<0..18446744073709551616>',
|
|
960
|
+
blockHeight_0)
|
|
961
|
+
}
|
|
962
|
+
if (!(typeof(outputKind_0) === 'number' && outputKind_0 >= 0 && outputKind_0 <= 2)) {
|
|
963
|
+
__compactRuntime.typeError('calculateSignetAttestationDigest1',
|
|
964
|
+
'argument 3',
|
|
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',
|
|
763
973
|
'Bytes<1>',
|
|
764
974
|
serializedOutput_0)
|
|
765
975
|
}
|
|
766
976
|
return _dummyContract._calculateSignetAttestationDigest1_0(requestId_0,
|
|
977
|
+
blockHeight_0,
|
|
978
|
+
outputKind_0,
|
|
767
979
|
serializedOutput_0);
|
|
768
980
|
},
|
|
769
981
|
calculateSignetAttestationDigest2: (...args_0) => {
|
|
770
|
-
if (args_0.length !==
|
|
771
|
-
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}`);
|
|
772
984
|
}
|
|
773
985
|
const requestId_0 = args_0[0];
|
|
774
|
-
const
|
|
986
|
+
const blockHeight_0 = args_0[1];
|
|
987
|
+
const outputKind_0 = args_0[2];
|
|
988
|
+
const serializedOutput_0 = args_0[3];
|
|
775
989
|
if (!(requestId_0.buffer instanceof ArrayBuffer && requestId_0.BYTES_PER_ELEMENT === 1 && requestId_0.length === 32)) {
|
|
776
990
|
__compactRuntime.typeError('calculateSignetAttestationDigest2',
|
|
777
991
|
'argument 1',
|
|
778
|
-
'circuits.compact line
|
|
992
|
+
'circuits.compact line 47 char 1',
|
|
779
993
|
'Bytes<32>',
|
|
780
994
|
requestId_0)
|
|
781
995
|
}
|
|
782
|
-
if (!(
|
|
996
|
+
if (!(typeof(blockHeight_0) === 'bigint' && blockHeight_0 >= 0n && blockHeight_0 <= 18446744073709551615n)) {
|
|
783
997
|
__compactRuntime.typeError('calculateSignetAttestationDigest2',
|
|
784
998
|
'argument 2',
|
|
785
|
-
'circuits.compact line
|
|
999
|
+
'circuits.compact line 47 char 1',
|
|
1000
|
+
'Uint<0..18446744073709551616>',
|
|
1001
|
+
blockHeight_0)
|
|
1002
|
+
}
|
|
1003
|
+
if (!(typeof(outputKind_0) === 'number' && outputKind_0 >= 0 && outputKind_0 <= 2)) {
|
|
1004
|
+
__compactRuntime.typeError('calculateSignetAttestationDigest2',
|
|
1005
|
+
'argument 3',
|
|
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',
|
|
786
1014
|
'Bytes<2>',
|
|
787
1015
|
serializedOutput_0)
|
|
788
1016
|
}
|
|
789
1017
|
return _dummyContract._calculateSignetAttestationDigest2_0(requestId_0,
|
|
1018
|
+
blockHeight_0,
|
|
1019
|
+
outputKind_0,
|
|
790
1020
|
serializedOutput_0);
|
|
791
1021
|
},
|
|
792
1022
|
calculateSignetAttestationDigest32: (...args_0) => {
|
|
793
|
-
if (args_0.length !==
|
|
794
|
-
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}`);
|
|
795
1025
|
}
|
|
796
1026
|
const requestId_0 = args_0[0];
|
|
797
|
-
const
|
|
1027
|
+
const blockHeight_0 = args_0[1];
|
|
1028
|
+
const outputKind_0 = args_0[2];
|
|
1029
|
+
const serializedOutput_0 = args_0[3];
|
|
798
1030
|
if (!(requestId_0.buffer instanceof ArrayBuffer && requestId_0.BYTES_PER_ELEMENT === 1 && requestId_0.length === 32)) {
|
|
799
1031
|
__compactRuntime.typeError('calculateSignetAttestationDigest32',
|
|
800
1032
|
'argument 1',
|
|
801
|
-
'circuits.compact line
|
|
1033
|
+
'circuits.compact line 56 char 1',
|
|
802
1034
|
'Bytes<32>',
|
|
803
1035
|
requestId_0)
|
|
804
1036
|
}
|
|
805
|
-
if (!(
|
|
1037
|
+
if (!(typeof(blockHeight_0) === 'bigint' && blockHeight_0 >= 0n && blockHeight_0 <= 18446744073709551615n)) {
|
|
806
1038
|
__compactRuntime.typeError('calculateSignetAttestationDigest32',
|
|
807
1039
|
'argument 2',
|
|
808
|
-
'circuits.compact line
|
|
1040
|
+
'circuits.compact line 56 char 1',
|
|
1041
|
+
'Uint<0..18446744073709551616>',
|
|
1042
|
+
blockHeight_0)
|
|
1043
|
+
}
|
|
1044
|
+
if (!(typeof(outputKind_0) === 'number' && outputKind_0 >= 0 && outputKind_0 <= 2)) {
|
|
1045
|
+
__compactRuntime.typeError('calculateSignetAttestationDigest32',
|
|
1046
|
+
'argument 3',
|
|
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',
|
|
809
1055
|
'Bytes<32>',
|
|
810
1056
|
serializedOutput_0)
|
|
811
1057
|
}
|
|
812
1058
|
return _dummyContract._calculateSignetAttestationDigest32_0(requestId_0,
|
|
1059
|
+
blockHeight_0,
|
|
1060
|
+
outputKind_0,
|
|
813
1061
|
serializedOutput_0);
|
|
814
1062
|
},
|
|
815
1063
|
calculateSignetAttestationDigest100: (...args_0) => {
|
|
816
|
-
if (args_0.length !==
|
|
817
|
-
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}`);
|
|
818
1066
|
}
|
|
819
1067
|
const requestId_0 = args_0[0];
|
|
820
|
-
const
|
|
1068
|
+
const blockHeight_0 = args_0[1];
|
|
1069
|
+
const outputKind_0 = args_0[2];
|
|
1070
|
+
const serializedOutput_0 = args_0[3];
|
|
821
1071
|
if (!(requestId_0.buffer instanceof ArrayBuffer && requestId_0.BYTES_PER_ELEMENT === 1 && requestId_0.length === 32)) {
|
|
822
1072
|
__compactRuntime.typeError('calculateSignetAttestationDigest100',
|
|
823
1073
|
'argument 1',
|
|
824
|
-
'circuits.compact line
|
|
1074
|
+
'circuits.compact line 65 char 1',
|
|
825
1075
|
'Bytes<32>',
|
|
826
1076
|
requestId_0)
|
|
827
1077
|
}
|
|
828
|
-
if (!(
|
|
1078
|
+
if (!(typeof(blockHeight_0) === 'bigint' && blockHeight_0 >= 0n && blockHeight_0 <= 18446744073709551615n)) {
|
|
829
1079
|
__compactRuntime.typeError('calculateSignetAttestationDigest100',
|
|
830
1080
|
'argument 2',
|
|
831
|
-
'circuits.compact line
|
|
1081
|
+
'circuits.compact line 65 char 1',
|
|
1082
|
+
'Uint<0..18446744073709551616>',
|
|
1083
|
+
blockHeight_0)
|
|
1084
|
+
}
|
|
1085
|
+
if (!(typeof(outputKind_0) === 'number' && outputKind_0 >= 0 && outputKind_0 <= 2)) {
|
|
1086
|
+
__compactRuntime.typeError('calculateSignetAttestationDigest100',
|
|
1087
|
+
'argument 3',
|
|
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',
|
|
832
1096
|
'Bytes<100>',
|
|
833
1097
|
serializedOutput_0)
|
|
834
1098
|
}
|
|
835
1099
|
return _dummyContract._calculateSignetAttestationDigest100_0(requestId_0,
|
|
1100
|
+
blockHeight_0,
|
|
1101
|
+
outputKind_0,
|
|
836
1102
|
serializedOutput_0);
|
|
837
1103
|
},
|
|
838
|
-
|
|
839
|
-
if (args_0.length !==
|
|
840
|
-
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}`);
|
|
841
1107
|
}
|
|
842
|
-
const
|
|
843
|
-
const
|
|
844
|
-
const
|
|
845
|
-
|
|
846
|
-
|
|
847
|
-
__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',
|
|
848
1113
|
'argument 1',
|
|
849
|
-
'circuits.compact line
|
|
850
|
-
'Bytes<
|
|
851
|
-
|
|
1114
|
+
'circuits.compact line 74 char 1',
|
|
1115
|
+
'Bytes<0>',
|
|
1116
|
+
serializedOutput_0)
|
|
852
1117
|
}
|
|
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',
|
|
1120
|
+
'argument 2',
|
|
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}`);
|
|
1132
|
+
}
|
|
1133
|
+
const serializedOutput_0 = args_0[0];
|
|
1134
|
+
const respondBidirectionalEvent_0 = args_0[1];
|
|
1135
|
+
const mpcResponseKey_0 = args_0[2];
|
|
853
1136
|
if (!(serializedOutput_0.buffer instanceof ArrayBuffer && serializedOutput_0.BYTES_PER_ELEMENT === 1 && serializedOutput_0.length === 32)) {
|
|
854
1137
|
__compactRuntime.typeError('verifyRespondBidirectionalEvent32',
|
|
855
|
-
'argument
|
|
856
|
-
'circuits.compact line
|
|
1138
|
+
'argument 1',
|
|
1139
|
+
'circuits.compact line 86 char 1',
|
|
857
1140
|
'Bytes<32>',
|
|
858
1141
|
serializedOutput_0)
|
|
859
1142
|
}
|
|
860
|
-
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)) {
|
|
861
1144
|
__compactRuntime.typeError('verifyRespondBidirectionalEvent32',
|
|
862
|
-
'argument
|
|
863
|
-
'circuits.compact line
|
|
864
|
-
'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>>>',
|
|
865
1148
|
respondBidirectionalEvent_0)
|
|
866
1149
|
}
|
|
867
|
-
return _dummyContract._verifyRespondBidirectionalEvent32_0(
|
|
868
|
-
serializedOutput_0,
|
|
1150
|
+
return _dummyContract._verifyRespondBidirectionalEvent32_0(serializedOutput_0,
|
|
869
1151
|
respondBidirectionalEvent_0,
|
|
870
1152
|
mpcResponseKey_0);
|
|
871
1153
|
}
|