@sig-net/midnight 0.23.0 → 0.24.0-rc.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +10 -7
- package/dist/compact-descriptors.d.ts +8 -6
- package/dist/compact-descriptors.d.ts.map +1 -1
- package/dist/compact-descriptors.js +26 -8
- package/dist/compact-descriptors.js.map +1 -1
- package/dist/constants.d.ts +2 -21
- package/dist/constants.d.ts.map +1 -1
- package/dist/constants.js +2 -24
- package/dist/constants.js.map +1 -1
- package/dist/ecdsa-attestation.d.ts +41 -11
- package/dist/ecdsa-attestation.d.ts.map +1 -1
- package/dist/ecdsa-attestation.js +45 -12
- package/dist/ecdsa-attestation.js.map +1 -1
- package/dist/index.d.ts +5 -5
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +4 -4
- package/dist/index.js.map +1 -1
- package/dist/managed/compiler/contract-info.json +290 -6
- package/dist/managed/compiler/contract-manifest.json +8 -8
- package/dist/managed/contract/index.d.ts +69 -5
- package/dist/managed/contract/index.js +436 -154
- package/dist/managed/contract/index.js.map +1 -1
- package/dist/signature-requests-state-reader.d.ts +6 -13
- package/dist/signature-requests-state-reader.d.ts.map +1 -1
- package/dist/signature-requests-state-reader.js +9 -15
- package/dist/signature-requests-state-reader.js.map +1 -1
- package/dist/signet-contract-events.d.ts +39 -9
- package/dist/signet-contract-events.d.ts.map +1 -1
- package/dist/signet-contract-events.js +79 -29
- package/dist/signet-contract-events.js.map +1 -1
- package/dist/signet-evtype2tx-record-decoding.js +4 -4
- package/dist/signet-evtype2tx-record-decoding.js.map +1 -1
- package/dist/signet-request-id.d.ts +2 -1
- package/dist/signet-request-id.d.ts.map +1 -1
- package/dist/signet-request-id.js +13 -3
- package/dist/signet-request-id.js.map +1 -1
- package/dist/signet-request-response-reader.d.ts.map +1 -1
- package/dist/signet-request-response-reader.js +5 -6
- package/dist/signet-request-response-reader.js.map +1 -1
- package/dist/signet-requests.d.ts +43 -10
- package/dist/signet-requests.d.ts.map +1 -1
- package/dist/signet-requests.js +24 -5
- package/dist/signet-requests.js.map +1 -1
- package/dist/testing.d.ts +1 -1
- package/dist/testing.d.ts.map +1 -1
- package/dist/testing.js +3 -8
- package/dist/testing.js.map +1 -1
- package/package.json +2 -2
- package/src/Signet.compact +107 -39
- package/src/circuits.compact +37 -9
package/src/circuits.compact
CHANGED
|
@@ -9,6 +9,7 @@ import CompactStandardLibrary;
|
|
|
9
9
|
import "./Signet";
|
|
10
10
|
|
|
11
11
|
export {
|
|
12
|
+
OutputKind,
|
|
12
13
|
constructSignBidirectionalEventNotificationV1,
|
|
13
14
|
ethereumCaip2Id,
|
|
14
15
|
evmAddressAbiWord,
|
|
@@ -21,46 +22,73 @@ export {
|
|
|
21
22
|
// ---- Fixed-width attestation oracles (tests only) --------------------------
|
|
22
23
|
// The size-generic digest and verify circuits cannot appear in the export
|
|
23
24
|
// list above. These fixed-width instantiations exist solely to pin the TS
|
|
24
|
-
// twin in ecdsa-attestation.ts against the compiled circuits (widths 1, 2,
|
|
25
|
-
// and 100
|
|
26
|
-
// width.
|
|
25
|
+
// twin in ecdsa-attestation.ts against the compiled circuits (widths 0, 1, 2,
|
|
26
|
+
// 32 and 100, where 0 is the empty output of a failed or unviable execution).
|
|
27
|
+
// Client contracts instantiate the generic circuits at their own width.
|
|
28
|
+
|
|
29
|
+
export pure circuit calculateSignetAttestationDigest0(
|
|
30
|
+
requestId: RequestId,
|
|
31
|
+
blockHeight: Uint<64>,
|
|
32
|
+
outputKind: OutputKind,
|
|
33
|
+
serializedOutput: Bytes<0>
|
|
34
|
+
): Bytes<32> {
|
|
35
|
+
return calculateSignetAttestationDigest<0>(requestId, blockHeight, outputKind, serializedOutput);
|
|
36
|
+
}
|
|
27
37
|
|
|
28
38
|
export pure circuit calculateSignetAttestationDigest1(
|
|
29
39
|
requestId: RequestId,
|
|
40
|
+
blockHeight: Uint<64>,
|
|
41
|
+
outputKind: OutputKind,
|
|
30
42
|
serializedOutput: Bytes<1>
|
|
31
43
|
): Bytes<32> {
|
|
32
|
-
return calculateSignetAttestationDigest<1>(requestId, serializedOutput);
|
|
44
|
+
return calculateSignetAttestationDigest<1>(requestId, blockHeight, outputKind, serializedOutput);
|
|
33
45
|
}
|
|
34
46
|
|
|
35
47
|
export pure circuit calculateSignetAttestationDigest2(
|
|
36
48
|
requestId: RequestId,
|
|
49
|
+
blockHeight: Uint<64>,
|
|
50
|
+
outputKind: OutputKind,
|
|
37
51
|
serializedOutput: Bytes<2>
|
|
38
52
|
): Bytes<32> {
|
|
39
|
-
return calculateSignetAttestationDigest<2>(requestId, serializedOutput);
|
|
53
|
+
return calculateSignetAttestationDigest<2>(requestId, blockHeight, outputKind, serializedOutput);
|
|
40
54
|
}
|
|
41
55
|
|
|
42
56
|
export pure circuit calculateSignetAttestationDigest32(
|
|
43
57
|
requestId: RequestId,
|
|
58
|
+
blockHeight: Uint<64>,
|
|
59
|
+
outputKind: OutputKind,
|
|
44
60
|
serializedOutput: Bytes<32>
|
|
45
61
|
): Bytes<32> {
|
|
46
|
-
return calculateSignetAttestationDigest<32>(requestId, serializedOutput);
|
|
62
|
+
return calculateSignetAttestationDigest<32>(requestId, blockHeight, outputKind, serializedOutput);
|
|
47
63
|
}
|
|
48
64
|
|
|
49
65
|
export pure circuit calculateSignetAttestationDigest100(
|
|
50
66
|
requestId: RequestId,
|
|
67
|
+
blockHeight: Uint<64>,
|
|
68
|
+
outputKind: OutputKind,
|
|
51
69
|
serializedOutput: Bytes<100>
|
|
52
70
|
): Bytes<32> {
|
|
53
|
-
return calculateSignetAttestationDigest<100>(requestId, serializedOutput);
|
|
71
|
+
return calculateSignetAttestationDigest<100>(requestId, blockHeight, outputKind, serializedOutput);
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
export pure circuit verifyRespondBidirectionalEvent0(
|
|
75
|
+
serializedOutput: Bytes<0>,
|
|
76
|
+
respondBidirectionalEvent: RespondBidirectionalEvent,
|
|
77
|
+
mpcResponseKey: Secp256k1Point
|
|
78
|
+
): Boolean {
|
|
79
|
+
return verifyRespondBidirectionalEvent<0>(
|
|
80
|
+
serializedOutput,
|
|
81
|
+
respondBidirectionalEvent,
|
|
82
|
+
mpcResponseKey
|
|
83
|
+
);
|
|
54
84
|
}
|
|
55
85
|
|
|
56
86
|
export pure circuit verifyRespondBidirectionalEvent32(
|
|
57
|
-
requestId: RequestId,
|
|
58
87
|
serializedOutput: Bytes<32>,
|
|
59
88
|
respondBidirectionalEvent: RespondBidirectionalEvent,
|
|
60
89
|
mpcResponseKey: Secp256k1Point
|
|
61
90
|
): Boolean {
|
|
62
91
|
return verifyRespondBidirectionalEvent<32>(
|
|
63
|
-
requestId,
|
|
64
92
|
serializedOutput,
|
|
65
93
|
respondBidirectionalEvent,
|
|
66
94
|
mpcResponseKey
|