@sig-net/midnight 0.11.0 → 0.13.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.
- package/README.md +19 -13
- package/dist/abi-serde.d.ts +89 -0
- package/dist/abi-serde.d.ts.map +1 -0
- package/dist/abi-serde.js +400 -0
- package/dist/abi-serde.js.map +1 -0
- package/dist/constants.d.ts +31 -23
- package/dist/constants.d.ts.map +1 -1
- package/dist/constants.js +38 -32
- package/dist/constants.js.map +1 -1
- package/dist/ecdsa-attestation.d.ts +38 -18
- package/dist/ecdsa-attestation.d.ts.map +1 -1
- package/dist/ecdsa-attestation.js +52 -25
- package/dist/ecdsa-attestation.js.map +1 -1
- package/dist/epsilon-derivation.js +1 -1
- package/dist/epsilon-derivation.js.map +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -0
- package/dist/index.js.map +1 -1
- package/dist/managed/compiler/contract-info.json +180 -122
- package/dist/managed/compiler/contract-manifest.json +8 -8
- package/dist/managed/contract/index.d.ts +38 -28
- package/dist/managed/contract/index.js +302 -149
- package/dist/managed/contract/index.js.map +1 -1
- package/dist/signature-requests-state-reader.d.ts +13 -13
- package/dist/signature-requests-state-reader.js +22 -22
- package/dist/signature-requests-state-reader.js.map +1 -1
- package/dist/signature-response-verification.d.ts +1 -1
- package/dist/signature-response-verification.js +3 -3
- package/dist/signature-response-verification.js.map +1 -1
- package/dist/signet-contract-state-reader.d.ts +33 -36
- package/dist/signet-contract-state-reader.d.ts.map +1 -1
- package/dist/signet-contract-state-reader.js +26 -28
- package/dist/signet-contract-state-reader.js.map +1 -1
- package/dist/signet-evtype2tx-requests.d.ts +21 -21
- package/dist/signet-evtype2tx-requests.js +16 -16
- package/dist/signet-evtype2tx-requests.js.map +1 -1
- package/dist/signet-request-response-reader.d.ts +27 -25
- package/dist/signet-request-response-reader.d.ts.map +1 -1
- package/dist/signet-request-response-reader.js +32 -30
- package/dist/signet-request-response-reader.js.map +1 -1
- package/dist/signet-requests.d.ts +27 -27
- package/dist/signet-requests.d.ts.map +1 -1
- package/dist/signet-requests.js +28 -29
- package/dist/signet-requests.js.map +1 -1
- package/package.json +3 -2
- package/src/Signet.compact +80 -65
- package/src/circuits.compact +45 -2
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"signet-request-response-reader.js","sourceRoot":"","sources":["../src/signet-request-response-reader.ts"],"names":[],"mappings":"AAAA,4EAA4E;AAC5E,8EAA8E;AAC9E,0EAA0E;AAC1E,uBAAuB;AACvB,yEAAyE;AACzE,
|
|
1
|
+
{"version":3,"file":"signet-request-response-reader.js","sourceRoot":"","sources":["../src/signet-request-response-reader.ts"],"names":[],"mappings":"AAAA,4EAA4E;AAC5E,8EAA8E;AAC9E,0EAA0E;AAC1E,uBAAuB;AACvB,yEAAyE;AACzE,2EAA2E;AAC3E,uEAAuE;AACvE,mEAAmE;AACnE,2EAA2E;AAC3E,iCAAiC;AAKjC,OAAO,EAAE,qBAAqB,EAAE,MAAM,sCAAsC,CAAC;AAC7E,OAAO,EACL,iCAAiC,EACjC,iBAAiB,GAGlB,MAAM,mCAAmC,CAAC;AAC3C,OAAO,EAAE,8BAA8B,EAAE,MAAM,sCAAsC,CAAC;AAEtF,OAAO,EACL,4CAA4C,EAC5C,8CAA8C,GAC/C,MAAM,gCAAgC,CAAC;AAoExC;;;;;GAKG;AACH,MAAM,OAAO,2BAA2B;IACrB,MAAM,CAAoC;IAE3D,wEAAwE;IACvD,YAAY,GAAG,IAAI,GAAG,EAGpC,CAAC;IAEJ;;OAEG;IACH,YAAY,MAAyC;QACnD,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;IACvB,CAAC;IAED;;;;;;;OAOG;IACK,KAAK,CAAC,aAAa,CACzB,eAAuB,EACvB,IAAY;QAEZ,MAAM,KAAK,GACT,MAAM,IAAI,CAAC,MAAM,CAAC,kBAAkB,CAAC,kBAAkB,CAAC,eAAe,CAAC,CAAC;QAC3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,8BAA8B,CAAC,GAAG,CAAC,SAAS,CAAC,IAAI,EAAE,CAAC;QACvE,MAAM,SAAS,GAAgC,EAAE,CAAC;QAClD,KAAK,IAAI,KAAK,GAAG,EAAE,EAAE,KAAK,GAAG,UAAU,EAAE,KAAK,EAAE,EAAE,CAAC;YACjD,MAAM,QAAQ,GAAG,uBAAuB,CAAC,GAAG,CAC1C,iBAAiB,CAAC,SAAS,EAAE,KAAK,CAAC,CACpC,CAAC;YACF,IAAI,QAAQ,KAAK,SAAS,EAAE,CAAC;gBAC3B,MAAM,IAAI,KAAK,CACb,0CAA0C,KAAK,gBAAgB,SAAS,GAAG;oBACzE,+BAA+B,UAAU,gCAAgC,CAC5E,CAAC;YACJ,CAAC;YACD,SAAS,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;QAC3B,CAAC;QACD,OAAO,SAAS,CAAC;IACnB,CAAC;CACF"}
|
|
@@ -3,7 +3,7 @@ import type { EvmType2TxParams } from "./signet-evtype2tx-requests.ts";
|
|
|
3
3
|
/**
|
|
4
4
|
* 32-byte signet request id (Compact: `new type RequestId = Bytes<32>`).
|
|
5
5
|
* Chain-agnostic: downstream consumers treat it as an opaque key. Ids are
|
|
6
|
-
* minted by `calculateRequestId` in Signet.compact
|
|
6
|
+
* minted by `calculateRequestId` in Signet.compact: the persistent hash of
|
|
7
7
|
* the full {@link SignBidirectionalEvent} record (which includes the sender
|
|
8
8
|
* contract address, scoping ids per contract).
|
|
9
9
|
*/
|
|
@@ -19,14 +19,14 @@ export interface ContractAddress {
|
|
|
19
19
|
/**
|
|
20
20
|
* Which transaction-param decomposition a request carries (Compact:
|
|
21
21
|
* `enum TxParamType`), as the generated code represents enums: a `number`
|
|
22
|
-
* holding the 0-based variant index. Exported as a `const` object
|
|
23
|
-
*
|
|
22
|
+
* holding the 0-based variant index. Exported as a `const` object so the
|
|
23
|
+
* values stay structurally `number`.
|
|
24
24
|
*/
|
|
25
25
|
export declare const TxParamType: {
|
|
26
26
|
/** `EvmType2TxParams` (signet-evtype2tx-requests.ts): an EIP-1559 EVM transaction. */
|
|
27
27
|
readonly evmType2: 0;
|
|
28
28
|
/**
|
|
29
|
-
* Never emitted
|
|
29
|
+
* Never emitted: mirrors the Compact-side padding variant that keeps the
|
|
30
30
|
* enum at >= 2 variants (a 1-variant enum is a zero-byte value the proof
|
|
31
31
|
* server cannot parse inside persistentHash preimages).
|
|
32
32
|
*/
|
|
@@ -39,7 +39,7 @@ export declare const TxParamType: {
|
|
|
39
39
|
export declare const MPCSignatureAlgorithm: {
|
|
40
40
|
/** ECDSA over secp256k1. */
|
|
41
41
|
readonly ecdsa: 0;
|
|
42
|
-
/** Never emitted
|
|
42
|
+
/** Never emitted: the >= 2 variants padding (see {@link TxParamType}). */
|
|
43
43
|
readonly reserved: 1;
|
|
44
44
|
};
|
|
45
45
|
/**
|
|
@@ -49,7 +49,7 @@ export declare const MPCSignatureAlgorithm: {
|
|
|
49
49
|
export declare const MPCDestination: {
|
|
50
50
|
/** The only currently-valid value. */
|
|
51
51
|
readonly unused: 0;
|
|
52
|
-
/** Never emitted
|
|
52
|
+
/** Never emitted: the >= 2 variants padding (see {@link TxParamType}). */
|
|
53
53
|
readonly reserved: 1;
|
|
54
54
|
};
|
|
55
55
|
/**
|
|
@@ -66,9 +66,9 @@ export interface Maybe<T> {
|
|
|
66
66
|
* `SignBidirectionalEvent<TxParams, #LenOutputDeserialization,
|
|
67
67
|
* #LenRespondSerialization>`), stored per {@link RequestId} in a requesting
|
|
68
68
|
* contract's `SignBidirectionalEventMap` (at whichever ledger field the
|
|
69
|
-
* contract declares it
|
|
70
|
-
* the tx-params decomposition, exactly like the Compact struct
|
|
71
|
-
* instantiation is {@link EvmType2TxParams}
|
|
69
|
+
* contract declares it: its notifications name the position). Generic over
|
|
70
|
+
* the tx-params decomposition, exactly like the Compact struct. The default
|
|
71
|
+
* instantiation is {@link EvmType2TxParams}, the only decomposition so far:
|
|
72
72
|
* new tx kinds supply their own type argument alongside their Compact struct.
|
|
73
73
|
* The schema fields carry their contract-declared byte widths in their array
|
|
74
74
|
* lengths.
|
|
@@ -86,25 +86,25 @@ export interface SignBidirectionalEvent<TxParams = EvmType2TxParams> {
|
|
|
86
86
|
algo: number;
|
|
87
87
|
/** An {@link MPCDestination} value. */
|
|
88
88
|
dest: number;
|
|
89
|
-
/** Extra MPC parameters, reserved
|
|
89
|
+
/** Extra MPC parameters, reserved, 64 bytes. */
|
|
90
90
|
params: Uint8Array;
|
|
91
91
|
/** A {@link TxParamType} value tagging the txParams decomposition. */
|
|
92
92
|
txParamType: number;
|
|
93
93
|
/** The transaction decomposition. */
|
|
94
94
|
txParams: TxParams;
|
|
95
|
-
/** Target chain in CAIP-2 form (https://chainagnostic.org/CAIPs/caip-2), zero-padded
|
|
95
|
+
/** Target chain in CAIP-2 form (https://chainagnostic.org/CAIPs/caip-2), zero-padded, 32 bytes. */
|
|
96
96
|
caip2Id: Uint8Array;
|
|
97
|
-
/** MPC output_deserialization_schema (destination chain -> MPC)
|
|
97
|
+
/** MPC output_deserialization_schema (destination chain -> MPC), contract-declared width. */
|
|
98
98
|
outputDeserializationSchema: Uint8Array;
|
|
99
|
-
/** MPC respond_serialization_schema (MPC -> Midnight)
|
|
99
|
+
/** MPC respond_serialization_schema (MPC -> Midnight), contract-declared width. */
|
|
100
100
|
respondSerializationSchema: Uint8Array;
|
|
101
101
|
}
|
|
102
102
|
/**
|
|
103
103
|
* Build the runtime descriptor of a Compact struct from its per-field
|
|
104
|
-
* descriptors
|
|
104
|
+
* descriptors: the generic form of the struct descriptor classes the
|
|
105
105
|
* compiler generates (field-by-field concatenation of alignments and values).
|
|
106
106
|
*
|
|
107
|
-
* Field ORDER must match the Compact struct declaration order
|
|
107
|
+
* Field ORDER must match the Compact struct declaration order. Object
|
|
108
108
|
* literals preserve insertion order for string keys, so pass fields in
|
|
109
109
|
* declaration order.
|
|
110
110
|
*
|
|
@@ -115,7 +115,7 @@ export declare function compactStructDescriptor<T extends object>(fields: {
|
|
|
115
115
|
readonly [K in keyof T]-?: CompactType<T[K]>;
|
|
116
116
|
}): CompactType<T>;
|
|
117
117
|
/**
|
|
118
|
-
* Descriptor of Compact's standard-library `Maybe<T
|
|
118
|
+
* Descriptor of Compact's standard-library `Maybe<T>`: the compiler
|
|
119
119
|
* generates it as the struct `{ is_some: Boolean, value: T }`.
|
|
120
120
|
*
|
|
121
121
|
* @param inner - Descriptor of the wrapped type.
|
|
@@ -124,10 +124,10 @@ export declare function compactStructDescriptor<T extends object>(fields: {
|
|
|
124
124
|
export declare function compactMaybeDescriptor<T>(inner: CompactType<T>): CompactType<Maybe<T>>;
|
|
125
125
|
/**
|
|
126
126
|
* Descriptor of {@link SignBidirectionalEvent} over ANY tx-params
|
|
127
|
-
* decomposition
|
|
127
|
+
* decomposition: the TS analogue of Compact's generic
|
|
128
128
|
* `SignBidirectionalEvent<TxParams, #LenOutputDeserialization,
|
|
129
129
|
* #LenRespondSerialization>`. Each decomposition wraps this with its own
|
|
130
|
-
* capacity-
|
|
130
|
+
* capacity-parameterised convenience (see `signBidirectionalEventDescriptor`
|
|
131
131
|
* in signet-evtype2tx-requests.ts for the EVM Type-2 one).
|
|
132
132
|
*
|
|
133
133
|
* @param txParams - Descriptor of the tx-params decomposition, already at
|
|
@@ -156,17 +156,17 @@ export interface SignBidirectionalEventLedgerMap extends Iterable<[RequestId, Si
|
|
|
156
156
|
member(requestId: RequestId): boolean;
|
|
157
157
|
/**
|
|
158
158
|
* @param requestId - 32-byte request id to fetch.
|
|
159
|
-
* @returns The stored request record
|
|
159
|
+
* @returns The stored request record. Throws when absent: guard with
|
|
160
160
|
* {@link member} first.
|
|
161
161
|
*/
|
|
162
162
|
lookup(requestId: RequestId): SignBidirectionalEvent;
|
|
163
163
|
}
|
|
164
164
|
declare const requestIdHexBrand: unique symbol;
|
|
165
165
|
/**
|
|
166
|
-
* 64-char lowercase hex rendering of a {@link RequestId}
|
|
166
|
+
* 64-char lowercase hex rendering of a {@link RequestId}: THE
|
|
167
167
|
* representation of a request id everywhere in TypeScript. Raw
|
|
168
168
|
* {@link RequestId} bytes appear only at the Compact boundary (state
|
|
169
|
-
* readers, compiled-circuit calls)
|
|
169
|
+
* readers, compiled-circuit calls). The moment an id crosses that boundary it
|
|
170
170
|
* becomes this type. Branded (the TS analogue of Compact's `new type`) so an
|
|
171
171
|
* arbitrary string cannot pose as a request id: mint one with
|
|
172
172
|
* {@link requestIdHex} (from ledger bytes) or {@link parseRequestIdHex}
|
|
@@ -192,7 +192,7 @@ export declare function bytesToHex(bytes: Uint8Array): string;
|
|
|
192
192
|
*/
|
|
193
193
|
export declare function stripHexPrefix(hex: string): string;
|
|
194
194
|
/**
|
|
195
|
-
* Decode a hex string into bytes
|
|
195
|
+
* Decode a hex string into bytes: the inverse of {@link bytesToHex}.
|
|
196
196
|
*
|
|
197
197
|
* @param hex - Hex digits, with or without a `0x` prefix.
|
|
198
198
|
* @returns The decoded bytes.
|
|
@@ -200,7 +200,7 @@ export declare function stripHexPrefix(hex: string): string;
|
|
|
200
200
|
export declare function hexToBytes(hex: string): Uint8Array;
|
|
201
201
|
/**
|
|
202
202
|
* Render a request id in its canonical TS form (see
|
|
203
|
-
* {@link RequestIdHex})
|
|
203
|
+
* {@link RequestIdHex}), also usable as a JS `Map` key, which raw
|
|
204
204
|
* `Uint8Array` ids are not (they compare by reference).
|
|
205
205
|
*
|
|
206
206
|
* @param requestId - 32-byte request id.
|
|
@@ -208,13 +208,13 @@ export declare function hexToBytes(hex: string): Uint8Array;
|
|
|
208
208
|
*/
|
|
209
209
|
export declare function requestIdHex(requestId: RequestId): RequestIdHex;
|
|
210
210
|
/**
|
|
211
|
-
* Validate and
|
|
211
|
+
* Validate and normalise an untrusted string (CLI argument, config value)
|
|
212
212
|
* into a {@link RequestIdHex}: an optional `0x` prefix is stripped and
|
|
213
213
|
* the digits lowercased before validation.
|
|
214
214
|
*
|
|
215
215
|
* @param value - The candidate request id string.
|
|
216
|
-
* @returns The branded,
|
|
217
|
-
* @throws Error if the value is not 64 hex chars after
|
|
216
|
+
* @returns The branded, normalised request id hex.
|
|
217
|
+
* @throws Error if the value is not 64 hex chars after normalisation.
|
|
218
218
|
*/
|
|
219
219
|
export declare function parseRequestIdHex(value: string): RequestIdHex;
|
|
220
220
|
/**
|
|
@@ -236,7 +236,7 @@ export declare const PATH_BYTES = 32;
|
|
|
236
236
|
* Parse the on-ledger request map into a plain-JS index keyed by hex
|
|
237
237
|
* request id.
|
|
238
238
|
*
|
|
239
|
-
* @param ledgerIndex - Iterable of `[requestId, request]` entries
|
|
239
|
+
* @param ledgerIndex - Iterable of `[requestId, request]` entries, e.g. a
|
|
240
240
|
* contract's `ledger(state).signBidirectionalEventMap` (any
|
|
241
241
|
* {@link SignBidirectionalEventLedgerMap}).
|
|
242
242
|
* @returns A new `Map` from {@link requestIdHex} key to request record.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"signet-requests.d.ts","sourceRoot":"","sources":["../src/signet-requests.ts"],"names":[],"mappings":"AAqBA,OAAO,EAKL,KAAK,WAAW,EACjB,MAAM,iCAAiC,CAAC;AAEzC,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,gCAAgC,CAAC;AAEvE;;;;;;GAMG;AACH,MAAM,MAAM,SAAS,GAAG,UAAU,CAAC;AAEnC;;;;GAIG;AACH,MAAM,WAAW,eAAe;IAC9B,KAAK,EAAE,UAAU,CAAC;CACnB;AAED;;;;;GAKG;AACH,eAAO,MAAM,WAAW;IACtB,sFAAsF;;IAEtF;;;;OAIG;;CAEK,CAAC;AAEX;;;GAGG;AACH,eAAO,MAAM,qBAAqB;IAChC,4BAA4B;;IAE5B,
|
|
1
|
+
{"version":3,"file":"signet-requests.d.ts","sourceRoot":"","sources":["../src/signet-requests.ts"],"names":[],"mappings":"AAqBA,OAAO,EAKL,KAAK,WAAW,EACjB,MAAM,iCAAiC,CAAC;AAEzC,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,gCAAgC,CAAC;AAEvE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G,EAAE,MAAM,GAAG,MAAM,CAElD;AAED;;;;;GAKG;AACH,wBAAgB,UAAU,CAAC,GAAG,EAAE,MAAM,GAAG,UAAU,CAOlD;AAED;;;;;;;GAOG;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,CAM1D;AAED;;;;;GAKG;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"}
|
package/dist/signet-requests.js
CHANGED
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
// The lockstep is enforced by each consuming contract's simulator tests: the
|
|
13
13
|
// "test-caller-contract ledger shape" test in packages/test-caller-contract/tests/
|
|
14
14
|
// contract.test.ts assigns the generated `ledger().signBidirectionalEventMap`
|
|
15
|
-
// to the named SignBidirectionalEventLedgerMap type
|
|
15
|
+
// to the named SignBidirectionalEventLedgerMap type: the assignment itself is
|
|
16
16
|
// the assertion, so any structural drift between the generated managed types
|
|
17
17
|
// and these twins fails that package's `yarn build` / `yarn test`.
|
|
18
18
|
//
|
|
@@ -22,14 +22,14 @@ import { CompactTypeBoolean, CompactTypeBytes, CompactTypeEnum, CompactTypeUnsig
|
|
|
22
22
|
/**
|
|
23
23
|
* Which transaction-param decomposition a request carries (Compact:
|
|
24
24
|
* `enum TxParamType`), as the generated code represents enums: a `number`
|
|
25
|
-
* holding the 0-based variant index. Exported as a `const` object
|
|
26
|
-
*
|
|
25
|
+
* holding the 0-based variant index. Exported as a `const` object so the
|
|
26
|
+
* values stay structurally `number`.
|
|
27
27
|
*/
|
|
28
28
|
export const TxParamType = {
|
|
29
29
|
/** `EvmType2TxParams` (signet-evtype2tx-requests.ts): an EIP-1559 EVM transaction. */
|
|
30
30
|
evmType2: 0,
|
|
31
31
|
/**
|
|
32
|
-
* Never emitted
|
|
32
|
+
* Never emitted: mirrors the Compact-side padding variant that keeps the
|
|
33
33
|
* enum at >= 2 variants (a 1-variant enum is a zero-byte value the proof
|
|
34
34
|
* server cannot parse inside persistentHash preimages).
|
|
35
35
|
*/
|
|
@@ -42,7 +42,7 @@ export const TxParamType = {
|
|
|
42
42
|
export const MPCSignatureAlgorithm = {
|
|
43
43
|
/** ECDSA over secp256k1. */
|
|
44
44
|
ecdsa: 0,
|
|
45
|
-
/** Never emitted
|
|
45
|
+
/** Never emitted: the >= 2 variants padding (see {@link TxParamType}). */
|
|
46
46
|
reserved: 1,
|
|
47
47
|
};
|
|
48
48
|
/**
|
|
@@ -52,7 +52,7 @@ export const MPCSignatureAlgorithm = {
|
|
|
52
52
|
export const MPCDestination = {
|
|
53
53
|
/** The only currently-valid value. */
|
|
54
54
|
unused: 0,
|
|
55
|
-
/** Never emitted
|
|
55
|
+
/** Never emitted: the >= 2 variants padding (see {@link TxParamType}). */
|
|
56
56
|
reserved: 1,
|
|
57
57
|
};
|
|
58
58
|
// ---- Runtime descriptor toolkit (TS twin of the compiled struct codecs) ----
|
|
@@ -60,26 +60,25 @@ export const MPCDestination = {
|
|
|
60
60
|
// DEVIATION from the "pure circuits are compiled, never re-written in TS"
|
|
61
61
|
// rule (see circuits.compact): the request-id circuit is generic over the
|
|
62
62
|
// tx-params type and schema lengths, the Compact compiler cannot export
|
|
63
|
-
// type-
|
|
64
|
-
// have to be
|
|
63
|
+
// type-parameterised circuits from the top level, and a compiled copy would
|
|
64
|
+
// have to be monomorphised at ONE capacity instantiation: a client
|
|
65
65
|
// contract's choice that never belongs in this client-agnostic package. So
|
|
66
66
|
// the record descriptor (and the per-decomposition `calculateRequestId`
|
|
67
67
|
// built on it, see signet-evtype2tx-requests.ts) alone gets a TS twin here.
|
|
68
68
|
//
|
|
69
|
-
//
|
|
70
|
-
//
|
|
71
|
-
//
|
|
72
|
-
//
|
|
73
|
-
//
|
|
74
|
-
//
|
|
75
|
-
// field by field, in declaration order. Enforced by test-caller-contract's
|
|
69
|
+
// Ids still come from the very `persistentHash` runtime builtin that
|
|
70
|
+
// compiled circuits call, over runtime type descriptors mirroring the ones
|
|
71
|
+
// the compiler generates (compare `_calculateRequestId_0` in any consuming
|
|
72
|
+
// contract's managed/contract/index.js). What must stay in lockstep with
|
|
73
|
+
// Signet.compact is exactly what this file already keeps in lockstep: the
|
|
74
|
+
// struct shapes, field by field, in declaration order. Enforced by test-caller-contract's
|
|
76
75
|
// "submitSignatureRequest round-trip" test, which asserts the id computed
|
|
77
76
|
// here equals the ledger map key minted by the REAL compiled contract.
|
|
78
77
|
// Runtime descriptors of the Compact base types the generic record fields
|
|
79
|
-
// use. CompactTypeUnsignedInteger takes (maxValue, byte length)
|
|
78
|
+
// use. CompactTypeUnsignedInteger takes (maxValue, byte length), the same
|
|
80
79
|
// literals the compiler emits for Uint<8/64>. CompactTypeEnum takes
|
|
81
|
-
// (variantCount - 1, byte length)
|
|
82
|
-
// `CompactTypeEnum(0, 0)
|
|
80
|
+
// (variantCount - 1, byte length). NOTE: a 1-variant enum would compile to
|
|
81
|
+
// `CompactTypeEnum(0, 0)`, zero bytes, which the proof server cannot parse
|
|
83
82
|
// inside persistentHash preimages. Every enum therefore carries a padding
|
|
84
83
|
// `reserved` variant so it stays at (1, 1).
|
|
85
84
|
const BYTES_32 = new CompactTypeBytes(32);
|
|
@@ -100,10 +99,10 @@ const CONTRACT_ADDRESS = {
|
|
|
100
99
|
};
|
|
101
100
|
/**
|
|
102
101
|
* Build the runtime descriptor of a Compact struct from its per-field
|
|
103
|
-
* descriptors
|
|
102
|
+
* descriptors: the generic form of the struct descriptor classes the
|
|
104
103
|
* compiler generates (field-by-field concatenation of alignments and values).
|
|
105
104
|
*
|
|
106
|
-
* Field ORDER must match the Compact struct declaration order
|
|
105
|
+
* Field ORDER must match the Compact struct declaration order. Object
|
|
107
106
|
* literals preserve insertion order for string keys, so pass fields in
|
|
108
107
|
* declaration order.
|
|
109
108
|
*
|
|
@@ -125,7 +124,7 @@ export function compactStructDescriptor(fields) {
|
|
|
125
124
|
};
|
|
126
125
|
}
|
|
127
126
|
/**
|
|
128
|
-
* Descriptor of Compact's standard-library `Maybe<T
|
|
127
|
+
* Descriptor of Compact's standard-library `Maybe<T>`: the compiler
|
|
129
128
|
* generates it as the struct `{ is_some: Boolean, value: T }`.
|
|
130
129
|
*
|
|
131
130
|
* @param inner - Descriptor of the wrapped type.
|
|
@@ -139,10 +138,10 @@ export function compactMaybeDescriptor(inner) {
|
|
|
139
138
|
}
|
|
140
139
|
/**
|
|
141
140
|
* Descriptor of {@link SignBidirectionalEvent} over ANY tx-params
|
|
142
|
-
* decomposition
|
|
141
|
+
* decomposition: the TS analogue of Compact's generic
|
|
143
142
|
* `SignBidirectionalEvent<TxParams, #LenOutputDeserialization,
|
|
144
143
|
* #LenRespondSerialization>`. Each decomposition wraps this with its own
|
|
145
|
-
* capacity-
|
|
144
|
+
* capacity-parameterised convenience (see `signBidirectionalEventDescriptor`
|
|
146
145
|
* in signet-evtype2tx-requests.ts for the EVM Type-2 one).
|
|
147
146
|
*
|
|
148
147
|
* @param txParams - Descriptor of the tx-params decomposition, already at
|
|
@@ -188,7 +187,7 @@ export function stripHexPrefix(hex) {
|
|
|
188
187
|
return hex.startsWith("0x") || hex.startsWith("0X") ? hex.slice(2) : hex;
|
|
189
188
|
}
|
|
190
189
|
/**
|
|
191
|
-
* Decode a hex string into bytes
|
|
190
|
+
* Decode a hex string into bytes: the inverse of {@link bytesToHex}.
|
|
192
191
|
*
|
|
193
192
|
* @param hex - Hex digits, with or without a `0x` prefix.
|
|
194
193
|
* @returns The decoded bytes.
|
|
@@ -203,7 +202,7 @@ export function hexToBytes(hex) {
|
|
|
203
202
|
}
|
|
204
203
|
/**
|
|
205
204
|
* Render a request id in its canonical TS form (see
|
|
206
|
-
* {@link RequestIdHex})
|
|
205
|
+
* {@link RequestIdHex}), also usable as a JS `Map` key, which raw
|
|
207
206
|
* `Uint8Array` ids are not (they compare by reference).
|
|
208
207
|
*
|
|
209
208
|
* @param requestId - 32-byte request id.
|
|
@@ -213,13 +212,13 @@ export function requestIdHex(requestId) {
|
|
|
213
212
|
return bytesToHex(requestId);
|
|
214
213
|
}
|
|
215
214
|
/**
|
|
216
|
-
* Validate and
|
|
215
|
+
* Validate and normalise an untrusted string (CLI argument, config value)
|
|
217
216
|
* into a {@link RequestIdHex}: an optional `0x` prefix is stripped and
|
|
218
217
|
* the digits lowercased before validation.
|
|
219
218
|
*
|
|
220
219
|
* @param value - The candidate request id string.
|
|
221
|
-
* @returns The branded,
|
|
222
|
-
* @throws Error if the value is not 64 hex chars after
|
|
220
|
+
* @returns The branded, normalised request id hex.
|
|
221
|
+
* @throws Error if the value is not 64 hex chars after normalisation.
|
|
223
222
|
*/
|
|
224
223
|
export function parseRequestIdHex(value) {
|
|
225
224
|
const hex = value.replace(/^0x/i, "").toLowerCase();
|
|
@@ -253,7 +252,7 @@ export const PATH_BYTES = 32;
|
|
|
253
252
|
* Parse the on-ledger request map into a plain-JS index keyed by hex
|
|
254
253
|
* request id.
|
|
255
254
|
*
|
|
256
|
-
* @param ledgerIndex - Iterable of `[requestId, request]` entries
|
|
255
|
+
* @param ledgerIndex - Iterable of `[requestId, request]` entries, e.g. a
|
|
257
256
|
* contract's `ledger(state).signBidirectionalEventMap` (any
|
|
258
257
|
* {@link SignBidirectionalEventLedgerMap}).
|
|
259
258
|
* @returns A new `Map` from {@link requestIdHex} key to request record.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"signet-requests.js","sourceRoot":"","sources":["../src/signet-requests.ts"],"names":[],"mappings":"AAAA,6EAA6E;AAC7E,4EAA4E;AAC5E,4EAA4E;AAC5E,0EAA0E;AAC1E,sEAAsE;AACt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6
6
|
"url": "https://github.com/sig-net/midnight-integration",
|
|
7
7
|
"directory": "packages/signet-midnight"
|
|
8
8
|
},
|
|
9
9
|
"type": "module",
|
|
10
|
-
"description": "Midnight-side sig-net integration
|
|
10
|
+
"description": "Midnight-side sig-net integration: the seed of a future signet.js Midnight adapter.",
|
|
11
11
|
"//exports": "Local dev consumes raw TS source. `publishConfig.exports` below swaps this to the emitted ./dist at publish time, so npm consumers get JS + .d.ts while the monorepo keeps resolving to src.",
|
|
12
12
|
"exports": {
|
|
13
13
|
".": {
|
|
@@ -40,6 +40,7 @@
|
|
|
40
40
|
"@midnight-ntwrk/compact-runtime": "0.18.0-rc.1",
|
|
41
41
|
"@midnight-ntwrk/midnight-js-types": "5.0.0-beta.4",
|
|
42
42
|
"@noble/curves": "^2.2.0",
|
|
43
|
+
"@sig-net/midnight-serde": "^0.13.0",
|
|
43
44
|
"ethers": "^6.17.0"
|
|
44
45
|
},
|
|
45
46
|
"devDependencies": {
|