@sig-net/midnight 0.0.9 → 0.11.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 +254 -112
- package/dist/constants.d.ts +1 -1
- package/dist/constants.js +1 -1
- package/dist/ecdsa-attestation.d.ts +53 -1
- package/dist/ecdsa-attestation.d.ts.map +1 -1
- package/dist/ecdsa-attestation.js +96 -4
- package/dist/ecdsa-attestation.js.map +1 -1
- package/dist/epsilon-derivation.d.ts +8 -8
- package/dist/epsilon-derivation.d.ts.map +1 -1
- package/dist/epsilon-derivation.js +15 -17
- package/dist/epsilon-derivation.js.map +1 -1
- package/dist/index.d.ts +3 -13
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +3 -13
- package/dist/index.js.map +1 -1
- package/dist/managed/compiler/contract-info.json +76 -24
- package/dist/managed/compiler/contract-manifest.json +8 -8
- package/dist/managed/contract/index.d.ts +18 -10
- package/dist/managed/contract/index.js +218 -103
- package/dist/managed/contract/index.js.map +1 -1
- package/dist/signature-requests-state-reader.d.ts +2 -2
- package/dist/signature-requests-state-reader.d.ts.map +1 -1
- package/dist/signature-requests-state-reader.js +32 -15
- 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 +5 -5
- package/dist/signature-response-verification.js.map +1 -1
- package/dist/signet-contract-state-reader.d.ts +49 -30
- package/dist/signet-contract-state-reader.d.ts.map +1 -1
- package/dist/signet-contract-state-reader.js +55 -35
- package/dist/signet-contract-state-reader.js.map +1 -1
- package/dist/signet-evtype2tx-requests.d.ts +65 -43
- package/dist/signet-evtype2tx-requests.d.ts.map +1 -1
- package/dist/signet-evtype2tx-requests.js +77 -78
- package/dist/signet-evtype2tx-requests.js.map +1 -1
- package/dist/signet-request-response-reader.d.ts +3 -3
- package/dist/signet-request-response-reader.js +9 -9
- package/dist/signet-request-response-reader.js.map +1 -1
- package/dist/signet-requests.d.ts +4 -4
- package/dist/signet-requests.js +3 -3
- package/dist/signet-requests.js.map +1 -1
- package/package.json +1 -1
- package/src/Signet.compact +122 -72
- package/src/circuits.compact +10 -27
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ecdsa-attestation.js","sourceRoot":"","sources":["../src/ecdsa-attestation.ts"],"names":[],"mappings":"AAAA,oEAAoE;AACpE,uEAAuE;AACvE,sEAAsE;AACtE,uEAAuE;AACvE
|
|
1
|
+
{"version":3,"file":"ecdsa-attestation.js","sourceRoot":"","sources":["../src/ecdsa-attestation.ts"],"names":[],"mappings":"AAAA,oEAAoE;AACpE,uEAAuE;AACvE,sEAAsE;AACtE,uEAAuE;AACvE,+EAA+E;AAC/E,6EAA6E;AAC7E,2EAA2E;AAC3E,yEAAyE;AACzE,4EAA4E;AAC5E,EAAE;AACF,yEAAyE;AACzE,8BAA8B;AAE9B,OAAO,EAAE,SAAS,EAAE,MAAM,4BAA4B,CAAC;AASvD,uCAAuC;AACvC,MAAM,CAAC,MAAM,eAAe,GAAG,SAAS,CAAC,KAAK,CAAC,EAAE,CAAC,KAAK,CAAC;AAExD,uEAAuE;AACvE,MAAM,CAAC,MAAM,SAAS,GAAG,8EAA8E,CAAC;AAExG;;;;;;;GAOG;AACH,MAAM,UAAU,aAAa,CAAC,KAAiB;IAC7C,IAAI,MAAM,GAAG,EAAE,CAAC;IAChB,KAAK,IAAI,CAAC,GAAG,KAAK,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC,IAAI,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC;QAC3C,MAAM,GAAG,CAAC,MAAM,IAAI,EAAE,CAAC,GAAG,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC;IAC7C,CAAC;IACD,OAAO,MAAM,CAAC;AAChB,CAAC;AAED;;;;;;;;GAQG;AACH,MAAM,UAAU,eAAe,CAAC,CAAS;IACvC,MAAM,GAAG,GAAG,IAAI,UAAU,CAAC,EAAE,CAAC,CAAC;IAC/B,IAAI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,OAAO,OAAO,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC,GAAG,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE,CAAC;AACpD,CAAC;AAED;;;;;;GAMG;AACH,MAAM,UAAU,oBAAoB,CAAC,SAAqB;IACxD,MAAM,YAAY,GAAG,SAAS,CAAC,YAAY,CAAC,SAAS,EAAE,KAAK,CAAC,CAAC;IAC9D,OAAO;QACL,CAAC,EAAE,eAAe,CAAC,YAAY,CAAC,KAAK,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC;QAC7C,CAAC,EAAE,eAAe,CAAC,YAAY,CAAC,KAAK,CAAC,EAAE,EAAE,EAAE,CAAC,CAAC;QAC9C,QAAQ,EAAE,KAAK;KAChB,CAAC;AACJ,CAAC"}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { type Secp256k1Point } from "./ecdsa-attestation.ts";
|
|
2
2
|
/**
|
|
3
|
-
* Domain prefix of the sig-net
|
|
4
|
-
*
|
|
5
|
-
*
|
|
3
|
+
* Domain prefix of the sig-net v2.0.0 epsilon derivation scheme. The full
|
|
4
|
+
* derivation string is `<prefix>:<chainId>:<requester>:<path>` (colon-separated),
|
|
5
|
+
* matching `caip2_derivation_path` in the MPC's `crypto/src/kdf.rs`.
|
|
6
6
|
*/
|
|
7
|
-
export declare const EPSILON_DERIVATION_PREFIX = "sig.network
|
|
7
|
+
export declare const EPSILON_DERIVATION_PREFIX = "sig.network v2.0.0 epsilon derivation";
|
|
8
8
|
/**
|
|
9
9
|
* CAIP-2 chain id under which the MPC derives keys for requests originating
|
|
10
10
|
* from Midnight contracts.
|
|
@@ -29,8 +29,8 @@ export declare const MIDNIGHT_TESTNET_CHAIN_ID = "midnight:testnet";
|
|
|
29
29
|
export declare const MIDNIGHT_RESPOND_BIDIRECTIONAL_PATH = "midnight response key";
|
|
30
30
|
/**
|
|
31
31
|
* Derive the EVM address the MPC network signs from for a given Midnight
|
|
32
|
-
* contract and derivation path, using the sig-net
|
|
33
|
-
* `epsilon = keccak256("<prefix
|
|
32
|
+
* contract and derivation path, using the sig-net v2.0.0 epsilon scheme:
|
|
33
|
+
* `epsilon = keccak256("<prefix>:<chainId>:<contractAddress>:<path>")` and
|
|
34
34
|
* `derivedPubKey = mpcRootPubKey + epsilon * G` on secp256k1.
|
|
35
35
|
*
|
|
36
36
|
* The MPC treats `path` as an opaque string: the vault's own account uses the
|
|
@@ -48,8 +48,8 @@ export declare const MIDNIGHT_RESPOND_BIDIRECTIONAL_PATH = "midnight response ke
|
|
|
48
48
|
*/
|
|
49
49
|
export declare function deriveEvmAddress(mpcSecp256k1PubkeyHex: string, contractAddress: string, path: string, chainId?: string): string;
|
|
50
50
|
/**
|
|
51
|
-
* The epsilon scalar of the sig-net
|
|
52
|
-
* `keccak256("<prefix
|
|
51
|
+
* The epsilon scalar of the sig-net v2.0.0 derivation scheme:
|
|
52
|
+
* `keccak256("<prefix>:<chainId>:<requester>:<path>")` reduced mod the
|
|
53
53
|
* secp256k1 curve order. Child keys are `root + epsilon` (secret side) and
|
|
54
54
|
* `rootPubKey + epsilon * G` (public side).
|
|
55
55
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"epsilon-derivation.d.ts","sourceRoot":"","sources":["../src/epsilon-derivation.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"epsilon-derivation.d.ts","sourceRoot":"","sources":["../src/epsilon-derivation.ts"],"names":[],"mappings":"AAaA,OAAO,EAAmB,KAAK,cAAc,EAAE,MAAM,wBAAwB,CAAC;AAE9E;;;;GAIG;AACH,eAAO,MAAM,yBAAyB,0CAA0C,CAAC;AAEjF;;;GAGG;AACH,eAAO,MAAM,yBAAyB,qBAAqB,CAAC;AAE5D;;;;;;;;;;;;;;;GAeG;AACH,eAAO,MAAM,mCAAmC,0BAA0B,CAAC;AAE3E;;;;;;;;;;;;;;;;;;GAkBG;AACH,wBAAgB,gBAAgB,CAC9B,qBAAqB,EAAE,MAAM,EAC7B,eAAe,EAAE,MAAM,EACvB,IAAI,EAAE,MAAM,EACZ,OAAO,GAAE,MAAkC,GAC1C,MAAM,CAGR;AAED;;;;;;;;;;;GAWG;AACH,wBAAgB,aAAa,CAC3B,SAAS,EAAE,MAAM,EACjB,IAAI,EAAE,MAAM,EACZ,OAAO,GAAE,MAAkC,GAC1C,MAAM,CAKR;AA6BD;;;;;;;;;;;;;GAaG;AACH,wBAAgB,yBAAyB,CACvC,qBAAqB,EAAE,MAAM,EAC7B,qBAAqB,EAAE,MAAM,GAC5B,cAAc,CAQhB;AAED;;;;;;;;;;;;GAYG;AACH,wBAAgB,+BAA+B,CAC7C,gBAAgB,EAAE,UAAU,EAC5B,qBAAqB,EAAE,MAAM,GAC5B,UAAU,CAwBZ"}
|
|
@@ -1,23 +1,21 @@
|
|
|
1
1
|
// Epsilon key derivation: contract address + path -> derived EVM account.
|
|
2
2
|
//
|
|
3
3
|
// This belongs in github.com/sig-net/signet.js — kept here until upstreamed.
|
|
4
|
-
//
|
|
5
|
-
//
|
|
6
|
-
//
|
|
7
|
-
//
|
|
8
|
-
//
|
|
9
|
-
//
|
|
10
|
-
// different strings and therefore derive different accounts; this module
|
|
11
|
-
// matches the server.
|
|
4
|
+
//
|
|
5
|
+
// v2.0.0 (COLON-separated) is the only scheme the MPC answers. The v1.0.0
|
|
6
|
+
// COMMA-separated form is `key_version 0` in the MPC's KDF and is not served;
|
|
7
|
+
// the Compact contracts also assert `keyVersion >= 1`, which selects v2. The
|
|
8
|
+
// two schemes hash different strings and derive different accounts, so a
|
|
9
|
+
// v1 signer silently gets the wrong address rather than an error.
|
|
12
10
|
import { secp256k1 } from "@noble/curves/secp256k1.js";
|
|
13
11
|
import { computeAddress, keccak256, SigningKey, toUtf8Bytes } from "ethers";
|
|
14
12
|
import { SECP256K1_ORDER } from "./ecdsa-attestation.js";
|
|
15
13
|
/**
|
|
16
|
-
* Domain prefix of the sig-net
|
|
17
|
-
*
|
|
18
|
-
*
|
|
14
|
+
* Domain prefix of the sig-net v2.0.0 epsilon derivation scheme. The full
|
|
15
|
+
* derivation string is `<prefix>:<chainId>:<requester>:<path>` (colon-separated),
|
|
16
|
+
* matching `caip2_derivation_path` in the MPC's `crypto/src/kdf.rs`.
|
|
19
17
|
*/
|
|
20
|
-
export const EPSILON_DERIVATION_PREFIX = "sig.network
|
|
18
|
+
export const EPSILON_DERIVATION_PREFIX = "sig.network v2.0.0 epsilon derivation";
|
|
21
19
|
/**
|
|
22
20
|
* CAIP-2 chain id under which the MPC derives keys for requests originating
|
|
23
21
|
* from Midnight contracts.
|
|
@@ -42,8 +40,8 @@ export const MIDNIGHT_TESTNET_CHAIN_ID = "midnight:testnet";
|
|
|
42
40
|
export const MIDNIGHT_RESPOND_BIDIRECTIONAL_PATH = "midnight response key";
|
|
43
41
|
/**
|
|
44
42
|
* Derive the EVM address the MPC network signs from for a given Midnight
|
|
45
|
-
* contract and derivation path, using the sig-net
|
|
46
|
-
* `epsilon = keccak256("<prefix
|
|
43
|
+
* contract and derivation path, using the sig-net v2.0.0 epsilon scheme:
|
|
44
|
+
* `epsilon = keccak256("<prefix>:<chainId>:<contractAddress>:<path>")` and
|
|
47
45
|
* `derivedPubKey = mpcRootPubKey + epsilon * G` on secp256k1.
|
|
48
46
|
*
|
|
49
47
|
* The MPC treats `path` as an opaque string: the vault's own account uses the
|
|
@@ -64,8 +62,8 @@ export function deriveEvmAddress(mpcSecp256k1PubkeyHex, contractAddress, path, c
|
|
|
64
62
|
return computeAddress(`0x${derivedPoint.toHex(false)}`);
|
|
65
63
|
}
|
|
66
64
|
/**
|
|
67
|
-
* The epsilon scalar of the sig-net
|
|
68
|
-
* `keccak256("<prefix
|
|
65
|
+
* The epsilon scalar of the sig-net v2.0.0 derivation scheme:
|
|
66
|
+
* `keccak256("<prefix>:<chainId>:<requester>:<path>")` reduced mod the
|
|
69
67
|
* secp256k1 curve order. Child keys are `root + epsilon` (secret side) and
|
|
70
68
|
* `rootPubKey + epsilon * G` (public side).
|
|
71
69
|
*
|
|
@@ -76,7 +74,7 @@ export function deriveEvmAddress(mpcSecp256k1PubkeyHex, contractAddress, path, c
|
|
|
76
74
|
* @returns The epsilon scalar, in `[0, n)`.
|
|
77
75
|
*/
|
|
78
76
|
export function deriveEpsilon(requester, path, chainId = MIDNIGHT_TESTNET_CHAIN_ID) {
|
|
79
|
-
const fullPath = `${EPSILON_DERIVATION_PREFIX}
|
|
77
|
+
const fullPath = `${EPSILON_DERIVATION_PREFIX}:${chainId}:${requester}:${path}`;
|
|
80
78
|
// Reduce mod n before using: noble throws on scalars >= n, whereas the
|
|
81
79
|
// server's scalar arithmetic reduces implicitly.
|
|
82
80
|
return BigInt(keccak256(toUtf8Bytes(fullPath))) % SECP256K1_ORDER;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"epsilon-derivation.js","sourceRoot":"","sources":["../src/epsilon-derivation.ts"],"names":[],"mappings":"AAAA,0EAA0E;AAC1E,EAAE;AACF,6EAA6E;AAC7E
|
|
1
|
+
{"version":3,"file":"epsilon-derivation.js","sourceRoot":"","sources":["../src/epsilon-derivation.ts"],"names":[],"mappings":"AAAA,0EAA0E;AAC1E,EAAE;AACF,6EAA6E;AAC7E,EAAE;AACF,0EAA0E;AAC1E,8EAA8E;AAC9E,6EAA6E;AAC7E,yEAAyE;AACzE,kEAAkE;AAElE,OAAO,EAAE,SAAS,EAAE,MAAM,4BAA4B,CAAC;AACvD,OAAO,EAAE,cAAc,EAAE,SAAS,EAAE,UAAU,EAAE,WAAW,EAAE,MAAM,QAAQ,CAAC;AAE5E,OAAO,EAAE,eAAe,EAAuB,MAAM,wBAAwB,CAAC;AAE9E;;;;GAIG;AACH,MAAM,CAAC,MAAM,yBAAyB,GAAG,uCAAuC,CAAC;AAEjF;;;GAGG;AACH,MAAM,CAAC,MAAM,yBAAyB,GAAG,kBAAkB,CAAC;AAE5D;;;;;;;;;;;;;;;GAeG;AACH,MAAM,CAAC,MAAM,mCAAmC,GAAG,uBAAuB,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AAC,sDAAsD,CAAC,CAAC;IAC1E,CAAC;IACD,MAAM,GAAG,GAAG,IAAI,UAAU,CAAC,EAAE,CAAC,CAAC;IAC/B,IAAI,KAAK,GAAG,KAAK,CAAC;IAClB,KAAK,IAAI,CAAC,GAAG,EAAE,EAAE,CAAC,IAAI,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC;QAC7B,GAAG,CAAC,CAAC,CAAC,GAAG,MAAM,CAAC,KAAK,GAAG,KAAK,CAAC,CAAC;QAC/B,KAAK,KAAK,EAAE,CAAC;IACf,CAAC;IACD,OAAO,GAAG,CAAC;AACb,CAAC"}
|
package/dist/index.d.ts
CHANGED
|
@@ -11,19 +11,9 @@ export * from "./constants.ts";
|
|
|
11
11
|
export * from "./epsilon-derivation.ts";
|
|
12
12
|
export * from "./ecdsa-attestation.ts";
|
|
13
13
|
/**
|
|
14
|
-
* Compiled pure circuits of Signet.compact (run `yarn compile` first)
|
|
15
|
-
*
|
|
16
|
-
* the
|
|
17
|
-
* (`verifyRespondBidirectionalEvent`), the deploy-time key pin
|
|
18
|
-
* (`signetKeyHash`), the notification packer
|
|
19
|
-
* (`constructSignBidirectionalEventNotificationV1`), and the ABI word
|
|
20
|
-
* builders/reader (`evmAddressAbiWord`, `numericAbiWord`,
|
|
21
|
-
* `abiWordToUint128`). Off-chain code MUST use
|
|
22
|
-
* these instead of re-porting the algorithms — they are the same compiled
|
|
23
|
-
* logic the contracts prove. The generic request circuits cannot be compiled
|
|
24
|
-
* here (type-parameterized): request construction is contract-only, and
|
|
25
|
-
* request-id hashing has a documented-deviation TS twin
|
|
26
|
-
* (`calculateRequestId` in signet-requests.ts).
|
|
14
|
+
* Compiled pure circuits of Signet.compact (run `yarn compile` first).
|
|
15
|
+
* Off-chain code MUST use these instead of re-porting the algorithms:
|
|
16
|
+
* they are the same compiled logic the contracts prove.
|
|
27
17
|
*/
|
|
28
18
|
export { pureCircuits, type PureCircuits } from "./managed/contract/index.js";
|
|
29
19
|
//# sourceMappingURL=index.d.ts.map
|
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,sBAAsB,CAAC;AACrC,cAAc,gCAAgC,CAAC;AAC/C,cAAc,8BAA8B,CAAC;AAC7C,cAAc,sCAAsC,CAAC;AACrD,cAAc,mCAAmC,CAAC;AAClD,cAAc,sCAAsC,CAAC;AACrD,cAAc,qCAAqC,CAAC;AACpD,cAAc,8BAA8B,CAAC;AAC7C,cAAc,0BAA0B,CAAC;AACzC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,yBAAyB,CAAC;AACxC,cAAc,wBAAwB,CAAC;AAEvC
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAIA,cAAc,sBAAsB,CAAC;AACrC,cAAc,gCAAgC,CAAC;AAC/C,cAAc,8BAA8B,CAAC;AAC7C,cAAc,sCAAsC,CAAC;AACrD,cAAc,mCAAmC,CAAC;AAClD,cAAc,sCAAsC,CAAC;AACrD,cAAc,qCAAqC,CAAC;AACpD,cAAc,8BAA8B,CAAC;AAC7C,cAAc,0BAA0B,CAAC;AACzC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,yBAAyB,CAAC;AACxC,cAAc,wBAAwB,CAAC;AAEvC;;;;GAIG;AACH,OAAO,EAAE,YAAY,EAAE,KAAK,YAAY,EAAE,MAAM,6BAA6B,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -14,19 +14,9 @@ export * from "./constants.js";
|
|
|
14
14
|
export * from "./epsilon-derivation.js";
|
|
15
15
|
export * from "./ecdsa-attestation.js";
|
|
16
16
|
/**
|
|
17
|
-
* Compiled pure circuits of Signet.compact (run `yarn compile` first)
|
|
18
|
-
*
|
|
19
|
-
* the
|
|
20
|
-
* (`verifyRespondBidirectionalEvent`), the deploy-time key pin
|
|
21
|
-
* (`signetKeyHash`), the notification packer
|
|
22
|
-
* (`constructSignBidirectionalEventNotificationV1`), and the ABI word
|
|
23
|
-
* builders/reader (`evmAddressAbiWord`, `numericAbiWord`,
|
|
24
|
-
* `abiWordToUint128`). Off-chain code MUST use
|
|
25
|
-
* these instead of re-porting the algorithms — they are the same compiled
|
|
26
|
-
* logic the contracts prove. The generic request circuits cannot be compiled
|
|
27
|
-
* here (type-parameterized): request construction is contract-only, and
|
|
28
|
-
* request-id hashing has a documented-deviation TS twin
|
|
29
|
-
* (`calculateRequestId` in signet-requests.ts).
|
|
17
|
+
* Compiled pure circuits of Signet.compact (run `yarn compile` first).
|
|
18
|
+
* Off-chain code MUST use these instead of re-porting the algorithms:
|
|
19
|
+
* they are the same compiled logic the contracts prove.
|
|
30
20
|
*/
|
|
31
21
|
export { pureCircuits } from "./managed/contract/index.js";
|
|
32
22
|
//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,yEAAyE;AACzE,4EAA4E;AAC5E,2DAA2D;AAE3D,cAAc,sBAAsB,CAAC;AACrC,cAAc,gCAAgC,CAAC;AAC/C,cAAc,8BAA8B,CAAC;AAC7C,cAAc,sCAAsC,CAAC;AACrD,cAAc,mCAAmC,CAAC;AAClD,cAAc,sCAAsC,CAAC;AACrD,cAAc,qCAAqC,CAAC;AACpD,cAAc,8BAA8B,CAAC;AAC7C,cAAc,0BAA0B,CAAC;AACzC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,yBAAyB,CAAC;AACxC,cAAc,wBAAwB,CAAC;AAEvC
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,yEAAyE;AACzE,4EAA4E;AAC5E,2DAA2D;AAE3D,cAAc,sBAAsB,CAAC;AACrC,cAAc,gCAAgC,CAAC;AAC/C,cAAc,8BAA8B,CAAC;AAC7C,cAAc,sCAAsC,CAAC;AACrD,cAAc,mCAAmC,CAAC;AAClD,cAAc,sCAAsC,CAAC;AACrD,cAAc,qCAAqC,CAAC;AACpD,cAAc,8BAA8B,CAAC;AAC7C,cAAc,0BAA0B,CAAC;AACzC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,yBAAyB,CAAC;AACxC,cAAc,wBAAwB,CAAC;AAEvC;;;;GAIG;AACH,OAAO,EAAE,YAAY,EAAqB,MAAM,6BAA6B,CAAC"}
|
|
@@ -75,13 +75,6 @@
|
|
|
75
75
|
"type-name": "Bytes",
|
|
76
76
|
"length": 128
|
|
77
77
|
}
|
|
78
|
-
},
|
|
79
|
-
{
|
|
80
|
-
"name": "outputLen",
|
|
81
|
-
"type": {
|
|
82
|
-
"type-name": "Uint",
|
|
83
|
-
"maxval": 255
|
|
84
|
-
}
|
|
85
78
|
}
|
|
86
79
|
],
|
|
87
80
|
"result-type": {
|
|
@@ -126,24 +119,49 @@
|
|
|
126
119
|
}
|
|
127
120
|
},
|
|
128
121
|
{
|
|
129
|
-
"name": "
|
|
130
|
-
"type": {
|
|
131
|
-
"type-name": "Bytes",
|
|
132
|
-
"length": 32
|
|
133
|
-
}
|
|
134
|
-
},
|
|
135
|
-
{
|
|
136
|
-
"name": "s",
|
|
137
|
-
"type": {
|
|
138
|
-
"type-name": "Bytes",
|
|
139
|
-
"length": 32
|
|
140
|
-
}
|
|
141
|
-
},
|
|
142
|
-
{
|
|
143
|
-
"name": "recoveryId",
|
|
122
|
+
"name": "signature",
|
|
144
123
|
"type": {
|
|
145
|
-
"type-name": "
|
|
146
|
-
"
|
|
124
|
+
"type-name": "Struct",
|
|
125
|
+
"name": "Signature",
|
|
126
|
+
"elements": [
|
|
127
|
+
{
|
|
128
|
+
"name": "bigR",
|
|
129
|
+
"type": {
|
|
130
|
+
"type-name": "Struct",
|
|
131
|
+
"name": "AffinePoint",
|
|
132
|
+
"elements": [
|
|
133
|
+
{
|
|
134
|
+
"name": "x",
|
|
135
|
+
"type": {
|
|
136
|
+
"type-name": "Bytes",
|
|
137
|
+
"length": 32
|
|
138
|
+
}
|
|
139
|
+
},
|
|
140
|
+
{
|
|
141
|
+
"name": "y",
|
|
142
|
+
"type": {
|
|
143
|
+
"type-name": "Bytes",
|
|
144
|
+
"length": 32
|
|
145
|
+
}
|
|
146
|
+
}
|
|
147
|
+
]
|
|
148
|
+
}
|
|
149
|
+
},
|
|
150
|
+
{
|
|
151
|
+
"name": "s",
|
|
152
|
+
"type": {
|
|
153
|
+
"type-name": "Bytes",
|
|
154
|
+
"length": 32
|
|
155
|
+
}
|
|
156
|
+
},
|
|
157
|
+
{
|
|
158
|
+
"name": "recoveryId",
|
|
159
|
+
"type": {
|
|
160
|
+
"type-name": "Uint",
|
|
161
|
+
"maxval": 255
|
|
162
|
+
}
|
|
163
|
+
}
|
|
164
|
+
]
|
|
147
165
|
}
|
|
148
166
|
}
|
|
149
167
|
]
|
|
@@ -223,6 +241,23 @@
|
|
|
223
241
|
"length": 32
|
|
224
242
|
}
|
|
225
243
|
},
|
|
244
|
+
{
|
|
245
|
+
"name": "boolAbiWord",
|
|
246
|
+
"pure": true,
|
|
247
|
+
"proof": false,
|
|
248
|
+
"arguments": [
|
|
249
|
+
{
|
|
250
|
+
"name": "value",
|
|
251
|
+
"type": {
|
|
252
|
+
"type-name": "Boolean"
|
|
253
|
+
}
|
|
254
|
+
}
|
|
255
|
+
],
|
|
256
|
+
"result-type": {
|
|
257
|
+
"type-name": "Bytes",
|
|
258
|
+
"length": 32
|
|
259
|
+
}
|
|
260
|
+
},
|
|
226
261
|
{
|
|
227
262
|
"name": "abiWordToUint128",
|
|
228
263
|
"pure": true,
|
|
@@ -240,6 +275,23 @@
|
|
|
240
275
|
"type-name": "Uint",
|
|
241
276
|
"maxval": 340282366920938463463374607431768211455
|
|
242
277
|
}
|
|
278
|
+
},
|
|
279
|
+
{
|
|
280
|
+
"name": "abiWordToBool",
|
|
281
|
+
"pure": true,
|
|
282
|
+
"proof": false,
|
|
283
|
+
"arguments": [
|
|
284
|
+
{
|
|
285
|
+
"name": "word",
|
|
286
|
+
"type": {
|
|
287
|
+
"type-name": "Bytes",
|
|
288
|
+
"length": 32
|
|
289
|
+
}
|
|
290
|
+
}
|
|
291
|
+
],
|
|
292
|
+
"result-type": {
|
|
293
|
+
"type-name": "Boolean"
|
|
294
|
+
}
|
|
243
295
|
}
|
|
244
296
|
],
|
|
245
297
|
"witnesses": [
|
|
@@ -7,26 +7,26 @@
|
|
|
7
7
|
"type": "directory",
|
|
8
8
|
"contract-info.json": {
|
|
9
9
|
"type": "file",
|
|
10
|
-
"size":
|
|
11
|
-
"hash": "
|
|
10
|
+
"size": 6935,
|
|
11
|
+
"hash": "fd5062d1dd4a2e8f0a6295dd28e33631aac7829d6ae4c5f07acdc1be2c57d218"
|
|
12
12
|
}
|
|
13
13
|
},
|
|
14
14
|
"contract": {
|
|
15
15
|
"type": "directory",
|
|
16
16
|
"index.d.ts": {
|
|
17
17
|
"type": "file",
|
|
18
|
-
"size":
|
|
19
|
-
"hash": "
|
|
18
|
+
"size": 5683,
|
|
19
|
+
"hash": "b974f22abb20ac4d35a8b532dfee9becdcc17f2f7d4b4ab3eea480b584de087e"
|
|
20
20
|
},
|
|
21
21
|
"index.js": {
|
|
22
22
|
"type": "file",
|
|
23
|
-
"size":
|
|
24
|
-
"hash": "
|
|
23
|
+
"size": 43240,
|
|
24
|
+
"hash": "88f3c259fe0a38d3b6a88fc497a36c28b2908e9ac4acde7f478537c4da9e1de5"
|
|
25
25
|
},
|
|
26
26
|
"index.js.map": {
|
|
27
27
|
"type": "file",
|
|
28
|
-
"size":
|
|
29
|
-
"hash": "
|
|
28
|
+
"size": 3820,
|
|
29
|
+
"hash": "0201ceb0f1f99727aec454888c558105ef8e1f4fde7a4ae8ea87245876269303"
|
|
30
30
|
}
|
|
31
31
|
}
|
|
32
32
|
}
|
|
@@ -16,20 +16,24 @@ export type PureCircuits = {
|
|
|
16
16
|
payload: Uint8Array
|
|
17
17
|
};
|
|
18
18
|
signetAttestationDigest(requestId_0: Uint8Array,
|
|
19
|
-
serializedOutput_0: Uint8Array
|
|
20
|
-
outputLen_0: bigint): Uint8Array;
|
|
19
|
+
serializedOutput_0: Uint8Array): Uint8Array;
|
|
21
20
|
verifyRespondBidirectionalEvent(requestId_0: Uint8Array,
|
|
22
21
|
respondBidirectionalEvent_0: { serializedOutput: Uint8Array,
|
|
23
22
|
outputLen: bigint,
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
23
|
+
signature: { bigR: { x: Uint8Array,
|
|
24
|
+
y: Uint8Array
|
|
25
|
+
},
|
|
26
|
+
s: Uint8Array,
|
|
27
|
+
recoveryId: bigint
|
|
28
|
+
}
|
|
27
29
|
},
|
|
28
30
|
mpcResponseKey_0: __compactRuntime.Secp256k1Point): boolean;
|
|
29
31
|
signetKeyHash(pk_0: __compactRuntime.Secp256k1Point): Uint8Array;
|
|
30
32
|
evmAddressAbiWord(addr_0: Uint8Array): Uint8Array;
|
|
31
33
|
numericAbiWord(value_0: bigint): Uint8Array;
|
|
34
|
+
boolAbiWord(value_0: boolean): Uint8Array;
|
|
32
35
|
abiWordToUint128(word_0: Uint8Array): bigint;
|
|
36
|
+
abiWordToBool(word_0: Uint8Array): boolean;
|
|
33
37
|
}
|
|
34
38
|
|
|
35
39
|
export type Circuits<PS> = {
|
|
@@ -41,15 +45,17 @@ export type Circuits<PS> = {
|
|
|
41
45
|
}>>;
|
|
42
46
|
signetAttestationDigest(context: __compactRuntime.CircuitContext<PS>,
|
|
43
47
|
requestId_0: Uint8Array,
|
|
44
|
-
serializedOutput_0: Uint8Array,
|
|
45
|
-
outputLen_0: bigint): Promise<__compactRuntime.CircuitResults<PS, Uint8Array>>;
|
|
48
|
+
serializedOutput_0: Uint8Array): Promise<__compactRuntime.CircuitResults<PS, Uint8Array>>;
|
|
46
49
|
verifyRespondBidirectionalEvent(context: __compactRuntime.CircuitContext<PS>,
|
|
47
50
|
requestId_0: Uint8Array,
|
|
48
51
|
respondBidirectionalEvent_0: { serializedOutput: Uint8Array,
|
|
49
52
|
outputLen: bigint,
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
+
signature: { bigR: { x: Uint8Array,
|
|
54
|
+
y: Uint8Array
|
|
55
|
+
},
|
|
56
|
+
s: Uint8Array,
|
|
57
|
+
recoveryId: bigint
|
|
58
|
+
}
|
|
53
59
|
},
|
|
54
60
|
mpcResponseKey_0: __compactRuntime.Secp256k1Point): Promise<__compactRuntime.CircuitResults<PS, boolean>>;
|
|
55
61
|
signetKeyHash(context: __compactRuntime.CircuitContext<PS>,
|
|
@@ -57,8 +63,10 @@ export type Circuits<PS> = {
|
|
|
57
63
|
evmAddressAbiWord(context: __compactRuntime.CircuitContext<PS>,
|
|
58
64
|
addr_0: Uint8Array): Promise<__compactRuntime.CircuitResults<PS, Uint8Array>>;
|
|
59
65
|
numericAbiWord(context: __compactRuntime.CircuitContext<PS>, value_0: bigint): Promise<__compactRuntime.CircuitResults<PS, Uint8Array>>;
|
|
66
|
+
boolAbiWord(context: __compactRuntime.CircuitContext<PS>, value_0: boolean): Promise<__compactRuntime.CircuitResults<PS, Uint8Array>>;
|
|
60
67
|
abiWordToUint128(context: __compactRuntime.CircuitContext<PS>,
|
|
61
68
|
word_0: Uint8Array): Promise<__compactRuntime.CircuitResults<PS, bigint>>;
|
|
69
|
+
abiWordToBool(context: __compactRuntime.CircuitContext<PS>, word_0: Uint8Array): Promise<__compactRuntime.CircuitResults<PS, boolean>>;
|
|
62
70
|
}
|
|
63
71
|
|
|
64
72
|
export type Ledger = {
|