@sig-net/midnight 0.24.1 → 0.25.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 +5 -4
- package/dist/compact-descriptors.d.ts +5 -7
- package/dist/compact-descriptors.d.ts.map +1 -1
- package/dist/compact-descriptors.js +6 -18
- package/dist/compact-descriptors.js.map +1 -1
- package/dist/constants.d.ts +5 -2
- package/dist/constants.d.ts.map +1 -1
- package/dist/constants.js +5 -2
- package/dist/constants.js.map +1 -1
- package/dist/ecdsa-attestation.d.ts +53 -9
- package/dist/ecdsa-attestation.d.ts.map +1 -1
- package/dist/ecdsa-attestation.js +89 -37
- package/dist/ecdsa-attestation.js.map +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/managed/compiler/contract-info.json +251 -143
- package/dist/managed/compiler/contract-manifest.json +8 -8
- package/dist/managed/contract/index.d.ts +75 -46
- package/dist/managed/contract/index.js +604 -585
- package/dist/managed/contract/index.js.map +1 -1
- package/dist/mpc-output-cache.js +1 -1
- package/dist/mpc-output-cache.js.map +1 -1
- package/dist/signet-contract-events.d.ts +15 -8
- package/dist/signet-contract-events.d.ts.map +1 -1
- package/dist/signet-contract-events.js +7 -4
- package/dist/signet-contract-events.js.map +1 -1
- package/dist/signet-evtype2tx-record-decoding.js +2 -2
- package/dist/signet-requests.d.ts +2 -2
- package/dist/signet-requests.js +2 -2
- package/package.json +2 -2
- package/src/Signet.compact +109 -45
- package/src/circuits.compact +40 -32
package/src/circuits.compact
CHANGED
|
@@ -12,6 +12,8 @@ export {
|
|
|
12
12
|
HashDomain,
|
|
13
13
|
OutputKind,
|
|
14
14
|
calculateRequestIdV1,
|
|
15
|
+
calculateSignetAttestationDigestV1,
|
|
16
|
+
verifyRespondBidirectionalAttestationV1,
|
|
15
17
|
constructSignBidirectionalEventNotificationV1,
|
|
16
18
|
ethereumCaip2Id,
|
|
17
19
|
evmAddressAbiWord,
|
|
@@ -22,56 +24,62 @@ export {
|
|
|
22
24
|
checkedTruncationU128
|
|
23
25
|
};
|
|
24
26
|
|
|
25
|
-
// ---- Fixed-width
|
|
26
|
-
// The size-generic
|
|
27
|
-
// list above. These fixed-width instantiations exist solely to pin
|
|
28
|
-
// twin in ecdsa-attestation.ts against the compiled circuits (widths
|
|
29
|
-
// 32 and 100, where 0 is the empty output of a failed or unviable
|
|
30
|
-
// Client contracts instantiate the generic circuits at their own
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
blockHeight: Uint<64>,
|
|
35
|
-
outputKind: OutputKind,
|
|
27
|
+
// ---- Fixed-width output hash oracles (tests only) --------------------------
|
|
28
|
+
// The size-generic output hash and verify circuits cannot appear in the
|
|
29
|
+
// export list above. These fixed-width instantiations exist solely to pin
|
|
30
|
+
// the TS twin in ecdsa-attestation.ts against the compiled circuits (widths
|
|
31
|
+
// 0, 1, 2, 32 and 100, where 0 is the empty output of a failed or unviable
|
|
32
|
+
// execution). Client contracts instantiate the generic circuits at their own
|
|
33
|
+
// width.
|
|
34
|
+
|
|
35
|
+
export pure circuit calculateAttestedOutputHash0(
|
|
36
36
|
serializedOutput: Bytes<0>
|
|
37
37
|
): Bytes<32> {
|
|
38
|
-
return
|
|
38
|
+
return calculateAttestedOutputHashV1<0>(serializedOutput);
|
|
39
39
|
}
|
|
40
40
|
|
|
41
|
-
export pure circuit
|
|
42
|
-
requestId: RequestId,
|
|
43
|
-
blockHeight: Uint<64>,
|
|
44
|
-
outputKind: OutputKind,
|
|
41
|
+
export pure circuit calculateAttestedOutputHash1(
|
|
45
42
|
serializedOutput: Bytes<1>
|
|
46
43
|
): Bytes<32> {
|
|
47
|
-
return
|
|
44
|
+
return calculateAttestedOutputHashV1<1>(serializedOutput);
|
|
48
45
|
}
|
|
49
46
|
|
|
50
|
-
export pure circuit
|
|
51
|
-
requestId: RequestId,
|
|
52
|
-
blockHeight: Uint<64>,
|
|
53
|
-
outputKind: OutputKind,
|
|
47
|
+
export pure circuit calculateAttestedOutputHash2(
|
|
54
48
|
serializedOutput: Bytes<2>
|
|
55
49
|
): Bytes<32> {
|
|
56
|
-
return
|
|
50
|
+
return calculateAttestedOutputHashV1<2>(serializedOutput);
|
|
57
51
|
}
|
|
58
52
|
|
|
59
|
-
export pure circuit
|
|
60
|
-
requestId: RequestId,
|
|
61
|
-
blockHeight: Uint<64>,
|
|
62
|
-
outputKind: OutputKind,
|
|
53
|
+
export pure circuit calculateAttestedOutputHash32(
|
|
63
54
|
serializedOutput: Bytes<32>
|
|
64
55
|
): Bytes<32> {
|
|
65
|
-
return
|
|
56
|
+
return calculateAttestedOutputHashV1<32>(serializedOutput);
|
|
66
57
|
}
|
|
67
58
|
|
|
68
|
-
export pure circuit
|
|
69
|
-
requestId: RequestId,
|
|
70
|
-
blockHeight: Uint<64>,
|
|
71
|
-
outputKind: OutputKind,
|
|
59
|
+
export pure circuit calculateAttestedOutputHash100(
|
|
72
60
|
serializedOutput: Bytes<100>
|
|
73
61
|
): Bytes<32> {
|
|
74
|
-
return
|
|
62
|
+
return calculateAttestedOutputHashV1<100>(serializedOutput);
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
// Fixed-width instantiations of verifyAttestedOutputV1, pinning its TS twin
|
|
66
|
+
// verifyAttestedOutput, including the trailing-zero case the length check
|
|
67
|
+
// exists for (a 2-byte output against a 1-byte attestation).
|
|
68
|
+
|
|
69
|
+
export pure circuit verifyAttestedOutput1(
|
|
70
|
+
serializedOutput: Bytes<1>,
|
|
71
|
+
attestedOutputLength: Uint<64>,
|
|
72
|
+
attestedOutputHash: Bytes<32>
|
|
73
|
+
): Boolean {
|
|
74
|
+
return verifyAttestedOutputV1<1>(serializedOutput, attestedOutputLength, attestedOutputHash);
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
export pure circuit verifyAttestedOutput2(
|
|
78
|
+
serializedOutput: Bytes<2>,
|
|
79
|
+
attestedOutputLength: Uint<64>,
|
|
80
|
+
attestedOutputHash: Bytes<32>
|
|
81
|
+
): Boolean {
|
|
82
|
+
return verifyAttestedOutputV1<2>(serializedOutput, attestedOutputLength, attestedOutputHash);
|
|
75
83
|
}
|
|
76
84
|
|
|
77
85
|
// ---- Fixed-width transaction digest oracles (tests only) --------------------
|