@sig-net/midnight 0.21.0-rc.9 → 0.21.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 +5 -3
- package/dist/compact-descriptors.d.ts +2 -2
- package/dist/compact-descriptors.d.ts.map +1 -1
- package/dist/compact-descriptors.js +4 -9
- package/dist/compact-descriptors.js.map +1 -1
- package/dist/constants.d.ts +5 -4
- package/dist/constants.d.ts.map +1 -1
- package/dist/constants.js +12 -7
- package/dist/constants.js.map +1 -1
- package/dist/ecdsa-attestation.d.ts +38 -9
- package/dist/ecdsa-attestation.d.ts.map +1 -1
- package/dist/ecdsa-attestation.js +89 -17
- package/dist/ecdsa-attestation.js.map +1 -1
- package/dist/epsilon-derivation.d.ts +21 -17
- package/dist/epsilon-derivation.d.ts.map +1 -1
- package/dist/epsilon-derivation.js +32 -29
- package/dist/epsilon-derivation.js.map +1 -1
- package/dist/index.d.ts +2 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +4 -3
- package/dist/index.js.map +1 -1
- package/dist/managed/compiler/contract-info.json +11 -29
- package/dist/managed/compiler/contract-manifest.json +8 -8
- package/dist/managed/contract/index.d.ts +2 -5
- package/dist/managed/contract/index.js +75 -128
- package/dist/managed/contract/index.js.map +1 -1
- package/dist/signet-evtype2tx-requests.d.ts +1 -1
- package/dist/signet-evtype2tx-requests.d.ts.map +1 -1
- package/package.json +5 -4
- package/src/Signet.compact +17 -4
- package/src/circuits.compact +2 -8
|
@@ -64,13 +64,9 @@ const _descriptor_7 = new __compactRuntime.CompactTypeBytes(100);
|
|
|
64
64
|
|
|
65
65
|
const _descriptor_8 = new __compactRuntime.CompactTypeBytes(1);
|
|
66
66
|
|
|
67
|
-
const _descriptor_9 = new __compactRuntime.
|
|
67
|
+
const _descriptor_9 = new __compactRuntime.CompactTypeUnsignedInteger(340282366920938463463374607431768211455n, 16);
|
|
68
68
|
|
|
69
|
-
const _descriptor_10 = new __compactRuntime.
|
|
70
|
-
|
|
71
|
-
const _descriptor_11 = new __compactRuntime.CompactTypeBytes(20);
|
|
72
|
-
|
|
73
|
-
const _descriptor_12 = __compactRuntime.CompactTypeSecp256k1Scalar;
|
|
69
|
+
const _descriptor_10 = new __compactRuntime.CompactTypeBytes(20);
|
|
74
70
|
|
|
75
71
|
class _ContractAddress_0 {
|
|
76
72
|
alignment() {
|
|
@@ -86,123 +82,104 @@ class _ContractAddress_0 {
|
|
|
86
82
|
}
|
|
87
83
|
}
|
|
88
84
|
|
|
89
|
-
const
|
|
85
|
+
const _descriptor_11 = new _ContractAddress_0();
|
|
90
86
|
|
|
91
|
-
const
|
|
87
|
+
const _descriptor_12 = new __compactRuntime.CompactTypeVector(4, _descriptor_2);
|
|
92
88
|
|
|
93
|
-
const
|
|
89
|
+
const _descriptor_13 = new __compactRuntime.CompactTypeBytes(128);
|
|
94
90
|
|
|
95
91
|
class _SignBidirectionalEventNotification_0 {
|
|
96
92
|
alignment() {
|
|
97
|
-
return _descriptor_2.alignment().concat(
|
|
93
|
+
return _descriptor_2.alignment().concat(_descriptor_13.alignment());
|
|
98
94
|
}
|
|
99
95
|
fromValue(value_0) {
|
|
100
96
|
return {
|
|
101
97
|
version: _descriptor_2.fromValue(value_0),
|
|
102
|
-
payload:
|
|
98
|
+
payload: _descriptor_13.fromValue(value_0)
|
|
103
99
|
}
|
|
104
100
|
}
|
|
105
101
|
toValue(value_0) {
|
|
106
|
-
return _descriptor_2.toValue(value_0.version).concat(
|
|
102
|
+
return _descriptor_2.toValue(value_0.version).concat(_descriptor_13.toValue(value_0.payload));
|
|
107
103
|
}
|
|
108
104
|
}
|
|
109
105
|
|
|
110
|
-
const
|
|
106
|
+
const _descriptor_14 = new _SignBidirectionalEventNotification_0();
|
|
111
107
|
|
|
112
|
-
const
|
|
113
|
-
|
|
114
|
-
const _descriptor_18 = __compactRuntime.CompactTypeField;
|
|
108
|
+
const _descriptor_15 = __compactRuntime.CompactTypeSecp256k1Scalar;
|
|
115
109
|
|
|
116
|
-
const
|
|
110
|
+
const _descriptor_16 = __compactRuntime.CompactTypeSecp256k1Base;
|
|
117
111
|
|
|
118
112
|
class _tuple_0 {
|
|
119
113
|
alignment() {
|
|
120
|
-
return _descriptor_0.alignment().concat(
|
|
121
|
-
}
|
|
122
|
-
fromValue(value_0) {
|
|
123
|
-
return [
|
|
124
|
-
_descriptor_0.fromValue(value_0),
|
|
125
|
-
_descriptor_19.fromValue(value_0),
|
|
126
|
-
_descriptor_7.fromValue(value_0)
|
|
127
|
-
]
|
|
128
|
-
}
|
|
129
|
-
toValue(value_0) {
|
|
130
|
-
return _descriptor_0.toValue(value_0[0]).concat(_descriptor_19.toValue(value_0[1]).concat(_descriptor_7.toValue(value_0[2])));
|
|
131
|
-
}
|
|
132
|
-
}
|
|
133
|
-
|
|
134
|
-
const _descriptor_20 = new _tuple_0();
|
|
135
|
-
|
|
136
|
-
class _tuple_1 {
|
|
137
|
-
alignment() {
|
|
138
|
-
return _descriptor_0.alignment().concat(_descriptor_19.alignment().concat(_descriptor_0.alignment()));
|
|
114
|
+
return _descriptor_0.alignment().concat(_descriptor_0.alignment());
|
|
139
115
|
}
|
|
140
116
|
fromValue(value_0) {
|
|
141
117
|
return [
|
|
142
118
|
_descriptor_0.fromValue(value_0),
|
|
143
|
-
_descriptor_19.fromValue(value_0),
|
|
144
119
|
_descriptor_0.fromValue(value_0)
|
|
145
120
|
]
|
|
146
121
|
}
|
|
147
122
|
toValue(value_0) {
|
|
148
|
-
return _descriptor_0.toValue(value_0[0]).concat(
|
|
123
|
+
return _descriptor_0.toValue(value_0[0]).concat(_descriptor_0.toValue(value_0[1]));
|
|
149
124
|
}
|
|
150
125
|
}
|
|
151
126
|
|
|
152
|
-
const
|
|
127
|
+
const _descriptor_17 = new _tuple_0();
|
|
153
128
|
|
|
154
|
-
|
|
129
|
+
const _descriptor_18 = __compactRuntime.CompactTypeField;
|
|
130
|
+
|
|
131
|
+
class _tuple_1 {
|
|
155
132
|
alignment() {
|
|
156
|
-
return _descriptor_0.alignment().concat(
|
|
133
|
+
return _descriptor_0.alignment().concat(_descriptor_8.alignment());
|
|
157
134
|
}
|
|
158
135
|
fromValue(value_0) {
|
|
159
136
|
return [
|
|
160
137
|
_descriptor_0.fromValue(value_0),
|
|
161
|
-
_descriptor_19.fromValue(value_0),
|
|
162
138
|
_descriptor_8.fromValue(value_0)
|
|
163
139
|
]
|
|
164
140
|
}
|
|
165
141
|
toValue(value_0) {
|
|
166
|
-
return _descriptor_0.toValue(value_0[0]).concat(
|
|
142
|
+
return _descriptor_0.toValue(value_0[0]).concat(_descriptor_8.toValue(value_0[1]));
|
|
167
143
|
}
|
|
168
144
|
}
|
|
169
145
|
|
|
170
|
-
const
|
|
146
|
+
const _descriptor_19 = new _tuple_1();
|
|
171
147
|
|
|
172
|
-
class
|
|
148
|
+
class _tuple_2 {
|
|
173
149
|
alignment() {
|
|
174
|
-
return _descriptor_0.alignment().concat(
|
|
150
|
+
return _descriptor_0.alignment().concat(_descriptor_7.alignment());
|
|
175
151
|
}
|
|
176
152
|
fromValue(value_0) {
|
|
177
153
|
return [
|
|
178
154
|
_descriptor_0.fromValue(value_0),
|
|
179
|
-
|
|
180
|
-
_descriptor_9.fromValue(value_0)
|
|
155
|
+
_descriptor_7.fromValue(value_0)
|
|
181
156
|
]
|
|
182
157
|
}
|
|
183
158
|
toValue(value_0) {
|
|
184
|
-
return _descriptor_0.toValue(value_0[0]).concat(
|
|
159
|
+
return _descriptor_0.toValue(value_0[0]).concat(_descriptor_7.toValue(value_0[1]));
|
|
185
160
|
}
|
|
186
161
|
}
|
|
187
162
|
|
|
188
|
-
const
|
|
163
|
+
const _descriptor_20 = new _tuple_2();
|
|
189
164
|
|
|
190
165
|
class _Secp256k1EcdsaSignature_0 {
|
|
191
166
|
alignment() {
|
|
192
|
-
return
|
|
167
|
+
return _descriptor_15.alignment().concat(_descriptor_15.alignment());
|
|
193
168
|
}
|
|
194
169
|
fromValue(value_0) {
|
|
195
170
|
return {
|
|
196
|
-
r:
|
|
197
|
-
s:
|
|
171
|
+
r: _descriptor_15.fromValue(value_0),
|
|
172
|
+
s: _descriptor_15.fromValue(value_0)
|
|
198
173
|
}
|
|
199
174
|
}
|
|
200
175
|
toValue(value_0) {
|
|
201
|
-
return
|
|
176
|
+
return _descriptor_15.toValue(value_0.r).concat(_descriptor_15.toValue(value_0.s));
|
|
202
177
|
}
|
|
203
178
|
}
|
|
204
179
|
|
|
205
|
-
const
|
|
180
|
+
const _descriptor_21 = new _Secp256k1EcdsaSignature_0();
|
|
181
|
+
|
|
182
|
+
const _descriptor_22 = new __compactRuntime.CompactTypeUnsignedInteger(18446744073709551615n, 8);
|
|
206
183
|
|
|
207
184
|
class _Either_0 {
|
|
208
185
|
alignment() {
|
|
@@ -220,9 +197,9 @@ class _Either_0 {
|
|
|
220
197
|
}
|
|
221
198
|
}
|
|
222
199
|
|
|
223
|
-
const
|
|
200
|
+
const _descriptor_23 = new _Either_0();
|
|
224
201
|
|
|
225
|
-
const
|
|
202
|
+
const _descriptor_24 = new __compactRuntime.CompactTypeUnsignedInteger(4294967295n, 4);
|
|
226
203
|
|
|
227
204
|
export class Contract {
|
|
228
205
|
witnesses;
|
|
@@ -239,6 +216,9 @@ export class Contract {
|
|
|
239
216
|
async constructSignBidirectionalEventNotificationV1(context, ...args_1) {
|
|
240
217
|
return { result: pureCircuits.constructSignBidirectionalEventNotificationV1(...args_1), context };
|
|
241
218
|
},
|
|
219
|
+
async ethereumCaip2Id(context, ...args_1) {
|
|
220
|
+
return { result: pureCircuits.ethereumCaip2Id(...args_1), context };
|
|
221
|
+
},
|
|
242
222
|
async evmAddressAbiWord(context, ...args_1) {
|
|
243
223
|
return { result: pureCircuits.evmAddressAbiWord(...args_1), context };
|
|
244
224
|
},
|
|
@@ -257,9 +237,6 @@ export class Contract {
|
|
|
257
237
|
async calculateSignetAttestationDigest1(context, ...args_1) {
|
|
258
238
|
return { result: pureCircuits.calculateSignetAttestationDigest1(...args_1), context };
|
|
259
239
|
},
|
|
260
|
-
async calculateSignetAttestationDigest2(context, ...args_1) {
|
|
261
|
-
return { result: pureCircuits.calculateSignetAttestationDigest2(...args_1), context };
|
|
262
|
-
},
|
|
263
240
|
async calculateSignetAttestationDigest32(context, ...args_1) {
|
|
264
241
|
return { result: pureCircuits.calculateSignetAttestationDigest32(...args_1), context };
|
|
265
242
|
},
|
|
@@ -366,19 +343,15 @@ export class Contract {
|
|
|
366
343
|
r_0;
|
|
367
344
|
}
|
|
368
345
|
_transientHash_0(value_0) {
|
|
369
|
-
const result_0 = __compactRuntime.transientHash(
|
|
346
|
+
const result_0 = __compactRuntime.transientHash(_descriptor_19, value_0);
|
|
370
347
|
return result_0;
|
|
371
348
|
}
|
|
372
349
|
_transientHash_1(value_0) {
|
|
373
|
-
const result_0 = __compactRuntime.transientHash(_descriptor_23, value_0);
|
|
374
|
-
return result_0;
|
|
375
|
-
}
|
|
376
|
-
_transientHash_2(value_0) {
|
|
377
350
|
const result_0 = __compactRuntime.transientHash(_descriptor_20, value_0);
|
|
378
351
|
return result_0;
|
|
379
352
|
}
|
|
380
|
-
|
|
381
|
-
const result_0 = __compactRuntime.transientHash(
|
|
353
|
+
_transientHash_2(value_0) {
|
|
354
|
+
const result_0 = __compactRuntime.transientHash(_descriptor_17, value_0);
|
|
382
355
|
return result_0;
|
|
383
356
|
}
|
|
384
357
|
_upgradeFromTransient_0(x_0) {
|
|
@@ -426,22 +399,14 @@ export class Contract {
|
|
|
426
399
|
}
|
|
427
400
|
_calculateSignetAttestationDigest_0(requestId_0, serializedOutput_0) {
|
|
428
401
|
return this._upgradeFromTransient_0(this._transientHash_0([requestId_0,
|
|
429
|
-
1n,
|
|
430
402
|
serializedOutput_0]));
|
|
431
403
|
}
|
|
432
404
|
_calculateSignetAttestationDigest_1(requestId_0, serializedOutput_0) {
|
|
433
405
|
return this._upgradeFromTransient_0(this._transientHash_1([requestId_0,
|
|
434
|
-
2n,
|
|
435
406
|
serializedOutput_0]));
|
|
436
407
|
}
|
|
437
408
|
_calculateSignetAttestationDigest_2(requestId_0, serializedOutput_0) {
|
|
438
409
|
return this._upgradeFromTransient_0(this._transientHash_2([requestId_0,
|
|
439
|
-
100n,
|
|
440
|
-
serializedOutput_0]));
|
|
441
|
-
}
|
|
442
|
-
_calculateSignetAttestationDigest_3(requestId_0, serializedOutput_0) {
|
|
443
|
-
return this._upgradeFromTransient_0(this._transientHash_3([requestId_0,
|
|
444
|
-
32n,
|
|
445
410
|
serializedOutput_0]));
|
|
446
411
|
}
|
|
447
412
|
_verifyRespondBidirectionalEvent_0(requestId_0,
|
|
@@ -449,7 +414,7 @@ export class Contract {
|
|
|
449
414
|
respondBidirectionalEvent_0,
|
|
450
415
|
mpcResponseKey_0)
|
|
451
416
|
{
|
|
452
|
-
const digest_0 = this.
|
|
417
|
+
const digest_0 = this._calculateSignetAttestationDigest_2(requestId_0,
|
|
453
418
|
serializedOutput_0);
|
|
454
419
|
return this._secp256k1EcdsaVerify_0(digest_0,
|
|
455
420
|
{ r:
|
|
@@ -457,15 +422,18 @@ export class Contract {
|
|
|
457
422
|
32,
|
|
458
423
|
respondBidirectionalEvent_0.signature.bigR.x,
|
|
459
424
|
'Secp256k1Scalar',
|
|
460
|
-
'Signet.compact line
|
|
425
|
+
'Signet.compact line 347 char 12'),
|
|
461
426
|
s:
|
|
462
427
|
__compactRuntime.convertBytesToField(115792089237316195423570985008687907852837564279074904382605163141518161494336n,
|
|
463
428
|
32,
|
|
464
429
|
respondBidirectionalEvent_0.signature.s,
|
|
465
430
|
'Secp256k1Scalar',
|
|
466
|
-
'Signet.compact line
|
|
431
|
+
'Signet.compact line 348 char 12') },
|
|
467
432
|
mpcResponseKey_0);
|
|
468
433
|
}
|
|
434
|
+
_ethereumCaip2Id_0() {
|
|
435
|
+
return new Uint8Array([101, 105, 112, 49, 53, 53, 58, 49, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]);
|
|
436
|
+
}
|
|
469
437
|
_evmAddressAbiWord_0(addr_0) {
|
|
470
438
|
return Uint8Array.from([...Array.from(new Uint8Array(12), BigInt),
|
|
471
439
|
...Array.from(addr_0, BigInt)],
|
|
@@ -474,7 +442,7 @@ export class Contract {
|
|
|
474
442
|
_numericAbiWord_0(value_0) {
|
|
475
443
|
const le_0 = Array.from(__compactRuntime.convertBigintToBytes(16,
|
|
476
444
|
value_0,
|
|
477
|
-
'Signet.compact line
|
|
445
|
+
'Signet.compact line 437 char 17'),
|
|
478
446
|
BigInt);
|
|
479
447
|
return Uint8Array.from([...Array.from(new Uint8Array(16), BigInt),
|
|
480
448
|
le_0[15],
|
|
@@ -556,7 +524,7 @@ export class Contract {
|
|
|
556
524
|
v_0[31]);
|
|
557
525
|
return ((t1) => {
|
|
558
526
|
if (t1 > 340282366920938463463374607431768211455n) {
|
|
559
|
-
throw new __compactRuntime.CompactError('Signet.compact line
|
|
527
|
+
throw new __compactRuntime.CompactError('Signet.compact line 489 char 12: cast from Field or Uint value to smaller Uint value failed: ' + t1 + ' is greater than 340282366920938463463374607431768211455');
|
|
560
528
|
}
|
|
561
529
|
return t1;
|
|
562
530
|
})(b15_0);
|
|
@@ -567,7 +535,7 @@ export class Contract {
|
|
|
567
535
|
((e, i) => e.slice(i, i+31))(word_0,
|
|
568
536
|
Number(0n)),
|
|
569
537
|
'Field',
|
|
570
|
-
'Signet.compact line
|
|
538
|
+
'Signet.compact line 495 char 12')
|
|
571
539
|
===
|
|
572
540
|
0n,
|
|
573
541
|
'ABI word is not a canonical Boolean');
|
|
@@ -576,7 +544,7 @@ export class Contract {
|
|
|
576
544
|
((e, i) => e.slice(i, i+1))(word_0,
|
|
577
545
|
Number(31n)),
|
|
578
546
|
'Field',
|
|
579
|
-
'Signet.compact line
|
|
547
|
+
'Signet.compact line 496 char 18');
|
|
580
548
|
__compactRuntime.assert(last_0 === 0n || last_0 === 1n,
|
|
581
549
|
'ABI word is not a canonical Boolean');
|
|
582
550
|
return last_0 === 1n;
|
|
@@ -585,16 +553,12 @@ export class Contract {
|
|
|
585
553
|
return this._calculateSignetAttestationDigest_0(requestId_0,
|
|
586
554
|
serializedOutput_0);
|
|
587
555
|
}
|
|
588
|
-
_calculateSignetAttestationDigest2_0(requestId_0, serializedOutput_0) {
|
|
589
|
-
return this._calculateSignetAttestationDigest_1(requestId_0,
|
|
590
|
-
serializedOutput_0);
|
|
591
|
-
}
|
|
592
556
|
_calculateSignetAttestationDigest32_0(requestId_0, serializedOutput_0) {
|
|
593
|
-
return this.
|
|
557
|
+
return this._calculateSignetAttestationDigest_2(requestId_0,
|
|
594
558
|
serializedOutput_0);
|
|
595
559
|
}
|
|
596
560
|
_calculateSignetAttestationDigest100_0(requestId_0, serializedOutput_0) {
|
|
597
|
-
return this.
|
|
561
|
+
return this._calculateSignetAttestationDigest_1(requestId_0,
|
|
598
562
|
serializedOutput_0);
|
|
599
563
|
}
|
|
600
564
|
_verifyRespondBidirectionalEvent32_0(requestId_0,
|
|
@@ -639,21 +603,21 @@ export const pureCircuits = {
|
|
|
639
603
|
if (!(typeof(callerAddress_0) === 'object' && callerAddress_0.bytes.buffer instanceof ArrayBuffer && callerAddress_0.bytes.BYTES_PER_ELEMENT === 1 && callerAddress_0.bytes.length === 32)) {
|
|
640
604
|
__compactRuntime.typeError('constructSignBidirectionalEventNotificationV1',
|
|
641
605
|
'argument 1',
|
|
642
|
-
'Signet.compact line
|
|
606
|
+
'Signet.compact line 240 char 3',
|
|
643
607
|
'struct ContractAddress<bytes: Bytes<32>>',
|
|
644
608
|
callerAddress_0)
|
|
645
609
|
}
|
|
646
610
|
if (!(typeof(requestsPathDepth_0) === 'bigint' && requestsPathDepth_0 >= 0n && requestsPathDepth_0 <= 255n)) {
|
|
647
611
|
__compactRuntime.typeError('constructSignBidirectionalEventNotificationV1',
|
|
648
612
|
'argument 2',
|
|
649
|
-
'Signet.compact line
|
|
613
|
+
'Signet.compact line 240 char 3',
|
|
650
614
|
'Uint<0..256>',
|
|
651
615
|
requestsPathDepth_0)
|
|
652
616
|
}
|
|
653
617
|
if (!(Array.isArray(requestsPath_0) && requestsPath_0.length === 4 && requestsPath_0.every((t) => typeof(t) === 'bigint' && t >= 0n && t <= 255n))) {
|
|
654
618
|
__compactRuntime.typeError('constructSignBidirectionalEventNotificationV1',
|
|
655
619
|
'argument 3',
|
|
656
|
-
'Signet.compact line
|
|
620
|
+
'Signet.compact line 240 char 3',
|
|
657
621
|
'Vector<4, Uint<0..256>>',
|
|
658
622
|
requestsPath_0)
|
|
659
623
|
}
|
|
@@ -661,6 +625,12 @@ export const pureCircuits = {
|
|
|
661
625
|
requestsPathDepth_0,
|
|
662
626
|
requestsPath_0);
|
|
663
627
|
},
|
|
628
|
+
ethereumCaip2Id: (...args_0) => {
|
|
629
|
+
if (args_0.length !== 0) {
|
|
630
|
+
throw new __compactRuntime.CompactError(`ethereumCaip2Id: expected 0 arguments (as invoked from Typescript), received ${args_0.length}`);
|
|
631
|
+
}
|
|
632
|
+
return _dummyContract._ethereumCaip2Id_0();
|
|
633
|
+
},
|
|
664
634
|
evmAddressAbiWord: (...args_0) => {
|
|
665
635
|
if (args_0.length !== 1) {
|
|
666
636
|
throw new __compactRuntime.CompactError(`evmAddressAbiWord: expected 1 argument (as invoked from Typescript), received ${args_0.length}`);
|
|
@@ -669,7 +639,7 @@ export const pureCircuits = {
|
|
|
669
639
|
if (!(addr_0.buffer instanceof ArrayBuffer && addr_0.BYTES_PER_ELEMENT === 1 && addr_0.length === 20)) {
|
|
670
640
|
__compactRuntime.typeError('evmAddressAbiWord',
|
|
671
641
|
'argument 1',
|
|
672
|
-
'Signet.compact line
|
|
642
|
+
'Signet.compact line 428 char 3',
|
|
673
643
|
'Bytes<20>',
|
|
674
644
|
addr_0)
|
|
675
645
|
}
|
|
@@ -683,7 +653,7 @@ export const pureCircuits = {
|
|
|
683
653
|
if (!(typeof(value_0) === 'bigint' && value_0 >= 0n && value_0 <= 340282366920938463463374607431768211455n)) {
|
|
684
654
|
__compactRuntime.typeError('numericAbiWord',
|
|
685
655
|
'argument 1',
|
|
686
|
-
'Signet.compact line
|
|
656
|
+
'Signet.compact line 434 char 3',
|
|
687
657
|
'Uint<0..340282366920938463463374607431768211456>',
|
|
688
658
|
value_0)
|
|
689
659
|
}
|
|
@@ -697,7 +667,7 @@ export const pureCircuits = {
|
|
|
697
667
|
if (!(typeof(value_0) === 'boolean')) {
|
|
698
668
|
__compactRuntime.typeError('boolAbiWord',
|
|
699
669
|
'argument 1',
|
|
700
|
-
'Signet.compact line
|
|
670
|
+
'Signet.compact line 447 char 3',
|
|
701
671
|
'Boolean',
|
|
702
672
|
value_0)
|
|
703
673
|
}
|
|
@@ -711,7 +681,7 @@ export const pureCircuits = {
|
|
|
711
681
|
if (!(word_0.buffer instanceof ArrayBuffer && word_0.BYTES_PER_ELEMENT === 1 && word_0.length === 32)) {
|
|
712
682
|
__compactRuntime.typeError('abiWordToUint128',
|
|
713
683
|
'argument 1',
|
|
714
|
-
'Signet.compact line
|
|
684
|
+
'Signet.compact line 455 char 3',
|
|
715
685
|
'Bytes<32>',
|
|
716
686
|
word_0)
|
|
717
687
|
}
|
|
@@ -725,7 +695,7 @@ export const pureCircuits = {
|
|
|
725
695
|
if (!(word_0.buffer instanceof ArrayBuffer && word_0.BYTES_PER_ELEMENT === 1 && word_0.length === 32)) {
|
|
726
696
|
__compactRuntime.typeError('abiWordToBool',
|
|
727
697
|
'argument 1',
|
|
728
|
-
'Signet.compact line
|
|
698
|
+
'Signet.compact line 494 char 3',
|
|
729
699
|
'Bytes<32>',
|
|
730
700
|
word_0)
|
|
731
701
|
}
|
|
@@ -740,43 +710,20 @@ export const pureCircuits = {
|
|
|
740
710
|
if (!(requestId_0.buffer instanceof ArrayBuffer && requestId_0.BYTES_PER_ELEMENT === 1 && requestId_0.length === 32)) {
|
|
741
711
|
__compactRuntime.typeError('calculateSignetAttestationDigest1',
|
|
742
712
|
'argument 1',
|
|
743
|
-
'circuits.compact line
|
|
713
|
+
'circuits.compact line 28 char 1',
|
|
744
714
|
'Bytes<32>',
|
|
745
715
|
requestId_0)
|
|
746
716
|
}
|
|
747
717
|
if (!(serializedOutput_0.buffer instanceof ArrayBuffer && serializedOutput_0.BYTES_PER_ELEMENT === 1 && serializedOutput_0.length === 1)) {
|
|
748
718
|
__compactRuntime.typeError('calculateSignetAttestationDigest1',
|
|
749
719
|
'argument 2',
|
|
750
|
-
'circuits.compact line
|
|
720
|
+
'circuits.compact line 28 char 1',
|
|
751
721
|
'Bytes<1>',
|
|
752
722
|
serializedOutput_0)
|
|
753
723
|
}
|
|
754
724
|
return _dummyContract._calculateSignetAttestationDigest1_0(requestId_0,
|
|
755
725
|
serializedOutput_0);
|
|
756
726
|
},
|
|
757
|
-
calculateSignetAttestationDigest2: (...args_0) => {
|
|
758
|
-
if (args_0.length !== 2) {
|
|
759
|
-
throw new __compactRuntime.CompactError(`calculateSignetAttestationDigest2: expected 2 arguments (as invoked from Typescript), received ${args_0.length}`);
|
|
760
|
-
}
|
|
761
|
-
const requestId_0 = args_0[0];
|
|
762
|
-
const serializedOutput_0 = args_0[1];
|
|
763
|
-
if (!(requestId_0.buffer instanceof ArrayBuffer && requestId_0.BYTES_PER_ELEMENT === 1 && requestId_0.length === 32)) {
|
|
764
|
-
__compactRuntime.typeError('calculateSignetAttestationDigest2',
|
|
765
|
-
'argument 1',
|
|
766
|
-
'circuits.compact line 34 char 1',
|
|
767
|
-
'Bytes<32>',
|
|
768
|
-
requestId_0)
|
|
769
|
-
}
|
|
770
|
-
if (!(serializedOutput_0.buffer instanceof ArrayBuffer && serializedOutput_0.BYTES_PER_ELEMENT === 1 && serializedOutput_0.length === 2)) {
|
|
771
|
-
__compactRuntime.typeError('calculateSignetAttestationDigest2',
|
|
772
|
-
'argument 2',
|
|
773
|
-
'circuits.compact line 34 char 1',
|
|
774
|
-
'Bytes<2>',
|
|
775
|
-
serializedOutput_0)
|
|
776
|
-
}
|
|
777
|
-
return _dummyContract._calculateSignetAttestationDigest2_0(requestId_0,
|
|
778
|
-
serializedOutput_0);
|
|
779
|
-
},
|
|
780
727
|
calculateSignetAttestationDigest32: (...args_0) => {
|
|
781
728
|
if (args_0.length !== 2) {
|
|
782
729
|
throw new __compactRuntime.CompactError(`calculateSignetAttestationDigest32: expected 2 arguments (as invoked from Typescript), received ${args_0.length}`);
|
|
@@ -786,14 +733,14 @@ export const pureCircuits = {
|
|
|
786
733
|
if (!(requestId_0.buffer instanceof ArrayBuffer && requestId_0.BYTES_PER_ELEMENT === 1 && requestId_0.length === 32)) {
|
|
787
734
|
__compactRuntime.typeError('calculateSignetAttestationDigest32',
|
|
788
735
|
'argument 1',
|
|
789
|
-
'circuits.compact line
|
|
736
|
+
'circuits.compact line 35 char 1',
|
|
790
737
|
'Bytes<32>',
|
|
791
738
|
requestId_0)
|
|
792
739
|
}
|
|
793
740
|
if (!(serializedOutput_0.buffer instanceof ArrayBuffer && serializedOutput_0.BYTES_PER_ELEMENT === 1 && serializedOutput_0.length === 32)) {
|
|
794
741
|
__compactRuntime.typeError('calculateSignetAttestationDigest32',
|
|
795
742
|
'argument 2',
|
|
796
|
-
'circuits.compact line
|
|
743
|
+
'circuits.compact line 35 char 1',
|
|
797
744
|
'Bytes<32>',
|
|
798
745
|
serializedOutput_0)
|
|
799
746
|
}
|
|
@@ -809,14 +756,14 @@ export const pureCircuits = {
|
|
|
809
756
|
if (!(requestId_0.buffer instanceof ArrayBuffer && requestId_0.BYTES_PER_ELEMENT === 1 && requestId_0.length === 32)) {
|
|
810
757
|
__compactRuntime.typeError('calculateSignetAttestationDigest100',
|
|
811
758
|
'argument 1',
|
|
812
|
-
'circuits.compact line
|
|
759
|
+
'circuits.compact line 42 char 1',
|
|
813
760
|
'Bytes<32>',
|
|
814
761
|
requestId_0)
|
|
815
762
|
}
|
|
816
763
|
if (!(serializedOutput_0.buffer instanceof ArrayBuffer && serializedOutput_0.BYTES_PER_ELEMENT === 1 && serializedOutput_0.length === 100)) {
|
|
817
764
|
__compactRuntime.typeError('calculateSignetAttestationDigest100',
|
|
818
765
|
'argument 2',
|
|
819
|
-
'circuits.compact line
|
|
766
|
+
'circuits.compact line 42 char 1',
|
|
820
767
|
'Bytes<100>',
|
|
821
768
|
serializedOutput_0)
|
|
822
769
|
}
|
|
@@ -834,21 +781,21 @@ export const pureCircuits = {
|
|
|
834
781
|
if (!(requestId_0.buffer instanceof ArrayBuffer && requestId_0.BYTES_PER_ELEMENT === 1 && requestId_0.length === 32)) {
|
|
835
782
|
__compactRuntime.typeError('verifyRespondBidirectionalEvent32',
|
|
836
783
|
'argument 1',
|
|
837
|
-
'circuits.compact line
|
|
784
|
+
'circuits.compact line 49 char 1',
|
|
838
785
|
'Bytes<32>',
|
|
839
786
|
requestId_0)
|
|
840
787
|
}
|
|
841
788
|
if (!(serializedOutput_0.buffer instanceof ArrayBuffer && serializedOutput_0.BYTES_PER_ELEMENT === 1 && serializedOutput_0.length === 32)) {
|
|
842
789
|
__compactRuntime.typeError('verifyRespondBidirectionalEvent32',
|
|
843
790
|
'argument 2',
|
|
844
|
-
'circuits.compact line
|
|
791
|
+
'circuits.compact line 49 char 1',
|
|
845
792
|
'Bytes<32>',
|
|
846
793
|
serializedOutput_0)
|
|
847
794
|
}
|
|
848
795
|
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)) {
|
|
849
796
|
__compactRuntime.typeError('verifyRespondBidirectionalEvent32',
|
|
850
797
|
'argument 3',
|
|
851
|
-
'circuits.compact line
|
|
798
|
+
'circuits.compact line 49 char 1',
|
|
852
799
|
'struct RespondBidirectionalEvent<signature: struct Signature<bigR: struct AffinePoint<x: Bytes<32>, y: Bytes<32>>, s: Bytes<32>, recoveryId: Uint<0..256>>>',
|
|
853
800
|
respondBidirectionalEvent_0)
|
|
854
801
|
}
|
|
@@ -4,5 +4,5 @@
|
|
|
4
4
|
"sourceRoot": "../../../",
|
|
5
5
|
"sources": ["src/circuits.compact", "src/./Signet.compact", "compiler/zkir-v3-library.compact"],
|
|
6
6
|
"names": [],
|
|
7
|
-
"mappings": "
|
|
7
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAAA;;;;;;;;;;MC+OE,MAAA,6CAsBC;;OAAA;MAqGD,MAAA,eAEC;;OAAA;MA+DD,MAAA,iBAEC;;OAAA;MAID,MAAA,cASC;;OAAA;MAID,MAAA,WAEC;;OAAA;MAMD,MAAA,gBAmCC;;OAAA;MAID,MAAA,aAKC;;OAAA;MDvdH,MAAA,iCAKC;;OAAA;MAED,MAAA,kCAKC;;OAAA;MAED,MAAA,mCAKC;;OAAA;MAED,MAAA,iCAYC;;OAAA;;;;GACA;EA7DD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6DC;EEjCD,AAAA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;EAID,AAAA,aAKC;;;;UALiC,MAAe;;;;;;;;2CAAf,MAAe;GAKhD;EDvdH,AAAA,iCAKC;;;;UAJC,WAAoB;UACpB,kBAA0B;;;;;;;;;;;;;;;+DAD1B,WAAoB;+DACpB,kBAA0B;GAG3B;EAED,AAAA,kCAKC;;;;UAJC,WAAoB;UACpB,kBAA2B;;;;;;;;;;;;;;;gEAD3B,WAAoB;gEACpB,kBAA2B;GAG5B;EAED,AAAA,mCAKC;;;;UAJC,WAAoB;UACpB,kBAA4B;;;;;;;;;;;;;;;iEAD5B,WAAoB;iEACpB,kBAA4B;GAG7B;EAED,AAAA,iCAYC;;;;UAXC,WAAoB;UACpB,kBAA2B;UAC3B,2BAAoD;UACpD,gBAA8B;;;;;;;;;;;;;;;;;;;;;;+DAH9B,WAAoB;+DACpB,kBAA2B;+DAC3B,2BAAoD;+DACpD,gBAA8B;GAQ/B;;;;;;"
|
|
8
8
|
}
|
|
@@ -41,7 +41,7 @@ export interface EvmAccessListEntry {
|
|
|
41
41
|
* leading slots are real.
|
|
42
42
|
*/
|
|
43
43
|
export interface EvmType2TxParams {
|
|
44
|
-
/**
|
|
44
|
+
/** EIP-155 chain id of the network the signed transaction is valid on. */
|
|
45
45
|
chainId: bigint;
|
|
46
46
|
/** Account nonce of the MPC-derived sender address. */
|
|
47
47
|
nonce: bigint;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"signet-evtype2tx-requests.d.ts","sourceRoot":"","sources":["../src/signet-evtype2tx-requests.ts"],"names":[],"mappings":"AAUA,OAAO,EAAE,KAAK,WAAW,EAAqB,MAAM,iCAAiC,CAAC;AACtF,OAAO,EAAc,WAAW,EAAE,MAAM,QAAQ,CAAC;AAGjD,OAAO,EAML,KAAK,KAAK,EAKX,MAAM,0BAA0B,CAAC;AAElC,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,6BAA6B,CAAC;AAC3E,OAAO,EACL,KAAK,sBAAsB,EAE5B,MAAM,sBAAsB,CAAC;AAE9B;;;;;GAKG;AACH,MAAM,WAAW,WAAW;IAC1B,yDAAyD;IACzD,QAAQ,EAAE,UAAU,CAAC;IACrB,6EAA6E;IAC7E,OAAO,EAAE,MAAM,CAAC;IAChB;;;OAGG;IACH,KAAK,EAAE,UAAU,EAAE,CAAC;CACrB;AAED;;;GAGG;AACH,MAAM,WAAW,kBAAkB;IACjC,iEAAiE;IACjE,OAAO,EAAE,UAAU,CAAC;IACpB,qDAAqD;IACrD,eAAe,EAAE,MAAM,CAAC;IACxB,sEAAsE;IACtE,WAAW,EAAE,UAAU,EAAE,CAAC;CAC3B;AAED;;;;;;;GAOG;AACH,MAAM,WAAW,gBAAgB;IAC/B
|
|
1
|
+
{"version":3,"file":"signet-evtype2tx-requests.d.ts","sourceRoot":"","sources":["../src/signet-evtype2tx-requests.ts"],"names":[],"mappings":"AAUA,OAAO,EAAE,KAAK,WAAW,EAAqB,MAAM,iCAAiC,CAAC;AACtF,OAAO,EAAc,WAAW,EAAE,MAAM,QAAQ,CAAC;AAGjD,OAAO,EAML,KAAK,KAAK,EAKX,MAAM,0BAA0B,CAAC;AAElC,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,6BAA6B,CAAC;AAC3E,OAAO,EACL,KAAK,sBAAsB,EAE5B,MAAM,sBAAsB,CAAC;AAE9B;;;;;GAKG;AACH,MAAM,WAAW,WAAW;IAC1B,yDAAyD;IACzD,QAAQ,EAAE,UAAU,CAAC;IACrB,6EAA6E;IAC7E,OAAO,EAAE,MAAM,CAAC;IAChB;;;OAGG;IACH,KAAK,EAAE,UAAU,EAAE,CAAC;CACrB;AAED;;;GAGG;AACH,MAAM,WAAW,kBAAkB;IACjC,iEAAiE;IACjE,OAAO,EAAE,UAAU,CAAC;IACpB,qDAAqD;IACrD,eAAe,EAAE,MAAM,CAAC;IACxB,sEAAsE;IACtE,WAAW,EAAE,UAAU,EAAE,CAAC;CAC3B;AAED;;;;;;;GAOG;AACH,MAAM,WAAW,gBAAgB;IAC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KAAK,EAAE,MAAM,GAAG,UAAU,CAExD;AAED;;;;;;;;GAQG;AACH,wBAAgB,iBAAiB,CAAC,OAAO,EAAE,UAAU,GAAG,UAAU,CAOjE;AAED;;;;;;;GAOG;AACH,wBAAgB,WAAW,CAAC,KAAK,EAAE,OAAO,GAAG,UAAU,CAItD;AAED;;;;;;;;GAQG;AACH,wBAAgB,gBAAgB,CAAC,IAAI,EAAE,UAAU,GAAG,MAAM,CAYzD;AAED;;;;;;;;GAQG;AACH,wBAAgB,aAAa,CAAC,IAAI,EAAE,UAAU,GAAG,OAAO,CASvD;AAED;;;;;;;GAOG;AACH,wBAAgB,gBAAgB,CAAC,QAAQ,EAAE,KAAK,CAAC,WAAW,CAAC,GAAG,MAAM,CAUrE;AAoBD;;;;;;;;;;GAUG;AACH,wBAAgB,8CAA8C,CAC5D,OAAO,EAAE,sBAAsB,GAC9B,WAAW,CAcb;AAED;;;;;;;;;;;;;;;;GAgBG;AACH,wBAAgB,4CAA4C,CAC1D,OAAO,EAAE,sBAAsB,EAC/B,QAAQ,EAAE,uBAAuB,GAChC,WAAW,CAIb"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sig-net/midnight",
|
|
3
|
-
"version": "0.21.0
|
|
3
|
+
"version": "0.21.0",
|
|
4
4
|
"repository": {
|
|
5
5
|
"type": "git",
|
|
6
6
|
"url": "https://github.com/sig-net/midnight-integration",
|
|
@@ -49,15 +49,16 @@
|
|
|
49
49
|
"@midnight-ntwrk/compact-runtime": "0.18.0-rc.1",
|
|
50
50
|
"@midnight-ntwrk/midnight-js-types": "5.0.0-beta.6",
|
|
51
51
|
"@noble/curves": "^2.2.0",
|
|
52
|
-
"@sig-net/midnight-serde": "^0.21.0
|
|
52
|
+
"@sig-net/midnight-serde": "^0.21.0",
|
|
53
53
|
"ethers": "^6.17.0"
|
|
54
54
|
},
|
|
55
55
|
"devDependencies": {
|
|
56
56
|
"@types/node": "^26.1.0",
|
|
57
|
-
"@vitest/coverage-v8": "^
|
|
57
|
+
"@vitest/coverage-v8": "^5.0.0",
|
|
58
58
|
"tsx": "^4.23.0",
|
|
59
59
|
"typescript": "^7.0.2",
|
|
60
|
-
"
|
|
60
|
+
"vite": "^8.2.2",
|
|
61
|
+
"vitest": "^5.0.0"
|
|
61
62
|
},
|
|
62
63
|
"main": "./dist/index.js",
|
|
63
64
|
"types": "./dist/index.d.ts"
|
package/src/Signet.compact
CHANGED
|
@@ -96,8 +96,10 @@ module Signet {
|
|
|
96
96
|
// Specific destination chain Transaction parameters.
|
|
97
97
|
txParamType: TxParamType; // Off-chain tag indicating what type txParams is set to.
|
|
98
98
|
txParams: TxParams; // The generic transaction-param payload
|
|
99
|
-
caip2Id: Bytes<32>; //
|
|
100
|
-
// (https://chainagnostic.org/CAIPs/caip-2)
|
|
99
|
+
caip2Id: Bytes<32>; // The MPC's routing key for the target chain, in CAIP-2 form
|
|
100
|
+
// (https://chainagnostic.org/CAIPs/caip-2). An Ethereum target
|
|
101
|
+
// (mainnet, Sepolia or a local anvil) uses ethereumCaip2Id():
|
|
102
|
+
// the network itself is txParams' chainId.
|
|
101
103
|
|
|
102
104
|
// Serialisation Schemas.
|
|
103
105
|
// outputDeserializationSchema tells the MPC how to deserialise the destination chain's
|
|
@@ -312,7 +314,7 @@ module Signet {
|
|
|
312
314
|
requestId: RequestId,
|
|
313
315
|
serializedOutput: Bytes<serializedOutputLength>,
|
|
314
316
|
): Bytes<32> {
|
|
315
|
-
return upgradeFromTransient(transientHash<[RequestId,
|
|
317
|
+
return upgradeFromTransient(transientHash<[RequestId, Bytes<serializedOutputLength>]>([requestId, serializedOutput]));
|
|
316
318
|
}
|
|
317
319
|
|
|
318
320
|
// Verifies a RespondBidirectionalEvent against its execution output and MPC
|
|
@@ -351,6 +353,17 @@ module Signet {
|
|
|
351
353
|
|
|
352
354
|
// ---- EVM Type2 Transaction Parameters --------------------------------------------------------------
|
|
353
355
|
|
|
356
|
+
// The caip2Id of every request targeting Ethereum, whichever Ethereum network the
|
|
357
|
+
// MPC node watches (mainnet, Sepolia or a local anvil: node configuration picks it).
|
|
358
|
+
// The MPC routes on this exact string (Chain::Ethereum in sig-net/mpc
|
|
359
|
+
// signet-primitives/src/chain.rs) and rejects the request for any other value,
|
|
360
|
+
// the network's own CAIP-2 id included. EvmType2TxParams.chainId is what binds
|
|
361
|
+
// the signed transaction to one network. Ethereum only: another EVM chain, such as
|
|
362
|
+
// BNB Smart Chain, is a separate chain to the MPC, never one of Ethereum's networks.
|
|
363
|
+
export pure circuit ethereumCaip2Id(): Bytes<32> {
|
|
364
|
+
return pad(32, "eip155:1");
|
|
365
|
+
}
|
|
366
|
+
|
|
354
367
|
// The EVM transaction to be signed, decomposed into typed fields
|
|
355
368
|
// (EIP-1559 / type-2: https://eips.ethereum.org/EIPS/eip-1559) so the
|
|
356
369
|
// requesting contract can enforce invariants field by field. The MPC
|
|
@@ -366,7 +379,7 @@ module Signet {
|
|
|
366
379
|
// KEY: texual order of the fields in this structure must remain fixed as is as their order
|
|
367
380
|
// is relied upon for consistent hashing and decoding from ledger state.
|
|
368
381
|
export struct EvmType2TxParams<#maxCalldataWords, #maxAccessListEntries, #maxStorageKeysPerEntry> {
|
|
369
|
-
chainId: Uint<64>; //
|
|
382
|
+
chainId: Uint<64>; // EIP-155 chain id of the network the signed tx is valid on
|
|
370
383
|
nonce: Uint<64>; // account nonce of the derived sender
|
|
371
384
|
maxPriorityFeePerGas: Uint<128>; // wei
|
|
372
385
|
maxFeePerGas: Uint<128>; // wei
|