@sig-net/midnight 0.24.0-rc.2 → 0.24.0-rc.4

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 (44) hide show
  1. package/README.md +26 -21
  2. package/dist/compact-descriptors.d.ts +23 -8
  3. package/dist/compact-descriptors.d.ts.map +1 -1
  4. package/dist/compact-descriptors.js +34 -31
  5. package/dist/compact-descriptors.js.map +1 -1
  6. package/dist/constants.d.ts +1 -1
  7. package/dist/constants.js +1 -1
  8. package/dist/ecdsa-attestation.d.ts +6 -6
  9. package/dist/ecdsa-attestation.d.ts.map +1 -1
  10. package/dist/ecdsa-attestation.js +7 -5
  11. package/dist/ecdsa-attestation.js.map +1 -1
  12. package/dist/index.d.ts +3 -3
  13. package/dist/index.d.ts.map +1 -1
  14. package/dist/index.js +3 -3
  15. package/dist/index.js.map +1 -1
  16. package/dist/managed/compiler/contract-info.json +1580 -122
  17. package/dist/managed/compiler/contract-manifest.json +8 -8
  18. package/dist/managed/contract/index.d.ts +352 -0
  19. package/dist/managed/contract/index.js +1042 -208
  20. package/dist/managed/contract/index.js.map +1 -1
  21. package/dist/mpc-output-cache.js +2 -2
  22. package/dist/mpc-output-cache.js.map +1 -1
  23. package/dist/signature-requests-state-reader.js +3 -3
  24. package/dist/signature-requests-state-reader.js.map +1 -1
  25. package/dist/signet-contract-events.d.ts +5 -5
  26. package/dist/signet-contract-events.d.ts.map +1 -1
  27. package/dist/signet-evtype2tx-record-decoding.d.ts.map +1 -1
  28. package/dist/signet-evtype2tx-record-decoding.js +5 -4
  29. package/dist/signet-evtype2tx-record-decoding.js.map +1 -1
  30. package/dist/signet-evtype2tx-requests.d.ts +17 -12
  31. package/dist/signet-evtype2tx-requests.d.ts.map +1 -1
  32. package/dist/signet-evtype2tx-requests.js +92 -16
  33. package/dist/signet-evtype2tx-requests.js.map +1 -1
  34. package/dist/signet-request-id.d.ts +5 -3
  35. package/dist/signet-request-id.d.ts.map +1 -1
  36. package/dist/signet-request-id.js +20 -12
  37. package/dist/signet-request-id.js.map +1 -1
  38. package/dist/signet-requests.d.ts +30 -34
  39. package/dist/signet-requests.d.ts.map +1 -1
  40. package/dist/signet-requests.js +15 -23
  41. package/dist/signet-requests.js.map +1 -1
  42. package/package.json +2 -2
  43. package/src/Signet.compact +204 -92
  44. package/src/circuits.compact +61 -9
@@ -62,76 +62,72 @@ export declare const MPCDestination: {
62
62
  };
63
63
  /**
64
64
  * The fields of a {@link SignBidirectionalEvent} that mint its
65
- * {@link RequestId} (Compact: `RequestIdPreimage<TxParams>`): the requesting
66
- * contract, the signing key, the transaction and its execution destination.
67
- * The serialisation schemas and the reserved MPC parameters stay out, so two
68
- * requests for one transaction share an id whatever schemas they declare.
69
- * Generic over the tx-params decomposition, {@link EvmType2TxParams} by
70
- * default.
71
- */
72
- export interface RequestIdPreimage<TxParams = EvmType2TxParams> {
73
- /** Address of the client contract that stores this event (`kernel.self()`). */
74
- sender: ContractAddress;
65
+ * {@link RequestId} (Compact: `RequestIdPreimageV1`), in Compact declaration
66
+ * order: the signing key, the requesting contract, a digest of the
67
+ * transaction and its execution destination. The transaction enters as the
68
+ * digest its decomposition's own function computes over the used entries
69
+ * only, so the id is the same whatever capacities the requester compiled its
70
+ * struct with and whatever bytes sit in unused slots. The serialisation
71
+ * schemas and the reserved MPC parameters stay out.
72
+ */
73
+ export interface RequestIdPreimage {
75
74
  /** MPC root-key version to derive from (>= 1). */
76
75
  keyVersion: bigint;
76
+ /** Address of the client contract that stores this event (`kernel.self()`). */
77
+ sender: ContractAddress;
77
78
  /** Key-derivation path: 32 opaque bytes of the client contract's choosing. */
78
79
  path: Uint8Array;
79
80
  /** An {@link MPCSignatureAlgorithm} value. */
80
81
  algo: number;
81
82
  /** A {@link TxParamType} value tagging the txParams decomposition. */
82
83
  txParamType: number;
83
- /** The transaction decomposition. */
84
- txParams: TxParams;
84
+ /** The 32-byte digest of the transaction decomposition over its used entries. */
85
+ txParamsDigest: Uint8Array;
85
86
  /** Execution destination: the target chain in CAIP-2 form (https://chainagnostic.org/CAIPs/caip-2), zero-padded, 32 bytes. */
86
87
  executionDest: Uint8Array;
87
88
  }
88
89
  /**
89
90
  * Canonical signet request record (Compact:
90
- * `SignBidirectionalEvent<TxParams, #LenOutputDeserialization,
91
+ * `SignBidirectionalEventV1<TxParams, #LenOutputDeserialization,
91
92
  * #LenRespondSerialization>`), stored per {@link RequestId} in a requesting
92
- * contract's `SignBidirectionalEventMap`, in Compact declaration order. The
93
- * {@link RequestIdPreimage} fields mint its id; the schema fields carry their
93
+ * contract's `SignBidirectionalEventMapV1`, in Compact declaration order. The
94
+ * {@link RequestIdPreimage} fields come first and mint its id, the
95
+ * protocol-only fields follow, and the schema fields carry their
94
96
  * contract-declared byte widths in their array lengths.
95
97
  */
96
98
  export interface SignBidirectionalEvent<TxParams = EvmType2TxParams> {
97
- /** Address of the client contract that stores this event (`kernel.self()`). */
98
- sender: ContractAddress;
99
99
  /** MPC root-key version to derive from (>= 1). */
100
100
  keyVersion: bigint;
101
+ /** Address of the client contract that stores this event (`kernel.self()`). */
102
+ sender: ContractAddress;
101
103
  /** Key-derivation path: 32 opaque bytes of the client contract's choosing. */
102
104
  path: Uint8Array;
103
105
  /** An {@link MPCSignatureAlgorithm} value. */
104
106
  algo: number;
105
- /** An {@link MPCDestination} value: the signature destination, reserved. */
106
- signatureDest: number;
107
- /** Extra MPC parameters: 64 opaque bytes, reserved, zero-filled. */
108
- params: Uint8Array;
109
107
  /** A {@link TxParamType} value tagging the txParams decomposition. */
110
108
  txParamType: number;
111
109
  /** The transaction decomposition. */
112
110
  txParams: TxParams;
113
111
  /** Execution destination: the target chain in CAIP-2 form (https://chainagnostic.org/CAIPs/caip-2), zero-padded, 32 bytes. */
114
112
  executionDest: Uint8Array;
113
+ /** An {@link MPCDestination} value: the signature destination, reserved. */
114
+ signatureDest: number;
115
+ /** Extra MPC parameters: 64 opaque bytes, reserved, zero-filled. */
116
+ params: Uint8Array;
115
117
  /** MPC output_deserialization_schema (destination chain -> MPC), contract-declared width. */
116
118
  outputDeserializationSchema: Uint8Array;
117
119
  /** MPC respond_serialization_schema (MPC -> Midnight), contract-declared width. */
118
120
  respondSerializationSchema: Uint8Array;
119
121
  }
120
122
  /**
121
- * Descriptor of {@link RequestIdPreimage} over ANY tx-params decomposition:
122
- * the TS analogue of Compact's generic `RequestIdPreimage`, what
123
- * `calculateRequestId` (signet-request-id.ts) hashes. Field order is the
124
- * Compact struct's, a subsequence of {@link signBidirectionalEventDescriptorWith}'s.
125
- *
126
- * @param txParams - Descriptor of the tx-params decomposition, already at
127
- * its capacity instantiation.
128
- * @returns The preimage descriptor.
123
+ * Descriptor of {@link RequestIdPreimage}: what {@link calculateRequestId}
124
+ * hashes, in Compact declaration order.
129
125
  */
130
- export declare function requestIdPreimageDescriptorWith<TxParams>(txParams: CompactType<TxParams>): CompactType<RequestIdPreimage<TxParams>>;
126
+ export declare const requestIdPreimageDescriptor: CompactType<RequestIdPreimage>;
131
127
  /**
132
128
  * Descriptor of {@link SignBidirectionalEvent} over ANY tx-params
133
129
  * decomposition: the TS analogue of Compact's generic
134
- * `SignBidirectionalEvent`. Each decomposition wraps this with its own
130
+ * `SignBidirectionalEventV1`. Each decomposition wraps this with its own
135
131
  * capacity-parameterised convenience (see `signBidirectionalEventDescriptor`
136
132
  * in signet-evtype2tx-requests.ts for the EVM Type-2 one).
137
133
  *
@@ -145,9 +141,9 @@ export declare function requestIdPreimageDescriptorWith<TxParams>(txParams: Comp
145
141
  */
146
142
  export declare function signBidirectionalEventDescriptorWith<TxParams>(txParams: CompactType<TxParams>, lenOutputDeserialization: number, lenRespondSerialization: number): CompactType<SignBidirectionalEvent<TxParams>>;
147
143
  /**
148
- * The generated ledger shape of `Map<RequestId, SignBidirectionalEvent>`:
149
- * what a contract's `ledger(state).signetRequestsIndex` provides. Structural,
150
- * so any contract exposing the index satisfies it.
144
+ * The generated ledger shape of a `SignBidirectionalEventMapV1`: what a
145
+ * contract's `ledger(state).signBidirectionalEventMap` provides. Structural,
146
+ * so any contract exposing such a map satisfies it.
151
147
  */
152
148
  export interface SignBidirectionalEventLedgerMap extends Iterable<[
153
149
  RequestId,
@@ -1 +1 @@
1
- {"version":3,"file":"signet-requests.d.ts","sourceRoot":"","sources":["../src/signet-requests.ts"],"names":[],"mappings":"AAWA,OAAO,EACL,KAAK,WAAW,EAGjB,MAAM,iCAAiC,CAAC;AAGzC,OAAO,EAKL,KAAK,eAAe,EAErB,MAAM,0BAA0B,CAAC;AAClC,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,gCAAgC,CAAC;AAGvE,YAAY,EAAE,eAAe,EAAE,KAAK,EAAE,MAAM,0BAA0B,CAAC;AAEvE;;;;;;;;;GASG;AACH,wBAAgB,sBAAsB,CAAC,GAAG,EAAE,MAAM,GAAG,eAAe,CAMnE;AAED;;;GAGG;AACH,MAAM,MAAM,SAAS,GAAG,UAAU,CAAC;AAEnC;;;;GAIG;AACH,eAAO,MAAM,aAAa,EAAE,WAAW,CAAC,SAAS,CAAY,CAAC;AAE9D;;;;;GAKG;AACH,eAAO,MAAM,WAAW;IACtB,sFAAsF;aACtF,QAAQ,EAAE,CAAC;IACX;;;;OAIG;aACH,QAAQ,EAAE,CAAC;CACH,CAAC;AAEX;;;GAGG;AACH,eAAO,MAAM,qBAAqB;IAChC,4BAA4B;aAC5B,KAAK,EAAE,CAAC;IACR,0EAA0E;aAC1E,QAAQ,EAAE,CAAC;CACH,CAAC;AAEX;;;GAGG;AACH,eAAO,MAAM,cAAc;IACzB,sCAAsC;aACtC,MAAM,EAAE,CAAC;IACT,0EAA0E;aAC1E,QAAQ,EAAE,CAAC;CACH,CAAC;AAEX;;;;;;;;GAQG;AACH,MAAM,WAAW,iBAAiB,CAAC,QAAQ,GAAG,gBAAgB;IAC5D,+EAA+E;IAC/E,MAAM,EAAE,eAAe,CAAC;IACxB,kDAAkD;IAClD,UAAU,EAAE,MAAM,CAAC;IACnB,8EAA8E;IAC9E,IA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AM,2BAA2B,GAAG,GAAG,CAAC,YAAY,EAAE,sBAAsB,CAAC,CAAC;AAEpF;;;;;GAKG;AACH,wBAAgB,YAAY,CAAC,SAAS,EAAE,SAAS,GAAG,YAAY,CAE/D;AAED;;;;;;;;GAQG;AACH,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,MAAM,GAAG,YAAY,CAM7D;AAED;;;;;;GAMG;AACH,wBAAgB,cAAc,CAAC,EAAE,EAAE,YAAY,GAAG,SAAS,CAE1D;AAED;;;GAGG;AACH,eAAO,MAAM,UAAU,KAAK,CAAC;AAE7B;;;;;;;;GAQG;AACH,wBAAgB,6BAA6B,CAC3C,WAAW,EAAE,QAAQ,CAAC,CAAC,SAAS,EAAE,sBAAsB,CAAC,CAAC,GACzD,2BAA2B,CAM7B"}
@@ -91,30 +91,22 @@ const TX_PARAM_TYPE = new CompactTypeEnum(1, 1);
91
91
  const MPC_SIGNATURE_ALGORITHM = new CompactTypeEnum(1, 1);
92
92
  const MPC_DESTINATION = new CompactTypeEnum(1, 1);
93
93
  /**
94
- * Descriptor of {@link RequestIdPreimage} over ANY tx-params decomposition:
95
- * the TS analogue of Compact's generic `RequestIdPreimage`, what
96
- * `calculateRequestId` (signet-request-id.ts) hashes. Field order is the
97
- * Compact struct's, a subsequence of {@link signBidirectionalEventDescriptorWith}'s.
98
- *
99
- * @param txParams - Descriptor of the tx-params decomposition, already at
100
- * its capacity instantiation.
101
- * @returns The preimage descriptor.
94
+ * Descriptor of {@link RequestIdPreimage}: what {@link calculateRequestId}
95
+ * hashes, in Compact declaration order.
102
96
  */
103
- export function requestIdPreimageDescriptorWith(txParams) {
104
- return compactStructDescriptor({
105
- sender: CONTRACT_ADDRESS,
106
- keyVersion: UINT_8,
107
- path: BYTES_32,
108
- algo: MPC_SIGNATURE_ALGORITHM,
109
- txParamType: TX_PARAM_TYPE,
110
- txParams,
111
- executionDest: BYTES_32,
112
- });
113
- }
97
+ export const requestIdPreimageDescriptor = compactStructDescriptor({
98
+ keyVersion: UINT_8,
99
+ sender: CONTRACT_ADDRESS,
100
+ path: BYTES_32,
101
+ algo: MPC_SIGNATURE_ALGORITHM,
102
+ txParamType: TX_PARAM_TYPE,
103
+ txParamsDigest: BYTES_32,
104
+ executionDest: BYTES_32,
105
+ });
114
106
  /**
115
107
  * Descriptor of {@link SignBidirectionalEvent} over ANY tx-params
116
108
  * decomposition: the TS analogue of Compact's generic
117
- * `SignBidirectionalEvent`. Each decomposition wraps this with its own
109
+ * `SignBidirectionalEventV1`. Each decomposition wraps this with its own
118
110
  * capacity-parameterised convenience (see `signBidirectionalEventDescriptor`
119
111
  * in signet-evtype2tx-requests.ts for the EVM Type-2 one).
120
112
  *
@@ -128,15 +120,15 @@ export function requestIdPreimageDescriptorWith(txParams) {
128
120
  */
129
121
  export function signBidirectionalEventDescriptorWith(txParams, lenOutputDeserialization, lenRespondSerialization) {
130
122
  return compactStructDescriptor({
131
- sender: CONTRACT_ADDRESS,
132
123
  keyVersion: UINT_8,
124
+ sender: CONTRACT_ADDRESS,
133
125
  path: BYTES_32,
134
126
  algo: MPC_SIGNATURE_ALGORITHM,
135
- signatureDest: MPC_DESTINATION,
136
- params: BYTES_64,
137
127
  txParamType: TX_PARAM_TYPE,
138
128
  txParams,
139
129
  executionDest: BYTES_32,
130
+ signatureDest: MPC_DESTINATION,
131
+ params: BYTES_64,
140
132
  outputDeserializationSchema: new CompactTypeBytes(lenOutputDeserialization),
141
133
  respondSerializationSchema: new CompactTypeBytes(lenRespondSerialization),
142
134
  });
@@ -1 +1 @@
1
- {"version":3,"file":"signet-requests.js","sourceRoot":"","sources":["../src/signet-requests.ts"],"names":[],"mappings":"AAAA,6EAA6E;AAC7E,4EAA4E;AAC5E,4EAA4E;AAC5E,2EAA2E;AAC3E,qCAAqC;AACrC,EAAE;AACF,0EAA0E;AAC1E,6EAA6E;AAC7E,8CAA8C;AAC9C,yDAAyD;AAEzD,OAAO,EAEL,gBAAgB,EAChB,eAAe,GAChB,MAAM,iCAAiC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MAAM,UAAU,cAAc,CAAC,EAAgB;IAC7C,OAAO,UAAU,CAAC,EAAE,CAAC,CAAC;AACxB,CAAC;AAED;;;GAGG;AACH,MAAM,CAAC,MAAM,UAAU,GAAG,EAAE,CAAC;AAE7B;;;;;;;;GAQG;AACH,MAAM,UAAU,6BAA6B,CAC3C,WAA0D;IAE1D,MAAM,KAAK,GAAgC,IAAI,GAAG,EAAE,CAAC;IACrD,KAAK,MAAM,CAAC,SAAS,EAAE,OAAO,CAAC,IAAI,WAAW,EAAE,CAAC;QAC/C,KAAK,CAAC,GAAG,CAAC,YAAY,CAAC,SAAS,CAAC,EAAE,OAAO,CAAC,CAAC;IAC9C,CAAC;IACD,OAAO,KAAK,CAAC;AACf,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sig-net/midnight",
3
- "version": "0.24.0-rc.2",
3
+ "version": "0.24.0-rc.4",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "https://github.com/sig-net/midnight-integration",
@@ -49,7 +49,7 @@
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.24.0-rc.2",
52
+ "@sig-net/midnight-serde": "^0.24.0-rc.4",
53
53
  "ethers": "^6.17.0"
54
54
  },
55
55
  "devDependencies": {