@sig-net/midnight 0.26.0-rc.8 → 0.27.0-rc.2
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 +6 -6
- package/dist/compact-descriptors.d.ts +8 -0
- package/dist/compact-descriptors.d.ts.map +1 -1
- package/dist/compact-descriptors.js +13 -1
- package/dist/compact-descriptors.js.map +1 -1
- package/dist/constants.d.ts +6 -8
- package/dist/constants.d.ts.map +1 -1
- package/dist/constants.js +29 -29
- package/dist/constants.js.map +1 -1
- package/dist/index.d.ts +5 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +7 -2
- package/dist/index.js.map +1 -1
- package/dist/managed/compiler/contract-info.json +714 -5
- package/dist/managed/compiler/contract-manifest.json +8 -8
- package/dist/managed/contract/index.d.ts +168 -1
- package/dist/managed/contract/index.js +678 -312
- package/dist/managed/contract/index.js.map +1 -1
- package/dist/mpc-output-cache.d.ts +3 -3
- package/dist/mpc-output-cache.d.ts.map +1 -1
- package/dist/mpc-output-cache.js +2 -2
- package/dist/record-contract-address.d.ts +4 -4
- package/dist/record-contract-address.d.ts.map +1 -1
- package/dist/record-contract-address.js +4 -4
- package/dist/record-contract-address.js.map +1 -1
- package/dist/signature-requests-state-reader.d.ts +3 -3
- package/dist/signature-requests-state-reader.d.ts.map +1 -1
- package/dist/signature-requests-state-reader.js +6 -2
- package/dist/signature-requests-state-reader.js.map +1 -1
- package/dist/signature-response-verification.d.ts +24 -9
- package/dist/signature-response-verification.d.ts.map +1 -1
- package/dist/signature-response-verification.js +35 -12
- package/dist/signature-response-verification.js.map +1 -1
- package/dist/signet-contract-events.d.ts +8 -2
- package/dist/signet-contract-events.d.ts.map +1 -1
- package/dist/signet-contract-events.js +10 -8
- package/dist/signet-contract-events.js.map +1 -1
- package/dist/signet-evtype2tx-requests.d.ts.map +1 -1
- package/dist/signet-evtype2tx-requests.js +1 -7
- package/dist/signet-evtype2tx-requests.js.map +1 -1
- package/dist/signet-request-id.d.ts +2 -2
- package/dist/signet-request-id.d.ts.map +1 -1
- package/dist/signet-request-id.js +18 -8
- package/dist/signet-request-id.js.map +1 -1
- package/dist/signet-request-response-reader.d.ts +35 -11
- package/dist/signet-request-response-reader.d.ts.map +1 -1
- package/dist/signet-request-response-reader.js +76 -29
- package/dist/signet-request-response-reader.js.map +1 -1
- package/dist/signet-requests.d.ts +18 -10
- package/dist/signet-requests.d.ts.map +1 -1
- package/dist/signet-requests.js +19 -10
- package/dist/signet-requests.js.map +1 -1
- package/dist/signet-tron-record-decoding.d.ts +11 -0
- package/dist/signet-tron-record-decoding.d.ts.map +1 -0
- package/dist/signet-tron-record-decoding.js +29 -0
- package/dist/signet-tron-record-decoding.js.map +1 -0
- package/dist/signet-tron-requests.d.ts +36 -0
- package/dist/signet-tron-requests.d.ts.map +1 -0
- package/dist/signet-tron-requests.js +76 -0
- package/dist/signet-tron-requests.js.map +1 -0
- package/dist/tron-transactions.d.ts +52 -0
- package/dist/tron-transactions.d.ts.map +1 -0
- package/dist/tron-transactions.js +181 -0
- package/dist/tron-transactions.js.map +1 -0
- package/dist/url-redaction.d.ts +11 -0
- package/dist/url-redaction.d.ts.map +1 -0
- package/dist/url-redaction.js +21 -0
- package/dist/url-redaction.js.map +1 -0
- package/package.json +2 -2
- package/src/Signet.compact +78 -8
- package/src/circuits.compact +26 -0
package/README.md
CHANGED
|
@@ -51,7 +51,7 @@ What your contract imports with `import "@sig-net/midnight/src/Signet"`:
|
|
|
51
51
|
|
|
52
52
|
| Task | Exports |
|
|
53
53
|
|---|---|
|
|
54
|
-
| Declare the protocol ledger state (setup step 3) | `SignBidirectionalEventMapV1` (the request map the MPC reads) and `SignetSigner` (the Signet
|
|
54
|
+
| Declare the protocol ledger state (setup step 3) | `SignBidirectionalEventMapV1` (the request map the MPC reads) and `SignetSigner` (the Signet signer's cross-contract-call interface, pinned at deploy). |
|
|
55
55
|
| Build and store a signature request (runtime step 1) | `constructSignBidirectionalEventV1` and `calculateEvmType2RequestIdV1`, over the request structs `EvmType2TxParams`, `EvmCalldata` and `EvmAccessListEntry`. The id hashes `calculateEvmType2TxParamsDigestV1`, a digest over the transaction's used entries only, so it ignores your struct's capacities and unused slots. |
|
|
56
56
|
| Notify the MPC of the request (runtime step 1) | `constructSignBidirectionalEventNotificationV1`: packs your contract's address and the request map's ledger-tree path. |
|
|
57
57
|
| Narrow an attested `uint256` in-circuit | `checkedTruncationU128`: the `Bytes<32>` the MPC attests (little-endian) to a `Uint<128>`, aborting unless the high 16 bytes are zero (see [Output Recovery and Serialisation](https://github.com/sig-net/midnight-integration/blob/main/README.md#output-recovery-and-serialisation)). |
|
|
@@ -68,7 +68,7 @@ What clients import from `@sig-net/midnight`:
|
|
|
68
68
|
| Verify responses over events already in hand (explorers, anything that streams the history once) | Decode the stream once with `tryDecodeSignetEvent`, then `reader.verifySignatureRespondedEvents(requestId, expectedSigner, events)` and `findVerifiedRespondBidirectionalEvent(requestId, serializedOutput, mpcResponseKey, events)` judge a request's posts without another walk of the event history. `signetEventRecordsOf` is the routing step both share. |
|
|
69
69
|
| Derive the key the MPC signs your requests with | `deriveMidnightRequestSigningKey`: the request signing public key for a contract address and path, and `deriveEvmAddress`: that key's EVM address, the expected signer checked in step 2 (see [Derived keys](https://github.com/sig-net/midnight-integration/blob/main/README.md#derived-keys)). With a request record in hand, `deriveSignBidirectionalEventSigningKey` and `deriveSignBidirectionalEventSignerEvmAddress` take the record and render its `sender` and `path` into the derivation themselves. |
|
|
70
70
|
| Derive the response key your deploy pins | `deriveMidnightResponseKey`: the key `initialise` stores (setup step 4), derived from your contract's address. |
|
|
71
|
-
| Look up published counterparty values | `MidnightNetwork`, `getMpcRootPublicKey`, `
|
|
71
|
+
| Look up published counterparty values | `MidnightNetwork`, `getMpcRootPublicKey`, `getSignerContractAddress` and `getResponderContractAddress`: the fixed per-network values (see the notes in [Runtime](https://github.com/sig-net/midnight-integration/blob/main/README.md#runtime)). |
|
|
72
72
|
| Accept an MPC public key in any published spelling | `parseSecp256k1PublicKey` (to a Compact `Secp256k1Point`) and `normaliseSecp256k1PublicKey` (to the canonical `0x04…` uncompressed SEC1 hex): both take SEC1 hex, compressed or uncompressed with an optional `0x`, and NEAR's `secp256k1:<base58>`. |
|
|
73
73
|
| Read a text field of a request record | `asciiUnpadded`: the inverse of `asciiPadded`, for the zero-padded text fields (`executionDest`, `outputDeserializationSchema`). |
|
|
74
74
|
| Compute a request id off chain | `calculateRequestId`: the TS twin of the on-chain circuit, plus `requestIdHex` and `parseRequestIdHex` for the hex form. |
|
|
@@ -78,11 +78,11 @@ What clients import from `@sig-net/midnight`:
|
|
|
78
78
|
| Convert a foreign execution output into respond bytes | `deserializeEvmOutput` (raw EVM return data to named values) and `serializeRespondOutput` (named values to the attested Borsh bytes): the two conversions `executedEvmRespondOutput` runs on a contract call's return data. |
|
|
79
79
|
| Know what an output schema attests to | `deriveRespondSchema` (the Borsh struct the MPC serialises with), `respondOutputWidth` (the `Bytes<N>` width a settle circuit declares) and `unsupportedEvmOutputFields` (the fields that make the MPC drop a request, without throwing). |
|
|
80
80
|
| Recognise a failed remote execution | `OutputKind` on the verified `RespondBidirectionalEvent`: `failed` or `unviable` beside an empty output (see [Handling Failure](https://github.com/sig-net/midnight-integration/blob/main/README.md#handling-failure)). |
|
|
81
|
-
| Read the attested output bytes from the MPC's output cache | `MpcOutputCacheReader`: one reader per network and Signet
|
|
81
|
+
| Read the attested output bytes from the MPC's output cache | `MpcOutputCacheReader`: one reader per network and Signet signer pair, over the public bucket an MPC configured with output storage writes each request's exact attested bytes to before posting, defaulting to the bucket `getMpcOutputCacheUrl` publishes for the network. `fetchSerializedOutput` yields the bytes step 5 verifies, `undefined` while the object is not in the cache (not written yet, or never written, since the cache is optional). |
|
|
82
82
|
| Hand a verified attestation to your verify circuit (runtime step 5) | `respondBidirectionalEventToCircuitInput`: flips the wire event's big-endian `bigR.x` and `s` into the little-endian record `verifyRespondBidirectionalEventV1` reads. |
|
|
83
83
|
| Verify attestations without the reader | `verifyRespondBidirectionalEvent`: the full check the reader applies, exposed for custom pipelines. `verifyRespondBidirectionalAttestation` checks a post's signature without the output, `verifyAttestedOutput` checks an output against an attested width and hash, and `calculateAttestedOutputHash` gives the output hash a post commits to. |
|
|
84
84
|
| Mint attestations in your contract's unit tests | The `@sig-net/midnight/testing` entry point, see [Testing entry point](#testing-entry-point). |
|
|
85
|
-
| Discover requests MPC-side (responders, background workers) | The discovery primitives: decode the signet
|
|
85
|
+
| Discover requests MPC-side (responders, background workers) | The discovery primitives: decode the signet signer's emitted notification events with `decodeSignetEventNamed(event, SignetEventName.SignBidirectionalEvent)` (or every kind at once with `decodeSignetEvent`, which throws on an undecodable payload anyone can emit, or its non-throwing sibling `tryDecodeSignetEvent`), then resolve each pointer against the named caller's own request map with `lookupSignetRequestAt` (the authenticated read). The polling loop belongs to the responder. |
|
|
86
86
|
| Call the compiled protocol circuits | `pureCircuits`: the compiled pure circuits of `circuits.compact`: the non-generic circuits of `Signet.compact` under their own names, for example the notification packer, and fixed-size instances of the generic ones with the sizes in the name, for example `calculateEvmType2RequestIdV1_1_0_0_34`. Off-chain code calls these compiled artefacts, so it always agrees with what the contracts prove. |
|
|
87
87
|
|
|
88
88
|
### Testing entry point
|
|
@@ -115,9 +115,9 @@ const event = attestRespondBidirectional(
|
|
|
115
115
|
|
|
116
116
|
## Related packages
|
|
117
117
|
|
|
118
|
-
- [`@sig-net/midnight-
|
|
118
|
+
- [`@sig-net/midnight-signer`](https://www.npmjs.com/package/@sig-net/midnight-signer): the central signet signer this library reads requests from.
|
|
119
119
|
- [`@sig-net/midnight-responder`](https://www.npmjs.com/package/@sig-net/midnight-responder): the signet responder this library reads the MPC's responses from.
|
|
120
|
-
- [`@sig-net/midnight-contract-deploy`](https://www.npmjs.com/package/@sig-net/midnight-contract-deploy): deploy tooling for the signet
|
|
120
|
+
- [`@sig-net/midnight-contract-deploy`](https://www.npmjs.com/package/@sig-net/midnight-contract-deploy): deploy tooling for the signet signer and the signet responder plus generic Midnight deploy/wallet plumbing.
|
|
121
121
|
|
|
122
122
|
Developed in [sig-net/midnight-integration](https://github.com/sig-net/midnight-integration).
|
|
123
123
|
|
|
@@ -5,10 +5,16 @@ export declare const HASH_DOMAIN: CompactTypeEnum;
|
|
|
5
5
|
export declare const BOOLEAN: CompactType<boolean>;
|
|
6
6
|
/** `Field`: the accumulator of the transaction digest folds. */
|
|
7
7
|
export declare const FIELD: CompactType<bigint>;
|
|
8
|
+
/** */
|
|
9
|
+
export declare const BYTES_2: CompactTypeBytes;
|
|
8
10
|
/** `Bytes<4>`. */
|
|
9
11
|
export declare const BYTES_4: CompactTypeBytes;
|
|
12
|
+
/** */
|
|
13
|
+
export declare const BYTES_8: CompactTypeBytes;
|
|
10
14
|
/** Descriptor of a Compact `Bytes<20>`. */
|
|
11
15
|
export declare const BYTES_20: CompactTypeBytes;
|
|
16
|
+
/** */
|
|
17
|
+
export declare const BYTES_21: CompactTypeBytes;
|
|
12
18
|
/** Descriptor of a Compact `Bytes<32>`. */
|
|
13
19
|
export declare const BYTES_32: CompactTypeBytes;
|
|
14
20
|
/** Descriptor of a Compact `Bytes<64>`. */
|
|
@@ -111,4 +117,6 @@ export declare function compactTupleDescriptor<T extends unknown[]>(elements: {
|
|
|
111
117
|
* @returns The tuple descriptor for {@link calculateAttestedOutputHash}.
|
|
112
118
|
*/
|
|
113
119
|
export declare function attestedOutputPreimageDescriptor(serializedOutputLength: number): CompactType<[number, Uint8Array]>;
|
|
120
|
+
/** */
|
|
121
|
+
export declare const DOMAIN_FIELD_BYTES_32: CompactType<[number, bigint, Uint8Array<ArrayBufferLike>]>;
|
|
114
122
|
//# sourceMappingURL=compact-descriptors.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"compact-descriptors.d.ts","sourceRoot":"","sources":["../src/compact-descriptors.ts"],"names":[],"mappings":"AAwBA,OAAO,EACL,KAAK,YAAY,EACjB,KAAK,WAAW,EAEhB,gBAAgB,EAChB,eAAe,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X,CAAC,CASH;AAED;;;;;;;;;GASG;AACH,wBAAgB,cAAc,CAAC,IAAI,EAAE,YAAY,EAAE,IAAI,EAAE,MAAM,GAAG,MAAM,EAAE,CAoBzE;AAED;;;;;;GAMG;AACH,wBAAgB,sBAAsB,CAAC,CAAC,SAAS,OAAO,EAAE,EAAE,QAAQ,EAAE;KACnE,CAAC,IAAI,MAAM,CAAC,GAAG,WAAW,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;CAClC,GAAG,WAAW,CAAC,CAAC,CAAC,CAOjB;AAED;;;;;;;GAOG;AACH,wBAAgB,gCAAgC,CAC9C,sBAAsB,EAAE,MAAM,GAC7B,WAAW,CAAC,CAAC,MAAM,EAAE,UAAU,CAAC,CAAC,CAKnC;AAED,MAAM;AACN,eAAO,MAAM,qBAAqB,4DAIhC,CAAC"}
|
|
@@ -25,15 +25,21 @@ import { CompactTypeBoolean, CompactTypeBytes, CompactTypeEnum, CompactTypeField
|
|
|
25
25
|
// Runtime descriptors of the Compact base types, at the same literals the
|
|
26
26
|
// compiler emits.
|
|
27
27
|
/** Protocol HashDomain enum, matching the Compact variant indices and byte width. */
|
|
28
|
-
export const HASH_DOMAIN = new CompactTypeEnum(
|
|
28
|
+
export const HASH_DOMAIN = new CompactTypeEnum(8, 1);
|
|
29
29
|
/** `Boolean`. */
|
|
30
30
|
export const BOOLEAN = CompactTypeBoolean;
|
|
31
31
|
/** `Field`: the accumulator of the transaction digest folds. */
|
|
32
32
|
export const FIELD = CompactTypeField;
|
|
33
|
+
/** */
|
|
34
|
+
export const BYTES_2 = new CompactTypeBytes(2);
|
|
33
35
|
/** `Bytes<4>`. */
|
|
34
36
|
export const BYTES_4 = new CompactTypeBytes(4);
|
|
37
|
+
/** */
|
|
38
|
+
export const BYTES_8 = new CompactTypeBytes(8);
|
|
35
39
|
/** Descriptor of a Compact `Bytes<20>`. */
|
|
36
40
|
export const BYTES_20 = new CompactTypeBytes(20);
|
|
41
|
+
/** */
|
|
42
|
+
export const BYTES_21 = new CompactTypeBytes(21);
|
|
37
43
|
/** Descriptor of a Compact `Bytes<32>`. */
|
|
38
44
|
export const BYTES_32 = new CompactTypeBytes(32);
|
|
39
45
|
/** Descriptor of a Compact `Bytes<64>`. */
|
|
@@ -169,4 +175,10 @@ export function attestedOutputPreimageDescriptor(serializedOutputLength) {
|
|
|
169
175
|
new CompactTypeBytes(serializedOutputLength),
|
|
170
176
|
]);
|
|
171
177
|
}
|
|
178
|
+
/** */
|
|
179
|
+
export const DOMAIN_FIELD_BYTES_32 = compactTupleDescriptor([
|
|
180
|
+
HASH_DOMAIN,
|
|
181
|
+
FIELD,
|
|
182
|
+
BYTES_32,
|
|
183
|
+
]);
|
|
172
184
|
//# sourceMappingURL=compact-descriptors.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"compact-descriptors.js","sourceRoot":"","sources":["../src/compact-descriptors.ts"],"names":[],"mappings":"AAAA,4EAA4E;AAC5E,yEAAyE;AACzE,6EAA6E;AAC7E,0CAA0C;AAC1C,mFAAmF;AACnF,gFAAgF;AAChF,oFAAoF;AACpF,eAAe;AACf,uFAAuF;AACvF,2EAA2E;AAC3E,gFAAgF;AAChF,4EAA4E;AAC5E,yEAAyE;AACzE,8BAA8B;AAC9B,2EAA2E;AAC3E,2EAA2E;AAC3E,yEAAyE;AACzE,0EAA0E;AAC1E,4CAA4C;AAC5C,EAAE;AACF,sEAAsE;AACtE,wBAAwB;AACxB,EAAE;AAEF,OAAO,EAGL,kBAAkB,EAClB,gBAAgB,EAChB,eAAe,EACf,gBAAgB,EAChB,0BAA0B,GAC3B,MAAM,iCAAiC,CAAC;AAEzC,0EAA0E;AAC1E,kBAAkB;AAElB,qFAAqF;AACrF,MAAM,CAAC,MAAM,WAAW,GAAG,IAAI,eAAe,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;AAErD,iBAAiB;AACjB,MAAM,CAAC,MAAM,OAAO,GAAG,kBAAkB,CAAC;AAC1C,gEAAgE;AAChE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AM,CAAC,KAAK,CAAC,gBAAgB,OAAO,CAAC,KAAK,CAAC,GAAG,gCAAgC,CAC/F,CAAC;QACJ,CAAC;QACD,OAAO,OAAO,CAAC,KAAK,CAAC,MAAM,CAAC;IAC9B,CAAC,CAAC,CAAC;AACL,CAAC;AAED;;;;;;GAMG;AACH,MAAM,UAAU,sBAAsB,CAAsB,QAE3D;IACC,OAAO;QACL,SAAS,EAAE,GAAG,EAAE,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAC,OAAO,EAAE,EAAE,CAAC,OAAO,CAAC,SAAS,EAAE,CAAC;QACnE,OAAO,EAAE,CAAC,MAAM,EAAE,EAAE,CAClB,QAAQ,CAAC,OAAO,CAAC,CAAC,OAA6B,EAAE,KAAK,EAAE,EAAE,CAAC,OAAO,CAAC,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC;QAC5F,SAAS,EAAE,CAAC,KAAK,EAAE,EAAE,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC,OAAO,EAAE,EAAE,CAAC,OAAO,CAAC,SAAS,CAAC,KAAK,CAAC,CAAM;KAC/E,CAAC;AACJ,CAAC;AAED;;;;;;;GAOG;AACH,MAAM,UAAU,gCAAgC,CAC9C,sBAA8B;IAE9B,OAAO,sBAAsB,CAAuB;QAClD,WAAW;QACX,IAAI,gBAAgB,CAAC,sBAAsB,CAAC;KAC7C,CAAC,CAAC;AACL,CAAC;AAED,MAAM;AACN,MAAM,CAAC,MAAM,qBAAqB,GAAG,sBAAsB,CAA+B;IACxF,WAAW;IACX,KAAK;IACL,QAAQ;CACT,CAAC,CAAC"}
|
package/dist/constants.d.ts
CHANGED
|
@@ -39,8 +39,6 @@ export declare function asciiUnpadded(bytes: Uint8Array): string;
|
|
|
39
39
|
export declare enum MidnightNetwork {
|
|
40
40
|
/** Local standalone stack (Docker node, indexer and proof server on localhost). */
|
|
41
41
|
Undeployed = "undeployed",
|
|
42
|
-
/** Public staging network, pre-preview. */
|
|
43
|
-
Stagenet = "stagenet",
|
|
44
42
|
/** Public test network for early and breaking changes (bleeding-edge ledger). */
|
|
45
43
|
Preview = "preview",
|
|
46
44
|
/** Public test network that mirrors mainnet config: the final staging step. */
|
|
@@ -52,7 +50,7 @@ export declare enum MidnightNetwork {
|
|
|
52
50
|
* A public, long-lived Midnight network: every named network except the
|
|
53
51
|
* local standalone stack. Only these have fixed protocol counterparty
|
|
54
52
|
* values published in this package (see {@link getMpcRootPublicKey},
|
|
55
|
-
* {@link
|
|
53
|
+
* {@link getSignerContractAddress} and {@link getResponderContractAddress}).
|
|
56
54
|
*/
|
|
57
55
|
export type DeployedNetwork = Exclude<MidnightNetwork, MidnightNetwork.Undeployed>;
|
|
58
56
|
/**
|
|
@@ -68,17 +66,17 @@ export type DeployedNetwork = Exclude<MidnightNetwork, MidnightNetwork.Undeploye
|
|
|
68
66
|
*/
|
|
69
67
|
export declare function getMpcRootPublicKey(networkId: DeployedNetwork): string;
|
|
70
68
|
/**
|
|
71
|
-
* The address of the
|
|
69
|
+
* The address of the signet signer on a deployed
|
|
72
70
|
* Midnight network: the contract a requester contract seals at deploy and
|
|
73
71
|
* notifies of its requests. A local standalone stack has no fixed address:
|
|
74
|
-
* each stack deploys its own
|
|
72
|
+
* each stack deploys its own signet signer.
|
|
75
73
|
*
|
|
76
74
|
* @param networkId - The deployed network to look up.
|
|
77
|
-
* @returns The network's signet
|
|
78
|
-
* @throws {Error} When the
|
|
75
|
+
* @returns The network's signet signer address.
|
|
76
|
+
* @throws {Error} When the signet signer's address is not yet published in this
|
|
79
77
|
* package.
|
|
80
78
|
*/
|
|
81
|
-
export declare function
|
|
79
|
+
export declare function getSignerContractAddress(networkId: DeployedNetwork): string;
|
|
82
80
|
/**
|
|
83
81
|
* The address of the signet responder contract on a deployed Midnight
|
|
84
82
|
* network: the contract the MPC posts its responses to, and the
|
package/dist/constants.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../src/constants.ts"],"names":[],"mappings":"AASA;;;GAGG;AACH,eAAO,MAAM,oBAAoB,KAAK,CAAC;AAEvC,8DAA8D;AAC9D,eAAO,MAAM,gBAAgB,KAAK,CAAC;AAEnC,wFAAwF;AACxF,eAAO,MAAM,cAAc,IAAI,CAAC;AAEhC;;;GAGG;AACH,eAAO,MAAM,0BAA0B,KAAK,CAAC;AAE7C;;;;;;;;;GASG;AACH,wBAAgB,WAAW,CAAC,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,UAAU,CAUpE;AAED;;;;;;;GAOG;AACH,wBAAgB,aAAa,CAAC,KAAK,EAAE,UAAU,GAAG,MAAM,CAMvD;AAED;;;GAGG;AACH,oBAAY,eAAe;IACzB,mFAAmF;IACnF,UAAU,eAAe;IACzB,
|
|
1
|
+
{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../src/constants.ts"],"names":[],"mappings":"AASA;;;GAGG;AACH,eAAO,MAAM,oBAAoB,KAAK,CAAC;AAEvC,8DAA8D;AAC9D,eAAO,MAAM,gBAAgB,KAAK,CAAC;AAEnC,wFAAwF;AACxF,eAAO,MAAM,cAAc,IAAI,CAAC;AAEhC;;;GAGG;AACH,eAAO,MAAM,0BAA0B,KAAK,CAAC;AAE7C;;;;;;;;;GASG;AACH,wBAAgB,WAAW,CAAC,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,UAAU,CAUpE;AAED;;;;;;;GAOG;AACH,wBAAgB,aAAa,CAAC,KAAK,EAAE,UAAU,GAAG,MAAM,CAMvD;AAED;;;GAGG;AACH,oBAAY,eAAe;IACzB,mFAAmF;IACnF,UAAU,eAAe;IACzB,iFAAiF;IACjF,OAAO,YAAY;IACnB,+EAA+E;IAC/E,OAAO,YAAY;IACnB,6CAA6C;IAC7C,OAAO,YAAY;CACpB;AAED;;;;;GAKG;AACH,MAAM,MAAM,eAAe,GAAG,OAAO,CAAC,eAAe,EAAE,eAAe,CAAC,UAAU,CAAC,CAAC;AAuBnF;;;;;;;;;;GAUG;AACH,wBAAgB,mBAAmB,CAAC,SAAS,EAAE,eAAe,GAAG,MAAM,CAMtE;AAWD;;;;;;;;;;GAUG;AACH,wBAAgB,wBAAwB,CAAC,SAAS,EAAE,eAAe,GAAG,MAAM,CAM3E;AAWD;;;;;;;;;;;GAWG;AACH,wBAAgB,2BAA2B,CAAC,SAAS,EAAE,eAAe,GAAG,MAAM,CAM9E;AAeD;;;;;;;;;;GAUG;AACH,wBAAgB,oBAAoB,CAAC,SAAS,EAAE,eAAe,GAAG,MAAM,CAMvE"}
|
package/dist/constants.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
// MPC routing constants, the padded-ASCII codec for the signet request
|
|
2
2
|
// structs, and the published per-network counterparty values (the MPC root
|
|
3
|
-
// public key and the signet
|
|
3
|
+
// public key and the signet signer and responder addresses). Field widths mirror
|
|
4
4
|
// Signet.compact (the wire format: keep in lockstep), and the string
|
|
5
5
|
// constants are the values the MPC network routes on.
|
|
6
6
|
//
|
|
@@ -62,8 +62,6 @@ export var MidnightNetwork;
|
|
|
62
62
|
(function (MidnightNetwork) {
|
|
63
63
|
/** Local standalone stack (Docker node, indexer and proof server on localhost). */
|
|
64
64
|
MidnightNetwork["Undeployed"] = "undeployed";
|
|
65
|
-
/** Public staging network, pre-preview. */
|
|
66
|
-
MidnightNetwork["Stagenet"] = "stagenet";
|
|
67
65
|
/** Public test network for early and breaking changes (bleeding-edge ledger). */
|
|
68
66
|
MidnightNetwork["Preview"] = "preview";
|
|
69
67
|
/** Public test network that mirrors mainnet config: the final staging step. */
|
|
@@ -76,15 +74,19 @@ export var MidnightNetwork;
|
|
|
76
74
|
// publish it for that network. An empty string means "not yet published" and
|
|
77
75
|
// makes getMpcRootPublicKey throw for that network.
|
|
78
76
|
const mpcRootPublicKeys = {
|
|
79
|
-
[MidnightNetwork.Stagenet]:
|
|
80
|
-
// Canonical form of the signet.js TESTNET root key:
|
|
81
|
-
// secp256k1:3Ww8iFjqTHufye5aRGUvrQqETegR4gVUcW8FX5xzscaN9ENhpkffojsxJwi6N1RbbHMTxYa9UyKeqK3fsMuwxjR5
|
|
82
|
-
"0x047dd8ecafa5d9c921485b6ac33476870e98c3378e395f3c8fae92ce4943d8432847f591ab25ca454effb522ec2eaf04b7e1c83ba65ae731ea98dd52eb7d458dd4",
|
|
83
77
|
[MidnightNetwork.Preview]:
|
|
84
78
|
// Canonical form of the signet.js TESTNET_DEV root key:
|
|
85
79
|
// secp256k1:54hU5wcCmVUPFWLDALXMh1fFToZsVXrx9BbTbHzSfQq1Kd1rJZi52iPa4QQxo6s5TgjWqgpY8HamYuUDzG6fAaUq
|
|
86
80
|
"0x04cb41bab8bc97121f4902514ca57a284f167b9239ecb8176831d1ef0fede87c61ca3e59da1c194aa90108098a9e5cdc55d3b3297cdefbc085ffafd0f2c34ae61a",
|
|
87
|
-
|
|
81
|
+
// TODO: uncomment and switch to this when testnet is pointed to pre-prod
|
|
82
|
+
// [MidnightNetwork.Preprod]:
|
|
83
|
+
// // Canonical form of the signet.js TESTNET root key:
|
|
84
|
+
// // secp256k1:3Ww8iFjqTHufye5aRGUvrQqETegR4gVUcW8FX5xzscaN9ENhpkffojsxJwi6N1RbbHMTxYa9UyKeqK3fsMuwxjR5
|
|
85
|
+
// "0x047dd8ecafa5d9c921485b6ac33476870e98c3378e395f3c8fae92ce4943d8432847f591ab25ca454effb522ec2eaf04b7e1c83ba65ae731ea98dd52eb7d458dd4",
|
|
86
|
+
[MidnightNetwork.Preprod]:
|
|
87
|
+
// Canonical form of the signet.js TESTNET_DEV root key:
|
|
88
|
+
// secp256k1:54hU5wcCmVUPFWLDALXMh1fFToZsVXrx9BbTbHzSfQq1Kd1rJZi52iPa4QQxo6s5TgjWqgpY8HamYuUDzG6fAaUq
|
|
89
|
+
"0x04cb41bab8bc97121f4902514ca57a284f167b9239ecb8176831d1ef0fede87c61ca3e59da1c194aa90108098a9e5cdc55d3b3297cdefbc085ffafd0f2c34ae61a",
|
|
88
90
|
[MidnightNetwork.Mainnet]: "",
|
|
89
91
|
};
|
|
90
92
|
/**
|
|
@@ -105,30 +107,29 @@ export function getMpcRootPublicKey(networkId) {
|
|
|
105
107
|
}
|
|
106
108
|
return publicKey;
|
|
107
109
|
}
|
|
108
|
-
// TODO: fill in each network's signet
|
|
109
|
-
//
|
|
110
|
-
// published" and makes
|
|
111
|
-
const
|
|
112
|
-
[MidnightNetwork.Stagenet]: "",
|
|
110
|
+
// TODO: fill in each network's signet signer address as the signet
|
|
111
|
+
// signer is deployed there. An empty string means "not yet deployed or
|
|
112
|
+
// published" and makes getSignerContractAddress throw for that network.
|
|
113
|
+
const signerContractAddresses = {
|
|
113
114
|
[MidnightNetwork.Preview]: "2b0f9ef9fe7e6d79628a12d245ae0d7efaaaeeca360d9f5f3e13214a5c325013",
|
|
114
|
-
[MidnightNetwork.Preprod]: "",
|
|
115
|
+
[MidnightNetwork.Preprod]: "798e602d58ca65bae159464f43091bd790b3ef23f10abb49d962bc0efeb00c5e",
|
|
115
116
|
[MidnightNetwork.Mainnet]: "",
|
|
116
117
|
};
|
|
117
118
|
/**
|
|
118
|
-
* The address of the
|
|
119
|
+
* The address of the signet signer on a deployed
|
|
119
120
|
* Midnight network: the contract a requester contract seals at deploy and
|
|
120
121
|
* notifies of its requests. A local standalone stack has no fixed address:
|
|
121
|
-
* each stack deploys its own
|
|
122
|
+
* each stack deploys its own signet signer.
|
|
122
123
|
*
|
|
123
124
|
* @param networkId - The deployed network to look up.
|
|
124
|
-
* @returns The network's signet
|
|
125
|
-
* @throws {Error} When the
|
|
125
|
+
* @returns The network's signet signer address.
|
|
126
|
+
* @throws {Error} When the signet signer's address is not yet published in this
|
|
126
127
|
* package.
|
|
127
128
|
*/
|
|
128
|
-
export function
|
|
129
|
-
const contractAddress =
|
|
129
|
+
export function getSignerContractAddress(networkId) {
|
|
130
|
+
const contractAddress = signerContractAddresses[networkId];
|
|
130
131
|
if (!contractAddress) {
|
|
131
|
-
throw new Error(`no signet
|
|
132
|
+
throw new Error(`no signet signer address published for the '${networkId}' network yet`);
|
|
132
133
|
}
|
|
133
134
|
return contractAddress;
|
|
134
135
|
}
|
|
@@ -136,9 +137,8 @@ export function getSignetContractAddress(networkId) {
|
|
|
136
137
|
// deployed there. An empty string means "not yet deployed or published" and
|
|
137
138
|
// makes getResponderContractAddress throw for that network.
|
|
138
139
|
const responderContractAddresses = {
|
|
139
|
-
[MidnightNetwork.Stagenet]: "",
|
|
140
140
|
[MidnightNetwork.Preview]: "1616a3cf33ffc2c4678323150374b89a18807335bcbabd31621c56e0d3c0d203",
|
|
141
|
-
[MidnightNetwork.Preprod]: "",
|
|
141
|
+
[MidnightNetwork.Preprod]: "825841d7bef91956fc4fdefe4edb7ecf9c2b985f0b4ddae7d0f1b35d9267ca2b",
|
|
142
142
|
[MidnightNetwork.Mainnet]: "",
|
|
143
143
|
};
|
|
144
144
|
/**
|
|
@@ -165,12 +165,12 @@ export function getResponderContractAddress(networkId) {
|
|
|
165
165
|
// string means "no cache published" and makes getMpcOutputCacheUrl throw for
|
|
166
166
|
// that network.
|
|
167
167
|
const mpcOutputCacheUrls = {
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
//
|
|
171
|
-
[MidnightNetwork.
|
|
172
|
-
[MidnightNetwork.Preprod]: "",
|
|
173
|
-
[MidnightNetwork.Mainnet]: "",
|
|
168
|
+
// The dev MPC serves Preprod and writes to this bucket under its `v1` prefix.
|
|
169
|
+
[MidnightNetwork.Preview]: "https://storage.googleapis.com/midnight-cache-storage-dev/v1",
|
|
170
|
+
// TODO: uncomment and switch to this when testnet is pointed to pre-prod
|
|
171
|
+
// [MidnightNetwork.Preprod]: "https://storage.googleapis.com/midnight-cache-storage-testnet/v1",
|
|
172
|
+
[MidnightNetwork.Preprod]: "https://storage.googleapis.com/midnight-cache-storage-dev/v1",
|
|
173
|
+
[MidnightNetwork.Mainnet]: "https://storage.googleapis.com/midnight-cache-storage-mainnet/v1",
|
|
174
174
|
};
|
|
175
175
|
/**
|
|
176
176
|
* The public URL of the MPC's output cache on a deployed Midnight network,
|
package/dist/constants.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"constants.js","sourceRoot":"","sources":["../src/constants.ts"],"names":[],"mappings":"AAAA,uEAAuE;AACvE,2EAA2E;AAC3E,
|
|
1
|
+
{"version":3,"file":"constants.js","sourceRoot":"","sources":["../src/constants.ts"],"names":[],"mappings":"AAAA,uEAAuE;AACvE,2EAA2E;AAC3E,iFAAiF;AACjF,qEAAqE;AACrE,sDAAsD;AACtD,EAAE;AACF,0EAA0E;AAC1E,oBAAoB;AAEpB;;;GAGG;AACH,MAAM,CAAC,MAAM,oBAAoB,GAAG,EAAE,CAAC;AAEvC,8DAA8D;AAC9D,MAAM,CAAC,MAAM,gBAAgB,GAAG,EAAE,CAAC;AAEnC,wFAAwF;AACxF,MAAM,CAAC,MAAM,cAAc,GAAG,CAAC,CAAC;AAEhC;;;GAGG;AACH,MAAM,CAAC,MAAM,0BAA0B,GAAG,EAAE,CAAC;AAE7C;;;;;;;;;GASG;AACH,MAAM,UAAU,WAAW,CAAC,IAAY,EAAE,MAAc;IACtD,MAAM,OAAO,GAAG,IAAI,WAAW,EAAE,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;IAC/C,IAAI,OAAO,CAAC,MAAM,GAAG,MAAM,EAAE,CAAC;QAC5B,MAAM,IAAI,KAAK,CACb,IAAI,IAAI,QAAQ,MAAM,CAAC,OAAO,CAAC,MAAM,CAAC,4BAA4B,MAAM,CAAC,MAAM,CAAC,aAAa,CAC9F,CAAC;IACJ,CAAC;IACD,MAAM,GAAG,GAAG,IAAI,UAAU,CAAC,MAAM,CAAC,CAAC;IACnC,GAAG,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC;IACjB,OAAO,GAAG,CAAC;AACb,CAAC;AAED;;;;;;;GAOG;AACH,MAAM,UAAU,aAAa,CAAC,KAAiB;IAC7C,IAAI,GAAG,G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;CAC9F,CAAC;AAEF;;;;;;;;;;GAUG;AACH,MAAM,UAAU,oBAAoB,CAAC,SAA0B;IAC7D,MAAM,QAAQ,GAAG,kBAAkB,CAAC,SAAS,CAAC,CAAC;IAC/C,IAAI,CAAC,QAAQ,EAAE,CAAC;QACd,MAAM,IAAI,KAAK,CAAC,8CAA8C,SAAS,eAAe,CAAC,CAAC;IAC1F,CAAC;IACD,OAAO,QAAQ,CAAC;AAClB,CAAC"}
|
package/dist/index.d.ts
CHANGED
|
@@ -11,7 +11,11 @@ export { decodeEvmType2SignBidirectionalEvent } from "./signet-evtype2tx-record-
|
|
|
11
11
|
export { abiWordToBool, abiWordToUint128, assembleCalldata, boolAbiWord, calculateEvmType2TxParamsDigest, type EvmAccessListEntry, evmAddressAbiWord, type EvmCalldata, type EvmType2TxParams, numericAbiWord, signBidirectionalEventToSignedEvmTransaction, signBidirectionalEventToUnsignedEvmTransaction, } from "./signet-evtype2tx-requests.ts";
|
|
12
12
|
export { calculateRequestId } from "./signet-request-id.ts";
|
|
13
13
|
export * from "./signet-request-response-reader.ts";
|
|
14
|
-
export { type ContractAddress, contractAddressFromHex, type Maybe, MPCDestination, MPCSignatureAlgorithm, parseRequestIdHex, PATH_BYTES, type RequestId, requestIdBytes, type RequestIdHex, requestIdHex, type RequestIdPreimage, type SignBidirectionalEvent, type SignBidirectionalEventIndex, type SignBidirectionalEventLedgerMap, toSignBidirectionalEventIndex, TxParamType, } from "./signet-requests.ts";
|
|
14
|
+
export { type AnySignBidirectionalEvent, type ContractAddress, contractAddressFromHex, isEvmType2SignBidirectionalEvent, isTronSignBidirectionalEvent, type Maybe, MPCDestination, MPCSignatureAlgorithm, parseRequestIdHex, PATH_BYTES, type RequestId, requestIdBytes, type RequestIdHex, requestIdHex, type RequestIdPreimage, type SignBidirectionalEvent, type SignBidirectionalEventIndex, type SignBidirectionalEventLedgerMap, toSignBidirectionalEventIndex, TxParamType, } from "./signet-requests.ts";
|
|
15
|
+
export { decodeTronSignBidirectionalEvent } from "./signet-tron-record-decoding.ts";
|
|
16
|
+
export { calculateTronTxParamsDigest, TRON_CAIP2_ID, tronSignBidirectionalEventDescriptor, type TronTxParams, tronTxParamsDescriptor, } from "./signet-tron-requests.ts";
|
|
17
|
+
export * from "./tron-transactions.ts";
|
|
18
|
+
export * from "./url-redaction.ts";
|
|
15
19
|
export { calculateAttestedOutputHash, formatSecp256k1PublicKey, normaliseSecp256k1PublicKey, parseSecp256k1PublicKey, respondBidirectionalEventToCircuitInput, SECP256K1_ORDER, type Secp256k1Point, signatureRespondedEventToSignature, verifyAttestedOutput, verifyRespondBidirectionalAttestation, verifyRespondBidirectionalEvent, } from "./ecdsa-attestation.ts";
|
|
16
20
|
/**
|
|
17
21
|
* Compiled pure circuits and protocol enums of Signet.compact (run
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAIA,cAAc,gBAAgB,CAAC;AAC/B,OAAO,EACL,eAAe,EACf,iBAAiB,EACjB,SAAS,EACT,aAAa,EACb,eAAe,EACf,UAAU,EACV,UAAU,EACV,cAAc,GACf,MAAM,kBAAkB,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAIA,cAAc,gBAAgB,CAAC;AAC/B,OAAO,EACL,eAAe,EACf,iBAAiB,EACjB,SAAS,EACT,aAAa,EACb,eAAe,EACf,UAAU,EACV,UAAU,EACV,cAAc,GACf,MAAM,kBAAkB,CAAC;AAK1B,cAAc,gBAAgB,CAAC;AAG/B,OAAO,EACL,aAAa,EACb,gBAAgB,EAChB,+BAA+B,EAC/B,yBAAyB,EACzB,4CAA4C,EAC5C,sCAAsC,EACtC,yBAAyB,EACzB,iBAAiB,EACjB,mCAAmC,EACnC,KAAK,iCAAiC,GACvC,MAAM,yBAAyB,CAAC;AACjC,cAAc,uBAAuB,CAAC;A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qCAAqC,EACrC,+BAA+B,GAChC,MAAM,wBAAwB,CAAC;AAEhC;;;;GAIG;AACH,OAAO,EACL,UAAU,EACV,UAAU,EACV,KAAK,YAAY,EACjB,YAAY,GACb,MAAM,6BAA6B,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -5,7 +5,8 @@ export * from "./abi-serde.js";
|
|
|
5
5
|
export { bigintToBytes32, bigintToBytes32BE, BLS_ORDER, bytesToBigint, bytesToBigintBE, bytesToHex, hexToBytes, stripHexPrefix, } from "./byte-codecs.js";
|
|
6
6
|
// Explicit lists for the request/state modules: the runtime descriptor
|
|
7
7
|
// toolkit (compact-descriptors.ts and the per-module record descriptors) is
|
|
8
|
-
// package-internal, consumed only through the reader and request functions
|
|
8
|
+
// package-internal, consumed only through the reader and request functions,
|
|
9
|
+
// except the Tron record descriptors.
|
|
9
10
|
export * from "./constants.js";
|
|
10
11
|
// Selective: deriveMidnightResponseSecretKey takes the MPC root secret, so
|
|
11
12
|
// it is exported through ./testing with the other secret-taking helpers.
|
|
@@ -19,7 +20,11 @@ export { decodeEvmType2SignBidirectionalEvent } from "./signet-evtype2tx-record-
|
|
|
19
20
|
export { abiWordToBool, abiWordToUint128, assembleCalldata, boolAbiWord, calculateEvmType2TxParamsDigest, evmAddressAbiWord, numericAbiWord, signBidirectionalEventToSignedEvmTransaction, signBidirectionalEventToUnsignedEvmTransaction, } from "./signet-evtype2tx-requests.js";
|
|
20
21
|
export { calculateRequestId } from "./signet-request-id.js";
|
|
21
22
|
export * from "./signet-request-response-reader.js";
|
|
22
|
-
export { contractAddressFromHex, MPCDestination, MPCSignatureAlgorithm, parseRequestIdHex, PATH_BYTES, requestIdBytes, requestIdHex, toSignBidirectionalEventIndex, TxParamType, } from "./signet-requests.js";
|
|
23
|
+
export { contractAddressFromHex, isEvmType2SignBidirectionalEvent, isTronSignBidirectionalEvent, MPCDestination, MPCSignatureAlgorithm, parseRequestIdHex, PATH_BYTES, requestIdBytes, requestIdHex, toSignBidirectionalEventIndex, TxParamType, } from "./signet-requests.js";
|
|
24
|
+
export { decodeTronSignBidirectionalEvent } from "./signet-tron-record-decoding.js";
|
|
25
|
+
export { calculateTronTxParamsDigest, TRON_CAIP2_ID, tronSignBidirectionalEventDescriptor, tronTxParamsDescriptor, } from "./signet-tron-requests.js";
|
|
26
|
+
export * from "./tron-transactions.js";
|
|
27
|
+
export * from "./url-redaction.js";
|
|
23
28
|
// Explicit list: ecdsa-attestation.ts also backs the ./testing entry point
|
|
24
29
|
// (the attestation-minting helpers that take a secret key live THERE), and
|
|
25
30
|
// its record decoder (mpcSignatureToEcdsaSignature) and noble-point parser
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,yEAAyE;AACzE,sEAAsE;AACtE,wEAAwE;AAExE,cAAc,gBAAgB,CAAC;AAC/B,OAAO,EACL,eAAe,EACf,iBAAiB,EACjB,SAAS,EACT,aAAa,EACb,eAAe,EACf,UAAU,EACV,UAAU,EACV,cAAc,GACf,MAAM,kBAAkB,CAAC;AAC1B,uEAAuE;AACvE,4EAA4E;AAC5E,4EAA4E;AAC5E,cAAc,gBAAgB,CAAC;AAC/B,2EAA2E;AAC3E,yEAAyE;AACzE,OAAO,EACL,aAAa,EACb,gBAAgB,EAChB,+BAA+B,EAC/B,yBAAyB,EACzB,4CAA4C,EAC5C,sCAAsC,EACtC,yBAAyB,EACzB,iBAAiB,EACjB,mCAAmC,GAEpC,MAAM,yBAAyB,CAAC;AACjC,cAAc,uBAAuB,CAAC;AACtC,OAAO,EAAyB,qBAAqB,EAAE,MAAM,yBAAyB,CAAC;AACvF,cAAc,sCAAsC,CAAC;AACrD,cAAc,sCAAsC,CAAC;AACrD,cAAc,6BAA6B,CAAC;AAC5C,OAAO,EAAE,oCAAoC,EAAE,MAAM,uCAAuC,CAAC;AAC7F,OAAO,EACL,aAAa,EACb,gBAAgB,EAChB,gBA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