@sig-net/midnight 0.10.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 (52) hide show
  1. package/README.md +17 -17
  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 +81 -9
  11. package/dist/ecdsa-attestation.d.ts.map +1 -1
  12. package/dist/ecdsa-attestation.js +137 -18
  13. package/dist/ecdsa-attestation.js.map +1 -1
  14. package/dist/epsilon-derivation.d.ts +8 -8
  15. package/dist/epsilon-derivation.d.ts.map +1 -1
  16. package/dist/epsilon-derivation.js +16 -18
  17. package/dist/epsilon-derivation.js.map +1 -1
  18. package/dist/index.d.ts +1 -0
  19. package/dist/index.d.ts.map +1 -1
  20. package/dist/index.js +1 -0
  21. package/dist/index.js.map +1 -1
  22. package/dist/managed/compiler/contract-info.json +180 -104
  23. package/dist/managed/compiler/contract-manifest.json +8 -8
  24. package/dist/managed/contract/index.d.ts +38 -24
  25. package/dist/managed/contract/index.js +363 -154
  26. package/dist/managed/contract/index.js.map +1 -1
  27. package/dist/signature-requests-state-reader.d.ts +15 -15
  28. package/dist/signature-requests-state-reader.d.ts.map +1 -1
  29. package/dist/signature-requests-state-reader.js +51 -34
  30. package/dist/signature-requests-state-reader.js.map +1 -1
  31. package/dist/signature-response-verification.d.ts +2 -2
  32. package/dist/signature-response-verification.js +8 -8
  33. package/dist/signature-response-verification.js.map +1 -1
  34. package/dist/signet-contract-state-reader.d.ts +74 -58
  35. package/dist/signet-contract-state-reader.d.ts.map +1 -1
  36. package/dist/signet-contract-state-reader.js +76 -58
  37. package/dist/signet-contract-state-reader.js.map +1 -1
  38. package/dist/signet-evtype2tx-requests.d.ts +62 -59
  39. package/dist/signet-evtype2tx-requests.d.ts.map +1 -1
  40. package/dist/signet-evtype2tx-requests.js +58 -90
  41. package/dist/signet-evtype2tx-requests.js.map +1 -1
  42. package/dist/signet-request-response-reader.d.ts +26 -26
  43. package/dist/signet-request-response-reader.d.ts.map +1 -1
  44. package/dist/signet-request-response-reader.js +37 -37
  45. package/dist/signet-request-response-reader.js.map +1 -1
  46. package/dist/signet-requests.d.ts +30 -30
  47. package/dist/signet-requests.d.ts.map +1 -1
  48. package/dist/signet-requests.js +29 -30
  49. package/dist/signet-requests.js.map +1 -1
  50. package/package.json +3 -2
  51. package/src/Signet.compact +137 -88
  52. package/src/circuits.compact +45 -2
@@ -1,16 +1,17 @@
1
1
  // The EVM Type-2 (EIP-1559) instantiation of the signet request protocol:
2
- // TypeScript twins of the `EVMType2TxParams` decomposition structs in
2
+ // TypeScript twins of the `EvmType2TxParams` decomposition structs in
3
3
  // `Signet.compact`, their runtime descriptors, the ABI-word helpers, and the
4
4
  // request -> transaction assembly the signer runs. Everything chain-agnostic
5
5
  // (the request record itself, ids, the descriptor toolkit) lives in
6
- // `signet-requests.ts`; a future non-EVM decomposition gets a sibling of THIS
6
+ // `signet-requests.ts`. A future non-EVM decomposition gets a sibling of THIS
7
7
  // file.
8
8
  //
9
9
  // The no-translation invariant lives here: words are stored ABI-ready and
10
10
  // {@link assembleCalldata} concatenates `selector || words` VERBATIM, so the
11
11
  // transaction the MPC signs carries the contract-stored bytes untouched.
12
- import { CompactTypeBytes, CompactTypeUnsignedInteger, CompactTypeVector, persistentHash, } from "@midnight-ntwrk/compact-runtime";
13
- import { getAddress, getBytes, Signature, Transaction } from "ethers";
12
+ import { CompactTypeBytes, CompactTypeUnsignedInteger, CompactTypeVector, keccak256, } from "@midnight-ntwrk/compact-runtime";
13
+ import { getAddress, Signature, toBeHex, Transaction } from "ethers";
14
+ import { bigintToBytes32BE, ecdsaSignatureToMpcSignature, mpcSignatureToEcdsaSignature, } from "./ecdsa-attestation.js";
14
15
  import { bytesToHex, compactMaybeDescriptor, compactStructDescriptor, signBidirectionalEventDescriptorWith, } from "./signet-requests.js";
15
16
  // ---- Runtime descriptors (see the deviation note in signet-requests.ts) ----
16
17
  // Base-type literals match what the compiler emits for the EVM structs'
@@ -23,8 +24,8 @@ const UINT_16 = new CompactTypeUnsignedInteger(2n ** 16n - 1n, 2);
23
24
  const UINT_64 = new CompactTypeUnsignedInteger(2n ** 64n - 1n, 8);
24
25
  const UINT_128 = new CompactTypeUnsignedInteger(2n ** 128n - 1n, 16);
25
26
  /**
26
- * Descriptor of {@link EVMCalldata} at one word capacity — the TS analogue
27
- * of instantiating Compact's `EVMCalldata<#maxWords>`.
27
+ * Descriptor of {@link EvmCalldata} at one word capacity: the TS analogue
28
+ * of instantiating Compact's `EvmCalldata<#maxWords>`.
28
29
  *
29
30
  * @param maxWords - The contract's calldata word capacity (the vault uses 2).
30
31
  * @returns The calldata descriptor.
@@ -37,8 +38,8 @@ export function evmCalldataDescriptor(maxWords) {
37
38
  });
38
39
  }
39
40
  /**
40
- * Descriptor of {@link EVMAccessListEntry} at one storage-key capacity
41
- * (Compact: `EVMAccessListEntry<#maxStorageKeys>`).
41
+ * Descriptor of {@link EvmAccessListEntry} at one storage-key capacity
42
+ * (Compact: `EvmAccessListEntry<#maxStorageKeys>`).
42
43
  *
43
44
  * @param maxStorageKeys - Storage-key capacity per entry.
44
45
  * @returns The entry descriptor.
@@ -51,8 +52,8 @@ export function evmAccessListEntryDescriptor(maxStorageKeys) {
51
52
  });
52
53
  }
53
54
  /**
54
- * Descriptor of {@link EVMType2TxParams} at one capacity instantiation —
55
- * the TS analogue of Compact's `EVMType2TxParams<#maxCalldataWords,
55
+ * Descriptor of {@link EvmType2TxParams} at one capacity instantiation:
56
+ * the TS analogue of Compact's `EvmType2TxParams<#maxCalldataWords,
56
57
  * #maxAccessListEntries, #maxStorageKeysPerEntry>`.
57
58
  *
58
59
  * @param maxCalldataWords - Calldata word capacity.
@@ -61,22 +62,23 @@ export function evmAccessListEntryDescriptor(maxStorageKeys) {
61
62
  * @returns The tx-params descriptor.
62
63
  */
63
64
  export function evmType2TxParamsDescriptor(maxCalldataWords, maxAccessListEntries, maxStorageKeysPerEntry) {
65
+ // Key order IS the encoding order: keep it identical to the Compact struct's.
64
66
  return compactStructDescriptor({
65
- to: BYTES_20,
66
67
  chainId: UINT_64,
67
68
  nonce: UINT_64,
68
- gasLimit: UINT_64,
69
- maxFeePerGas: UINT_128,
70
69
  maxPriorityFeePerGas: UINT_128,
70
+ maxFeePerGas: UINT_128,
71
+ gasLimit: UINT_64,
72
+ to: BYTES_20,
71
73
  value: UINT_128,
74
+ calldata: compactMaybeDescriptor(evmCalldataDescriptor(maxCalldataWords)),
72
75
  accessListEntryCount: UINT_8,
73
76
  accessList: new CompactTypeVector(maxAccessListEntries, evmAccessListEntryDescriptor(maxStorageKeysPerEntry)),
74
- calldata: compactMaybeDescriptor(evmCalldataDescriptor(maxCalldataWords)),
75
77
  });
76
78
  }
77
79
  /**
78
80
  * Descriptor of {@link SignBidirectionalEvent} at one EVM Type-2 capacity
79
- * instantiation — the generic record descriptor
81
+ * instantiation: the generic record descriptor
80
82
  * (`signBidirectionalEventDescriptorWith`) over
81
83
  * {@link evmType2TxParamsDescriptor}.
82
84
  *
@@ -94,22 +96,22 @@ export function signBidirectionalEventDescriptor(maxCalldataWords, maxAccessList
94
96
  }
95
97
  /**
96
98
  * Canonical id of a signet request: the persistent hash of the entire event
97
- * record (which commits to every field, the sender address included — there
98
- * is deliberately no extra domain tag). TS twin of Signet.compact's
99
+ * record (which commits to every field, the sender address included, and
100
+ * deliberately carries no extra domain tag). TS twin of Signet.compact's
99
101
  * `calculateRequestId` circuit (see the deviation note in
100
102
  * signet-requests.ts), generic over the capacity instantiation via the
101
- * record's own array lengths — pass the record exactly as the ledger stores
103
+ * record's own array lengths: pass the record exactly as the ledger stores
102
104
  * it, unused slots included and schemas at their declared widths.
103
105
  *
104
106
  * @param request - The full event record (contract-shaped, all slots).
105
- * @returns The 32-byte request id — the record's ledger map key.
107
+ * @returns The 32-byte request id, the record's ledger map key.
106
108
  */
107
109
  export function calculateRequestId(request) {
108
110
  const { txParams } = request;
109
111
  const maxCalldataWords = txParams.calldata.value.words.length;
110
112
  const maxAccessListEntries = txParams.accessList.length;
111
113
  const maxStorageKeysPerEntry = maxAccessListEntries === 0 ? 0 : txParams.accessList[0].storageKeys.length;
112
- return persistentHash(signBidirectionalEventDescriptor(maxCalldataWords, maxAccessListEntries, maxStorageKeysPerEntry, request.outputDeserializationSchema.length, request.respondSerializationSchema.length), request);
114
+ return keccak256(signBidirectionalEventDescriptor(maxCalldataWords, maxAccessListEntries, maxStorageKeysPerEntry, request.outputDeserializationSchema.length, request.respondSerializationSchema.length), request);
113
115
  }
114
116
  // ---- ABI words / calldata / transaction assembly ---------------------------
115
117
  /**
@@ -120,7 +122,8 @@ export function calculateRequestId(request) {
120
122
  * builders, tests).
121
123
  *
122
124
  * @param value - The word's numeric value (e.g. an amount).
123
- * @returns The ABI-ready 32-byte word to store in an {@link EVMCalldata} word.
125
+ * @returns The ABI-ready 32-byte word to store in an {@link EvmCalldata} word.
126
+ * @throws Error if the value is negative or does not fit 32 bytes.
124
127
  */
125
128
  export function numericAbiWord(value) {
126
129
  return bigintToBytes32BE(value);
@@ -131,7 +134,7 @@ export function numericAbiWord(value) {
131
134
  * `evmAddressAbiWord` circuit (lockstep-tested against the compiled circuit).
132
135
  *
133
136
  * @param address - The 20-byte address in display order.
134
- * @returns The ABI-ready 32-byte word to store in an {@link EVMCalldata} word.
137
+ * @returns The ABI-ready 32-byte word to store in an {@link EvmCalldata} word.
135
138
  * @throws Error if the address is not exactly 20 bytes.
136
139
  */
137
140
  export function evmAddressAbiWord(address) {
@@ -148,7 +151,7 @@ export function evmAddressAbiWord(address) {
148
151
  * (lockstep-tested against the compiled circuit).
149
152
  *
150
153
  * @param value - The word's Boolean value.
151
- * @returns The ABI-ready 32-byte word to store in an {@link EVMCalldata} word.
154
+ * @returns The ABI-ready 32-byte word to store in an {@link EvmCalldata} word.
152
155
  */
153
156
  export function boolAbiWord(value) {
154
157
  const word = new Uint8Array(32);
@@ -199,10 +202,10 @@ export function abiWordToBool(word) {
199
202
  /**
200
203
  * Assemble the raw calldata a request's words describe:
201
204
  * `data = selector || words[0..noWords]`, VERBATIM. Words are stored
202
- * ABI-ready (see {@link EVMCalldata}), so no byte of the stored record is
203
- * reordered or reinterpreted on the way into the transaction; slots past
205
+ * ABI-ready (see {@link EvmCalldata}), so no byte of the stored record is
206
+ * reordered or reinterpreted on the way into the transaction. Slots past
204
207
  * `noWords` are unused capacity and are dropped. This is THE implementation
205
- * of the signer-side assembly documented on `EVMCalldata` in Signet.compact.
208
+ * of the signer-side assembly documented on `EvmCalldata` in Signet.compact.
206
209
  *
207
210
  * @param calldata - The request's calldata field.
208
211
  * @returns Hex calldata for the transaction (`"0x"` when absent).
@@ -240,7 +243,7 @@ function decodeAccessList(txParams) {
240
243
  * byte-identical to the one the MPC assembles and signs: calldata from the
241
244
  * tagged words (see {@link assembleCalldata}), the count-trimmed access
242
245
  * list, and the stored envelope fields. This is the canonical
243
- * request→transaction transform; response-side verification
246
+ * request→transaction transform. Response-side verification
244
247
  * (`signature-response-verification.ts`) and the signed-transaction builder
245
248
  * below both go through it, so the transaction a client broadcasts is
246
249
  * provably the one the MPC put its signature over.
@@ -250,7 +253,7 @@ function decodeAccessList(txParams) {
250
253
  * MPC signs).
251
254
  * @throws Error if a calldata word carries an unknown kind.
252
255
  */
253
- export function signBidirectionalEventToUnsignedEVMTransaction(request) {
256
+ export function signBidirectionalEventToUnsignedEvmTransaction(request) {
254
257
  const { txParams } = request;
255
258
  return Transaction.from({
256
259
  type: 2,
@@ -267,104 +270,69 @@ export function signBidirectionalEventToUnsignedEVMTransaction(request) {
267
270
  }
268
271
  /**
269
272
  * Decode a response signature record (as posted to the signet contract's
270
- * signature response log — the canonical MPC `Signature { big_r, s,
271
- * recovery_id }` shape) into an ethers {@link Signature}: `r` is `bigR`'s x
272
- * coordinate, `v` the legacy parity derived from the recovery id.
273
+ * signature response log) into an ethers {@link Signature}. Goes through
274
+ * {@link mpcSignatureToEcdsaSignature}, so this and in-circuit claims decode
275
+ * a post identically:
276
+ * ethers' `r` is the ECDSA scalar (`bigR.x` reduced mod the curve order),
277
+ * not the raw coordinate, and a malformed record is rejected the same way
278
+ * in both paths.
273
279
  *
274
280
  * @param response - The posted signature record.
275
281
  * @returns The ethers signature.
276
- * @throws Error if the recovery id is not 0 or 1.
282
+ * @throws Error if the record is malformed (see {@link mpcSignatureToEcdsaSignature}).
277
283
  */
278
284
  export function signatureRespondedEventToSignature(response) {
279
- const recoveryId = Number(response.recoveryId);
280
- if (recoveryId !== 0 && recoveryId !== 1) {
281
- throw new Error(`expected a recovery id of 0 or 1, got ${recoveryId}`);
282
- }
285
+ const { r, s, recoveryId } = mpcSignatureToEcdsaSignature(response.signature);
283
286
  return Signature.from({
284
- r: `0x${bytesToHex(response.bigRx)}`,
285
- s: `0x${bytesToHex(response.s)}`,
287
+ r: toBeHex(r, 32),
288
+ s: toBeHex(s, 32),
286
289
  v: recoveryId + 27,
287
290
  });
288
291
  }
289
- /** secp256k1 base field prime (2^256 - 2^32 - 977). */
290
- const SECP256K1_P = 2n ** 256n - 2n ** 32n - 977n;
291
- /** Modular exponentiation by squaring. */
292
- function modPow(base, exponent, modulus) {
293
- let result = 1n;
294
- let b = base % modulus;
295
- let e = exponent;
296
- while (e > 0n) {
297
- if (e & 1n)
298
- result = (result * b) % modulus;
299
- b = (b * b) % modulus;
300
- e >>= 1n;
301
- }
302
- return result;
303
- }
304
- /** Encode a bigint as exactly 32 BIG-endian bytes (secp256k1 scalar form). */
305
- function bigintToBytes32BE(value) {
306
- const out = new Uint8Array(32);
307
- let v = value;
308
- for (let i = 31; i >= 0; i--) {
309
- out[i] = Number(v & 0xffn);
310
- v >>= 8n;
311
- }
312
- return out;
313
- }
314
292
  /**
315
293
  * Encode an ECDSA signature as the response record posted to the signet
316
- * contract — the inverse of {@link signatureRespondedEventToSignature},
317
- * for MPC-side posters (the fakenet signer, tests). The canonical record
318
- * carries `bigR` as a full affine point but an `r || s || v` signature only
319
- * has R.x and the parity of R.y, so R.y is recovered by decompressing the
320
- * point on the curve (y² = x³ + 7 over the secp256k1 base field).
294
+ * contract: the inverse of {@link signatureRespondedEventToSignature}, for
295
+ * MPC-side posters (the fakenet signer, tests). An `r || s || v` signature
296
+ * carries only R.x and the parity of R.y, so the full R point the record
297
+ * stores is recovered on-curve (see {@link ecdsaSignatureToMpcSignature}).
321
298
  *
322
299
  * The parameter is structural (the r/s/yParity subset of an ethers
323
- * {@link Signature}) so signatures from ANY ethers instance qualify — posters
300
+ * {@link Signature}) so signatures from ANY ethers instance qualify: posters
324
301
  * living in other repos resolve their own ethers install, and nominal class
325
302
  * typing would reject it.
326
303
  *
327
304
  * @param signature - The signature to encode (`r`/`s` as 0x hex, `yParity` 0 or 1).
328
305
  * @returns The response record, ready to post.
329
- * @throws Error if `r` is not the x coordinate of a curve point.
306
+ * @throws Error if `r` is not the x coordinate of a secp256k1 point.
330
307
  */
331
308
  export function signatureToSignatureRespondedEvent(signature) {
332
- const x = BigInt(signature.r);
333
- const ySquared = (modPow(x, 3n, SECP256K1_P) + 7n) % SECP256K1_P;
334
- // P ≡ 3 (mod 4), so a square root (when one exists) is c^((P+1)/4).
335
- let y = modPow(ySquared, (SECP256K1_P + 1n) / 4n, SECP256K1_P);
336
- if ((y * y) % SECP256K1_P !== ySquared) {
337
- throw new Error("signature r is not the x coordinate of a secp256k1 point");
338
- }
339
- if ((y & 1n) !== BigInt(signature.yParity)) {
340
- y = SECP256K1_P - y;
341
- }
342
309
  return {
343
- bigRx: getBytes(signature.r),
344
- bigRy: bigintToBytes32BE(y),
345
- s: getBytes(signature.s),
346
- recoveryId: BigInt(signature.yParity),
310
+ signature: ecdsaSignatureToMpcSignature({
311
+ r: BigInt(signature.r),
312
+ s: BigInt(signature.s),
313
+ recoveryId: signature.yParity,
314
+ }),
347
315
  };
348
316
  }
349
317
  /**
350
318
  * Assemble the broadcast-ready signed EIP-1559 transaction for a request from
351
319
  * its MPC signature response: rebuild the exact unsigned transaction the MPC
352
- * signed (see {@link signBidirectionalEventToUnsignedEVMTransaction}) and
320
+ * signed (see {@link signBidirectionalEventToUnsignedEvmTransaction}) and
353
321
  * attach the signature. Does NOT check that the signature recovers to the
354
- * requester's derived address — the response log is unauthenticated, so
322
+ * requester's derived address: the response log is unauthenticated, so
355
323
  * verify first with `verifySignatureRespondedEvent`.
356
324
  *
357
325
  * @param request - The on-ledger request record.
358
326
  * @param response - The posted signature record answering it.
359
- * @returns The signed ethers transaction; `serialized` is the raw payload for
327
+ * @returns The signed ethers transaction: `serialized` is the raw payload for
360
328
  * `eth_sendRawTransaction`, `hash` its on-chain hash, `from` the recovered
361
329
  * sender.
362
330
  * @throws Error if the request record is malformed (see
363
- * {@link signBidirectionalEventToUnsignedEVMTransaction}) or the response
331
+ * {@link signBidirectionalEventToUnsignedEvmTransaction}) or the response
364
332
  * is not a decodable signature.
365
333
  */
366
- export function signBidirectionalEventToSignedEVMTransaction(request, response) {
367
- const transaction = signBidirectionalEventToUnsignedEVMTransaction(request);
334
+ export function signBidirectionalEventToSignedEvmTransaction(request, response) {
335
+ const transaction = signBidirectionalEventToUnsignedEvmTransaction(request);
368
336
  transaction.signature = signatureRespondedEventToSignature(response);
369
337
  return transaction;
370
338
  }
@@ -1 +1 @@
1
- {"version":3,"file":"signet-evtype2tx-requests.js","sourceRoot":"","sources":["../src/signet-evtype2tx-requests.ts"],"names":[],"mappings":"AAAA,0EAA0E;AAC1E,sEAAsE;AACtE,6EAA6E;AAC7E,6EAA6E;AAC7E,oEAAoE;AACpE,8EAA8E;AAC9E,QAAQ;AACR,EAAE;AACF,0EAA0E;AAC1E,6EAA6E;AAC7E,yEAAyE;AAEzE,OAAO,EACL,gBAAgB,EAChB,0BAA0B,EAC1B,iBAAiB,EACjB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L,CAAC;AAED;;;;;;;;;;;;;;;GAeG;AACH,MAAM,UAAU,kCAAkC,CAChD,SAAiD;IAEjD,OAAO;QACL,SAAS,EAAE,4BAA4B,CAAC;YACtC,CAAC,EAAE,MAAM,CAAC,SAAS,CAAC,CAAC,CAAC;YACtB,CAAC,EAAE,MAAM,CAAC,SAAS,CAAC,CAAC,CAAC;YACtB,UAAU,EAAE,SAAS,CAAC,OAAO;SAC9B,CAAC;KACH,CAAC;AACJ,CAAC;AAED;;;;;;;;;;;;;;;;GAgBG;AACH,MAAM,UAAU,4CAA4C,CAC1D,OAA+B,EAC/B,QAAiC;IAEjC,MAAM,WAAW,GAAG,8CAA8C,CAAC,OAAO,CAAC,CAAC;IAC5E,WAAW,CAAC,SAAS,GAAG,kCAAkC,CAAC,QAAQ,CAAC,CAAC;IACrE,OAAO,WAAW,CAAC;AACrB,CAAC"}
@@ -5,8 +5,8 @@ import type { RawContractState } from "./signature-state-reading.ts";
5
5
  import type { SignBidirectionalEvent, RequestIdHex } from "./signet-requests.ts";
6
6
  /**
7
7
  * The least of midnight-js's `PublicDataProvider` the reader needs: raw
8
- * contract state by address. Declared structurally (rather than a `Pick`) so
9
- * tests can satisfy it with a plain stub; any full `PublicDataProvider`
8
+ * contract state by address. Declared structurally so tests can satisfy it
9
+ * with a plain stub. Any full `PublicDataProvider`
10
10
  * (e.g. `indexerPublicDataProvider`) is assignable to it.
11
11
  */
12
12
  export interface SignetPublicStateSource {
@@ -26,7 +26,7 @@ export interface SignetRequestResponseReaderConfig {
26
26
  /** Address of the signet-compliant requester contract (e.g. the vault). */
27
27
  readonly requesterContractAddress: string;
28
28
  /**
29
- * Ledger field position of the requester contract's request index — the
29
+ * Ledger field position of the requester contract's request index: the
30
30
  * same position the contract passes as `requestsIndexField` in its
31
31
  * notifications. A contract is free to declare the index at any field, so
32
32
  * the reader cannot assume one.
@@ -43,16 +43,16 @@ export interface SignatureResponseVerdict {
43
43
  count: bigint;
44
44
  /** The posted signature record, verbatim. */
45
45
  response: SignatureRespondedEvent;
46
- /** Recovered signer address — absent when the signature did not decode. */
46
+ /** Recovered signer address, absent when the signature did not decode. */
47
47
  signer?: string;
48
- /** Why the post was rejected; absent when the post is valid. */
48
+ /** Why the post was rejected, absent when the post is valid. */
49
49
  rejectedReason?: string;
50
50
  }
51
51
  /** Result of {@link SignetRequestResponseReader['getVerifiedSignatureRespondedEvent']}. */
52
52
  export interface VerifiedSignatureResponseResult {
53
53
  /**
54
54
  * The first valid response (lowest count), or `undefined` when no valid
55
- * response has been posted yet — poll again.
55
+ * response has been posted yet: poll again.
56
56
  */
57
57
  verified?: SignatureRespondedEvent;
58
58
  /**
@@ -64,7 +64,7 @@ export interface VerifiedSignatureResponseResult {
64
64
  /**
65
65
  * Reader over one requester contract / signet contract pair.
66
66
  * Construct once per pair and reuse: fetched request records are cached (they
67
- * are immutable — the ledger key is their hash), so repeated verification
67
+ * are immutable, the ledger key is their hash), so repeated verification
68
68
  * calls cost one responses-contract query each.
69
69
  */
70
70
  export declare class SignetRequestResponseReader {
@@ -96,32 +96,32 @@ export declare class SignetRequestResponseReader {
96
96
  getSignatureRequest(requestId: RequestIdHex): Promise<SignBidirectionalEvent>;
97
97
  /**
98
98
  * Fetch every response posted for `requestId`, in post (count) order.
99
- * UNVERIFIED — any of them may be garbage; see
100
- * {@link getVerifiedSignatureRespondedEvent}.
99
+ * UNVERIFIED: any of them may be garbage (see
100
+ * {@link getVerifiedSignatureRespondedEvent}).
101
101
  *
102
102
  * @param requestId - The request id whose posts to enumerate.
103
- * @returns The posted payloads, index = count; empty when none yet.
103
+ * @returns The posted payloads, index = count, empty when none yet.
104
104
  * @throws Error when the responses contract has no state, or its counter
105
105
  * disagrees with the log (inconsistent ledger).
106
106
  */
107
107
  getSignatureResponses(requestId: RequestIdHex): Promise<SignatureRespondedEvent[]>;
108
108
  /**
109
109
  * Fetch and verify the responses posted for `requestId`: each post's
110
- * `{ bigR, s, recoveryId }` signature must recover to `expectedSigner`
110
+ * signature must recover to `expectedSigner`
111
111
  * (compared case-insensitively) over the signing hash of the transaction
112
- * the request record describes. The first valid post wins; every post gets
113
- * a verdict so callers can report the noise.
112
+ * the request record describes. The first valid post wins, and every post
113
+ * gets a verdict so callers can report the noise.
114
114
  *
115
115
  * @param requestId - The request id to fetch a verified response for.
116
116
  * @param expectedSigner - The EVM address (0x hex, any case) the genuine
117
- * response must be signed by — the requester's MPC-derived address.
117
+ * response must be signed by: the requester's MPC-derived address.
118
118
  * @returns The first valid response (if any) plus per-post verdicts.
119
119
  * @throws Error when either contract has no state, the request is not on
120
120
  * the requester's ledger, or the responses ledger is inconsistent.
121
121
  */
122
122
  getVerifiedSignatureRespondedEvent(requestId: RequestIdHex, expectedSigner: string): Promise<VerifiedSignatureResponseResult>;
123
123
  /**
124
- * Rebuild the unsigned EIP-1559 transaction for `requestId` — the exact
124
+ * Rebuild the unsigned EIP-1559 transaction for `requestId`: the exact
125
125
  * transaction the MPC signs, assembled from the request record's decomposed
126
126
  * fields. No responses-contract query: this needs only the request record
127
127
  * (fetched via {@link getSignatureRequest}, cached).
@@ -132,34 +132,34 @@ export declare class SignetRequestResponseReader {
132
132
  * @throws Error when the requester contract has no state or holds no
133
133
  * request under `requestId`.
134
134
  */
135
- getUnsignedEVMTransaction(requestId: RequestIdHex): Promise<Transaction>;
135
+ getUnsignedEvmTransaction(requestId: RequestIdHex): Promise<Transaction>;
136
136
  /**
137
137
  * Assemble the broadcast-ready signed EIP-1559 transaction for `requestId`:
138
138
  * rebuild the request's transaction and attach the first VERIFIED response
139
- * signed by `expectedSigner` (see {@link getVerifiedSignatureRespondedEvent} — the
140
- * response log is unauthenticated, so an `expectedSigner` is required and
141
- * unverified posts are never attached).
139
+ * signed by `expectedSigner` (see {@link getVerifiedSignatureRespondedEvent}:
140
+ * the response log is unauthenticated, so an `expectedSigner` is required
141
+ * and unverified posts are never attached).
142
142
  *
143
143
  * @param requestId - The request id to produce a signed transaction for.
144
144
  * @param expectedSigner - The EVM address (0x hex, any case) the genuine
145
- * response must be signed by — the requester's MPC-derived address.
145
+ * response must be signed by: the requester's MPC-derived address.
146
146
  * @returns The signed ethers transaction (`serialized` is the payload for
147
147
  * `eth_sendRawTransaction`), or `undefined` when no valid response has
148
- * been posted yet — poll again.
148
+ * been posted yet: poll again.
149
149
  * @throws Error when either contract has no state, the request is not on the
150
150
  * requester's ledger, or the responses ledger is inconsistent.
151
151
  */
152
- getSignedEVMTransaction(requestId: RequestIdHex, expectedSigner: string): Promise<Transaction | undefined>;
152
+ getSignedEvmTransaction(requestId: RequestIdHex, expectedSigner: string): Promise<Transaction | undefined>;
153
153
  /**
154
154
  * Fetch every respond-bidirectional response posted for `requestId`, in
155
- * post (count) order. UNVERIFIED — the signet contract stores posts without
156
- * checking them, so any entry may be garbage: verify each candidate before
155
+ * post (count) order. UNVERIFIED: the signet contract stores posts without
156
+ * checking them, so any entry may be garbage. Verify each candidate before
157
157
  * trusting it (in-circuit at claim time, or off-chain via the compiled
158
158
  * `pureCircuits.verifyRespondBidirectionalEvent` against the MPC derived
159
- * key you expect). An empty array simply means none posted yet, poll again.
159
+ * key you expect). An empty array simply means none posted yet: poll again.
160
160
  *
161
161
  * @param requestId - The request id whose responses to enumerate.
162
- * @returns The posted records, index = count; empty when none yet.
162
+ * @returns The posted records, index = count, empty when none yet.
163
163
  * @throws Error when the signet contract has no state, or its counter
164
164
  * disagrees with the log (inconsistent ledger).
165
165
  */
@@ -1 +1 @@
1
- {"version":3,"file":"signet-request-response-reader.d.ts","sourceRoot":"","sources":["../src/signet-request-response-reader.ts"],"names":[],"mappings":"AAWA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,mCAAmC,CAAC;AAC5E,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,QAAQ,CAAC;AAG1C,OAAO,EAGL,KAAK,uBAAuB,EAC5B,KAAK,yBAAyB,EAC/B,MAAM,mCAAmC,CAAC;AAE3C,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,8BAA8B,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IACG,mBAAmB,CACvB,SAAS,EAAE,YAAY,GACtB,OAAO,CAAC,sBAAsB,CAAC;IAwBlC;;;;;;;;;OASG;IACG,qBAAqB,CACzB,SAAS,EAAE,YAAY,GACtB,OAAO,CAAC,uBAAuB,EAAE,CAAC;IAwBrC;;;;;;;;;;;;;OAaG;IACG,kCAAkC,CACtC,SAAS,EAAE,YAAY,EACvB,cAAc,EAAE,MAAM,GACrB,OAAO,CAAC,+BAA+B,CAAC;IAiC3C;;;;;;;;;;;OAWG;IACG,yBAAyB,CAC7B,SAAS,EAAE,YAAY,GACtB,OAAO,CAAC,WAAW,CAAC;IAMvB;;;;;;;;;;;;;;;OAeG;IACG,uBAAuB,CAC3B,SAAS,EAAE,YAAY,EACvB,cAAc,EAAE,MAAM,GACrB,OAAO,CAAC,WAAW,GAAG,SAAS,CAAC;IAcnC;;;;;;;;;;;;OAYG;IACG,6BAA6B,CACjC,SAAS,EAAE,YAAY,GACtB,OAAO,CAAC,yBAAyB,EAAE,CAAC;CAuBxC"}
1
+ {"version":3,"file":"signet-request-response-reader.d.ts","sourceRoot":"","sources":["../src/signet-request-response-reader.ts"],"names":[],"mappings":"AAWA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,mCAAmC,CAAC;AAC5E,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,QAAQ,CAAC;AAG1C,OAAO,EAGL,KAAK,uBAAuB,EAC5B,KAAK,yBAAyB,EAC/B,MAAM,mCAAmC,CAAC;AAE3C,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,8BAA8B,CAAC;AAKrE,OAAO,KAAK,EACV,sBAAsB,EACtB,YAAY,EACb,MAAM,sBAAsB,CAAC;AAE9B;;;;;GAKG;AACH,MAAM,WAAW,uBAAuB;IACtC;;;;;;OAMG;IACH,kBAAkB,CAChB,eAAe,EAAE,UAAU,CAAC,kBAAkB,CAAC,oBAAoB,CAAC,CAAC,CAAC,CAAC,CAAC,GACvE,OAAO,CAAC;QAAE,IAA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