@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.
Files changed (48) hide show
  1. package/README.md +9 -9
  2. package/dist/abi-serde.d.ts +89 -0
  3. package/dist/abi-serde.d.ts.map +1 -0
  4. package/dist/abi-serde.js +393 -0
  5. package/dist/abi-serde.js.map +1 -0
  6. package/dist/constants.d.ts +23 -14
  7. package/dist/constants.d.ts.map +1 -1
  8. package/dist/constants.js +28 -20
  9. package/dist/constants.js.map +1 -1
  10. package/dist/ecdsa-attestation.d.ts +38 -18
  11. package/dist/ecdsa-attestation.d.ts.map +1 -1
  12. package/dist/ecdsa-attestation.js +52 -25
  13. package/dist/ecdsa-attestation.js.map +1 -1
  14. package/dist/epsilon-derivation.js +1 -1
  15. package/dist/epsilon-derivation.js.map +1 -1
  16. package/dist/index.d.ts +1 -0
  17. package/dist/index.d.ts.map +1 -1
  18. package/dist/index.js +1 -0
  19. package/dist/index.js.map +1 -1
  20. package/dist/managed/compiler/contract-info.json +180 -122
  21. package/dist/managed/compiler/contract-manifest.json +8 -8
  22. package/dist/managed/contract/index.d.ts +38 -28
  23. package/dist/managed/contract/index.js +302 -149
  24. package/dist/managed/contract/index.js.map +1 -1
  25. package/dist/signature-requests-state-reader.d.ts +13 -13
  26. package/dist/signature-requests-state-reader.js +22 -22
  27. package/dist/signature-requests-state-reader.js.map +1 -1
  28. package/dist/signature-response-verification.d.ts +1 -1
  29. package/dist/signature-response-verification.js +3 -3
  30. package/dist/signature-response-verification.js.map +1 -1
  31. package/dist/signet-contract-state-reader.d.ts +33 -36
  32. package/dist/signet-contract-state-reader.d.ts.map +1 -1
  33. package/dist/signet-contract-state-reader.js +26 -28
  34. package/dist/signet-contract-state-reader.js.map +1 -1
  35. package/dist/signet-evtype2tx-requests.d.ts +21 -21
  36. package/dist/signet-evtype2tx-requests.js +16 -16
  37. package/dist/signet-evtype2tx-requests.js.map +1 -1
  38. package/dist/signet-request-response-reader.d.ts +23 -23
  39. package/dist/signet-request-response-reader.d.ts.map +1 -1
  40. package/dist/signet-request-response-reader.js +28 -28
  41. package/dist/signet-request-response-reader.js.map +1 -1
  42. package/dist/signet-requests.d.ts +27 -27
  43. package/dist/signet-requests.d.ts.map +1 -1
  44. package/dist/signet-requests.js +28 -29
  45. package/dist/signet-requests.js.map +1 -1
  46. package/package.json +3 -2
  47. package/src/Signet.compact +78 -63
  48. package/src/circuits.compact +45 -2
package/dist/constants.js CHANGED
@@ -1,43 +1,51 @@
1
1
  // MPC routing constants + the padded-ASCII codec for the signet request
2
- // structs. Field widths mirror Signet.compact (the wire format —
3
- // keep in lockstep); the string constants are the values the MPC network
2
+ // structs. Field widths mirror Signet.compact (the wire format: keep in
3
+ // lockstep), and the string constants are the values the MPC network
4
4
  // routes on. Ported from the MVP's contract-cli signet/constants.ts, adapted
5
- // to the refactor's zero-padded convention (Compact `pad(N, "text")`) — the
6
- // MVP's 2-byte length-prefixed codec is gone with the old layout.
5
+ // to the refactor's zero-padded convention (Compact `pad(N, "text")`).
7
6
  //
8
- // The routing constants belong in github.com/sig-net/signet.js — kept here
7
+ // The routing constants belong in github.com/sig-net/signet.js, kept here
9
8
  // until upstreamed.
10
9
  /** Width of `SignBidirectionalEvent.caip2Id` (`Bytes<32>`). */
11
10
  export const CAIP2_ID_BYTES = 32;
12
11
  /** Width of `SignBidirectionalEvent.params` (`Bytes<64>`). */
13
12
  export const MPC_PARAMS_BYTES = 64;
14
- /** Width of `EvmCalldata.selector` (`Bytes<4>`) — the literal first 4 calldata bytes. */
13
+ /** Width of `EvmCalldata.selector` (`Bytes<4>`): the literal first 4 calldata bytes. */
15
14
  export const SELECTOR_BYTES = 4;
16
- /** Width of `RespondBidirectionalEvent.serializedOutput` (`Bytes<128>`). */
17
- export const SERIALIZED_OUTPUT_BYTES = 128;
18
15
  /**
19
- * The MPC's error sentinel: `serializedOutput` beginning with these four
16
+ * The MPC's error sentinel: a serialised output beginning with these four
20
17
  * bytes marks a failed/absent remote execution (mirrors the sig-net MPC's
21
18
  * MAGIC_ERROR_PREFIX).
22
19
  */
23
20
  export const MPC_ERROR_SENTINEL = new Uint8Array([0xde, 0xad, 0xbe, 0xef]);
24
21
  /**
25
- * Whether an attestation's serialized output reports a successful remote
26
- * execution: the first byte is 1 — the little-endian encoding of the
27
- * ABI-decoded success flag, matching the circuits'
28
- * `serializedOutput as Field == 1` check.
22
+ * The complete serialised output the MPC attests for a FAILED remote
23
+ * execution (reverted or replaced transaction): the error sentinel followed
24
+ * by one `0x01` byte. Schema-independent by design, mirroring the canonical
25
+ * MPC's Borsh-format failure payload (sig-net/mpc,
26
+ * node/src/respond_bidirectional.rs), so every respond schema shares one
27
+ * fixed 5-byte failure width. Clients recompute their failure candidate from
28
+ * this constant alone: no receipt or schema needed.
29
+ */
30
+ export const MPC_FAILURE_OUTPUT = new Uint8Array([0xde, 0xad, 0xbe, 0xef, 0x01]);
31
+ /**
32
+ * Whether an attested serialised output reports a successful remote
33
+ * execution: the first byte is 1, the packed little-endian encoding of a
34
+ * leading boolean success flag. The output is the exact unpadded respond
35
+ * payload (see `serializeRespondOutput`), so its length follows from the
36
+ * request's respond schema.
29
37
  *
30
- * @param serializedOutput - The attestation's serialized output.
38
+ * @param serializedOutput - The attested serialised output.
31
39
  * @returns `true` when the remote call succeeded.
32
40
  */
33
41
  export function executionSucceeded(serializedOutput) {
34
42
  return serializedOutput[0] === 1;
35
43
  }
36
44
  /**
37
- * Whether an attestation's serialized output is the MPC's error sentinel
38
- * (see {@link MPC_ERROR_SENTINEL}) rather than a call result.
45
+ * Whether an attested serialised output is the MPC's error sentinel
46
+ * (see {@link MPC_ERROR_SENTINEL}).
39
47
  *
40
- * @param serializedOutput - The attestation's serialized output.
48
+ * @param serializedOutput - The attested serialised output.
41
49
  * @returns `true` when the MPC reported an execution error.
42
50
  */
43
51
  export function isExecutionError(serializedOutput) {
@@ -45,12 +53,12 @@ export function isExecutionError(serializedOutput) {
45
53
  }
46
54
  /**
47
55
  * Default MPC key version (`keyVersion` field value). Version 0 is the
48
- * unsupported legacy format — the canonical MPC (and
56
+ * unsupported legacy format: the canonical MPC (and
49
57
  * `constructSignBidirectionalEvent`) requires `keyVersion >= 1`.
50
58
  */
51
59
  export const SIGNET_DEFAULT_KEY_VERSION = 1n;
52
60
  /**
53
- * Encode text as zero-padded ASCII bytes — the Compact `pad(N, "text")`
61
+ * Encode text as zero-padded ASCII bytes, the Compact `pad(N, "text")`
54
62
  * convention every string-ish field of the request structs uses (consumers
55
63
  * NUL-trim on decode).
56
64
  *
@@ -62,7 +70,7 @@ export const SIGNET_DEFAULT_KEY_VERSION = 1n;
62
70
  export function asciiPadded(text, length) {
63
71
  const encoded = new TextEncoder().encode(text);
64
72
  if (encoded.length > length) {
65
- throw new Error(`"${text}" is ${encoded.length} bytes — does not fit the ${length}-byte field`);
73
+ throw new Error(`"${text}" is ${encoded.length} bytes: does not fit the ${length}-byte field`);
66
74
  }
67
75
  const out = new Uint8Array(length);
68
76
  out.set(encoded);
@@ -1 +1 @@
1
- {"version":3,"file":"constants.js","sourceRoot":"","sources":["../src/constants.ts"],"names":[],"mappings":"AAAA,wEAAwE;AACxE,iEAAiE;AACjE,yEAAyE;AACzE,6EAA6E;AAC7E,4EAA4E;AAC5E,kEAAkE;AAClE,EAAE;AACF,2EAA2E;AAC3E,oBAAoB;AAEpB,+DAA+D;AAC/D,MAAM,CAAC,MAAM,cAAc,GAAG,EAAE,CAAC;AAEjC,8DAA8D;AAC9D,MAAM,CAAC,MAAM,gBAAgB,GAAG,EAAE,CAAC;AAEnC,yFAAyF;AACzF,MAAM,CAAC,MAAM,cAAc,GAAG,CAAC,CAAC;AAEhC,4EAA4E;AAC5E,MAAM,CAAC,MAAM,uBAAuB,GAAG,GAAG,CAAC;AAE3C;;;;GAIG;AACH,MAAM,CAAC,MAAM,kBAAkB,GAAG,IAAI,UAAU,CAAC,CAAC,IAAI,EAAE,IAAI,EAAE,IAAI,EAA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runtime";
2
+ import type { RequestId } from "./signet-requests.ts";
2
3
  import type { MpcSignature } from "./signet-contract-state-reader.ts";
3
4
  export type { Secp256k1Point } from "@midnight-ntwrk/compact-runtime";
4
5
  /** secp256k1 curve (group) order n. */
@@ -17,7 +18,7 @@ export declare function bytesToBigint(bytes: Uint8Array): bigint;
17
18
  /**
18
19
  * Convert a bigint to exactly 32 little-endian bytes. Matches Compact's
19
20
  * `Field as Bytes<32>` / `Secp256k1Scalar as Bytes<32>` encoding (the inverse
20
- * of {@link bytesToBigint}); negative inputs are interpreted in the BLS
21
+ * of {@link bytesToBigint}). Negative inputs are interpreted in the BLS
21
22
  * scalar field.
22
23
  *
23
24
  * @param n - The integer to encode.
@@ -34,7 +35,7 @@ export declare function bigintToBytes32(n: bigint): Uint8Array;
34
35
  export declare function bytesToBigintBE(bytes: Uint8Array): bigint;
35
36
  /**
36
37
  * Convert a bigint to exactly 32 BIG-endian bytes (SEC1 scalar/coordinate
37
- * order, also the ABI word encoding) — the big-endian counterpart of
38
+ * order, also the ABI word encoding): the big-endian counterpart of
38
39
  * {@link bigintToBytes32} and the inverse of {@link bytesToBigintBE}.
39
40
  *
40
41
  * @param value - The non-negative integer to encode.
@@ -45,7 +46,7 @@ export declare function bigintToBytes32BE(value: bigint): Uint8Array;
45
46
  /**
46
47
  * An ECDSA signature over the attestation digest, in the MPC's canonical
47
48
  * `Signature { big_r, s, recovery_id }` spirit with `r` already reduced to
48
- * the scalar `big_r.x mod n` — the form Compact's `Secp256k1EcdsaSignature`
49
+ * the scalar `big_r.x mod n`, the form Compact's `Secp256k1EcdsaSignature`
49
50
  * takes. Build the stored form for posting in a respond event with
50
51
  * {@link ecdsaSignatureToMpcSignature}.
51
52
  */
@@ -60,11 +61,11 @@ export interface EcdsaSignature {
60
61
  /**
61
62
  * ECDSA-sign a 32-byte digest with a secp256k1 secret key, exactly as the
62
63
  * MPC signs the attestation digest: RFC 6979 deterministic, low-s, the digest
63
- * interpreted big-endian with NO extra hashing (`prehash: false`) — the same
64
+ * interpreted big-endian with NO extra hashing (`prehash: false`), the same
64
65
  * convention `secp256k1EcdsaVerify` checks in-circuit.
65
66
  *
66
- * @param digest - The 32-byte digest to sign (e.g. the compiled
67
- * `pureCircuits.signetAttestationDigest` output).
67
+ * @param digest - The 32-byte digest to sign (e.g. the
68
+ * {@link calculateSignetAttestationDigest} output).
68
69
  * @param secretKey - The 32-byte secp256k1 secret key.
69
70
  * @returns The signature with its recovery id.
70
71
  */
@@ -72,7 +73,7 @@ export declare function signAttestationDigest(digest: Uint8Array, secretKey: Uin
72
73
  /**
73
74
  * Build the stored-form signature both respond events carry from a
74
75
  * scalar-form one: R is reconstructed by decompressing the curve point with
75
- * x = `r` and the parity `recoveryId` names — undoing the compression an
76
+ * x = `r` and the parity `recoveryId` names, undoing the compression an
76
77
  * `r || s || v` signature performs. For MPC-side posters (the fakenet
77
78
  * signer, tests). The negligible caveat: an R.x that overflowed the curve
78
79
  * order cannot be told apart from its reduced twin, so reconstruction picks
@@ -85,15 +86,13 @@ export declare function signAttestationDigest(digest: Uint8Array, secretKey: Uin
85
86
  */
86
87
  export declare function ecdsaSignatureToMpcSignature(signature: EcdsaSignature): MpcSignature;
87
88
  /**
88
- * Read a stored-form signature back into scalar form — the inverse of
89
+ * Read a stored-form signature back into scalar form: the inverse of
89
90
  * {@link ecdsaSignatureToMpcSignature}, for off-chain consumers building a
90
- * transaction from the response. In-circuit verification does not need this:
91
- * `verifyRespondBidirectionalEvent` takes the stored record as-is. `r` comes
92
- * out as `bigR.x` reduced mod the curve order. Rejects records that do not
93
- * even hold the shape, since posts are unauthenticated and a malformed
94
- * record is garbage, not a signature. `bigR.y` is NOT checked against the
95
- * curve or the recovery id: signature verification is the authority, not
96
- * this decoder.
91
+ * transaction from the response. `r` comes out as `bigR.x` reduced mod the
92
+ * curve order. Rejects records that do not even hold the shape, since posts
93
+ * are unauthenticated and a malformed record is garbage. `bigR.y` is NOT
94
+ * checked against the curve or the recovery id: signature verification is
95
+ * the authority, not this decoder.
97
96
  *
98
97
  * @param signature - The stored-form signature as posted.
99
98
  * @returns The scalar-form signature.
@@ -103,7 +102,7 @@ export declare function ecdsaSignatureToMpcSignature(signature: EcdsaSignature):
103
102
  export declare function mpcSignatureToEcdsaSignature(signature: MpcSignature): EcdsaSignature;
104
103
  /**
105
104
  * Parse a secp256k1 public key from SEC1 hex (compressed or uncompressed,
106
- * optional `0x` prefix) into the Compact runtime's `Secp256k1Point` shape —
105
+ * optional `0x` prefix) into the Compact runtime's `Secp256k1Point` shape:
107
106
  * how deploys receive the MPC response key to pin.
108
107
  *
109
108
  * @param value - The SEC1 hex public key.
@@ -113,7 +112,7 @@ export declare function mpcSignatureToEcdsaSignature(signature: MpcSignature): E
113
112
  export declare function parseSecp256k1PublicKey(value: string): Secp256k1Point;
114
113
  /**
115
114
  * Format a secp256k1 public key point as uncompressed SEC1 hex (with `0x`
116
- * prefix) — the round-trip inverse of {@link parseSecp256k1PublicKey}, for
115
+ * prefix): the round-trip inverse of {@link parseSecp256k1PublicKey}, for
117
116
  * handing a response key to deploys via env/config.
118
117
  *
119
118
  * @param point - The point to format.
@@ -121,11 +120,32 @@ export declare function parseSecp256k1PublicKey(value: string): Secp256k1Point;
121
120
  */
122
121
  export declare function formatSecp256k1PublicKey(point: Secp256k1Point): string;
123
122
  /**
124
- * Derive the `Secp256k1Point` of a secret key — convenience for tests and
123
+ * Derive the `Secp256k1Point` of a secret key: a convenience for tests and
125
124
  * signers that hold key material as raw bytes.
126
125
  *
127
126
  * @param secretKey - The 32-byte secp256k1 secret key.
128
127
  * @returns The public key point.
129
128
  */
130
129
  export declare function secp256k1PublicKeyOf(secretKey: Uint8Array): Secp256k1Point;
130
+ /**
131
+ * The attestation digest of a respond-bidirectional response:
132
+ * `keccak256(requestId || serializedOutput)`, the 32-byte digest the MPC
133
+ * ECDSA-signs to attest a remote execution.
134
+ *
135
+ * TS twin of the size-generic Compact circuit
136
+ * `calculateSignetAttestationDigest` (which the compiler cannot export
137
+ * compiled, so this is the one sanctioned re-implementation, pinned
138
+ * byte-for-byte against the fixed-width oracle circuits in
139
+ * circuits.compact). The constructions agree because the circuit's keccak
140
+ * preimage of the `[RequestId, Bytes<N>]` pair is the raw concatenated
141
+ * bytes, and it matches the MPC's respond-bidirectional hash
142
+ * (`hash(request_id || serialized_output)`: one flat concatenation, one
143
+ * hash). The output is hashed AS GIVEN, at its exact length: no padding and
144
+ * no length binding.
145
+ *
146
+ * @param requestId - The 32-byte request id the response answers.
147
+ * @param serializedOutput - The serialised execution output, exact unpadded bytes.
148
+ * @returns The 32-byte attestation digest.
149
+ */
150
+ export declare function calculateSignetAttestationDigest(requestId: RequestId, serializedOutput: Uint8Array): Uint8Array;
131
151
  //# sourceMappingURL=ecdsa-attestation.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"ecdsa-attestation.d.ts","sourceRoot":"","sources":["../src/ecdsa-attestation.ts"],"names":[],"mappings":"AAcA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,iCAAiC,CAAC;AAEtE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,mCAAmC,CAAC;AAItE,YAAY,EAAE,cAAc,EAAE,MAAM,iCAAiC,CAAC;AAEtE,uCAAuC;AACvC,eAAO,MAAM,eAAe,QAA2B,CAAC;AAExD,uEAAuE;AACvE,eAAO,MAAM,SAAS,iFAAiF,CAAC;AAExG;;;;;;;GAOG;AACH,wBAAgB,aAAa,CAAC,KAAK,EAAE,UAAU,GAAG,MAAM,CAMvD;AAED;;;;;;;;GAQG;AACH,wBAAgB,eAAe,CAAC,CAAC,EAAE,MAAM,GAAG,UAAU,CAQrD;AAED;;;;;;GAMG;AACH,wBAAgB,eAAe,CAAC,KAAK,EAAE,UAAU,GAAG,MAAM,CAMzD;AAED;;;;;;;;GAQG;AACH,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,MAAM,GAAG,UAAU,CAW3D;AAED;;;;;;GAMG;AACH,MAAM,WAAW,cAAc;IAC7B,wCAA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GAAG,UAAU,CAQrD;AAED;;;;;;GAMG;AACH,wBAAgB,eAAe,CAAC,KAAK,EAAE,UAAU,GAAG,MAAM,CAMzD;AAED;;;;;;;;GAQG;AACH,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,MAAM,GAAG,UAAU,CAW3D;AAED;;;;;;GAMG;AACH,MAAM,WAAW,cAAc;IAC7B,wCAAwC;IACxC,CAAC,EAAE,MAAM,CAAC;IACV,2DAA2D;IAC3D,CAAC,EAAE,MAAM,CAAC;IACV,2CAA2C;IAC3C,UAAU,EAAE,MAAM,CAAC;CACpB;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,qBAAqB,CACnC,MAAM,EAAE,UAAU,EAClB,SAAS,EAAE,UAAU,GACpB,cAAc,CAiBhB;AAED;;;;;;;;;;;;;GAaG;AACH,wBAAgB,4BAA4B,CAAC,SAAS,EAAE,cAAc,GAAG,YAAY,CAmBpF;AAED;;;;;;;;;;;;;GAaG;AACH,wBAAgB,4BAA4B,CAAC,SAAS,EAAE,YAAY,GAAG,cAAc,CAapF;AAED;;;;;;;;GAQG;AACH,wBAAgB,uBAAuB,CAAC,KAAK,EAAE,MAAM,GAAG,cAAc,CAcrE;AAED;;;;;;;GAOG;AACH,wBAAgB,wBAAwB,CAAC,KAAK,EAAE,cAAc,GAAG,MAAM,CAGtE;AAED;;;;;;GAMG;AACH,wBAAgB,oBAAoB,CAAC,SAAS,EAAE,UAAU,GAAG,cAAc,CAO1E;AAED;;;;;;;;;;;;;;;;;;;GAmBG;AACH,wBAAgB,gCAAgC,CAC9C,SAAS,EAAE,SAAS,EACpB,gBAAgB,EAAE,UAAU,GAC3B,UAAU,CAIZ"}
@@ -1,15 +1,19 @@
1
1
  // secp256k1 ECDSA helpers: the TS side of the respond-bidirectional
2
- // attestation flow in Signet.compact — SIGNING (which needs the secret
3
- // scalar, so it cannot be a circuit), key parsing/formatting, and the
2
+ // attestation flow in Signet.compact: SIGNING (which needs the secret
3
+ // scalar, so it cannot be a circuit), key parsing/formatting, the
4
4
  // byte-order conversions between noble's bigints and the little-endian
5
- // scalar bytes Compact's casts read. Everything provable stays in Compact: the
6
- // attestation digest is the COMPILED `pureCircuits.signetAttestationDigest`,
7
- // verification is `pureCircuits.verifyRespondBidirectionalEvent` (the same
8
- // check client contracts run in-circuit), and the deploy-time key pin is
9
- // `pureCircuits.signetKeyHash` — this file never re-implements any of them.
5
+ // scalar bytes Compact's casts read, and the attestation digest's TS twin.
6
+ // Everything provable stays in Compact where possible: in-circuit
7
+ // verification is `verifyRespondBidirectionalEvent`, the deploy-time key pin
8
+ // is `pureCircuits.signetKeyHash`. The digest circuit is size-generic and the
9
+ // compiler cannot export size-generic circuits top-level, so the digest is
10
+ // the ONE sanctioned TS twin here, pinned byte-for-byte against the
11
+ // fixed-width oracle circuits circuits.compact exports (see
12
+ // tests/ecdsa-attestation.test.ts).
10
13
  //
11
- // This belongs in github.com/sig-net/signet.js as its Midnight adapter —
14
+ // This belongs in github.com/sig-net/signet.js as its Midnight adapter,
12
15
  // kept here until upstreamed.
16
+ import { ethers } from "ethers";
13
17
  import { secp256k1 } from "@noble/curves/secp256k1.js";
14
18
  /** secp256k1 curve (group) order n. */
15
19
  export const SECP256K1_ORDER = secp256k1.Point.Fn.ORDER;
@@ -26,6 +30,8 @@ export const BLS_ORDER = 5243587517512619047944774050818596583769055250052763782
26
30
  export function bytesToBigint(bytes) {
27
31
  let result = 0n;
28
32
  for (let i = bytes.length - 1; i >= 0; i--) {
33
+ // The index is in range by construction: the assertion satisfies
34
+ // consumers compiling with noUncheckedIndexedAccess.
29
35
  result = (result << 8n) | BigInt(bytes[i]);
30
36
  }
31
37
  return result;
@@ -33,7 +39,7 @@ export function bytesToBigint(bytes) {
33
39
  /**
34
40
  * Convert a bigint to exactly 32 little-endian bytes. Matches Compact's
35
41
  * `Field as Bytes<32>` / `Secp256k1Scalar as Bytes<32>` encoding (the inverse
36
- * of {@link bytesToBigint}); negative inputs are interpreted in the BLS
42
+ * of {@link bytesToBigint}). Negative inputs are interpreted in the BLS
37
43
  * scalar field.
38
44
  *
39
45
  * @param n - The integer to encode.
@@ -64,7 +70,7 @@ export function bytesToBigintBE(bytes) {
64
70
  }
65
71
  /**
66
72
  * Convert a bigint to exactly 32 BIG-endian bytes (SEC1 scalar/coordinate
67
- * order, also the ABI word encoding) — the big-endian counterpart of
73
+ * order, also the ABI word encoding): the big-endian counterpart of
68
74
  * {@link bigintToBytes32} and the inverse of {@link bytesToBigintBE}.
69
75
  *
70
76
  * @param value - The non-negative integer to encode.
@@ -86,11 +92,11 @@ export function bigintToBytes32BE(value) {
86
92
  /**
87
93
  * ECDSA-sign a 32-byte digest with a secp256k1 secret key, exactly as the
88
94
  * MPC signs the attestation digest: RFC 6979 deterministic, low-s, the digest
89
- * interpreted big-endian with NO extra hashing (`prehash: false`) — the same
95
+ * interpreted big-endian with NO extra hashing (`prehash: false`), the same
90
96
  * convention `secp256k1EcdsaVerify` checks in-circuit.
91
97
  *
92
- * @param digest - The 32-byte digest to sign (e.g. the compiled
93
- * `pureCircuits.signetAttestationDigest` output).
98
+ * @param digest - The 32-byte digest to sign (e.g. the
99
+ * {@link calculateSignetAttestationDigest} output).
94
100
  * @param secretKey - The 32-byte secp256k1 secret key.
95
101
  * @returns The signature with its recovery id.
96
102
  */
@@ -115,7 +121,7 @@ export function signAttestationDigest(digest, secretKey) {
115
121
  /**
116
122
  * Build the stored-form signature both respond events carry from a
117
123
  * scalar-form one: R is reconstructed by decompressing the curve point with
118
- * x = `r` and the parity `recoveryId` names — undoing the compression an
124
+ * x = `r` and the parity `recoveryId` names, undoing the compression an
119
125
  * `r || s || v` signature performs. For MPC-side posters (the fakenet
120
126
  * signer, tests). The negligible caveat: an R.x that overflowed the curve
121
127
  * order cannot be told apart from its reduced twin, so reconstruction picks
@@ -148,15 +154,13 @@ export function ecdsaSignatureToMpcSignature(signature) {
148
154
  };
149
155
  }
150
156
  /**
151
- * Read a stored-form signature back into scalar form — the inverse of
157
+ * Read a stored-form signature back into scalar form: the inverse of
152
158
  * {@link ecdsaSignatureToMpcSignature}, for off-chain consumers building a
153
- * transaction from the response. In-circuit verification does not need this:
154
- * `verifyRespondBidirectionalEvent` takes the stored record as-is. `r` comes
155
- * out as `bigR.x` reduced mod the curve order. Rejects records that do not
156
- * even hold the shape, since posts are unauthenticated and a malformed
157
- * record is garbage, not a signature. `bigR.y` is NOT checked against the
158
- * curve or the recovery id: signature verification is the authority, not
159
- * this decoder.
159
+ * transaction from the response. `r` comes out as `bigR.x` reduced mod the
160
+ * curve order. Rejects records that do not even hold the shape, since posts
161
+ * are unauthenticated and a malformed record is garbage. `bigR.y` is NOT
162
+ * checked against the curve or the recovery id: signature verification is
163
+ * the authority, not this decoder.
160
164
  *
161
165
  * @param signature - The stored-form signature as posted.
162
166
  * @returns The scalar-form signature.
@@ -179,7 +183,7 @@ export function mpcSignatureToEcdsaSignature(signature) {
179
183
  }
180
184
  /**
181
185
  * Parse a secp256k1 public key from SEC1 hex (compressed or uncompressed,
182
- * optional `0x` prefix) into the Compact runtime's `Secp256k1Point` shape —
186
+ * optional `0x` prefix) into the Compact runtime's `Secp256k1Point` shape:
183
187
  * how deploys receive the MPC response key to pin.
184
188
  *
185
189
  * @param value - The SEC1 hex public key.
@@ -204,7 +208,7 @@ export function parseSecp256k1PublicKey(value) {
204
208
  }
205
209
  /**
206
210
  * Format a secp256k1 public key point as uncompressed SEC1 hex (with `0x`
207
- * prefix) — the round-trip inverse of {@link parseSecp256k1PublicKey}, for
211
+ * prefix): the round-trip inverse of {@link parseSecp256k1PublicKey}, for
208
212
  * handing a response key to deploys via env/config.
209
213
  *
210
214
  * @param point - The point to format.
@@ -215,7 +219,7 @@ export function formatSecp256k1PublicKey(point) {
215
219
  return `0x04${toBE32(point.x)}${toBE32(point.y)}`;
216
220
  }
217
221
  /**
218
- * Derive the `Secp256k1Point` of a secret key — convenience for tests and
222
+ * Derive the `Secp256k1Point` of a secret key: a convenience for tests and
219
223
  * signers that hold key material as raw bytes.
220
224
  *
221
225
  * @param secretKey - The 32-byte secp256k1 secret key.
@@ -229,4 +233,27 @@ export function secp256k1PublicKeyOf(secretKey) {
229
233
  identity: false,
230
234
  };
231
235
  }
236
+ /**
237
+ * The attestation digest of a respond-bidirectional response:
238
+ * `keccak256(requestId || serializedOutput)`, the 32-byte digest the MPC
239
+ * ECDSA-signs to attest a remote execution.
240
+ *
241
+ * TS twin of the size-generic Compact circuit
242
+ * `calculateSignetAttestationDigest` (which the compiler cannot export
243
+ * compiled, so this is the one sanctioned re-implementation, pinned
244
+ * byte-for-byte against the fixed-width oracle circuits in
245
+ * circuits.compact). The constructions agree because the circuit's keccak
246
+ * preimage of the `[RequestId, Bytes<N>]` pair is the raw concatenated
247
+ * bytes, and it matches the MPC's respond-bidirectional hash
248
+ * (`hash(request_id || serialized_output)`: one flat concatenation, one
249
+ * hash). The output is hashed AS GIVEN, at its exact length: no padding and
250
+ * no length binding.
251
+ *
252
+ * @param requestId - The 32-byte request id the response answers.
253
+ * @param serializedOutput - The serialised execution output, exact unpadded bytes.
254
+ * @returns The 32-byte attestation digest.
255
+ */
256
+ export function calculateSignetAttestationDigest(requestId, serializedOutput) {
257
+ return ethers.getBytes(ethers.keccak256(ethers.concat([requestId, serializedOutput])));
258
+ }
232
259
  //# sourceMappingURL=ecdsa-attestation.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"ecdsa-attestation.js","sourceRoot":"","sources":["../src/ecdsa-attestation.ts"],"names":[],"mappings":"AAAA,oEAAoE;AACpE,uEAAuE;AACvE,sEAAsE;AACtE,uEAAuE;AACvE,+EAA+E;AAC/E,6EAA6E;AAC7E,2EAA2E;AAC3E,yEAAyE;AACzE,4EAA4E;AAC5E,EAAE;AACF,yEAAyE;AACzE,8BAA8B;AAE9B,OAAO,EAAE,SAAS,EAAE,MAAM,4BAA4B,CAAC;AASvD,uCAAuC;AACvC,MAAM,CAAC,MAAM,eAAe,GAAG,SAAS,CAAC,KAAK,CAAC,EAAE,CAAC,KAAK,C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7C,CAAC,EAAE,eAAe,CAAC,YAAY,CAAC,KAAK,CAAC,EAAE,EAAE,EAAE,CAAC,CAAC;QAC9C,QAAQ,EAAE,KAAK;KAChB,CAAC;AACJ,CAAC;AAED;;;;;;;;;;;;;;;;;;;GAmBG;AACH,MAAM,UAAU,gCAAgC,CAC9C,SAAoB,EACpB,gBAA4B;IAE5B,OAAO,MAAM,CAAC,QAAQ,CACpB,MAAM,CAAC,SAAS,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC,SAAS,EAAE,gBAAgB,CAAC,CAAC,CAAC,CAC/D,CAAC;AACJ,CAAC"}
@@ -1,6 +1,6 @@
1
1
  // Epsilon key derivation: contract address + path -> derived EVM account.
2
2
  //
3
- // This belongs in github.com/sig-net/signet.js — kept here until upstreamed.
3
+ // This belongs in github.com/sig-net/signet.js, kept here until upstreamed.
4
4
  //
5
5
  // v2.0.0 (COLON-separated) is the only scheme the MPC answers. The v1.0.0
6
6
  // COMMA-separated form is `key_version 0` in the MPC's KDF and is not served;
@@ -1 +1 @@
1
- {"version":3,"file":"epsilon-derivation.js","sourceRoot":"","sources":["../src/epsilon-derivation.ts"],"names":[],"mappings":"AAAA,0EAA0E;AAC1E,EAAE;AACF,6EAA6E;AAC7E,EAAE;AACF,0EAA0E;AAC1E,8EAA8E;AAC9E,6EAA6E;AAC7E,yEAAyE;AACzE,kEAAkE;AAElE,OAAO,EAAE,SAAS,EAAE,MAAM,4BAA4B,CAAC;AACvD,OAAO,EAAE,cAAc,EAAE,SAAS,EAAE,UAAU,EAAE,WAAW,EAAE,MAAM,QAAQ,CAAC;AAE5E,OAAO,EAAE,eAAe,EAAuB,MAAM,wBAAwB,CAAC;AAE9E;;;;GAIG;AACH,MAAM,CAAC,MAAM,yBAAyB,GAAG,uCAAuC,CAAC;AAEjF;;;GAGG;AACH,MAAM,CAAC,MAAM,yBAAyB,GAAG,kBAAkB,CAAC;AAE5D;;;;;;;;;;;;;;;GAeG;AACH,MAAM,CAAC,MAAM,mCA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C;QAC7B,GAAG,CAAC,CAAC,CAAC,GAAG,MAAM,CAAC,KAAK,GAAG,KAAK,CAAC,CAAC;QAC/B,KAAK,KAAK,EAAE,CAAC;IACf,CAAC;IACD,OAAO,GAAG,CAAC;AACb,CAAC"}
package/dist/index.d.ts CHANGED
@@ -1,3 +1,4 @@
1
+ export * from "./abi-serde.ts";
1
2
  export * from "./signet-requests.ts";
2
3
  export * from "./signet-evtype2tx-requests.ts";
3
4
  export * from "./signature-state-reading.ts";
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAIA,cAAc,sBAAsB,CAAC;AACrC,cAAc,gCAAgC,CAAC;AAC/C,cAAc,8BAA8B,CAAC;AAC7C,cAAc,sCAAsC,CAAC;AACrD,cAAc,mCAAmC,CAAC;AAClD,cAAc,sCAAsC,CAAC;AACrD,cAAc,qCAAqC,CAAC;AACpD,cAAc,8BAA8B,CAAC;AAC7C,cAAc,0BAA0B,CAAC;AACzC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,yBAAyB,CAAC;AACxC,cAAc,wBAAwB,CAAC;AAEvC;;;;GAIG;AACH,OAAO,EAAE,YAAY,EAAE,KAAK,YAAY,EAAE,MAAM,6BAA6B,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAIA,cAAc,gBAAgB,CAAC;AAC/B,cAAc,sBAAsB,CAAC;AACrC,cAAc,gCAAgC,CAAC;AAC/C,cAAc,8BAA8B,CAAC;AAC7C,cAAc,sCAAsC,CAAC;AACrD,cAAc,mCAAmC,CAAC;AAClD,cAAc,sCAAsC,CAAC;AACrD,cAAc,qCAAqC,CAAC;AACpD,cAAc,8BAA8B,CAAC;AAC7C,cAAc,0BAA0B,CAAC;AACzC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,yBAAyB,CAAC;AACxC,cAAc,wBAAwB,CAAC;AAEvC;;;;GAIG;AACH,OAAO,EAAE,YAAY,EAAE,KAAK,YAAY,EAAE,MAAM,6BAA6B,CAAC"}
package/dist/index.js CHANGED
@@ -1,6 +1,7 @@
1
1
  // Midnight-side sig-net integration: the client-agnostic signet protocol
2
2
  // library (wire structs, state readers, request feed/resolver, crypto) plus
3
3
  // the compiled pure circuits of the shared Compact module.
4
+ export * from "./abi-serde.js";
4
5
  export * from "./signet-requests.js";
5
6
  export * from "./signet-evtype2tx-requests.js";
6
7
  export * from "./signature-state-reading.js";
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,yEAAyE;AACzE,4EAA4E;AAC5E,2DAA2D;AAE3D,cAAc,sBAAsB,CAAC;AACrC,cAAc,gCAAgC,CAAC;AAC/C,cAAc,8BAA8B,CAAC;AAC7C,cAAc,sCAAsC,CAAC;AACrD,cAAc,mCAAmC,CAAC;AAClD,cAAc,sCAAsC,CAAC;AACrD,cAAc,qCAAqC,CAAC;AACpD,cAAc,8BAA8B,CAAC;AAC7C,cAAc,0BAA0B,CAAC;AACzC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,yBAAyB,CAAC;AACxC,cAAc,wBAAwB,CAAC;AAEvC;;;;GAIG;AACH,OAAO,EAAE,YAAY,EAAqB,MAAM,6BAA6B,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,yEAAyE;AACzE,4EAA4E;AAC5E,2DAA2D;AAE3D,cAAc,gBAAgB,CAAC;AAC/B,cAAc,sBAAsB,CAAC;AACrC,cAAc,gCAAgC,CAAC;AAC/C,cAAc,8BAA8B,CAAC;AAC7C,cAAc,sCAAsC,CAAC;AACrD,cAAc,mCAAmC,CAAC;AAClD,cAAc,sCAAsC,CAAC;AACrD,cAAc,qCAAqC,CAAC;AACpD,cAAc,8BAA8B,CAAC;AAC7C,cAAc,0BAA0B,CAAC;AACzC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,yBAAyB,CAAC;AACxC,cAAc,wBAAwB,CAAC;AAEvC;;;;GAIG;AACH,OAAO,EAAE,YAAY,EAAqB,MAAM,6BAA6B,CAAC"}