@sig-net/midnight 0.10.0 → 0.12.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 +17 -17
- package/dist/abi-serde.d.ts +89 -0
- package/dist/abi-serde.d.ts.map +1 -0
- package/dist/abi-serde.js +393 -0
- package/dist/abi-serde.js.map +1 -0
- package/dist/constants.d.ts +23 -14
- package/dist/constants.d.ts.map +1 -1
- package/dist/constants.js +28 -20
- package/dist/constants.js.map +1 -1
- package/dist/ecdsa-attestation.d.ts +81 -9
- package/dist/ecdsa-attestation.d.ts.map +1 -1
- package/dist/ecdsa-attestation.js +137 -18
- 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 +16 -18
- package/dist/epsilon-derivation.js.map +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -0
- package/dist/index.js.map +1 -1
- package/dist/managed/compiler/contract-info.json +180 -104
- package/dist/managed/compiler/contract-manifest.json +8 -8
- package/dist/managed/contract/index.d.ts +38 -24
- package/dist/managed/contract/index.js +363 -154
- package/dist/managed/contract/index.js.map +1 -1
- package/dist/signature-requests-state-reader.d.ts +15 -15
- package/dist/signature-requests-state-reader.d.ts.map +1 -1
- package/dist/signature-requests-state-reader.js +51 -34
- package/dist/signature-requests-state-reader.js.map +1 -1
- package/dist/signature-response-verification.d.ts +2 -2
- package/dist/signature-response-verification.js +8 -8
- package/dist/signature-response-verification.js.map +1 -1
- package/dist/signet-contract-state-reader.d.ts +74 -58
- package/dist/signet-contract-state-reader.d.ts.map +1 -1
- package/dist/signet-contract-state-reader.js +76 -58
- package/dist/signet-contract-state-reader.js.map +1 -1
- package/dist/signet-evtype2tx-requests.d.ts +62 -59
- package/dist/signet-evtype2tx-requests.d.ts.map +1 -1
- package/dist/signet-evtype2tx-requests.js +58 -90
- package/dist/signet-evtype2tx-requests.js.map +1 -1
- package/dist/signet-request-response-reader.d.ts +26 -26
- package/dist/signet-request-response-reader.d.ts.map +1 -1
- package/dist/signet-request-response-reader.js +37 -37
- package/dist/signet-request-response-reader.js.map +1 -1
- package/dist/signet-requests.d.ts +30 -30
- package/dist/signet-requests.d.ts.map +1 -1
- package/dist/signet-requests.js +29 -30
- package/dist/signet-requests.js.map +1 -1
- package/package.json +3 -2
- package/src/Signet.compact +137 -88
- package/src/circuits.compact +45 -2
|
@@ -1,23 +1,21 @@
|
|
|
1
1
|
// Epsilon key derivation: contract address + path -> derived EVM account.
|
|
2
2
|
//
|
|
3
|
-
// This belongs in github.com/sig-net/signet.js
|
|
4
|
-
//
|
|
5
|
-
//
|
|
6
|
-
//
|
|
7
|
-
//
|
|
8
|
-
//
|
|
9
|
-
//
|
|
10
|
-
// different strings and therefore derive different accounts; this module
|
|
11
|
-
// matches the server.
|
|
3
|
+
// This belongs in github.com/sig-net/signet.js, kept here until upstreamed.
|
|
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,
|
|
1
|
+
{"version":3,"file":"epsilon-derivation.js","sourceRoot":"","sources":["../src/epsilon-derivation.ts"],"names":[],"mappings":"AAAA,0EAA0E;AAC1E,EAAE;AACF,4EAA4E;AAC5E,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,CAAC;AAE3E;;;;;;;;;;;;;;;;;;GAkBG;AACH,MAAM,UAAU,gBAAgB,CAC9B,qBAA6B,EAC7B,eAAuB,EACvB,IAAY,EACZ,UAAkB,yBAAyB;IAE3C,MAAM,Y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K,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
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;;;;GAIG;AACH,OAAO,EAAE,YAAY,EAAE,KAAK,YAAY,EAAE,MAAM,6BAA6B,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAIA,cAAc,gBAAgB,CAAC;AAC/B,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
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
// Midnight-side sig-net integration: the client-agnostic signet protocol
|
|
2
2
|
// library (wire structs, state readers, request feed/resolver, crypto) plus
|
|
3
3
|
// the compiled pure circuits of the shared Compact module.
|
|
4
|
+
export * from "./abi-serde.js";
|
|
4
5
|
export * from "./signet-requests.js";
|
|
5
6
|
export * from "./signet-evtype2tx-requests.js";
|
|
6
7
|
export * from "./signature-state-reading.js";
|
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;;;;GAIG;AACH,OAAO,EAAE,YAAY,EAAqB,MAAM,6BAA6B,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,yEAAyE;AACzE,4EAA4E;AAC5E,2DAA2D;AAE3D,cAAc,gBAAgB,CAAC;AAC/B,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"}
|
|
@@ -54,33 +54,55 @@
|
|
|
54
54
|
}
|
|
55
55
|
},
|
|
56
56
|
{
|
|
57
|
-
"name": "
|
|
57
|
+
"name": "signetKeyHash",
|
|
58
58
|
"pure": true,
|
|
59
59
|
"proof": false,
|
|
60
60
|
"arguments": [
|
|
61
61
|
{
|
|
62
|
-
"name": "
|
|
62
|
+
"name": "pk",
|
|
63
63
|
"type": {
|
|
64
64
|
"type-name": "Alias",
|
|
65
|
-
"name": "
|
|
65
|
+
"name": "Secp256k1Point",
|
|
66
66
|
"type": {
|
|
67
|
-
"type-name": "
|
|
68
|
-
"
|
|
67
|
+
"type-name": "Opaque",
|
|
68
|
+
"tsType": "Secp256k1Point"
|
|
69
69
|
}
|
|
70
70
|
}
|
|
71
|
-
}
|
|
71
|
+
}
|
|
72
|
+
],
|
|
73
|
+
"result-type": {
|
|
74
|
+
"type-name": "Bytes",
|
|
75
|
+
"length": 32
|
|
76
|
+
}
|
|
77
|
+
},
|
|
78
|
+
{
|
|
79
|
+
"name": "evmAddressAbiWord",
|
|
80
|
+
"pure": true,
|
|
81
|
+
"proof": false,
|
|
82
|
+
"arguments": [
|
|
72
83
|
{
|
|
73
|
-
"name": "
|
|
84
|
+
"name": "addr",
|
|
74
85
|
"type": {
|
|
75
86
|
"type-name": "Bytes",
|
|
76
|
-
"length":
|
|
87
|
+
"length": 20
|
|
77
88
|
}
|
|
78
|
-
}
|
|
89
|
+
}
|
|
90
|
+
],
|
|
91
|
+
"result-type": {
|
|
92
|
+
"type-name": "Bytes",
|
|
93
|
+
"length": 32
|
|
94
|
+
}
|
|
95
|
+
},
|
|
96
|
+
{
|
|
97
|
+
"name": "numericAbiWord",
|
|
98
|
+
"pure": true,
|
|
99
|
+
"proof": false,
|
|
100
|
+
"arguments": [
|
|
79
101
|
{
|
|
80
|
-
"name": "
|
|
102
|
+
"name": "value",
|
|
81
103
|
"type": {
|
|
82
104
|
"type-name": "Uint",
|
|
83
|
-
"maxval":
|
|
105
|
+
"maxval": 340282366920938463463374607431768211455
|
|
84
106
|
}
|
|
85
107
|
}
|
|
86
108
|
],
|
|
@@ -90,131 +112,78 @@
|
|
|
90
112
|
}
|
|
91
113
|
},
|
|
92
114
|
{
|
|
93
|
-
"name": "
|
|
115
|
+
"name": "boolAbiWord",
|
|
94
116
|
"pure": true,
|
|
95
117
|
"proof": false,
|
|
96
118
|
"arguments": [
|
|
97
119
|
{
|
|
98
|
-
"name": "
|
|
99
|
-
"type": {
|
|
100
|
-
"type-name": "Alias",
|
|
101
|
-
"name": "RequestId",
|
|
102
|
-
"type": {
|
|
103
|
-
"type-name": "Bytes",
|
|
104
|
-
"length": 32
|
|
105
|
-
}
|
|
106
|
-
}
|
|
107
|
-
},
|
|
108
|
-
{
|
|
109
|
-
"name": "respondBidirectionalEvent",
|
|
110
|
-
"type": {
|
|
111
|
-
"type-name": "Struct",
|
|
112
|
-
"name": "RespondBidirectionalEvent",
|
|
113
|
-
"elements": [
|
|
114
|
-
{
|
|
115
|
-
"name": "serializedOutput",
|
|
116
|
-
"type": {
|
|
117
|
-
"type-name": "Bytes",
|
|
118
|
-
"length": 128
|
|
119
|
-
}
|
|
120
|
-
},
|
|
121
|
-
{
|
|
122
|
-
"name": "outputLen",
|
|
123
|
-
"type": {
|
|
124
|
-
"type-name": "Uint",
|
|
125
|
-
"maxval": 255
|
|
126
|
-
}
|
|
127
|
-
},
|
|
128
|
-
{
|
|
129
|
-
"name": "r",
|
|
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",
|
|
144
|
-
"type": {
|
|
145
|
-
"type-name": "Uint",
|
|
146
|
-
"maxval": 255
|
|
147
|
-
}
|
|
148
|
-
}
|
|
149
|
-
]
|
|
150
|
-
}
|
|
151
|
-
},
|
|
152
|
-
{
|
|
153
|
-
"name": "mpcResponseKey",
|
|
120
|
+
"name": "value",
|
|
154
121
|
"type": {
|
|
155
|
-
"type-name": "
|
|
156
|
-
"name": "Secp256k1Point",
|
|
157
|
-
"type": {
|
|
158
|
-
"type-name": "Opaque",
|
|
159
|
-
"tsType": "Secp256k1Point"
|
|
160
|
-
}
|
|
122
|
+
"type-name": "Boolean"
|
|
161
123
|
}
|
|
162
124
|
}
|
|
163
125
|
],
|
|
164
126
|
"result-type": {
|
|
165
|
-
"type-name": "
|
|
127
|
+
"type-name": "Bytes",
|
|
128
|
+
"length": 32
|
|
166
129
|
}
|
|
167
130
|
},
|
|
168
131
|
{
|
|
169
|
-
"name": "
|
|
132
|
+
"name": "abiWordToUint128",
|
|
170
133
|
"pure": true,
|
|
171
134
|
"proof": false,
|
|
172
135
|
"arguments": [
|
|
173
136
|
{
|
|
174
|
-
"name": "
|
|
137
|
+
"name": "word",
|
|
175
138
|
"type": {
|
|
176
|
-
"type-name": "
|
|
177
|
-
"
|
|
178
|
-
"type": {
|
|
179
|
-
"type-name": "Opaque",
|
|
180
|
-
"tsType": "Secp256k1Point"
|
|
181
|
-
}
|
|
139
|
+
"type-name": "Bytes",
|
|
140
|
+
"length": 32
|
|
182
141
|
}
|
|
183
142
|
}
|
|
184
143
|
],
|
|
185
144
|
"result-type": {
|
|
186
|
-
"type-name": "
|
|
187
|
-
"
|
|
145
|
+
"type-name": "Uint",
|
|
146
|
+
"maxval": 340282366920938463463374607431768211455
|
|
188
147
|
}
|
|
189
148
|
},
|
|
190
149
|
{
|
|
191
|
-
"name": "
|
|
150
|
+
"name": "abiWordToBool",
|
|
192
151
|
"pure": true,
|
|
193
152
|
"proof": false,
|
|
194
153
|
"arguments": [
|
|
195
154
|
{
|
|
196
|
-
"name": "
|
|
155
|
+
"name": "word",
|
|
197
156
|
"type": {
|
|
198
157
|
"type-name": "Bytes",
|
|
199
|
-
"length":
|
|
158
|
+
"length": 32
|
|
200
159
|
}
|
|
201
160
|
}
|
|
202
161
|
],
|
|
203
162
|
"result-type": {
|
|
204
|
-
"type-name": "
|
|
205
|
-
"length": 32
|
|
163
|
+
"type-name": "Boolean"
|
|
206
164
|
}
|
|
207
165
|
},
|
|
208
166
|
{
|
|
209
|
-
"name": "
|
|
167
|
+
"name": "calculateSignetAttestationDigest1",
|
|
210
168
|
"pure": true,
|
|
211
169
|
"proof": false,
|
|
212
170
|
"arguments": [
|
|
213
171
|
{
|
|
214
|
-
"name": "
|
|
172
|
+
"name": "requestId",
|
|
215
173
|
"type": {
|
|
216
|
-
"type-name": "
|
|
217
|
-
"
|
|
174
|
+
"type-name": "Alias",
|
|
175
|
+
"name": "RequestId",
|
|
176
|
+
"type": {
|
|
177
|
+
"type-name": "Bytes",
|
|
178
|
+
"length": 32
|
|
179
|
+
}
|
|
180
|
+
}
|
|
181
|
+
},
|
|
182
|
+
{
|
|
183
|
+
"name": "serializedOutput",
|
|
184
|
+
"type": {
|
|
185
|
+
"type-name": "Bytes",
|
|
186
|
+
"length": 1
|
|
218
187
|
}
|
|
219
188
|
}
|
|
220
189
|
],
|
|
@@ -224,14 +193,26 @@
|
|
|
224
193
|
}
|
|
225
194
|
},
|
|
226
195
|
{
|
|
227
|
-
"name": "
|
|
196
|
+
"name": "calculateSignetAttestationDigest32",
|
|
228
197
|
"pure": true,
|
|
229
198
|
"proof": false,
|
|
230
199
|
"arguments": [
|
|
231
200
|
{
|
|
232
|
-
"name": "
|
|
201
|
+
"name": "requestId",
|
|
233
202
|
"type": {
|
|
234
|
-
"type-name": "
|
|
203
|
+
"type-name": "Alias",
|
|
204
|
+
"name": "RequestId",
|
|
205
|
+
"type": {
|
|
206
|
+
"type-name": "Bytes",
|
|
207
|
+
"length": 32
|
|
208
|
+
}
|
|
209
|
+
}
|
|
210
|
+
},
|
|
211
|
+
{
|
|
212
|
+
"name": "serializedOutput",
|
|
213
|
+
"type": {
|
|
214
|
+
"type-name": "Bytes",
|
|
215
|
+
"length": 32
|
|
235
216
|
}
|
|
236
217
|
}
|
|
237
218
|
],
|
|
@@ -241,34 +222,129 @@
|
|
|
241
222
|
}
|
|
242
223
|
},
|
|
243
224
|
{
|
|
244
|
-
"name": "
|
|
225
|
+
"name": "calculateSignetAttestationDigest100",
|
|
245
226
|
"pure": true,
|
|
246
227
|
"proof": false,
|
|
247
228
|
"arguments": [
|
|
248
229
|
{
|
|
249
|
-
"name": "
|
|
230
|
+
"name": "requestId",
|
|
231
|
+
"type": {
|
|
232
|
+
"type-name": "Alias",
|
|
233
|
+
"name": "RequestId",
|
|
234
|
+
"type": {
|
|
235
|
+
"type-name": "Bytes",
|
|
236
|
+
"length": 32
|
|
237
|
+
}
|
|
238
|
+
}
|
|
239
|
+
},
|
|
240
|
+
{
|
|
241
|
+
"name": "serializedOutput",
|
|
250
242
|
"type": {
|
|
251
243
|
"type-name": "Bytes",
|
|
252
|
-
"length":
|
|
244
|
+
"length": 100
|
|
253
245
|
}
|
|
254
246
|
}
|
|
255
247
|
],
|
|
256
248
|
"result-type": {
|
|
257
|
-
"type-name": "
|
|
258
|
-
"
|
|
249
|
+
"type-name": "Bytes",
|
|
250
|
+
"length": 32
|
|
259
251
|
}
|
|
260
252
|
},
|
|
261
253
|
{
|
|
262
|
-
"name": "
|
|
254
|
+
"name": "verifyRespondBidirectionalEvent32",
|
|
263
255
|
"pure": true,
|
|
264
256
|
"proof": false,
|
|
265
257
|
"arguments": [
|
|
266
258
|
{
|
|
267
|
-
"name": "
|
|
259
|
+
"name": "requestId",
|
|
260
|
+
"type": {
|
|
261
|
+
"type-name": "Alias",
|
|
262
|
+
"name": "RequestId",
|
|
263
|
+
"type": {
|
|
264
|
+
"type-name": "Bytes",
|
|
265
|
+
"length": 32
|
|
266
|
+
}
|
|
267
|
+
}
|
|
268
|
+
},
|
|
269
|
+
{
|
|
270
|
+
"name": "serializedOutput",
|
|
268
271
|
"type": {
|
|
269
272
|
"type-name": "Bytes",
|
|
270
273
|
"length": 32
|
|
271
274
|
}
|
|
275
|
+
},
|
|
276
|
+
{
|
|
277
|
+
"name": "respondBidirectionalEvent",
|
|
278
|
+
"type": {
|
|
279
|
+
"type-name": "Struct",
|
|
280
|
+
"name": "RespondBidirectionalEvent",
|
|
281
|
+
"elements": [
|
|
282
|
+
{
|
|
283
|
+
"name": "attestationDigest",
|
|
284
|
+
"type": {
|
|
285
|
+
"type-name": "Bytes",
|
|
286
|
+
"length": 32
|
|
287
|
+
}
|
|
288
|
+
},
|
|
289
|
+
{
|
|
290
|
+
"name": "signature",
|
|
291
|
+
"type": {
|
|
292
|
+
"type-name": "Struct",
|
|
293
|
+
"name": "Signature",
|
|
294
|
+
"elements": [
|
|
295
|
+
{
|
|
296
|
+
"name": "bigR",
|
|
297
|
+
"type": {
|
|
298
|
+
"type-name": "Struct",
|
|
299
|
+
"name": "AffinePoint",
|
|
300
|
+
"elements": [
|
|
301
|
+
{
|
|
302
|
+
"name": "x",
|
|
303
|
+
"type": {
|
|
304
|
+
"type-name": "Bytes",
|
|
305
|
+
"length": 32
|
|
306
|
+
}
|
|
307
|
+
},
|
|
308
|
+
{
|
|
309
|
+
"name": "y",
|
|
310
|
+
"type": {
|
|
311
|
+
"type-name": "Bytes",
|
|
312
|
+
"length": 32
|
|
313
|
+
}
|
|
314
|
+
}
|
|
315
|
+
]
|
|
316
|
+
}
|
|
317
|
+
},
|
|
318
|
+
{
|
|
319
|
+
"name": "s",
|
|
320
|
+
"type": {
|
|
321
|
+
"type-name": "Bytes",
|
|
322
|
+
"length": 32
|
|
323
|
+
}
|
|
324
|
+
},
|
|
325
|
+
{
|
|
326
|
+
"name": "recoveryId",
|
|
327
|
+
"type": {
|
|
328
|
+
"type-name": "Uint",
|
|
329
|
+
"maxval": 255
|
|
330
|
+
}
|
|
331
|
+
}
|
|
332
|
+
]
|
|
333
|
+
}
|
|
334
|
+
}
|
|
335
|
+
]
|
|
336
|
+
}
|
|
337
|
+
},
|
|
338
|
+
{
|
|
339
|
+
"name": "mpcResponseKey",
|
|
340
|
+
"type": {
|
|
341
|
+
"type-name": "Alias",
|
|
342
|
+
"name": "Secp256k1Point",
|
|
343
|
+
"type": {
|
|
344
|
+
"type-name": "Opaque",
|
|
345
|
+
"tsType": "Secp256k1Point"
|
|
346
|
+
}
|
|
347
|
+
}
|
|
272
348
|
}
|
|
273
349
|
],
|
|
274
350
|
"result-type": {
|
|
@@ -7,26 +7,26 @@
|
|
|
7
7
|
"type": "directory",
|
|
8
8
|
"contract-info.json": {
|
|
9
9
|
"type": "file",
|
|
10
|
-
"size":
|
|
11
|
-
"hash": "
|
|
10
|
+
"size": 8148,
|
|
11
|
+
"hash": "715bcde3bb79588f8a61c282f9ca5ad16a13e357222e01679205ba9f669cad52"
|
|
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": 6584,
|
|
19
|
+
"hash": "c5acb7266f73191c6e488fc8452f7b47c8250692665f3ca3cc65aa762a3464ca"
|
|
20
20
|
},
|
|
21
21
|
"index.js": {
|
|
22
22
|
"type": "file",
|
|
23
|
-
"size":
|
|
24
|
-
"hash": "
|
|
23
|
+
"size": 49879,
|
|
24
|
+
"hash": "aafe79ad986e0eaef36ff12177899256eb447007f9d431dcab0a37c03bdc722a"
|
|
25
25
|
},
|
|
26
26
|
"index.js.map": {
|
|
27
27
|
"type": "file",
|
|
28
|
-
"size":
|
|
29
|
-
"hash": "
|
|
28
|
+
"size": 4740,
|
|
29
|
+
"hash": "efbfa3604e2fab40308e84e9d174e4cd7f47dcc88684338af779ef54eb749847"
|
|
30
30
|
}
|
|
31
31
|
}
|
|
32
32
|
}
|
|
@@ -15,23 +15,29 @@ export type PureCircuits = {
|
|
|
15
15
|
requestsIndexField_0: bigint): { version: bigint,
|
|
16
16
|
payload: Uint8Array
|
|
17
17
|
};
|
|
18
|
-
signetAttestationDigest(requestId_0: Uint8Array,
|
|
19
|
-
serializedOutput_0: Uint8Array,
|
|
20
|
-
outputLen_0: bigint): Uint8Array;
|
|
21
|
-
verifyRespondBidirectionalEvent(requestId_0: Uint8Array,
|
|
22
|
-
respondBidirectionalEvent_0: { serializedOutput: Uint8Array,
|
|
23
|
-
outputLen: bigint,
|
|
24
|
-
r: Uint8Array,
|
|
25
|
-
s: Uint8Array,
|
|
26
|
-
recoveryId: bigint
|
|
27
|
-
},
|
|
28
|
-
mpcResponseKey_0: __compactRuntime.Secp256k1Point): boolean;
|
|
29
18
|
signetKeyHash(pk_0: __compactRuntime.Secp256k1Point): Uint8Array;
|
|
30
19
|
evmAddressAbiWord(addr_0: Uint8Array): Uint8Array;
|
|
31
20
|
numericAbiWord(value_0: bigint): Uint8Array;
|
|
32
21
|
boolAbiWord(value_0: boolean): Uint8Array;
|
|
33
22
|
abiWordToUint128(word_0: Uint8Array): bigint;
|
|
34
23
|
abiWordToBool(word_0: Uint8Array): boolean;
|
|
24
|
+
calculateSignetAttestationDigest1(requestId_0: Uint8Array,
|
|
25
|
+
serializedOutput_0: Uint8Array): Uint8Array;
|
|
26
|
+
calculateSignetAttestationDigest32(requestId_0: Uint8Array,
|
|
27
|
+
serializedOutput_0: Uint8Array): Uint8Array;
|
|
28
|
+
calculateSignetAttestationDigest100(requestId_0: Uint8Array,
|
|
29
|
+
serializedOutput_0: Uint8Array): Uint8Array;
|
|
30
|
+
verifyRespondBidirectionalEvent32(requestId_0: Uint8Array,
|
|
31
|
+
serializedOutput_0: Uint8Array,
|
|
32
|
+
respondBidirectionalEvent_0: { attestationDigest: Uint8Array,
|
|
33
|
+
signature: { bigR: { x: Uint8Array,
|
|
34
|
+
y: Uint8Array
|
|
35
|
+
},
|
|
36
|
+
s: Uint8Array,
|
|
37
|
+
recoveryId: bigint
|
|
38
|
+
}
|
|
39
|
+
},
|
|
40
|
+
mpcResponseKey_0: __compactRuntime.Secp256k1Point): boolean;
|
|
35
41
|
}
|
|
36
42
|
|
|
37
43
|
export type Circuits<PS> = {
|
|
@@ -41,19 +47,6 @@ export type Circuits<PS> = {
|
|
|
41
47
|
requestsIndexField_0: bigint): Promise<__compactRuntime.CircuitResults<PS, { version: bigint,
|
|
42
48
|
payload: Uint8Array
|
|
43
49
|
}>>;
|
|
44
|
-
signetAttestationDigest(context: __compactRuntime.CircuitContext<PS>,
|
|
45
|
-
requestId_0: Uint8Array,
|
|
46
|
-
serializedOutput_0: Uint8Array,
|
|
47
|
-
outputLen_0: bigint): Promise<__compactRuntime.CircuitResults<PS, Uint8Array>>;
|
|
48
|
-
verifyRespondBidirectionalEvent(context: __compactRuntime.CircuitContext<PS>,
|
|
49
|
-
requestId_0: Uint8Array,
|
|
50
|
-
respondBidirectionalEvent_0: { serializedOutput: Uint8Array,
|
|
51
|
-
outputLen: bigint,
|
|
52
|
-
r: Uint8Array,
|
|
53
|
-
s: Uint8Array,
|
|
54
|
-
recoveryId: bigint
|
|
55
|
-
},
|
|
56
|
-
mpcResponseKey_0: __compactRuntime.Secp256k1Point): Promise<__compactRuntime.CircuitResults<PS, boolean>>;
|
|
57
50
|
signetKeyHash(context: __compactRuntime.CircuitContext<PS>,
|
|
58
51
|
pk_0: __compactRuntime.Secp256k1Point): Promise<__compactRuntime.CircuitResults<PS, Uint8Array>>;
|
|
59
52
|
evmAddressAbiWord(context: __compactRuntime.CircuitContext<PS>,
|
|
@@ -63,6 +56,27 @@ export type Circuits<PS> = {
|
|
|
63
56
|
abiWordToUint128(context: __compactRuntime.CircuitContext<PS>,
|
|
64
57
|
word_0: Uint8Array): Promise<__compactRuntime.CircuitResults<PS, bigint>>;
|
|
65
58
|
abiWordToBool(context: __compactRuntime.CircuitContext<PS>, word_0: Uint8Array): Promise<__compactRuntime.CircuitResults<PS, boolean>>;
|
|
59
|
+
calculateSignetAttestationDigest1(context: __compactRuntime.CircuitContext<PS>,
|
|
60
|
+
requestId_0: Uint8Array,
|
|
61
|
+
serializedOutput_0: Uint8Array): Promise<__compactRuntime.CircuitResults<PS, Uint8Array>>;
|
|
62
|
+
calculateSignetAttestationDigest32(context: __compactRuntime.CircuitContext<PS>,
|
|
63
|
+
requestId_0: Uint8Array,
|
|
64
|
+
serializedOutput_0: Uint8Array): Promise<__compactRuntime.CircuitResults<PS, Uint8Array>>;
|
|
65
|
+
calculateSignetAttestationDigest100(context: __compactRuntime.CircuitContext<PS>,
|
|
66
|
+
requestId_0: Uint8Array,
|
|
67
|
+
serializedOutput_0: Uint8Array): Promise<__compactRuntime.CircuitResults<PS, Uint8Array>>;
|
|
68
|
+
verifyRespondBidirectionalEvent32(context: __compactRuntime.CircuitContext<PS>,
|
|
69
|
+
requestId_0: Uint8Array,
|
|
70
|
+
serializedOutput_0: Uint8Array,
|
|
71
|
+
respondBidirectionalEvent_0: { attestationDigest: Uint8Array,
|
|
72
|
+
signature: { bigR: { x: Uint8Array,
|
|
73
|
+
y: Uint8Array
|
|
74
|
+
},
|
|
75
|
+
s: Uint8Array,
|
|
76
|
+
recoveryId: bigint
|
|
77
|
+
}
|
|
78
|
+
},
|
|
79
|
+
mpcResponseKey_0: __compactRuntime.Secp256k1Point): Promise<__compactRuntime.CircuitResults<PS, boolean>>;
|
|
66
80
|
}
|
|
67
81
|
|
|
68
82
|
export type Ledger = {
|