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