@sig-net/midnight 0.19.0 → 0.21.0-rc.1
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 +42 -2
- package/dist/abi-serde.d.ts +32 -30
- package/dist/abi-serde.d.ts.map +1 -1
- package/dist/abi-serde.js +139 -75
- package/dist/abi-serde.js.map +1 -1
- package/dist/byte-codecs.d.ts +62 -0
- package/dist/byte-codecs.d.ts.map +1 -0
- package/dist/byte-codecs.js +116 -0
- package/dist/byte-codecs.js.map +1 -0
- package/dist/compact-descriptors.d.ts +89 -0
- package/dist/compact-descriptors.d.ts.map +1 -0
- package/dist/compact-descriptors.js +139 -0
- package/dist/compact-descriptors.js.map +1 -0
- package/dist/constants.d.ts +18 -43
- package/dist/constants.d.ts.map +1 -1
- package/dist/constants.js +19 -45
- package/dist/constants.js.map +1 -1
- package/dist/ecdsa-attestation.d.ts +66 -96
- package/dist/ecdsa-attestation.d.ts.map +1 -1
- package/dist/ecdsa-attestation.js +115 -140
- package/dist/ecdsa-attestation.js.map +1 -1
- package/dist/epsilon-derivation.d.ts +24 -31
- package/dist/epsilon-derivation.d.ts.map +1 -1
- package/dist/epsilon-derivation.js +52 -62
- package/dist/epsilon-derivation.js.map +1 -1
- package/dist/index.d.ts +10 -9
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +17 -8
- package/dist/index.js.map +1 -1
- package/dist/managed/compiler/contract-info.json +0 -22
- package/dist/managed/compiler/contract-manifest.json +8 -8
- package/dist/managed/contract/index.d.ts +0 -3
- package/dist/managed/contract/index.js +102 -225
- package/dist/managed/contract/index.js.map +1 -1
- package/dist/raw-contract-state.d.ts +25 -0
- package/dist/raw-contract-state.d.ts.map +1 -0
- package/dist/raw-contract-state.js +52 -0
- package/dist/raw-contract-state.js.map +1 -0
- package/dist/signature-requests-state-reader.d.ts +18 -44
- package/dist/signature-requests-state-reader.d.ts.map +1 -1
- package/dist/signature-requests-state-reader.js +82 -146
- package/dist/signature-requests-state-reader.js.map +1 -1
- package/dist/signature-response-verification.d.ts +9 -8
- package/dist/signature-response-verification.d.ts.map +1 -1
- package/dist/signature-response-verification.js +20 -17
- package/dist/signature-response-verification.js.map +1 -1
- package/dist/signet-contract-events.d.ts +67 -66
- package/dist/signet-contract-events.d.ts.map +1 -1
- package/dist/signet-contract-events.js +57 -52
- package/dist/signet-contract-events.js.map +1 -1
- package/dist/signet-evtype2tx-record-decoding.d.ts +18 -0
- package/dist/signet-evtype2tx-record-decoding.d.ts.map +1 -0
- package/dist/signet-evtype2tx-record-decoding.js +97 -0
- package/dist/signet-evtype2tx-record-decoding.js.map +1 -0
- package/dist/signet-evtype2tx-requests.d.ts +43 -87
- package/dist/signet-evtype2tx-requests.d.ts.map +1 -1
- package/dist/signet-evtype2tx-requests.js +59 -130
- package/dist/signet-evtype2tx-requests.js.map +1 -1
- package/dist/signet-request-id.d.ts +14 -0
- package/dist/signet-request-id.d.ts.map +1 -0
- package/dist/signet-request-id.js +27 -0
- package/dist/signet-request-id.js.map +1 -0
- package/dist/signet-request-response-reader.d.ts +34 -56
- package/dist/signet-request-response-reader.d.ts.map +1 -1
- package/dist/signet-request-response-reader.js +56 -68
- package/dist/signet-request-response-reader.js.map +1 -1
- package/dist/signet-requests.d.ts +28 -92
- package/dist/signet-requests.d.ts.map +1 -1
- package/dist/signet-requests.js +39 -141
- package/dist/signet-requests.js.map +1 -1
- package/dist/testing.d.ts +3 -0
- package/dist/testing.d.ts.map +1 -0
- package/dist/testing.js +20 -0
- package/dist/testing.js.map +1 -0
- package/package.json +12 -3
- package/src/Signet.compact +149 -198
- package/src/circuits.compact +9 -16
- package/dist/signature-state-reading.d.ts +0 -43
- package/dist/signature-state-reading.d.ts.map +0 -1
- package/dist/signature-state-reading.js +0 -74
- package/dist/signature-state-reading.js.map +0 -1
- package/dist/signet-request-feed.d.ts +0 -126
- package/dist/signet-request-feed.d.ts.map +0 -1
- package/dist/signet-request-feed.js +0 -216
- package/dist/signet-request-feed.js.map +0 -1
|
@@ -3,8 +3,6 @@ __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.CompactTypeBytes(100);
|
|
7
|
-
|
|
8
6
|
class _AffinePoint_0 {
|
|
9
7
|
alignment() {
|
|
10
8
|
return _descriptor_0.alignment().concat(_descriptor_0.alignment());
|
|
@@ -20,47 +18,49 @@ class _AffinePoint_0 {
|
|
|
20
18
|
}
|
|
21
19
|
}
|
|
22
20
|
|
|
23
|
-
const
|
|
21
|
+
const _descriptor_1 = new _AffinePoint_0();
|
|
24
22
|
|
|
25
|
-
const
|
|
23
|
+
const _descriptor_2 = new __compactRuntime.CompactTypeUnsignedInteger(255n, 1);
|
|
26
24
|
|
|
27
25
|
class _Signature_0 {
|
|
28
26
|
alignment() {
|
|
29
|
-
return
|
|
27
|
+
return _descriptor_1.alignment().concat(_descriptor_0.alignment().concat(_descriptor_2.alignment()));
|
|
30
28
|
}
|
|
31
29
|
fromValue(value_0) {
|
|
32
30
|
return {
|
|
33
|
-
bigR:
|
|
31
|
+
bigR: _descriptor_1.fromValue(value_0),
|
|
34
32
|
s: _descriptor_0.fromValue(value_0),
|
|
35
|
-
recoveryId:
|
|
33
|
+
recoveryId: _descriptor_2.fromValue(value_0)
|
|
36
34
|
}
|
|
37
35
|
}
|
|
38
36
|
toValue(value_0) {
|
|
39
|
-
return
|
|
37
|
+
return _descriptor_1.toValue(value_0.bigR).concat(_descriptor_0.toValue(value_0.s).concat(_descriptor_2.toValue(value_0.recoveryId)));
|
|
40
38
|
}
|
|
41
39
|
}
|
|
42
40
|
|
|
43
|
-
const
|
|
41
|
+
const _descriptor_3 = new _Signature_0();
|
|
44
42
|
|
|
45
43
|
class _RespondBidirectionalEvent_0 {
|
|
46
44
|
alignment() {
|
|
47
|
-
return
|
|
45
|
+
return _descriptor_3.alignment();
|
|
48
46
|
}
|
|
49
47
|
fromValue(value_0) {
|
|
50
48
|
return {
|
|
51
|
-
signature:
|
|
49
|
+
signature: _descriptor_3.fromValue(value_0)
|
|
52
50
|
}
|
|
53
51
|
}
|
|
54
52
|
toValue(value_0) {
|
|
55
|
-
return
|
|
53
|
+
return _descriptor_3.toValue(value_0.signature);
|
|
56
54
|
}
|
|
57
55
|
}
|
|
58
56
|
|
|
59
|
-
const
|
|
57
|
+
const _descriptor_4 = new _RespondBidirectionalEvent_0();
|
|
58
|
+
|
|
59
|
+
const _descriptor_5 = __compactRuntime.CompactTypeSecp256k1Point;
|
|
60
60
|
|
|
61
|
-
const _descriptor_6 = __compactRuntime.
|
|
61
|
+
const _descriptor_6 = __compactRuntime.CompactTypeBoolean;
|
|
62
62
|
|
|
63
|
-
const _descriptor_7 = __compactRuntime.
|
|
63
|
+
const _descriptor_7 = new __compactRuntime.CompactTypeBytes(100);
|
|
64
64
|
|
|
65
65
|
const _descriptor_8 = new __compactRuntime.CompactTypeBytes(1);
|
|
66
66
|
|
|
@@ -68,6 +68,8 @@ const _descriptor_9 = new __compactRuntime.CompactTypeUnsignedInteger(3402823669
|
|
|
68
68
|
|
|
69
69
|
const _descriptor_10 = new __compactRuntime.CompactTypeBytes(20);
|
|
70
70
|
|
|
71
|
+
const _descriptor_11 = __compactRuntime.CompactTypeSecp256k1Scalar;
|
|
72
|
+
|
|
71
73
|
class _ContractAddress_0 {
|
|
72
74
|
alignment() {
|
|
73
75
|
return _descriptor_0.alignment();
|
|
@@ -82,45 +84,43 @@ class _ContractAddress_0 {
|
|
|
82
84
|
}
|
|
83
85
|
}
|
|
84
86
|
|
|
85
|
-
const
|
|
87
|
+
const _descriptor_12 = new _ContractAddress_0();
|
|
86
88
|
|
|
87
|
-
const
|
|
89
|
+
const _descriptor_13 = new __compactRuntime.CompactTypeVector(4, _descriptor_2);
|
|
88
90
|
|
|
89
|
-
const
|
|
91
|
+
const _descriptor_14 = new __compactRuntime.CompactTypeBytes(128);
|
|
90
92
|
|
|
91
93
|
class _SignBidirectionalEventNotification_0 {
|
|
92
94
|
alignment() {
|
|
93
|
-
return
|
|
95
|
+
return _descriptor_2.alignment().concat(_descriptor_14.alignment());
|
|
94
96
|
}
|
|
95
97
|
fromValue(value_0) {
|
|
96
98
|
return {
|
|
97
|
-
version:
|
|
98
|
-
payload:
|
|
99
|
+
version: _descriptor_2.fromValue(value_0),
|
|
100
|
+
payload: _descriptor_14.fromValue(value_0)
|
|
99
101
|
}
|
|
100
102
|
}
|
|
101
103
|
toValue(value_0) {
|
|
102
|
-
return
|
|
104
|
+
return _descriptor_2.toValue(value_0.version).concat(_descriptor_14.toValue(value_0.payload));
|
|
103
105
|
}
|
|
104
106
|
}
|
|
105
107
|
|
|
106
|
-
const
|
|
107
|
-
|
|
108
|
-
const _descriptor_15 = __compactRuntime.CompactTypeSecp256k1Scalar;
|
|
108
|
+
const _descriptor_15 = new _SignBidirectionalEventNotification_0();
|
|
109
109
|
|
|
110
110
|
const _descriptor_16 = __compactRuntime.CompactTypeSecp256k1Base;
|
|
111
111
|
|
|
112
112
|
class _tuple_0 {
|
|
113
113
|
alignment() {
|
|
114
|
-
return _descriptor_0.alignment().concat(
|
|
114
|
+
return _descriptor_0.alignment().concat(_descriptor_0.alignment());
|
|
115
115
|
}
|
|
116
116
|
fromValue(value_0) {
|
|
117
117
|
return [
|
|
118
118
|
_descriptor_0.fromValue(value_0),
|
|
119
|
-
|
|
119
|
+
_descriptor_0.fromValue(value_0)
|
|
120
120
|
]
|
|
121
121
|
}
|
|
122
122
|
toValue(value_0) {
|
|
123
|
-
return _descriptor_0.toValue(value_0[0]).concat(
|
|
123
|
+
return _descriptor_0.toValue(value_0[0]).concat(_descriptor_0.toValue(value_0[1]));
|
|
124
124
|
}
|
|
125
125
|
}
|
|
126
126
|
|
|
@@ -128,16 +128,16 @@ const _descriptor_17 = new _tuple_0();
|
|
|
128
128
|
|
|
129
129
|
class _tuple_1 {
|
|
130
130
|
alignment() {
|
|
131
|
-
return _descriptor_0.alignment().concat(
|
|
131
|
+
return _descriptor_0.alignment().concat(_descriptor_8.alignment());
|
|
132
132
|
}
|
|
133
133
|
fromValue(value_0) {
|
|
134
134
|
return [
|
|
135
135
|
_descriptor_0.fromValue(value_0),
|
|
136
|
-
|
|
136
|
+
_descriptor_8.fromValue(value_0)
|
|
137
137
|
]
|
|
138
138
|
}
|
|
139
139
|
toValue(value_0) {
|
|
140
|
-
return _descriptor_0.toValue(value_0[0]).concat(
|
|
140
|
+
return _descriptor_0.toValue(value_0[0]).concat(_descriptor_8.toValue(value_0[1]));
|
|
141
141
|
}
|
|
142
142
|
}
|
|
143
143
|
|
|
@@ -145,16 +145,16 @@ const _descriptor_18 = new _tuple_1();
|
|
|
145
145
|
|
|
146
146
|
class _tuple_2 {
|
|
147
147
|
alignment() {
|
|
148
|
-
return _descriptor_0.alignment().concat(
|
|
148
|
+
return _descriptor_0.alignment().concat(_descriptor_7.alignment());
|
|
149
149
|
}
|
|
150
150
|
fromValue(value_0) {
|
|
151
151
|
return [
|
|
152
152
|
_descriptor_0.fromValue(value_0),
|
|
153
|
-
|
|
153
|
+
_descriptor_7.fromValue(value_0)
|
|
154
154
|
]
|
|
155
155
|
}
|
|
156
156
|
toValue(value_0) {
|
|
157
|
-
return _descriptor_0.toValue(value_0[0]).concat(
|
|
157
|
+
return _descriptor_0.toValue(value_0[0]).concat(_descriptor_7.toValue(value_0[1]));
|
|
158
158
|
}
|
|
159
159
|
}
|
|
160
160
|
|
|
@@ -162,16 +162,16 @@ const _descriptor_19 = new _tuple_2();
|
|
|
162
162
|
|
|
163
163
|
class _Secp256k1EcdsaSignature_0 {
|
|
164
164
|
alignment() {
|
|
165
|
-
return
|
|
165
|
+
return _descriptor_11.alignment().concat(_descriptor_11.alignment());
|
|
166
166
|
}
|
|
167
167
|
fromValue(value_0) {
|
|
168
168
|
return {
|
|
169
|
-
r:
|
|
170
|
-
s:
|
|
169
|
+
r: _descriptor_11.fromValue(value_0),
|
|
170
|
+
s: _descriptor_11.fromValue(value_0)
|
|
171
171
|
}
|
|
172
172
|
}
|
|
173
173
|
toValue(value_0) {
|
|
174
|
-
return
|
|
174
|
+
return _descriptor_11.toValue(value_0.r).concat(_descriptor_11.toValue(value_0.s));
|
|
175
175
|
}
|
|
176
176
|
}
|
|
177
177
|
|
|
@@ -181,17 +181,17 @@ const _descriptor_21 = new __compactRuntime.CompactTypeUnsignedInteger(184467440
|
|
|
181
181
|
|
|
182
182
|
class _Either_0 {
|
|
183
183
|
alignment() {
|
|
184
|
-
return
|
|
184
|
+
return _descriptor_6.alignment().concat(_descriptor_0.alignment().concat(_descriptor_0.alignment()));
|
|
185
185
|
}
|
|
186
186
|
fromValue(value_0) {
|
|
187
187
|
return {
|
|
188
|
-
is_left:
|
|
188
|
+
is_left: _descriptor_6.fromValue(value_0),
|
|
189
189
|
left: _descriptor_0.fromValue(value_0),
|
|
190
190
|
right: _descriptor_0.fromValue(value_0)
|
|
191
191
|
}
|
|
192
192
|
}
|
|
193
193
|
toValue(value_0) {
|
|
194
|
-
return
|
|
194
|
+
return _descriptor_6.toValue(value_0.is_left).concat(_descriptor_0.toValue(value_0.left).concat(_descriptor_0.toValue(value_0.right)));
|
|
195
195
|
}
|
|
196
196
|
}
|
|
197
197
|
|
|
@@ -214,9 +214,6 @@ export class Contract {
|
|
|
214
214
|
async constructSignBidirectionalEventNotificationV1(context, ...args_1) {
|
|
215
215
|
return { result: pureCircuits.constructSignBidirectionalEventNotificationV1(...args_1), context };
|
|
216
216
|
},
|
|
217
|
-
async signetKeyHash(context, ...args_1) {
|
|
218
|
-
return { result: pureCircuits.signetKeyHash(...args_1), context };
|
|
219
|
-
},
|
|
220
217
|
async evmAddressAbiWord(context, ...args_1) {
|
|
221
218
|
return { result: pureCircuits.evmAddressAbiWord(...args_1), context };
|
|
222
219
|
},
|
|
@@ -340,20 +337,16 @@ export class Contract {
|
|
|
340
337
|
===
|
|
341
338
|
r_0;
|
|
342
339
|
}
|
|
343
|
-
_persistentHash_0(value_0) {
|
|
344
|
-
const result_0 = __compactRuntime.persistentHash(_descriptor_6, value_0);
|
|
345
|
-
return result_0;
|
|
346
|
-
}
|
|
347
340
|
_keccak256_0(value_0) {
|
|
348
|
-
const result_0 = __compactRuntime.keccak256(
|
|
341
|
+
const result_0 = __compactRuntime.keccak256(_descriptor_18, value_0);
|
|
349
342
|
return result_0;
|
|
350
343
|
}
|
|
351
344
|
_keccak256_1(value_0) {
|
|
352
|
-
const result_0 = __compactRuntime.keccak256(
|
|
345
|
+
const result_0 = __compactRuntime.keccak256(_descriptor_19, value_0);
|
|
353
346
|
return result_0;
|
|
354
347
|
}
|
|
355
348
|
_keccak256_2(value_0) {
|
|
356
|
-
const result_0 = __compactRuntime.keccak256(
|
|
349
|
+
const result_0 = __compactRuntime.keccak256(_descriptor_17, value_0);
|
|
357
350
|
return result_0;
|
|
358
351
|
}
|
|
359
352
|
_mul_0(x_0, y_0) {
|
|
@@ -404,42 +397,6 @@ export class Contract {
|
|
|
404
397
|
_calculateSignetAttestationDigest_2(requestId_0, serializedOutput_0) {
|
|
405
398
|
return this._keccak256_2([requestId_0, serializedOutput_0]);
|
|
406
399
|
}
|
|
407
|
-
_reverseBytes32_0(b_0) {
|
|
408
|
-
const v_0 = Array.from(b_0, BigInt);
|
|
409
|
-
return Uint8Array.from([v_0[31],
|
|
410
|
-
v_0[30],
|
|
411
|
-
v_0[29],
|
|
412
|
-
v_0[28],
|
|
413
|
-
v_0[27],
|
|
414
|
-
v_0[26],
|
|
415
|
-
v_0[25],
|
|
416
|
-
v_0[24],
|
|
417
|
-
v_0[23],
|
|
418
|
-
v_0[22],
|
|
419
|
-
v_0[21],
|
|
420
|
-
v_0[20],
|
|
421
|
-
v_0[19],
|
|
422
|
-
v_0[18],
|
|
423
|
-
v_0[17],
|
|
424
|
-
v_0[16],
|
|
425
|
-
v_0[15],
|
|
426
|
-
v_0[14],
|
|
427
|
-
v_0[13],
|
|
428
|
-
v_0[12],
|
|
429
|
-
v_0[11],
|
|
430
|
-
v_0[10],
|
|
431
|
-
v_0[9],
|
|
432
|
-
v_0[8],
|
|
433
|
-
v_0[7],
|
|
434
|
-
v_0[6],
|
|
435
|
-
v_0[5],
|
|
436
|
-
v_0[4],
|
|
437
|
-
v_0[3],
|
|
438
|
-
v_0[2],
|
|
439
|
-
v_0[1],
|
|
440
|
-
v_0[0]],
|
|
441
|
-
Number);
|
|
442
|
-
}
|
|
443
400
|
_verifyRespondBidirectionalEvent_0(requestId_0,
|
|
444
401
|
serializedOutput_0,
|
|
445
402
|
respondBidirectionalEvent_0,
|
|
@@ -451,18 +408,17 @@ export class Contract {
|
|
|
451
408
|
{ r:
|
|
452
409
|
__compactRuntime.convertBytesToField(115792089237316195423570985008687907852837564279074904382605163141518161494336n,
|
|
453
410
|
32,
|
|
454
|
-
|
|
411
|
+
respondBidirectionalEvent_0.signature.bigR.x,
|
|
455
412
|
'Secp256k1Scalar',
|
|
456
|
-
'Signet.compact line
|
|
413
|
+
'Signet.compact line 336 char 12'),
|
|
457
414
|
s:
|
|
458
415
|
__compactRuntime.convertBytesToField(115792089237316195423570985008687907852837564279074904382605163141518161494336n,
|
|
459
416
|
32,
|
|
460
|
-
|
|
417
|
+
respondBidirectionalEvent_0.signature.s,
|
|
461
418
|
'Secp256k1Scalar',
|
|
462
|
-
'Signet.compact line
|
|
419
|
+
'Signet.compact line 337 char 12') },
|
|
463
420
|
mpcResponseKey_0);
|
|
464
421
|
}
|
|
465
|
-
_signetKeyHash_0(pk_0) { return this._persistentHash_0(pk_0); }
|
|
466
422
|
_evmAddressAbiWord_0(addr_0) {
|
|
467
423
|
return Uint8Array.from([...Array.from(new Uint8Array(12), BigInt),
|
|
468
424
|
...Array.from(addr_0, BigInt)],
|
|
@@ -471,7 +427,7 @@ export class Contract {
|
|
|
471
427
|
_numericAbiWord_0(value_0) {
|
|
472
428
|
const le_0 = Array.from(__compactRuntime.convertBigintToBytes(16,
|
|
473
429
|
value_0,
|
|
474
|
-
'Signet.compact line
|
|
430
|
+
'Signet.compact line 415 char 17'),
|
|
475
431
|
BigInt);
|
|
476
432
|
return Uint8Array.from([...Array.from(new Uint8Array(16), BigInt),
|
|
477
433
|
le_0[15],
|
|
@@ -498,134 +454,62 @@ export class Contract {
|
|
|
498
454
|
Number);
|
|
499
455
|
}
|
|
500
456
|
_abiWordToUint128_0(word_0) {
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
457
|
+
const v_0 = Array.from(word_0, BigInt);
|
|
458
|
+
__compactRuntime.assert(v_0[0] === 0n, 'ABI word exceeds Uint<128>');
|
|
459
|
+
__compactRuntime.assert(v_0[1] === 0n, 'ABI word exceeds Uint<128>');
|
|
460
|
+
__compactRuntime.assert(v_0[2] === 0n, 'ABI word exceeds Uint<128>');
|
|
461
|
+
__compactRuntime.assert(v_0[3] === 0n, 'ABI word exceeds Uint<128>');
|
|
462
|
+
__compactRuntime.assert(v_0[4] === 0n, 'ABI word exceeds Uint<128>');
|
|
463
|
+
__compactRuntime.assert(v_0[5] === 0n, 'ABI word exceeds Uint<128>');
|
|
464
|
+
__compactRuntime.assert(v_0[6] === 0n, 'ABI word exceeds Uint<128>');
|
|
465
|
+
__compactRuntime.assert(v_0[7] === 0n, 'ABI word exceeds Uint<128>');
|
|
466
|
+
__compactRuntime.assert(v_0[8] === 0n, 'ABI word exceeds Uint<128>');
|
|
467
|
+
__compactRuntime.assert(v_0[9] === 0n, 'ABI word exceeds Uint<128>');
|
|
468
|
+
__compactRuntime.assert(v_0[10] === 0n, 'ABI word exceeds Uint<128>');
|
|
469
|
+
__compactRuntime.assert(v_0[11] === 0n, 'ABI word exceeds Uint<128>');
|
|
470
|
+
__compactRuntime.assert(v_0[12] === 0n, 'ABI word exceeds Uint<128>');
|
|
471
|
+
__compactRuntime.assert(v_0[13] === 0n, 'ABI word exceeds Uint<128>');
|
|
472
|
+
__compactRuntime.assert(v_0[14] === 0n, 'ABI word exceeds Uint<128>');
|
|
473
|
+
__compactRuntime.assert(v_0[15] === 0n, 'ABI word exceeds Uint<128>');
|
|
474
|
+
const b0_0 = v_0[16];
|
|
516
475
|
const b1_0 = __compactRuntime.addField(__compactRuntime.mulField(b0_0, 256n),
|
|
517
|
-
|
|
518
|
-
1,
|
|
519
|
-
((e, i) => e.slice(i, i+1))(word_0,
|
|
520
|
-
Number(17n)),
|
|
521
|
-
'Field',
|
|
522
|
-
'Signet.compact line 501 char 30'));
|
|
476
|
+
v_0[17]);
|
|
523
477
|
const b2_0 = __compactRuntime.addField(__compactRuntime.mulField(b1_0, 256n),
|
|
524
|
-
|
|
525
|
-
1,
|
|
526
|
-
((e, i) => e.slice(i, i+1))(word_0,
|
|
527
|
-
Number(18n)),
|
|
528
|
-
'Field',
|
|
529
|
-
'Signet.compact line 502 char 30'));
|
|
478
|
+
v_0[18]);
|
|
530
479
|
const b3_0 = __compactRuntime.addField(__compactRuntime.mulField(b2_0, 256n),
|
|
531
|
-
|
|
532
|
-
1,
|
|
533
|
-
((e, i) => e.slice(i, i+1))(word_0,
|
|
534
|
-
Number(19n)),
|
|
535
|
-
'Field',
|
|
536
|
-
'Signet.compact line 503 char 30'));
|
|
480
|
+
v_0[19]);
|
|
537
481
|
const b4_0 = __compactRuntime.addField(__compactRuntime.mulField(b3_0, 256n),
|
|
538
|
-
|
|
539
|
-
1,
|
|
540
|
-
((e, i) => e.slice(i, i+1))(word_0,
|
|
541
|
-
Number(20n)),
|
|
542
|
-
'Field',
|
|
543
|
-
'Signet.compact line 504 char 30'));
|
|
482
|
+
v_0[20]);
|
|
544
483
|
const b5_0 = __compactRuntime.addField(__compactRuntime.mulField(b4_0, 256n),
|
|
545
|
-
|
|
546
|
-
1,
|
|
547
|
-
((e, i) => e.slice(i, i+1))(word_0,
|
|
548
|
-
Number(21n)),
|
|
549
|
-
'Field',
|
|
550
|
-
'Signet.compact line 505 char 30'));
|
|
484
|
+
v_0[21]);
|
|
551
485
|
const b6_0 = __compactRuntime.addField(__compactRuntime.mulField(b5_0, 256n),
|
|
552
|
-
|
|
553
|
-
1,
|
|
554
|
-
((e, i) => e.slice(i, i+1))(word_0,
|
|
555
|
-
Number(22n)),
|
|
556
|
-
'Field',
|
|
557
|
-
'Signet.compact line 506 char 30'));
|
|
486
|
+
v_0[22]);
|
|
558
487
|
const b7_0 = __compactRuntime.addField(__compactRuntime.mulField(b6_0, 256n),
|
|
559
|
-
|
|
560
|
-
1,
|
|
561
|
-
((e, i) => e.slice(i, i+1))(word_0,
|
|
562
|
-
Number(23n)),
|
|
563
|
-
'Field',
|
|
564
|
-
'Signet.compact line 507 char 30'));
|
|
488
|
+
v_0[23]);
|
|
565
489
|
const b8_0 = __compactRuntime.addField(__compactRuntime.mulField(b7_0, 256n),
|
|
566
|
-
|
|
567
|
-
1,
|
|
568
|
-
((e, i) => e.slice(i, i+1))(word_0,
|
|
569
|
-
Number(24n)),
|
|
570
|
-
'Field',
|
|
571
|
-
'Signet.compact line 508 char 30'));
|
|
490
|
+
v_0[24]);
|
|
572
491
|
const b9_0 = __compactRuntime.addField(__compactRuntime.mulField(b8_0, 256n),
|
|
573
|
-
|
|
574
|
-
1,
|
|
575
|
-
((e, i) => e.slice(i, i+1))(word_0,
|
|
576
|
-
Number(25n)),
|
|
577
|
-
'Field',
|
|
578
|
-
'Signet.compact line 509 char 30'));
|
|
492
|
+
v_0[25]);
|
|
579
493
|
const b10_0 = __compactRuntime.addField(__compactRuntime.mulField(b9_0, 256n),
|
|
580
|
-
|
|
581
|
-
1,
|
|
582
|
-
((e, i) => e.slice(i, i+1))(word_0,
|
|
583
|
-
Number(26n)),
|
|
584
|
-
'Field',
|
|
585
|
-
'Signet.compact line 510 char 30'));
|
|
494
|
+
v_0[26]);
|
|
586
495
|
const b11_0 = __compactRuntime.addField(__compactRuntime.mulField(b10_0,
|
|
587
496
|
256n),
|
|
588
|
-
|
|
589
|
-
1,
|
|
590
|
-
((e, i) => e.slice(i, i+1))(word_0,
|
|
591
|
-
Number(27n)),
|
|
592
|
-
'Field',
|
|
593
|
-
'Signet.compact line 511 char 30'));
|
|
497
|
+
v_0[27]);
|
|
594
498
|
const b12_0 = __compactRuntime.addField(__compactRuntime.mulField(b11_0,
|
|
595
499
|
256n),
|
|
596
|
-
|
|
597
|
-
1,
|
|
598
|
-
((e, i) => e.slice(i, i+1))(word_0,
|
|
599
|
-
Number(28n)),
|
|
600
|
-
'Field',
|
|
601
|
-
'Signet.compact line 512 char 30'));
|
|
500
|
+
v_0[28]);
|
|
602
501
|
const b13_0 = __compactRuntime.addField(__compactRuntime.mulField(b12_0,
|
|
603
502
|
256n),
|
|
604
|
-
|
|
605
|
-
1,
|
|
606
|
-
((e, i) => e.slice(i, i+1))(word_0,
|
|
607
|
-
Number(29n)),
|
|
608
|
-
'Field',
|
|
609
|
-
'Signet.compact line 513 char 30'));
|
|
503
|
+
v_0[29]);
|
|
610
504
|
const b14_0 = __compactRuntime.addField(__compactRuntime.mulField(b13_0,
|
|
611
505
|
256n),
|
|
612
|
-
|
|
613
|
-
1,
|
|
614
|
-
((e, i) => e.slice(i, i+1))(word_0,
|
|
615
|
-
Number(30n)),
|
|
616
|
-
'Field',
|
|
617
|
-
'Signet.compact line 514 char 30'));
|
|
506
|
+
v_0[30]);
|
|
618
507
|
const b15_0 = __compactRuntime.addField(__compactRuntime.mulField(b14_0,
|
|
619
508
|
256n),
|
|
620
|
-
|
|
621
|
-
1,
|
|
622
|
-
((e, i) => e.slice(i, i+1))(word_0,
|
|
623
|
-
Number(31n)),
|
|
624
|
-
'Field',
|
|
625
|
-
'Signet.compact line 515 char 30'));
|
|
509
|
+
v_0[31]);
|
|
626
510
|
return ((t1) => {
|
|
627
511
|
if (t1 > 340282366920938463463374607431768211455n) {
|
|
628
|
-
throw new __compactRuntime.CompactError('Signet.compact line
|
|
512
|
+
throw new __compactRuntime.CompactError('Signet.compact line 467 char 12: cast from Field or Uint value to smaller Uint value failed: ' + t1 + ' is greater than 340282366920938463463374607431768211455');
|
|
629
513
|
}
|
|
630
514
|
return t1;
|
|
631
515
|
})(b15_0);
|
|
@@ -636,7 +520,7 @@ export class Contract {
|
|
|
636
520
|
((e, i) => e.slice(i, i+31))(word_0,
|
|
637
521
|
Number(0n)),
|
|
638
522
|
'Field',
|
|
639
|
-
'Signet.compact line
|
|
523
|
+
'Signet.compact line 473 char 12')
|
|
640
524
|
===
|
|
641
525
|
0n,
|
|
642
526
|
'ABI word is not a canonical Boolean');
|
|
@@ -645,7 +529,7 @@ export class Contract {
|
|
|
645
529
|
((e, i) => e.slice(i, i+1))(word_0,
|
|
646
530
|
Number(31n)),
|
|
647
531
|
'Field',
|
|
648
|
-
'Signet.compact line
|
|
532
|
+
'Signet.compact line 474 char 18');
|
|
649
533
|
__compactRuntime.assert(last_0 === 0n || last_0 === 1n,
|
|
650
534
|
'ABI word is not a canonical Boolean');
|
|
651
535
|
return last_0 === 1n;
|
|
@@ -704,21 +588,21 @@ export const pureCircuits = {
|
|
|
704
588
|
if (!(typeof(callerAddress_0) === 'object' && callerAddress_0.bytes.buffer instanceof ArrayBuffer && callerAddress_0.bytes.BYTES_PER_ELEMENT === 1 && callerAddress_0.bytes.length === 32)) {
|
|
705
589
|
__compactRuntime.typeError('constructSignBidirectionalEventNotificationV1',
|
|
706
590
|
'argument 1',
|
|
707
|
-
'Signet.compact line
|
|
591
|
+
'Signet.compact line 229 char 3',
|
|
708
592
|
'struct ContractAddress<bytes: Bytes<32>>',
|
|
709
593
|
callerAddress_0)
|
|
710
594
|
}
|
|
711
595
|
if (!(typeof(requestsPathDepth_0) === 'bigint' && requestsPathDepth_0 >= 0n && requestsPathDepth_0 <= 255n)) {
|
|
712
596
|
__compactRuntime.typeError('constructSignBidirectionalEventNotificationV1',
|
|
713
597
|
'argument 2',
|
|
714
|
-
'Signet.compact line
|
|
598
|
+
'Signet.compact line 229 char 3',
|
|
715
599
|
'Uint<0..256>',
|
|
716
600
|
requestsPathDepth_0)
|
|
717
601
|
}
|
|
718
602
|
if (!(Array.isArray(requestsPath_0) && requestsPath_0.length === 4 && requestsPath_0.every((t) => typeof(t) === 'bigint' && t >= 0n && t <= 255n))) {
|
|
719
603
|
__compactRuntime.typeError('constructSignBidirectionalEventNotificationV1',
|
|
720
604
|
'argument 3',
|
|
721
|
-
'Signet.compact line
|
|
605
|
+
'Signet.compact line 229 char 3',
|
|
722
606
|
'Vector<4, Uint<0..256>>',
|
|
723
607
|
requestsPath_0)
|
|
724
608
|
}
|
|
@@ -726,13 +610,6 @@ export const pureCircuits = {
|
|
|
726
610
|
requestsPathDepth_0,
|
|
727
611
|
requestsPath_0);
|
|
728
612
|
},
|
|
729
|
-
signetKeyHash: (...args_0) => {
|
|
730
|
-
if (args_0.length !== 1) {
|
|
731
|
-
throw new __compactRuntime.CompactError(`signetKeyHash: expected 1 argument (as invoked from Typescript), received ${args_0.length}`);
|
|
732
|
-
}
|
|
733
|
-
const pk_0 = args_0[0];
|
|
734
|
-
return _dummyContract._signetKeyHash_0(pk_0);
|
|
735
|
-
},
|
|
736
613
|
evmAddressAbiWord: (...args_0) => {
|
|
737
614
|
if (args_0.length !== 1) {
|
|
738
615
|
throw new __compactRuntime.CompactError(`evmAddressAbiWord: expected 1 argument (as invoked from Typescript), received ${args_0.length}`);
|
|
@@ -741,7 +618,7 @@ export const pureCircuits = {
|
|
|
741
618
|
if (!(addr_0.buffer instanceof ArrayBuffer && addr_0.BYTES_PER_ELEMENT === 1 && addr_0.length === 20)) {
|
|
742
619
|
__compactRuntime.typeError('evmAddressAbiWord',
|
|
743
620
|
'argument 1',
|
|
744
|
-
'Signet.compact line
|
|
621
|
+
'Signet.compact line 406 char 3',
|
|
745
622
|
'Bytes<20>',
|
|
746
623
|
addr_0)
|
|
747
624
|
}
|
|
@@ -755,7 +632,7 @@ export const pureCircuits = {
|
|
|
755
632
|
if (!(typeof(value_0) === 'bigint' && value_0 >= 0n && value_0 <= 340282366920938463463374607431768211455n)) {
|
|
756
633
|
__compactRuntime.typeError('numericAbiWord',
|
|
757
634
|
'argument 1',
|
|
758
|
-
'Signet.compact line
|
|
635
|
+
'Signet.compact line 412 char 3',
|
|
759
636
|
'Uint<0..340282366920938463463374607431768211456>',
|
|
760
637
|
value_0)
|
|
761
638
|
}
|
|
@@ -769,7 +646,7 @@ export const pureCircuits = {
|
|
|
769
646
|
if (!(typeof(value_0) === 'boolean')) {
|
|
770
647
|
__compactRuntime.typeError('boolAbiWord',
|
|
771
648
|
'argument 1',
|
|
772
|
-
'Signet.compact line
|
|
649
|
+
'Signet.compact line 425 char 3',
|
|
773
650
|
'Boolean',
|
|
774
651
|
value_0)
|
|
775
652
|
}
|
|
@@ -783,7 +660,7 @@ export const pureCircuits = {
|
|
|
783
660
|
if (!(word_0.buffer instanceof ArrayBuffer && word_0.BYTES_PER_ELEMENT === 1 && word_0.length === 32)) {
|
|
784
661
|
__compactRuntime.typeError('abiWordToUint128',
|
|
785
662
|
'argument 1',
|
|
786
|
-
'Signet.compact line
|
|
663
|
+
'Signet.compact line 433 char 3',
|
|
787
664
|
'Bytes<32>',
|
|
788
665
|
word_0)
|
|
789
666
|
}
|
|
@@ -797,7 +674,7 @@ export const pureCircuits = {
|
|
|
797
674
|
if (!(word_0.buffer instanceof ArrayBuffer && word_0.BYTES_PER_ELEMENT === 1 && word_0.length === 32)) {
|
|
798
675
|
__compactRuntime.typeError('abiWordToBool',
|
|
799
676
|
'argument 1',
|
|
800
|
-
'Signet.compact line
|
|
677
|
+
'Signet.compact line 472 char 3',
|
|
801
678
|
'Bytes<32>',
|
|
802
679
|
word_0)
|
|
803
680
|
}
|
|
@@ -812,14 +689,14 @@ export const pureCircuits = {
|
|
|
812
689
|
if (!(requestId_0.buffer instanceof ArrayBuffer && requestId_0.BYTES_PER_ELEMENT === 1 && requestId_0.length === 32)) {
|
|
813
690
|
__compactRuntime.typeError('calculateSignetAttestationDigest1',
|
|
814
691
|
'argument 1',
|
|
815
|
-
'circuits.compact line
|
|
692
|
+
'circuits.compact line 27 char 1',
|
|
816
693
|
'Bytes<32>',
|
|
817
694
|
requestId_0)
|
|
818
695
|
}
|
|
819
696
|
if (!(serializedOutput_0.buffer instanceof ArrayBuffer && serializedOutput_0.BYTES_PER_ELEMENT === 1 && serializedOutput_0.length === 1)) {
|
|
820
697
|
__compactRuntime.typeError('calculateSignetAttestationDigest1',
|
|
821
698
|
'argument 2',
|
|
822
|
-
'circuits.compact line
|
|
699
|
+
'circuits.compact line 27 char 1',
|
|
823
700
|
'Bytes<1>',
|
|
824
701
|
serializedOutput_0)
|
|
825
702
|
}
|
|
@@ -835,14 +712,14 @@ export const pureCircuits = {
|
|
|
835
712
|
if (!(requestId_0.buffer instanceof ArrayBuffer && requestId_0.BYTES_PER_ELEMENT === 1 && requestId_0.length === 32)) {
|
|
836
713
|
__compactRuntime.typeError('calculateSignetAttestationDigest32',
|
|
837
714
|
'argument 1',
|
|
838
|
-
'circuits.compact line
|
|
715
|
+
'circuits.compact line 34 char 1',
|
|
839
716
|
'Bytes<32>',
|
|
840
717
|
requestId_0)
|
|
841
718
|
}
|
|
842
719
|
if (!(serializedOutput_0.buffer instanceof ArrayBuffer && serializedOutput_0.BYTES_PER_ELEMENT === 1 && serializedOutput_0.length === 32)) {
|
|
843
720
|
__compactRuntime.typeError('calculateSignetAttestationDigest32',
|
|
844
721
|
'argument 2',
|
|
845
|
-
'circuits.compact line
|
|
722
|
+
'circuits.compact line 34 char 1',
|
|
846
723
|
'Bytes<32>',
|
|
847
724
|
serializedOutput_0)
|
|
848
725
|
}
|
|
@@ -858,14 +735,14 @@ export const pureCircuits = {
|
|
|
858
735
|
if (!(requestId_0.buffer instanceof ArrayBuffer && requestId_0.BYTES_PER_ELEMENT === 1 && requestId_0.length === 32)) {
|
|
859
736
|
__compactRuntime.typeError('calculateSignetAttestationDigest100',
|
|
860
737
|
'argument 1',
|
|
861
|
-
'circuits.compact line
|
|
738
|
+
'circuits.compact line 41 char 1',
|
|
862
739
|
'Bytes<32>',
|
|
863
740
|
requestId_0)
|
|
864
741
|
}
|
|
865
742
|
if (!(serializedOutput_0.buffer instanceof ArrayBuffer && serializedOutput_0.BYTES_PER_ELEMENT === 1 && serializedOutput_0.length === 100)) {
|
|
866
743
|
__compactRuntime.typeError('calculateSignetAttestationDigest100',
|
|
867
744
|
'argument 2',
|
|
868
|
-
'circuits.compact line
|
|
745
|
+
'circuits.compact line 41 char 1',
|
|
869
746
|
'Bytes<100>',
|
|
870
747
|
serializedOutput_0)
|
|
871
748
|
}
|
|
@@ -883,21 +760,21 @@ export const pureCircuits = {
|
|
|
883
760
|
if (!(requestId_0.buffer instanceof ArrayBuffer && requestId_0.BYTES_PER_ELEMENT === 1 && requestId_0.length === 32)) {
|
|
884
761
|
__compactRuntime.typeError('verifyRespondBidirectionalEvent32',
|
|
885
762
|
'argument 1',
|
|
886
|
-
'circuits.compact line
|
|
763
|
+
'circuits.compact line 48 char 1',
|
|
887
764
|
'Bytes<32>',
|
|
888
765
|
requestId_0)
|
|
889
766
|
}
|
|
890
767
|
if (!(serializedOutput_0.buffer instanceof ArrayBuffer && serializedOutput_0.BYTES_PER_ELEMENT === 1 && serializedOutput_0.length === 32)) {
|
|
891
768
|
__compactRuntime.typeError('verifyRespondBidirectionalEvent32',
|
|
892
769
|
'argument 2',
|
|
893
|
-
'circuits.compact line
|
|
770
|
+
'circuits.compact line 48 char 1',
|
|
894
771
|
'Bytes<32>',
|
|
895
772
|
serializedOutput_0)
|
|
896
773
|
}
|
|
897
774
|
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)) {
|
|
898
775
|
__compactRuntime.typeError('verifyRespondBidirectionalEvent32',
|
|
899
776
|
'argument 3',
|
|
900
|
-
'circuits.compact line
|
|
777
|
+
'circuits.compact line 48 char 1',
|
|
901
778
|
'struct RespondBidirectionalEvent<signature: struct Signature<bigR: struct AffinePoint<x: Bytes<32>, y: Bytes<32>>, s: Bytes<32>, recoveryId: Uint<0..256>>>',
|
|
902
779
|
respondBidirectionalEvent_0)
|
|
903
780
|
}
|