@sig-net/midnight 0.24.0-rc.1 → 0.24.0-rc.3
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 -24
- package/dist/compact-descriptors.d.ts +22 -7
- package/dist/compact-descriptors.d.ts.map +1 -1
- package/dist/compact-descriptors.js +39 -28
- package/dist/compact-descriptors.js.map +1 -1
- package/dist/constants.d.ts +3 -22
- package/dist/constants.d.ts.map +1 -1
- package/dist/constants.js +3 -25
- package/dist/constants.js.map +1 -1
- package/dist/ecdsa-attestation.d.ts +43 -15
- package/dist/ecdsa-attestation.d.ts.map +1 -1
- package/dist/ecdsa-attestation.js +47 -17
- package/dist/ecdsa-attestation.js.map +1 -1
- package/dist/index.d.ts +6 -6
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +5 -5
- package/dist/index.js.map +1 -1
- package/dist/managed/compiler/contract-info.json +1212 -13
- package/dist/managed/compiler/contract-manifest.json +8 -8
- package/dist/managed/contract/index.d.ts +282 -7
- package/dist/managed/contract/index.js +1072 -161
- package/dist/managed/contract/index.js.map +1 -1
- package/dist/mpc-output-cache.d.ts +5 -29
- package/dist/mpc-output-cache.d.ts.map +1 -1
- package/dist/mpc-output-cache.js +8 -42
- package/dist/mpc-output-cache.js.map +1 -1
- package/dist/signature-requests-state-reader.js +3 -3
- package/dist/signature-requests-state-reader.js.map +1 -1
- package/dist/signet-contract-events.d.ts +40 -10
- package/dist/signet-contract-events.d.ts.map +1 -1
- package/dist/signet-contract-events.js +79 -29
- package/dist/signet-contract-events.js.map +1 -1
- package/dist/signet-evtype2tx-record-decoding.d.ts.map +1 -1
- package/dist/signet-evtype2tx-record-decoding.js +6 -5
- package/dist/signet-evtype2tx-record-decoding.js.map +1 -1
- package/dist/signet-evtype2tx-requests.d.ts +17 -12
- package/dist/signet-evtype2tx-requests.d.ts.map +1 -1
- package/dist/signet-evtype2tx-requests.js +85 -16
- package/dist/signet-evtype2tx-requests.js.map +1 -1
- package/dist/signet-request-id.d.ts +5 -2
- package/dist/signet-request-id.d.ts.map +1 -1
- package/dist/signet-request-id.js +21 -9
- package/dist/signet-request-id.js.map +1 -1
- package/dist/signet-request-response-reader.d.ts +2 -4
- package/dist/signet-request-response-reader.d.ts.map +1 -1
- package/dist/signet-request-response-reader.js +7 -11
- package/dist/signet-request-response-reader.js.map +1 -1
- package/dist/signet-requests.d.ts +48 -17
- package/dist/signet-requests.d.ts.map +1 -1
- package/dist/signet-requests.js +18 -6
- package/dist/signet-requests.js.map +1 -1
- package/dist/testing.d.ts +1 -1
- package/dist/testing.d.ts.map +1 -1
- package/dist/testing.js +3 -8
- package/dist/testing.js.map +1 -1
- package/package.json +2 -2
- package/src/Signet.compact +258 -80
- package/src/circuits.compact +68 -13
|
@@ -89,17 +89,6 @@ export declare function evmAccessListEntryDescriptor(maxStorageKeys: number): Co
|
|
|
89
89
|
* @returns The tx-params descriptor.
|
|
90
90
|
*/
|
|
91
91
|
export declare function evmType2TxParamsDescriptor(maxCalldataWords: number, maxAccessListEntries: number, maxStorageKeysPerEntry: number): CompactType<EvmType2TxParams>;
|
|
92
|
-
/**
|
|
93
|
-
* Descriptor of {@link EvmType2TxParams} at the capacity instantiation a
|
|
94
|
-
* stored value itself exhibits: vector capacities are read off the value's
|
|
95
|
-
* array lengths, which carry the contract's compile-time throttles. For
|
|
96
|
-
* hashing or re-encoding a record already decoded at full capacity (see
|
|
97
|
-
* `calculateRequestId` in signet-request-id.ts).
|
|
98
|
-
*
|
|
99
|
-
* @param txParams - The transaction decomposition to size against.
|
|
100
|
-
* @returns The tx-params descriptor at the value's capacities.
|
|
101
|
-
*/
|
|
102
|
-
export declare function evmType2TxParamsDescriptorOf(txParams: EvmType2TxParams): CompactType<EvmType2TxParams>;
|
|
103
92
|
/**
|
|
104
93
|
* Descriptor of {@link SignBidirectionalEvent} at one EVM Type-2 capacity
|
|
105
94
|
* instantiation.
|
|
@@ -164,6 +153,22 @@ export declare function abiWordToUint128(word: Uint8Array): bigint;
|
|
|
164
153
|
* @throws {Error} If the word is not 32 bytes or is not a canonical Boolean.
|
|
165
154
|
*/
|
|
166
155
|
export declare function abiWordToBool(word: Uint8Array): boolean;
|
|
156
|
+
/**
|
|
157
|
+
* Digest of an {@link EvmType2TxParams} over the bytes that reach the signed
|
|
158
|
+
* transaction, the TS twin of the `calculateEvmType2TxParamsDigestV1` circuit
|
|
159
|
+
* (lockstep-tested against its fixed-width oracles): the scalar fields, then
|
|
160
|
+
* the calldata words, access-list entries and storage keys up to their
|
|
161
|
+
* declared counts, each count hashed beside its entries. Slots past a count
|
|
162
|
+
* are skipped and an absent calldata contributes only its absence, so one
|
|
163
|
+
* transaction has one digest whatever the capacities and whatever bytes sit
|
|
164
|
+
* in unused slots. This is what {@link calculateRequestId} hashes in place of
|
|
165
|
+
* the parameters.
|
|
166
|
+
*
|
|
167
|
+
* @param txParams - The transaction decomposition to digest, at any capacity.
|
|
168
|
+
* @returns The 32-byte digest.
|
|
169
|
+
* @throws {Error} When a count exceeds its capacity.
|
|
170
|
+
*/
|
|
171
|
+
export declare function calculateEvmType2TxParamsDigest(txParams: EvmType2TxParams): Uint8Array;
|
|
167
172
|
/**
|
|
168
173
|
* Assemble the raw calldata a request's words describe:
|
|
169
174
|
* `data = selector || words[0..noWords]`, VERBATIM (see {@link EvmCalldata}).
|
|
@@ -182,7 +187,7 @@ export declare function assembleCalldata(calldata: Maybe<EvmCalldata>): string;
|
|
|
182
187
|
* @param request - The on-ledger request record.
|
|
183
188
|
* @returns The unsigned ethers transaction (`unsignedHash` is the digest the
|
|
184
189
|
* MPC signs).
|
|
185
|
-
* @throws {Error} If a calldata
|
|
190
|
+
* @throws {Error} If a calldata count overruns its stored slots.
|
|
186
191
|
*/
|
|
187
192
|
export declare function signBidirectionalEventToUnsignedEvmTransaction(request: SignBidirectionalEvent): Transaction;
|
|
188
193
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"signet-evtype2tx-requests.d.ts","sourceRoot":"","sources":["../src/signet-evtype2tx-requests.ts"],"names":[],"mappings":"AAUA,OAAO,
|
|
1
|
+
{"version":3,"file":"signet-evtype2tx-requests.d.ts","sourceRoot":"","sources":["../src/signet-evtype2tx-requests.ts"],"names":[],"mappings":"AAUA,OAAO,EACL,KAAK,WAAW,EAIjB,MAAM,iCAAiC,CAAC;AACzC,OAAO,EAAc,WAAW,EAAE,MAAM,QAAQ,CAAC;AAGjD,OAAO,EASL,KAAK,KAAK,EAKX,MAAM,0BAA0B,CAAC;AAElC,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,6BAA6B,CAAC;AAC3E,OAAO,EACL,KAAK,sBAAsB,EAE5B,MAAM,sBAAsB,CAAC;AAE9B;;;;;GAKG;AACH,MAAM,WAAW,WAAW;IAC1B,yDAAyD;IACzD,QAAQ,EAAE,UAAU,CAAC;IACrB,6EAA6E;IAC7E,OAAO,EAAE,MAAM,CAAC;IAChB;;;OAGG;IACH,KAAK,EAAE,UAAU,EAAE,CAAC;CACrB;AAED;;;GAGG;AACH,MAAM,WAAW,kBAAkB;IACjC,iEAAiE;IACjE,OAAO,EAAE,UAAU,CAAC;IACpB,qDAAqD;IACrD,eAAe,EAAE,MAAM,CAAC;IACxB,sEAAsE;IACtE,WAAW,EAAE,UAAU,EAAE,CAAC;CAC3B;AAED;;;;;;;GAOG;AACH,MAAM,WAAW,gBAAgB;IAC/B,0EAA0E;IAC1E,OAAO,EAAE,MAAM,CAAC;IAChB,uDAAuD;IACvD,KAAK,EAAE,MAAM,CAAC;IACd,qCAAqC;IACrC,oBAAoB,EAAE,MAAM,CAAC;IAC7B,kCAAkC;IAClC,YAAY,EAAE,MAAM,CAAC;IACrB,gCAAgC;IAChC,QAAQ,EAAE,MAAM,CAAC;IACjB,uDAAuD;IACvD,EAAE,EAAE,UAAU,CAAC;IACf,mCAAmC;IACnC,KAAK,EAAE,MAAM,CAAC;IACd,0EAA0E;IAC1E,QAAQ,EAAE,KAAK,CAAC,WAAW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;;GAOG;AACH,wBAAgB,gBAAgB,CAAC,QAAQ,EAAE,KAAK,CAAC,WAAW,CAAC,GAAG,MAAM,CAUrE;AAoBD;;;;;;;;;;GAUG;AACH,wBAAgB,8CAA8C,CAC5D,OAAO,EAAE,sBAAsB,GAC9B,WAAW,CAcb;AAED;;;;;;;;;;;;;;;;GAgBG;AACH,wBAAgB,4CAA4C,CAC1D,OAAO,EAAE,sBAAsB,EAC/B,QAAQ,EAAE,uBAAuB,GAChC,WAAW,CAIb"}
|
|
@@ -7,10 +7,10 @@
|
|
|
7
7
|
// Words are stored ABI-ready: {@link assembleCalldata} concatenates
|
|
8
8
|
// `selector || words` VERBATIM, so the transaction the MPC signs carries the
|
|
9
9
|
// contract-stored bytes untouched.
|
|
10
|
-
import { CompactTypeVector } from "@midnight-ntwrk/compact-runtime";
|
|
10
|
+
import { CompactTypeVector, transientHash, upgradeFromTransient, } from "@midnight-ntwrk/compact-runtime";
|
|
11
11
|
import { getAddress, Transaction } from "ethers";
|
|
12
12
|
import { bigintToBytes32BE, bytesToHex } from "./byte-codecs.js";
|
|
13
|
-
import { BYTES_4, BYTES_20, BYTES_32, compactMaybeDescriptor, compactStructDescriptor, UINT_8, UINT_16, UINT_64, UINT_128, } from "./compact-descriptors.js";
|
|
13
|
+
import { BOOLEAN, BYTES_4, BYTES_20, BYTES_32, compactMaybeDescriptor, compactStructDescriptor, compactTupleDescriptor, FIELD, UINT_8, UINT_16, UINT_64, UINT_128, } from "./compact-descriptors.js";
|
|
14
14
|
import { signatureRespondedEventToSignature } from "./ecdsa-attestation.js";
|
|
15
15
|
import { signBidirectionalEventDescriptorWith, } from "./signet-requests.js";
|
|
16
16
|
// ---- Runtime descriptors (see the deviation note in signet-requests.ts) ----
|
|
@@ -69,19 +69,6 @@ export function evmType2TxParamsDescriptor(maxCalldataWords, maxAccessListEntrie
|
|
|
69
69
|
accessList: new CompactTypeVector(maxAccessListEntries, evmAccessListEntryDescriptor(maxStorageKeysPerEntry)),
|
|
70
70
|
});
|
|
71
71
|
}
|
|
72
|
-
/**
|
|
73
|
-
* Descriptor of {@link EvmType2TxParams} at the capacity instantiation a
|
|
74
|
-
* stored value itself exhibits: vector capacities are read off the value's
|
|
75
|
-
* array lengths, which carry the contract's compile-time throttles. For
|
|
76
|
-
* hashing or re-encoding a record already decoded at full capacity (see
|
|
77
|
-
* `calculateRequestId` in signet-request-id.ts).
|
|
78
|
-
*
|
|
79
|
-
* @param txParams - The transaction decomposition to size against.
|
|
80
|
-
* @returns The tx-params descriptor at the value's capacities.
|
|
81
|
-
*/
|
|
82
|
-
export function evmType2TxParamsDescriptorOf(txParams) {
|
|
83
|
-
return evmType2TxParamsDescriptor(txParams.calldata.value.words.length, txParams.accessList.length, txParams.accessList[0]?.storageKeys.length ?? 0);
|
|
84
|
-
}
|
|
85
72
|
/**
|
|
86
73
|
* Descriptor of {@link SignBidirectionalEvent} at one EVM Type-2 capacity
|
|
87
74
|
* instantiation.
|
|
@@ -183,6 +170,88 @@ export function abiWordToBool(word) {
|
|
|
183
170
|
}
|
|
184
171
|
return low === 1;
|
|
185
172
|
}
|
|
173
|
+
/** The digest's head tuple: the scalar fields, the calldata presence, selector and count, the entry count. */
|
|
174
|
+
const EVM_TYPE2_DIGEST_HEAD = compactTupleDescriptor([
|
|
175
|
+
UINT_64,
|
|
176
|
+
UINT_64,
|
|
177
|
+
UINT_128,
|
|
178
|
+
UINT_128,
|
|
179
|
+
UINT_64,
|
|
180
|
+
BYTES_20,
|
|
181
|
+
UINT_128,
|
|
182
|
+
BOOLEAN,
|
|
183
|
+
BYTES_4,
|
|
184
|
+
UINT_16,
|
|
185
|
+
UINT_8,
|
|
186
|
+
]);
|
|
187
|
+
/** One fold step over a calldata word or storage key. */
|
|
188
|
+
const FIELD_BYTES_32 = compactTupleDescriptor([FIELD, BYTES_32]);
|
|
189
|
+
/** One fold step over a used access-list entry with its keys' digest. */
|
|
190
|
+
const EVM_TYPE2_DIGEST_ENTRY = compactTupleDescriptor([
|
|
191
|
+
FIELD,
|
|
192
|
+
BYTES_20,
|
|
193
|
+
UINT_8,
|
|
194
|
+
FIELD,
|
|
195
|
+
]);
|
|
196
|
+
/**
|
|
197
|
+
* Digest of an {@link EvmType2TxParams} over the bytes that reach the signed
|
|
198
|
+
* transaction, the TS twin of the `calculateEvmType2TxParamsDigestV1` circuit
|
|
199
|
+
* (lockstep-tested against its fixed-width oracles): the scalar fields, then
|
|
200
|
+
* the calldata words, access-list entries and storage keys up to their
|
|
201
|
+
* declared counts, each count hashed beside its entries. Slots past a count
|
|
202
|
+
* are skipped and an absent calldata contributes only its absence, so one
|
|
203
|
+
* transaction has one digest whatever the capacities and whatever bytes sit
|
|
204
|
+
* in unused slots. This is what {@link calculateRequestId} hashes in place of
|
|
205
|
+
* the parameters.
|
|
206
|
+
*
|
|
207
|
+
* @param txParams - The transaction decomposition to digest, at any capacity.
|
|
208
|
+
* @returns The 32-byte digest.
|
|
209
|
+
* @throws {Error} When a count exceeds its capacity.
|
|
210
|
+
*/
|
|
211
|
+
export function calculateEvmType2TxParamsDigest(txParams) {
|
|
212
|
+
const { calldata, accessListEntryCount, accessList } = txParams;
|
|
213
|
+
const noWords = calldata.is_some ? calldata.value.noWords : 0n;
|
|
214
|
+
const selector = calldata.is_some ? calldata.value.selector : new Uint8Array(4);
|
|
215
|
+
if (noWords > BigInt(calldata.value.words.length)) {
|
|
216
|
+
throw new Error("calldata noWords exceeds capacity");
|
|
217
|
+
}
|
|
218
|
+
if (accessListEntryCount > BigInt(accessList.length)) {
|
|
219
|
+
throw new Error("accessListEntryCount exceeds capacity");
|
|
220
|
+
}
|
|
221
|
+
const head = transientHash(EVM_TYPE2_DIGEST_HEAD, [
|
|
222
|
+
txParams.chainId,
|
|
223
|
+
txParams.nonce,
|
|
224
|
+
txParams.maxPriorityFeePerGas,
|
|
225
|
+
txParams.maxFeePerGas,
|
|
226
|
+
txParams.gasLimit,
|
|
227
|
+
txParams.to,
|
|
228
|
+
txParams.value,
|
|
229
|
+
calldata.is_some,
|
|
230
|
+
selector,
|
|
231
|
+
noWords,
|
|
232
|
+
accessListEntryCount,
|
|
233
|
+
]);
|
|
234
|
+
let acc = head;
|
|
235
|
+
for (const word of calldata.value.words.slice(0, Number(noWords))) {
|
|
236
|
+
acc = transientHash(FIELD_BYTES_32, [acc, word]);
|
|
237
|
+
}
|
|
238
|
+
for (const entry of accessList.slice(0, Number(accessListEntryCount))) {
|
|
239
|
+
if (entry.storageKeyCount > BigInt(entry.storageKeys.length)) {
|
|
240
|
+
throw new Error("a used entry's storageKeyCount exceeds capacity");
|
|
241
|
+
}
|
|
242
|
+
let keysAcc = 0n;
|
|
243
|
+
for (const key of entry.storageKeys.slice(0, Number(entry.storageKeyCount))) {
|
|
244
|
+
keysAcc = transientHash(FIELD_BYTES_32, [keysAcc, key]);
|
|
245
|
+
}
|
|
246
|
+
acc = transientHash(EVM_TYPE2_DIGEST_ENTRY, [
|
|
247
|
+
acc,
|
|
248
|
+
entry.address,
|
|
249
|
+
entry.storageKeyCount,
|
|
250
|
+
keysAcc,
|
|
251
|
+
]);
|
|
252
|
+
}
|
|
253
|
+
return upgradeFromTransient(acc);
|
|
254
|
+
}
|
|
186
255
|
/**
|
|
187
256
|
* Assemble the raw calldata a request's words describe:
|
|
188
257
|
* `data = selector || words[0..noWords]`, VERBATIM (see {@link EvmCalldata}).
|
|
@@ -226,7 +295,7 @@ function decodeAccessList(txParams) {
|
|
|
226
295
|
* @param request - The on-ledger request record.
|
|
227
296
|
* @returns The unsigned ethers transaction (`unsignedHash` is the digest the
|
|
228
297
|
* MPC signs).
|
|
229
|
-
* @throws {Error} If a calldata
|
|
298
|
+
* @throws {Error} If a calldata count overruns its stored slots.
|
|
230
299
|
*/
|
|
231
300
|
export function signBidirectionalEventToUnsignedEvmTransaction(request) {
|
|
232
301
|
const { txParams } = request;
|
|
@@ -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,sEAAsE;AACtE,wBAAwB;AACxB,EAAE;AACF,oEAAoE;AACpE,6EAA6E;AAC7E,mCAAmC;AAEnC,OAAO,
|
|
1
|
+
{"version":3,"file":"signet-evtype2tx-requests.js","sourceRoot":"","sources":["../src/signet-evtype2tx-requests.ts"],"names":[],"mappings":"AAAA,0EAA0E;AAC1E,sEAAsE;AACtE,6EAA6E;AAC7E,sEAAsE;AACtE,wBAAwB;AACxB,EAAE;AACF,oEAAoE;AACpE,6EAA6E;AAC7E,mCAAmC;AAEnC,OAAO,EAEL,iBAAiB,EACjB,aAAa,EACb,oBAAoB,GACrB,MAAM,iCAAiC,CAAC;AACzC,OAAO,EAAE,UAAU,EAAE,WAAW,EAAE,MAAM,QAAQ,CAAC;AAEjD,OAAO,EAAE,iBAAiB,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AACjE,OAAO,EACL,OAAO,EACP,OAAO,EACP,QAAQ,EACR,QAAQ,EACR,sBAAsB,EACtB,uBAAuB,EACvB,sBAAsB,EACtB,KAAK,EAEL,MAAM,EACN,OAAO,EACP,OAAO,EACP,QAAQ,GACT,MAAM,0BAA0B,CAAC;AAClC,OAAO,EAAE,kCAAkC,EAAE,MAAM,wBAAwB,CAAC;AAE5E,OAAO,EAEL,oCAAoC,GACrC,MAAM,sBAAsB,CAAC;AAgE9B,+EAA+E;AAC/E,6EAA6E;AAC7E,kFAAkF;AAElF;;;;;;GAMG;AACH,MAAM,UAAU,qBAAqB,CAAC,QAAgB;IACpD,OAAO,uBAAuB,CAAc;QAC1C,QAAQ,EAAE,OAAO;QACjB,OAAO,EAAE,OAAO;QAChB,KAAK,EAAE,IAAI,iBAAiB,CAAC,QAAQ,EAAE,QAAQ,CAAC;KACjD,CAAC,CAAC;AACL,CAAC;AAED;;;;;;GAMG;AACH,MAAM,UAAU,4BAA4B,CAC1C,cAAsB;IAEtB,OAAO,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id of a signet request: the transientHash (Poseidon) of the
|
|
4
|
-
*
|
|
4
|
+
* record's {@link RequestIdPreimage} over its field-aligned representation,
|
|
5
|
+
* with the transaction entering as its decomposition's digest
|
|
6
|
+
* ({@link calculateEvmType2TxParamsDigest} for evmType2), so the id ignores
|
|
7
|
+
* the record's capacities and unused slots.
|
|
5
8
|
*
|
|
6
9
|
* @param request - The full event record (contract-shaped, all slots).
|
|
7
10
|
* @returns The 32-byte request id, the record's ledger map key.
|
|
8
11
|
* @throws {Error} If the record's `txParamType` names a decomposition this
|
|
9
|
-
* computation has no
|
|
12
|
+
* computation has no digest for, or a count overruns its capacity.
|
|
10
13
|
*/
|
|
11
14
|
export declare function calculateRequestId(request: SignBidirectionalEvent): RequestId;
|
|
12
15
|
//# sourceMappingURL=signet-request-id.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"signet-request-id.d.ts","sourceRoot":"","sources":["../src/signet-request-id.ts"],"names":[],"mappings":"AASA,OAAO,EACL,KAAK,SAAS,
|
|
1
|
+
{"version":3,"file":"signet-request-id.d.ts","sourceRoot":"","sources":["../src/signet-request-id.ts"],"names":[],"mappings":"AASA,OAAO,EACL,KAAK,SAAS,EAGd,KAAK,sBAAsB,EAE5B,MAAM,sBAAsB,CAAC;AAE9B;;;;;;;;;;;GAWG;AACH,wBAAgB,kBAAkB,CAAC,OAAO,EAAE,sBAAsB,GAAG,SAAS,CAiB7E"}
|
|
@@ -1,25 +1,37 @@
|
|
|
1
1
|
// The signet request id computation: the TS twin of Signet.compact's
|
|
2
|
-
// `
|
|
3
|
-
// signet-requests.ts). Chain-agnostic entry point that
|
|
4
|
-
//
|
|
5
|
-
//
|
|
2
|
+
// `calculateEvmType2RequestIdV1` circuit (see the deviation note in
|
|
3
|
+
// signet-requests.ts). Chain-agnostic entry point that digests each record's
|
|
4
|
+
// transaction by its `txParamType` tag, so every decomposition mints ids
|
|
5
|
+
// through this one function.
|
|
6
6
|
import { transientHash, upgradeFromTransient } from "@midnight-ntwrk/compact-runtime";
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
7
|
+
import { calculateEvmType2TxParamsDigest } from "./signet-evtype2tx-requests.js";
|
|
8
|
+
import { requestIdPreimageDescriptor, TxParamType, } from "./signet-requests.js";
|
|
9
9
|
/**
|
|
10
10
|
* Canonical id of a signet request: the transientHash (Poseidon) of the
|
|
11
|
-
*
|
|
11
|
+
* record's {@link RequestIdPreimage} over its field-aligned representation,
|
|
12
|
+
* with the transaction entering as its decomposition's digest
|
|
13
|
+
* ({@link calculateEvmType2TxParamsDigest} for evmType2), so the id ignores
|
|
14
|
+
* the record's capacities and unused slots.
|
|
12
15
|
*
|
|
13
16
|
* @param request - The full event record (contract-shaped, all slots).
|
|
14
17
|
* @returns The 32-byte request id, the record's ledger map key.
|
|
15
18
|
* @throws {Error} If the record's `txParamType` names a decomposition this
|
|
16
|
-
* computation has no
|
|
19
|
+
* computation has no digest for, or a count overruns its capacity.
|
|
17
20
|
*/
|
|
18
21
|
export function calculateRequestId(request) {
|
|
19
22
|
if (request.txParamType !== TxParamType.evmType2) {
|
|
20
23
|
throw new Error(`unsupported txParamType ${String(request.txParamType)}: this id computation ` +
|
|
21
24
|
`understands evmType2 (${String(TxParamType.evmType2)})`);
|
|
22
25
|
}
|
|
23
|
-
|
|
26
|
+
const preimage = {
|
|
27
|
+
keyVersion: request.keyVersion,
|
|
28
|
+
sender: request.sender,
|
|
29
|
+
path: request.path,
|
|
30
|
+
algo: request.algo,
|
|
31
|
+
txParamType: request.txParamType,
|
|
32
|
+
txParamsDigest: calculateEvmType2TxParamsDigest(request.txParams),
|
|
33
|
+
executionDest: request.executionDest,
|
|
34
|
+
};
|
|
35
|
+
return upgradeFromTransient(transientHash(requestIdPreimageDescriptor, preimage));
|
|
24
36
|
}
|
|
25
37
|
//# sourceMappingURL=signet-request-id.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"signet-request-id.js","sourceRoot":"","sources":["../src/signet-request-id.ts"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,
|
|
1
|
+
{"version":3,"file":"signet-request-id.js","sourceRoot":"","sources":["../src/signet-request-id.ts"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,oEAAoE;AACpE,6EAA6E;AAC7E,yEAAyE;AACzE,6BAA6B;AAE7B,OAAO,EAAE,aAAa,EAAE,oBAAoB,EAAE,MAAM,iCAAiC,CAAC;AAEtF,OAAO,EAAE,+BAA+B,EAAE,MAAM,gCAAgC,CAAC;AACjF,OAAO,EAGL,2BAA2B,EAE3B,WAAW,GACZ,MAAM,sBAAsB,CAAC;AAE9B;;;;;;;;;;;GAWG;AACH,MAAM,UAAU,kBAAkB,CAAC,OAA+B;IAChE,IAAI,OAAO,CAAC,WAAW,KAAK,WAAW,CAAC,QAAQ,EAAE,CAAC;QACjD,MAAM,IAAI,KAAK,CACb,2BAA2B,MAAM,CAAC,OAAO,CAAC,WAAW,CAAC,wBAAwB;YAC5E,yBAAyB,MAAM,CAAC,WAAW,CAAC,QAAQ,CAAC,GAAG,CAC3D,CAAC;IACJ,CAAC;IACD,MAAM,QAAQ,GAAsB;QAClC,UAAU,EAAE,OAAO,CAAC,UAAU;QAC9B,MAAM,EAAE,OAAO,CAAC,MAAM;QACtB,IAAI,EAAE,OAAO,CAAC,IAAI;QAClB,IAAI,EAAE,OAAO,CAAC,IAAI;QAClB,WAAW,EAAE,OAAO,CAAC,WAAW;QAChC,cAAc,EAAE,+BAA+B,CAAC,OAAO,CAAC,QAAQ,CAAC;QACjE,aAAa,EAAE,OAAO,CAAC,aAAa;KACrC,CAAC;IACF,OAAO,oBAAoB,CAAC,aAAa,CAAC,2BAA2B,EAAE,QAAQ,CAAC,CAAC,CAAC;AACpF,CAAC"}
|
|
@@ -71,7 +71,6 @@ export interface VerifiedSignatureResponseResult {
|
|
|
71
71
|
*
|
|
72
72
|
* @param requestId - The request id the posts must declare and the
|
|
73
73
|
* attestation must commit to.
|
|
74
|
-
* @param blockHeight - The destination block height the attestation names.
|
|
75
74
|
* @param serializedOutput - The serialised execution output the attestation
|
|
76
75
|
* must commit to, exact unpadded bytes.
|
|
77
76
|
* @param mpcResponseKey - The MPC response key the requesting contract
|
|
@@ -80,7 +79,7 @@ export interface VerifiedSignatureResponseResult {
|
|
|
80
79
|
* emission order. Only attestations declaring `requestId` are judged.
|
|
81
80
|
* @returns The first verifying post, or `undefined` when none attests this output.
|
|
82
81
|
*/
|
|
83
|
-
export declare function findVerifiedRespondBidirectionalEvent(requestId: RequestIdHex,
|
|
82
|
+
export declare function findVerifiedRespondBidirectionalEvent(requestId: RequestIdHex, serializedOutput: Uint8Array, mpcResponseKey: Secp256k1Point, events: readonly DecodedSignetEvent[]): RespondBidirectionalEvent | undefined;
|
|
84
83
|
/**
|
|
85
84
|
* Reader over one requester contract / signet contract pair. Construct once
|
|
86
85
|
* per pair and reuse: fetched request records are cached, so repeated
|
|
@@ -214,7 +213,6 @@ export declare class SignetRequestResponseReader {
|
|
|
214
213
|
*
|
|
215
214
|
* @param requestId - The request id the posts must declare and the
|
|
216
215
|
* attestation must commit to.
|
|
217
|
-
* @param blockHeight - The destination block height the attestation names.
|
|
218
216
|
* @param serializedOutput - The serialised execution output the attestation
|
|
219
217
|
* must commit to, exact unpadded bytes.
|
|
220
218
|
* @param mpcResponseKey - The MPC response key the requesting contract
|
|
@@ -222,6 +220,6 @@ export declare class SignetRequestResponseReader {
|
|
|
222
220
|
* @returns The first verifying post, or `undefined` when none has been
|
|
223
221
|
* posted yet (poll again) or none attests this output.
|
|
224
222
|
*/
|
|
225
|
-
getVerifiedRespondBidirectionalEvent(requestId: RequestIdHex,
|
|
223
|
+
getVerifiedRespondBidirectionalEvent(requestId: RequestIdHex, serializedOutput: Uint8Array, mpcResponseKey: Secp256k1Point): Promise<RespondBidirectionalEvent | undefined>;
|
|
226
224
|
}
|
|
227
225
|
//# sourceMappingURL=signet-request-response-reader.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"signet-request-response-reader.d.ts","sourceRoot":"","sources":["../src/signet-request-response-reader.ts"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,mCAAmC,CAAC;AAC5E,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,QAAQ,CAAC;AAE1C,OAAO,EAAE,KAAK,cAAc,EAAuC,MAAM,wBAAwB,CAAC;AAClG,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAC;AAGhE,OAAO,EACL,KAAK,kBAAkB,EAEvB,KAAK,yBAAyB,EAC9B,KAAK,uBAAuB,EAI5B,KAAK,iBAAiB,EACvB,MAAM,6BAA6B,CAAC;AAKrC,OAAO,
|
|
1
|
+
{"version":3,"file":"signet-request-response-reader.d.ts","sourceRoot":"","sources":["../src/signet-request-response-reader.ts"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,mCAAmC,CAAC;AAC5E,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,QAAQ,CAAC;AAE1C,OAAO,EAAE,KAAK,cAAc,EAAuC,MAAM,wBAAwB,CAAC;AAClG,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAC;AAGhE,OAAO,EACL,KAAK,kBAAkB,EAEvB,KAAK,yBAAyB,EAC9B,KAAK,uBAAuB,EAI5B,KAAK,iBAAiB,EACvB,MAAM,6BAA6B,CAAC;AAKrC,OAAO,EAAE,KAAK,YAAY,EAAE,KAAK,sBAAsB,EAAe,MAAM,sBAAsB,CAAC;AAEnG;;;;;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,IAAI,EAAE,gBAAgB,CAAA;KAAE,GAAG,IAAI,CAAC,CAAC;CAC/C;AAED,yEAAyE;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;;;;;OAOG;YACW,eAAe;IAa7B;;;;;;;OAOG;IACG,2BAA2B,CAAC,SAAS,EAAE,YAAY,GAAG,OAAO,CAAC,uBAAuB,EAAE,CAAC,CAE7F;IAED;;;;;;;;;;;;;OAaG;IACG,kCAAkC,CACtC,SAAS,EAAE,YAAY,EACvB,cAAc,EAAE,MAAM,GACrB,OAAO,CAAC,+BAA+B,CAAC,CAM1C;IAED;;;;;;;;;;;;;;OAcG;IACG,8BAA8B,CAClC,SAAS,EAAE,YAAY,EACvB,cAAc,EAAE,MAAM,EACtB,MAAM,EAAE,SAAS,kBAAkB,EAAE,GACpC,OAAO,CAAC,+BAA+B,CAAC,CAM1C;IAED;;;;;;;;;;;OAWG;YACW,wBAAwB;IAkCtC;;;;;;;;;;OAUG;IACG,yBAAyB,CAAC,SAAS,EAAE,YAAY,GAAG,OAAO,CAAC,WAAW,CAAC,CAI7E;IAED;;;;;;;;;;;;;;OAcG;IACG,uBAAuB,CAC3B,SAAS,EAAE,YAAY,EACvB,cAAc,EAAE,MAAM,GACrB,OAAO,CAAC,WAAW,GAAG,SAAS,CAAC,CAQlC;IAED;;;;;;;;OAQG;IACG,6BAA6B,CACjC,SAAS,EAAE,YAAY,GACtB,OAAO,CAAC,yBAAyB,EAAE,CAAC,CAEtC;IAED;;;;;;;;;;;;;;;;OAgBG;IACG,oCAAoC,CACxC,SAAS,EAAE,YAAY,EACvB,gBAAgB,EAAE,UAAU,EAC5B,cAAc,EAAE,cAAc,GAC7B,OAAO,CAAC,yBAAyB,GAAG,SAAS,CAAC,CAMhD;CACF"}
|
|
@@ -9,7 +9,7 @@ import { lookupSignetRequestAt } from "./signature-requests-state-reader.js";
|
|
|
9
9
|
import { recoverSignatureResponseSigner } from "./signature-response-verification.js";
|
|
10
10
|
import { decodeSignetEventNamed, SignetEventName, signetEventRecordsOf, } from "./signet-contract-events.js";
|
|
11
11
|
import { signBidirectionalEventToSignedEvmTransaction, signBidirectionalEventToUnsignedEvmTransaction, } from "./signet-evtype2tx-requests.js";
|
|
12
|
-
import {
|
|
12
|
+
import { TxParamType } from "./signet-requests.js";
|
|
13
13
|
/**
|
|
14
14
|
* Assert a fetched request carries the evmType2 decomposition, the only one
|
|
15
15
|
* the EVM-transaction methods may read `txParams` from.
|
|
@@ -26,15 +26,13 @@ function assertEvmType2Request(request) {
|
|
|
26
26
|
* The first (oldest) of a request's respond-bidirectional posts whose
|
|
27
27
|
* signature verifies over `serializedOutput` against `mpcResponseKey`.
|
|
28
28
|
*
|
|
29
|
-
* @param requestId - The request id the attestation must commit to.
|
|
30
|
-
* @param blockHeight - The destination block height the attestation names.
|
|
31
29
|
* @param serializedOutput - The serialised execution output, exact unpadded bytes.
|
|
32
30
|
* @param mpcResponseKey - The MPC response key the requesting contract pinned.
|
|
33
31
|
* @param posts - The request's posts, in emission order.
|
|
34
32
|
* @returns The first verifying post, or `undefined` when none verifies.
|
|
35
33
|
*/
|
|
36
|
-
function firstVerifiedRespondBidirectionalEvent(
|
|
37
|
-
return posts.find((post) => verifyRespondBidirectionalSignature(
|
|
34
|
+
function firstVerifiedRespondBidirectionalEvent(serializedOutput, mpcResponseKey, posts) {
|
|
35
|
+
return posts.find((post) => verifyRespondBidirectionalSignature(serializedOutput, post, mpcResponseKey));
|
|
38
36
|
}
|
|
39
37
|
/**
|
|
40
38
|
* `SignetRequestResponseReader.getVerifiedRespondBidirectionalEvent` over
|
|
@@ -44,7 +42,6 @@ function firstVerifiedRespondBidirectionalEvent(requestId, blockHeight, serializ
|
|
|
44
42
|
*
|
|
45
43
|
* @param requestId - The request id the posts must declare and the
|
|
46
44
|
* attestation must commit to.
|
|
47
|
-
* @param blockHeight - The destination block height the attestation names.
|
|
48
45
|
* @param serializedOutput - The serialised execution output the attestation
|
|
49
46
|
* must commit to, exact unpadded bytes.
|
|
50
47
|
* @param mpcResponseKey - The MPC response key the requesting contract
|
|
@@ -53,8 +50,8 @@ function firstVerifiedRespondBidirectionalEvent(requestId, blockHeight, serializ
|
|
|
53
50
|
* emission order. Only attestations declaring `requestId` are judged.
|
|
54
51
|
* @returns The first verifying post, or `undefined` when none attests this output.
|
|
55
52
|
*/
|
|
56
|
-
export function findVerifiedRespondBidirectionalEvent(requestId,
|
|
57
|
-
return firstVerifiedRespondBidirectionalEvent(
|
|
53
|
+
export function findVerifiedRespondBidirectionalEvent(requestId, serializedOutput, mpcResponseKey, events) {
|
|
54
|
+
return firstVerifiedRespondBidirectionalEvent(serializedOutput, mpcResponseKey, signetEventRecordsOf(events, SignetEventName.RespondBidirectionalEvent, requestId));
|
|
58
55
|
}
|
|
59
56
|
/**
|
|
60
57
|
* Reader over one requester contract / signet contract pair. Construct once
|
|
@@ -266,7 +263,6 @@ export class SignetRequestResponseReader {
|
|
|
266
263
|
*
|
|
267
264
|
* @param requestId - The request id the posts must declare and the
|
|
268
265
|
* attestation must commit to.
|
|
269
|
-
* @param blockHeight - The destination block height the attestation names.
|
|
270
266
|
* @param serializedOutput - The serialised execution output the attestation
|
|
271
267
|
* must commit to, exact unpadded bytes.
|
|
272
268
|
* @param mpcResponseKey - The MPC response key the requesting contract
|
|
@@ -274,8 +270,8 @@ export class SignetRequestResponseReader {
|
|
|
274
270
|
* @returns The first verifying post, or `undefined` when none has been
|
|
275
271
|
* posted yet (poll again) or none attests this output.
|
|
276
272
|
*/
|
|
277
|
-
async getVerifiedRespondBidirectionalEvent(requestId,
|
|
278
|
-
return firstVerifiedRespondBidirectionalEvent(
|
|
273
|
+
async getVerifiedRespondBidirectionalEvent(requestId, serializedOutput, mpcResponseKey) {
|
|
274
|
+
return firstVerifiedRespondBidirectionalEvent(serializedOutput, mpcResponseKey, await this.getRespondBidirectionalEvents(requestId));
|
|
279
275
|
}
|
|
280
276
|
}
|
|
281
277
|
//# sourceMappingURL=signet-request-response-reader.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"signet-request-response-reader.js","sourceRoot":"","sources":["../src/signet-request-response-reader.ts"],"names":[],"mappings":"AAAA,2EAA2E;AAC3E,4EAA4E;AAC5E,wEAAwE;AACxE,uEAAuE;AACvE,uEAAuE;AACvE,0EAA0E;AAK1E,OAAO,EAAuB,mCAAmC,EAAE,MAAM,wBAAwB,CAAC;AAElG,OAAO,EAAE,qBAAqB,EAAE,MAAM,sCAAsC,CAAC;AAC7E,OAAO,EAAE,8BAA8B,EAAE,MAAM,sCAAsC,CAAC;AACtF,OAAO,EAEL,sBAAsB,EAGtB,eAAe,EAEf,oBAAoB,GAErB,MAAM,6BAA6B,CAAC;AACrC,OAAO,EACL,4CAA4C,EAC5C,8CAA8C,GAC/C,MAAM,gCAAgC,CAAC;AACxC,OAAO,
|
|
1
|
+
{"version":3,"file":"signet-request-response-reader.js","sourceRoot":"","sources":["../src/signet-request-response-reader.ts"],"names":[],"mappings":"AAAA,2EAA2E;AAC3E,4EAA4E;AAC5E,wEAAwE;AACxE,uEAAuE;AACvE,uEAAuE;AACvE,0EAA0E;AAK1E,OAAO,EAAuB,mCAAmC,EAAE,MAAM,wBAAwB,CAAC;AAElG,OAAO,EAAE,qBAAqB,EAAE,MAAM,sCAAsC,CAAC;AAC7E,OAAO,EAAE,8BAA8B,EAAE,MAAM,sCAAsC,CAAC;AACtF,OAAO,EAEL,sBAAsB,EAGtB,eAAe,EAEf,oBAAoB,GAErB,MAAM,6BAA6B,CAAC;AACrC,OAAO,EACL,4CAA4C,EAC5C,8CAA8C,GAC/C,MAAM,gCAAgC,CAAC;AACxC,OAAO,EAAkD,WAAW,EAAE,MAAM,sBAAsB,CAAC;AAiEnG;;;;;;GAMG;AACH,SAAS,qBAAqB,CAAC,OAA+B;IAC5D,IAAI,OAAO,CAAC,WAAW,KAAK,WAAW,CAAC,QAAQ,EAAE,CAAC;QACjD,MAAM,IAAI,KAAK,CAAC,2BAA2B,MAAM,CAAC,OAAO,CAAC,WAAW,CAAC,EAAE,CAAC,CAAC;IAC5E,CAAC;AACH,CAAC;AAED;;;;;;;;GAQG;AACH,SAAS,sCAAsC,CAC7C,gBAA4B,EAC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;;;;;;OAUG;IACH,KAAK,CAAC,yBAAyB,CAAC,SAAuB;QACrD,MAAM,OAAO,GAAG,MAAM,IAAI,CAAC,mBAAmB,CAAC,SAAS,CAAC,CAAC;QAC1D,qBAAqB,CAAC,OAAO,CAAC,CAAC;QAC/B,OAAO,8CAA8C,CAAC,OAAO,CAAC,CAAC;IACjE,CAAC;IAED;;;;;;;;;;;;;;OAcG;IACH,KAAK,CAAC,uBAAuB,CAC3B,SAAuB,EACvB,cAAsB;QAEtB,MAAM,OAAO,GAAG,MAAM,IAAI,CAAC,mBAAmB,CAAC,SAAS,CAAC,CAAC;QAC1D,qBAAqB,CAAC,OAAO,CAAC,CAAC;QAC/B,MAAM,EAAE,QAAQ,EAAE,GAAG,MAAM,IAAI,CAAC,kCAAkC,CAAC,SAAS,EAAE,cAAc,CAAC,CAAC;QAC9F,IAAI,QAAQ,KAAK,SAAS,EAAE,CAAC;YAC3B,OAAO,SAAS,CAAC;QACnB,CAAC;QACD,OAAO,4CAA4C,CAAC,OAAO,EAAE,QAAQ,CAAC,CAAC;IACzE,CAAC;IAED;;;;;;;;OAQG;IACH,KAAK,CAAC,6BAA6B,CACjC,SAAuB;QAEvB,OAAO,IAAI,CAAC,eAAe,CAAC,eAAe,CAAC,yBAAyB,EAAE,SAAS,CAAC,CAAC;IACpF,CAAC;IAED;;;;;;;;;;;;;;;;OAgBG;IACH,KAAK,CAAC,oCAAoC,CACxC,SAAuB,EACvB,gBAA4B,EAC5B,cAA8B;QAE9B,OAAO,sCAAsC,CAC3C,gBAAgB,EAChB,cAAc,EACd,MAAM,IAAI,CAAC,6BAA6B,CAAC,SAAS,CAAC,CACpD,CAAC;IACJ,CAAC;CACF"}
|
|
@@ -60,43 +60,74 @@ export declare const MPCDestination: {
|
|
|
60
60
|
/** Never emitted: the >= 2 variants padding (see {@link TxParamType}). */
|
|
61
61
|
readonly reserved: 1;
|
|
62
62
|
};
|
|
63
|
+
/**
|
|
64
|
+
* The fields of a {@link SignBidirectionalEvent} that mint its
|
|
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 {
|
|
74
|
+
/** MPC root-key version to derive from (>= 1). */
|
|
75
|
+
keyVersion: bigint;
|
|
76
|
+
/** Address of the client contract that stores this event (`kernel.self()`). */
|
|
77
|
+
sender: ContractAddress;
|
|
78
|
+
/** Key-derivation path: 32 opaque bytes of the client contract's choosing. */
|
|
79
|
+
path: Uint8Array;
|
|
80
|
+
/** An {@link MPCSignatureAlgorithm} value. */
|
|
81
|
+
algo: number;
|
|
82
|
+
/** A {@link TxParamType} value tagging the txParams decomposition. */
|
|
83
|
+
txParamType: number;
|
|
84
|
+
/** The 32-byte digest of the transaction decomposition over its used entries. */
|
|
85
|
+
txParamsDigest: Uint8Array;
|
|
86
|
+
/** Execution destination: the target chain in CAIP-2 form (https://chainagnostic.org/CAIPs/caip-2), zero-padded, 32 bytes. */
|
|
87
|
+
executionDest: Uint8Array;
|
|
88
|
+
}
|
|
63
89
|
/**
|
|
64
90
|
* Canonical signet request record (Compact:
|
|
65
|
-
* `
|
|
91
|
+
* `SignBidirectionalEventV1<TxParams, #LenOutputDeserialization,
|
|
66
92
|
* #LenRespondSerialization>`), stored per {@link RequestId} in a requesting
|
|
67
|
-
* contract's `
|
|
68
|
-
*
|
|
69
|
-
*
|
|
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
|
|
96
|
+
* contract-declared byte widths in their array lengths.
|
|
70
97
|
*/
|
|
71
98
|
export interface SignBidirectionalEvent<TxParams = EvmType2TxParams> {
|
|
72
|
-
/** Address of the client contract that stores this event (`kernel.self()`). */
|
|
73
|
-
sender: ContractAddress;
|
|
74
99
|
/** MPC root-key version to derive from (>= 1). */
|
|
75
100
|
keyVersion: bigint;
|
|
101
|
+
/** Address of the client contract that stores this event (`kernel.self()`). */
|
|
102
|
+
sender: ContractAddress;
|
|
76
103
|
/** Key-derivation path: 32 opaque bytes of the client contract's choosing. */
|
|
77
104
|
path: Uint8Array;
|
|
78
105
|
/** An {@link MPCSignatureAlgorithm} value. */
|
|
79
106
|
algo: number;
|
|
80
|
-
/** An {@link MPCDestination} value. */
|
|
81
|
-
dest: number;
|
|
82
|
-
/** Extra MPC parameters: 64 opaque bytes, reserved, zero-filled. */
|
|
83
|
-
params: Uint8Array;
|
|
84
107
|
/** A {@link TxParamType} value tagging the txParams decomposition. */
|
|
85
108
|
txParamType: number;
|
|
86
109
|
/** The transaction decomposition. */
|
|
87
110
|
txParams: TxParams;
|
|
88
|
-
/**
|
|
89
|
-
|
|
111
|
+
/** Execution destination: the target chain in CAIP-2 form (https://chainagnostic.org/CAIPs/caip-2), zero-padded, 32 bytes. */
|
|
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;
|
|
90
117
|
/** MPC output_deserialization_schema (destination chain -> MPC), contract-declared width. */
|
|
91
118
|
outputDeserializationSchema: Uint8Array;
|
|
92
119
|
/** MPC respond_serialization_schema (MPC -> Midnight), contract-declared width. */
|
|
93
120
|
respondSerializationSchema: Uint8Array;
|
|
94
121
|
}
|
|
95
122
|
/**
|
|
96
|
-
|
|
123
|
+
* Descriptor of {@link RequestIdPreimage}: what {@link calculateRequestId}
|
|
124
|
+
* hashes, in Compact declaration order.
|
|
125
|
+
*/
|
|
126
|
+
export declare const requestIdPreimageDescriptor: CompactType<RequestIdPreimage>;
|
|
127
|
+
/**
|
|
97
128
|
* Descriptor of {@link SignBidirectionalEvent} over ANY tx-params
|
|
98
129
|
* decomposition: the TS analogue of Compact's generic
|
|
99
|
-
* `
|
|
130
|
+
* `SignBidirectionalEventV1`. Each decomposition wraps this with its own
|
|
100
131
|
* capacity-parameterised convenience (see `signBidirectionalEventDescriptor`
|
|
101
132
|
* in signet-evtype2tx-requests.ts for the EVM Type-2 one).
|
|
102
133
|
*
|
|
@@ -110,9 +141,9 @@ export interface SignBidirectionalEvent<TxParams = EvmType2TxParams> {
|
|
|
110
141
|
*/
|
|
111
142
|
export declare function signBidirectionalEventDescriptorWith<TxParams>(txParams: CompactType<TxParams>, lenOutputDeserialization: number, lenRespondSerialization: number): CompactType<SignBidirectionalEvent<TxParams>>;
|
|
112
143
|
/**
|
|
113
|
-
* The generated ledger shape of `
|
|
114
|
-
*
|
|
115
|
-
* so any contract exposing
|
|
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.
|
|
116
147
|
*/
|
|
117
148
|
export interface SignBidirectionalEventLedgerMap extends Iterable<[
|
|
118
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,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W,EAAE,QAAQ,CAAC,CAAC,SAAS,EAAE,sBAAsB,CAAC,CAAC,GACzD,2BAA2B,CAM7B"}
|
package/dist/signet-requests.js
CHANGED
|
@@ -91,10 +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
|
-
|
|
94
|
+
* Descriptor of {@link RequestIdPreimage}: what {@link calculateRequestId}
|
|
95
|
+
* hashes, in Compact declaration order.
|
|
96
|
+
*/
|
|
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
|
+
});
|
|
106
|
+
/**
|
|
95
107
|
* Descriptor of {@link SignBidirectionalEvent} over ANY tx-params
|
|
96
108
|
* decomposition: the TS analogue of Compact's generic
|
|
97
|
-
* `
|
|
109
|
+
* `SignBidirectionalEventV1`. Each decomposition wraps this with its own
|
|
98
110
|
* capacity-parameterised convenience (see `signBidirectionalEventDescriptor`
|
|
99
111
|
* in signet-evtype2tx-requests.ts for the EVM Type-2 one).
|
|
100
112
|
*
|
|
@@ -108,15 +120,15 @@ const MPC_DESTINATION = new CompactTypeEnum(1, 1);
|
|
|
108
120
|
*/
|
|
109
121
|
export function signBidirectionalEventDescriptorWith(txParams, lenOutputDeserialization, lenRespondSerialization) {
|
|
110
122
|
return compactStructDescriptor({
|
|
111
|
-
sender: CONTRACT_ADDRESS,
|
|
112
123
|
keyVersion: UINT_8,
|
|
124
|
+
sender: CONTRACT_ADDRESS,
|
|
113
125
|
path: BYTES_32,
|
|
114
126
|
algo: MPC_SIGNATURE_ALGORITHM,
|
|
115
|
-
dest: MPC_DESTINATION,
|
|
116
|
-
params: BYTES_64,
|
|
117
127
|
txParamType: TX_PARAM_TYPE,
|
|
118
128
|
txParams,
|
|
119
|
-
|
|
129
|
+
executionDest: BYTES_32,
|
|
130
|
+
signatureDest: MPC_DESTINATION,
|
|
131
|
+
params: BYTES_64,
|
|
120
132
|
outputDeserializationSchema: new CompactTypeBytes(lenOutputDeserialization),
|
|
121
133
|
respondSerializationSchema: new CompactTypeBytes(lenRespondSerialization),
|
|
122
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,CAAC;AAEzC,OAAO,EAAE,UAAU,EAAE,UAAU,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAC1E,OAAO,EACL,QAAQ,EACR,QAAQ,EACR,uBAAuB,EACvB,gBAAgB,EAEhB,MAAM,GACP,MAAM,0BAA0B,CAAC;AAMlC;;;;;;;;;GASG;AACH,MAAM,UAAU,sBAAsB,CAAC,GAAW;IAChD,MAAM,MAAM,GAAG,cAAc,CAAC,GAAG,CAAC,CAAC;IACnC,IAAI,CAAC,mBAAmB,CAAC,IAAI,CAAC,MAAM,CAAC,EAAE,CAAC;QACtC,MAAM,IAAI,KAAK,CAAC,2CAA2C,GAAG,GAAG,CAAC,CAAC;IACrE,CAAC;IACD,OAAO,EAAE,KAAK,EAAE,UAAU,CAAC,MAAM,CAAC,EAAE,CAAC;AACvC,CAAC;AAQD;;;;GAIG;AACH,MAAM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