@sig-net/midnight-contract 0.0.1
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/dist/contract-surface.d.ts +20 -0
- package/dist/contract-surface.d.ts.map +1 -0
- package/dist/contract-surface.js +17 -0
- package/dist/contract-surface.js.map +1 -0
- package/dist/index.d.ts +4 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +9 -0
- package/dist/index.js.map +1 -0
- package/dist/managed/compiler/contract-info.json +335 -0
- package/dist/managed/compiler/contract-manifest.json +98 -0
- package/dist/managed/contract/index.d.ts +129 -0
- package/dist/managed/contract/index.js +1188 -0
- package/dist/managed/contract/index.js.map +8 -0
- package/dist/managed/keys/emitSignBidirectionalEvent.verifier +0 -0
- package/dist/managed/keys/postRespondBidirectional.verifier +0 -0
- package/dist/managed/keys/postSignatureResponse.verifier +0 -0
- package/dist/managed/zkir/emitSignBidirectionalEvent.bzkir +0 -0
- package/dist/managed/zkir/emitSignBidirectionalEvent.zkir +965 -0
- package/dist/managed/zkir/postRespondBidirectional.bzkir +0 -0
- package/dist/managed/zkir/postRespondBidirectional.zkir +666 -0
- package/dist/managed/zkir/postSignatureResponse.bzkir +0 -0
- package/dist/managed/zkir/postSignatureResponse.zkir +383 -0
- package/dist/witnesses.d.ts +15 -0
- package/dist/witnesses.d.ts.map +1 -0
- package/dist/witnesses.js +15 -0
- package/dist/witnesses.js.map +1 -0
- package/package.json +49 -0
- package/src/contract-surface.ts +40 -0
- package/src/index.ts +9 -0
- package/src/signet-contract.compact +135 -0
- package/src/witnesses.ts +22 -0
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import type { MidnightProviders } from "@midnight-ntwrk/midnight-js/types";
|
|
2
|
+
import { Contract } from "./managed/contract/index.js";
|
|
3
|
+
import { type SignetContractPrivateState } from "./witnesses.ts";
|
|
4
|
+
/** The contract's provable circuit ids, straight from the generated contract. */
|
|
5
|
+
export type SignetContractCircuitId = keyof InstanceType<typeof Contract>["provableCircuits"] & string;
|
|
6
|
+
/**
|
|
7
|
+
* Literal of the private-state storage key. Just a string, but a single-value
|
|
8
|
+
* union so the providers/`findDeployedContract` pairing is enforced by the
|
|
9
|
+
* type system.
|
|
10
|
+
*/
|
|
11
|
+
export type SignetContractPrivateStateId = "signet-contract";
|
|
12
|
+
/**
|
|
13
|
+
* Key under which midnight-js persists this contract's private state locally
|
|
14
|
+
* (in whatever private-state store the consumer's provider set uses).
|
|
15
|
+
* Distinct per contract so two clients don't share an entry.
|
|
16
|
+
*/
|
|
17
|
+
export declare const SIGNET_CONTRACT_PRIVATE_STATE_ID: SignetContractPrivateStateId;
|
|
18
|
+
/** The full midnight-js provider set, typed to the signet contract. */
|
|
19
|
+
export type SignetContractProviders = MidnightProviders<SignetContractCircuitId, SignetContractPrivateStateId, SignetContractPrivateState>;
|
|
20
|
+
//# sourceMappingURL=contract-surface.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"contract-surface.d.ts","sourceRoot":"","sources":["../src/contract-surface.ts"],"names":[],"mappings":"AASA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,mCAAmC,CAAC;AAE3E,OAAO,EAAE,QAAQ,EAAE,MAAM,6BAA6B,CAAC;AACvD,OAAO,EAAE,KAAK,0BAA0B,EAAE,MAAM,gBAAgB,CAAC;AAEjE,iFAAiF;AACjF,MAAM,MAAM,uBAAuB,GAAG,MAAM,YAAY,CAAC,OAAO,QAAQ,CAAC,CAAC,kBAAkB,CAAC,GAAG,MAAM,CAAC;AAEvG;;;;GAIG;AACH,MAAM,MAAM,4BAA4B,GAAG,iBAAiB,CAAC;AAE7D;;;;GAIG;AACH,eAAO,MAAM,gCAAgC,EAAE,4BAAgD,CAAC;AAEhG,uEAAuE;AACvE,MAAM,MAAM,uBAAuB,GAAG,iBAAiB,CAErD,uBAAuB,EAEvB,4BAA4B,EAE5B,0BAA0B,CAC3B,CAAC"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
// The contract's platform-agnostic client surface: the circuit-id union, the
|
|
2
|
+
// private-state store key, and the provider-set TYPE. Deliberately nothing
|
|
3
|
+
// runnable — no wallet flavor, no zk-config source, no state store, no proof
|
|
4
|
+
// provider. Composing a live midnight-js provider set is CONSUMER territory
|
|
5
|
+
// (it differs per environment: Node fs vs browser fetch, LevelDB vs
|
|
6
|
+
// IndexedDB, WalletFacade vs a connector API), so each consumer declares its
|
|
7
|
+
// own — see this monorepo's signet-contract-deploy package for the Node
|
|
8
|
+
// operator composition, and the fakenet response server for a consumer's.
|
|
9
|
+
import { Contract } from "./managed/contract/index.js";
|
|
10
|
+
import {} from "./witnesses.js";
|
|
11
|
+
/**
|
|
12
|
+
* Key under which midnight-js persists this contract's private state locally
|
|
13
|
+
* (in whatever private-state store the consumer's provider set uses).
|
|
14
|
+
* Distinct per contract so two clients don't share an entry.
|
|
15
|
+
*/
|
|
16
|
+
export const SIGNET_CONTRACT_PRIVATE_STATE_ID = "signet-contract";
|
|
17
|
+
//# sourceMappingURL=contract-surface.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"contract-surface.js","sourceRoot":"","sources":["../src/contract-surface.ts"],"names":[],"mappings":"AAAA,6EAA6E;AAC7E,2EAA2E;AAC3E,6EAA6E;AAC7E,4EAA4E;AAC5E,oEAAoE;AACpE,6EAA6E;AAC7E,wEAAwE;AACxE,0EAA0E;AAI1E,OAAO,EAAE,QAAQ,EAAE,MAAM,6BAA6B,CAAC;AACvD,OAAO,EAAmC,MAAM,gBAAgB,CAAC;AAYjE;;;;GAIG;AACH,MAAM,CAAC,MAAM,gCAAgC,GAAiC,iBAAiB,CAAC"}
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAMA,cAAc,6BAA6B,CAAC;AAC5C,cAAc,gBAAgB,CAAC;AAC/B,cAAc,uBAAuB,CAAC"}
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
// Curated export surface — this IS the "sdk" face of the package.
|
|
2
|
+
// Everything the compiler emitted, the handwritten witnesses, and the
|
|
3
|
+
// platform-agnostic contract surface (ids + provider TYPE). Environment
|
|
4
|
+
// bindings (zk-config source, state store, wallet adapter) deliberately
|
|
5
|
+
// live with each consumer, not here.
|
|
6
|
+
export * from "./managed/contract/index.js";
|
|
7
|
+
export * from "./witnesses.js";
|
|
8
|
+
export * from "./contract-surface.js";
|
|
9
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,kEAAkE;AAClE,sEAAsE;AACtE,wEAAwE;AACxE,wEAAwE;AACxE,qCAAqC;AAErC,cAAc,6BAA6B,CAAC;AAC5C,cAAc,gBAAgB,CAAC;AAC/B,cAAc,uBAAuB,CAAC"}
|
|
@@ -0,0 +1,335 @@
|
|
|
1
|
+
{
|
|
2
|
+
"compiler-version": "0.33.0",
|
|
3
|
+
"language-version": "0.25.0",
|
|
4
|
+
"runtime-version": "0.18.0-rc.0",
|
|
5
|
+
"circuits": [
|
|
6
|
+
{
|
|
7
|
+
"name": "emitSignBidirectionalEvent",
|
|
8
|
+
"pure": false,
|
|
9
|
+
"proof": true,
|
|
10
|
+
"arguments": [
|
|
11
|
+
{
|
|
12
|
+
"name": "signBidirectionalEvent",
|
|
13
|
+
"type": {
|
|
14
|
+
"type-name": "Struct",
|
|
15
|
+
"name": "SignBidirectionalEvent",
|
|
16
|
+
"elements": [
|
|
17
|
+
{
|
|
18
|
+
"name": "version",
|
|
19
|
+
"type": {
|
|
20
|
+
"type-name": "Uint",
|
|
21
|
+
"maxval": 255
|
|
22
|
+
}
|
|
23
|
+
},
|
|
24
|
+
{
|
|
25
|
+
"name": "payload",
|
|
26
|
+
"type": {
|
|
27
|
+
"type-name": "Bytes",
|
|
28
|
+
"length": 224
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
]
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
],
|
|
35
|
+
"result-type": {
|
|
36
|
+
"type-name": "Tuple",
|
|
37
|
+
"types": [
|
|
38
|
+
]
|
|
39
|
+
}
|
|
40
|
+
},
|
|
41
|
+
{
|
|
42
|
+
"name": "postSignatureResponse",
|
|
43
|
+
"pure": false,
|
|
44
|
+
"proof": true,
|
|
45
|
+
"arguments": [
|
|
46
|
+
{
|
|
47
|
+
"name": "requestId",
|
|
48
|
+
"type": {
|
|
49
|
+
"type-name": "Alias",
|
|
50
|
+
"name": "RequestId",
|
|
51
|
+
"type": {
|
|
52
|
+
"type-name": "Bytes",
|
|
53
|
+
"length": 32
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
},
|
|
57
|
+
{
|
|
58
|
+
"name": "signatureResponse",
|
|
59
|
+
"type": {
|
|
60
|
+
"type-name": "Struct",
|
|
61
|
+
"name": "SignatureResponse",
|
|
62
|
+
"elements": [
|
|
63
|
+
{
|
|
64
|
+
"name": "bigRx",
|
|
65
|
+
"type": {
|
|
66
|
+
"type-name": "Bytes",
|
|
67
|
+
"length": 32
|
|
68
|
+
}
|
|
69
|
+
},
|
|
70
|
+
{
|
|
71
|
+
"name": "bigRy",
|
|
72
|
+
"type": {
|
|
73
|
+
"type-name": "Bytes",
|
|
74
|
+
"length": 32
|
|
75
|
+
}
|
|
76
|
+
},
|
|
77
|
+
{
|
|
78
|
+
"name": "s",
|
|
79
|
+
"type": {
|
|
80
|
+
"type-name": "Bytes",
|
|
81
|
+
"length": 32
|
|
82
|
+
}
|
|
83
|
+
},
|
|
84
|
+
{
|
|
85
|
+
"name": "recoveryId",
|
|
86
|
+
"type": {
|
|
87
|
+
"type-name": "Uint",
|
|
88
|
+
"maxval": 255
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
]
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
],
|
|
95
|
+
"result-type": {
|
|
96
|
+
"type-name": "Tuple",
|
|
97
|
+
"types": [
|
|
98
|
+
]
|
|
99
|
+
}
|
|
100
|
+
},
|
|
101
|
+
{
|
|
102
|
+
"name": "postRespondBidirectional",
|
|
103
|
+
"pure": false,
|
|
104
|
+
"proof": true,
|
|
105
|
+
"arguments": [
|
|
106
|
+
{
|
|
107
|
+
"name": "requestId",
|
|
108
|
+
"type": {
|
|
109
|
+
"type-name": "Alias",
|
|
110
|
+
"name": "RequestId",
|
|
111
|
+
"type": {
|
|
112
|
+
"type-name": "Bytes",
|
|
113
|
+
"length": 32
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
},
|
|
117
|
+
{
|
|
118
|
+
"name": "respondBidirectional",
|
|
119
|
+
"type": {
|
|
120
|
+
"type-name": "Struct",
|
|
121
|
+
"name": "RespondBidirectional",
|
|
122
|
+
"elements": [
|
|
123
|
+
{
|
|
124
|
+
"name": "serializedOutput",
|
|
125
|
+
"type": {
|
|
126
|
+
"type-name": "Bytes",
|
|
127
|
+
"length": 128
|
|
128
|
+
}
|
|
129
|
+
},
|
|
130
|
+
{
|
|
131
|
+
"name": "outputLen",
|
|
132
|
+
"type": {
|
|
133
|
+
"type-name": "Uint",
|
|
134
|
+
"maxval": 255
|
|
135
|
+
}
|
|
136
|
+
},
|
|
137
|
+
{
|
|
138
|
+
"name": "pk",
|
|
139
|
+
"type": {
|
|
140
|
+
"type-name": "Alias",
|
|
141
|
+
"name": "JubjubPoint",
|
|
142
|
+
"type": {
|
|
143
|
+
"type-name": "Opaque",
|
|
144
|
+
"tsType": "JubjubPoint"
|
|
145
|
+
}
|
|
146
|
+
}
|
|
147
|
+
},
|
|
148
|
+
{
|
|
149
|
+
"name": "announcement",
|
|
150
|
+
"type": {
|
|
151
|
+
"type-name": "Alias",
|
|
152
|
+
"name": "JubjubPoint",
|
|
153
|
+
"type": {
|
|
154
|
+
"type-name": "Opaque",
|
|
155
|
+
"tsType": "JubjubPoint"
|
|
156
|
+
}
|
|
157
|
+
}
|
|
158
|
+
},
|
|
159
|
+
{
|
|
160
|
+
"name": "response",
|
|
161
|
+
"type": {
|
|
162
|
+
"type-name": "Field"
|
|
163
|
+
}
|
|
164
|
+
}
|
|
165
|
+
]
|
|
166
|
+
}
|
|
167
|
+
}
|
|
168
|
+
],
|
|
169
|
+
"result-type": {
|
|
170
|
+
"type-name": "Tuple",
|
|
171
|
+
"types": [
|
|
172
|
+
]
|
|
173
|
+
}
|
|
174
|
+
}
|
|
175
|
+
],
|
|
176
|
+
"witnesses": [
|
|
177
|
+
],
|
|
178
|
+
"contracts": [
|
|
179
|
+
],
|
|
180
|
+
"ledger": [
|
|
181
|
+
{
|
|
182
|
+
"name": "signatureResponseCounterIndex",
|
|
183
|
+
"index": 0,
|
|
184
|
+
"exported": true,
|
|
185
|
+
"storage": "Map",
|
|
186
|
+
"key": {
|
|
187
|
+
"type-name": "Alias",
|
|
188
|
+
"name": "RequestId",
|
|
189
|
+
"type": {
|
|
190
|
+
"type-name": "Bytes",
|
|
191
|
+
"length": 32
|
|
192
|
+
}
|
|
193
|
+
},
|
|
194
|
+
"value": {
|
|
195
|
+
"type-name": "Counter"
|
|
196
|
+
}
|
|
197
|
+
},
|
|
198
|
+
{
|
|
199
|
+
"name": "signatureResponseIndex",
|
|
200
|
+
"index": 1,
|
|
201
|
+
"exported": true,
|
|
202
|
+
"storage": "Map",
|
|
203
|
+
"key": {
|
|
204
|
+
"type-name": "Struct",
|
|
205
|
+
"name": "SignetResponseKey",
|
|
206
|
+
"elements": [
|
|
207
|
+
{
|
|
208
|
+
"name": "count",
|
|
209
|
+
"type": {
|
|
210
|
+
"type-name": "Uint",
|
|
211
|
+
"maxval": 18446744073709551615
|
|
212
|
+
}
|
|
213
|
+
},
|
|
214
|
+
{
|
|
215
|
+
"name": "requestId",
|
|
216
|
+
"type": {
|
|
217
|
+
"type-name": "Alias",
|
|
218
|
+
"name": "RequestId",
|
|
219
|
+
"type": {
|
|
220
|
+
"type-name": "Bytes",
|
|
221
|
+
"length": 32
|
|
222
|
+
}
|
|
223
|
+
}
|
|
224
|
+
}
|
|
225
|
+
]
|
|
226
|
+
},
|
|
227
|
+
"value": {
|
|
228
|
+
"type-name": "Struct",
|
|
229
|
+
"name": "SignatureResponse",
|
|
230
|
+
"elements": [
|
|
231
|
+
{
|
|
232
|
+
"name": "bigRx",
|
|
233
|
+
"type": {
|
|
234
|
+
"type-name": "Bytes",
|
|
235
|
+
"length": 32
|
|
236
|
+
}
|
|
237
|
+
},
|
|
238
|
+
{
|
|
239
|
+
"name": "bigRy",
|
|
240
|
+
"type": {
|
|
241
|
+
"type-name": "Bytes",
|
|
242
|
+
"length": 32
|
|
243
|
+
}
|
|
244
|
+
},
|
|
245
|
+
{
|
|
246
|
+
"name": "s",
|
|
247
|
+
"type": {
|
|
248
|
+
"type-name": "Bytes",
|
|
249
|
+
"length": 32
|
|
250
|
+
}
|
|
251
|
+
},
|
|
252
|
+
{
|
|
253
|
+
"name": "recoveryId",
|
|
254
|
+
"type": {
|
|
255
|
+
"type-name": "Uint",
|
|
256
|
+
"maxval": 255
|
|
257
|
+
}
|
|
258
|
+
}
|
|
259
|
+
]
|
|
260
|
+
}
|
|
261
|
+
},
|
|
262
|
+
{
|
|
263
|
+
"name": "respondBidirectionalIndex",
|
|
264
|
+
"index": 2,
|
|
265
|
+
"exported": true,
|
|
266
|
+
"storage": "Map",
|
|
267
|
+
"key": {
|
|
268
|
+
"type-name": "Alias",
|
|
269
|
+
"name": "RequestId",
|
|
270
|
+
"type": {
|
|
271
|
+
"type-name": "Bytes",
|
|
272
|
+
"length": 32
|
|
273
|
+
}
|
|
274
|
+
},
|
|
275
|
+
"value": {
|
|
276
|
+
"type-name": "Struct",
|
|
277
|
+
"name": "RespondBidirectional",
|
|
278
|
+
"elements": [
|
|
279
|
+
{
|
|
280
|
+
"name": "serializedOutput",
|
|
281
|
+
"type": {
|
|
282
|
+
"type-name": "Bytes",
|
|
283
|
+
"length": 128
|
|
284
|
+
}
|
|
285
|
+
},
|
|
286
|
+
{
|
|
287
|
+
"name": "outputLen",
|
|
288
|
+
"type": {
|
|
289
|
+
"type-name": "Uint",
|
|
290
|
+
"maxval": 255
|
|
291
|
+
}
|
|
292
|
+
},
|
|
293
|
+
{
|
|
294
|
+
"name": "pk",
|
|
295
|
+
"type": {
|
|
296
|
+
"type-name": "Alias",
|
|
297
|
+
"name": "JubjubPoint",
|
|
298
|
+
"type": {
|
|
299
|
+
"type-name": "Opaque",
|
|
300
|
+
"tsType": "JubjubPoint"
|
|
301
|
+
}
|
|
302
|
+
}
|
|
303
|
+
},
|
|
304
|
+
{
|
|
305
|
+
"name": "announcement",
|
|
306
|
+
"type": {
|
|
307
|
+
"type-name": "Alias",
|
|
308
|
+
"name": "JubjubPoint",
|
|
309
|
+
"type": {
|
|
310
|
+
"type-name": "Opaque",
|
|
311
|
+
"tsType": "JubjubPoint"
|
|
312
|
+
}
|
|
313
|
+
}
|
|
314
|
+
},
|
|
315
|
+
{
|
|
316
|
+
"name": "response",
|
|
317
|
+
"type": {
|
|
318
|
+
"type-name": "Field"
|
|
319
|
+
}
|
|
320
|
+
}
|
|
321
|
+
]
|
|
322
|
+
}
|
|
323
|
+
},
|
|
324
|
+
{
|
|
325
|
+
"name": "mpcPubKeyHash",
|
|
326
|
+
"index": 3,
|
|
327
|
+
"exported": true,
|
|
328
|
+
"storage": "Cell",
|
|
329
|
+
"type": {
|
|
330
|
+
"type-name": "Bytes",
|
|
331
|
+
"length": 32
|
|
332
|
+
}
|
|
333
|
+
}
|
|
334
|
+
]
|
|
335
|
+
}
|
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
{
|
|
2
|
+
"manifest-version": "1",
|
|
3
|
+
"compiler-version": "0.33.0",
|
|
4
|
+
"language-version": "0.25.0",
|
|
5
|
+
"runtime-version": "0.18.0-rc.0",
|
|
6
|
+
"compiler": {
|
|
7
|
+
"type": "directory",
|
|
8
|
+
"contract-info.json": {
|
|
9
|
+
"type": "file",
|
|
10
|
+
"size": 7635,
|
|
11
|
+
"hash": "99d983e2bb40700d15169dbb42b76b725503fbe8319ebf2f4d300ad656b1e74b"
|
|
12
|
+
}
|
|
13
|
+
},
|
|
14
|
+
"contract": {
|
|
15
|
+
"type": "directory",
|
|
16
|
+
"index.d.ts": {
|
|
17
|
+
"type": "file",
|
|
18
|
+
"size": 6948,
|
|
19
|
+
"hash": "c3eca9f9b2ac149a16434769080479a3bb90d14457b6479174beb7a2b648285e"
|
|
20
|
+
},
|
|
21
|
+
"index.js": {
|
|
22
|
+
"type": "file",
|
|
23
|
+
"size": 90631,
|
|
24
|
+
"hash": "37a18a718c7ee9df21b11b1c4c0aaebc1f3b074c1df0a902d5d07a7a1c495554"
|
|
25
|
+
},
|
|
26
|
+
"index.js.map": {
|
|
27
|
+
"type": "file",
|
|
28
|
+
"size": 3302,
|
|
29
|
+
"hash": "96a304c896fb00298abdffb985cae45e641752ae92134c035023abfa0f7db4f0"
|
|
30
|
+
}
|
|
31
|
+
},
|
|
32
|
+
"zkir": {
|
|
33
|
+
"type": "directory",
|
|
34
|
+
"emitSignBidirectionalEvent.bzkir": {
|
|
35
|
+
"type": "file",
|
|
36
|
+
"size": 4680,
|
|
37
|
+
"hash": "60ef0e2d3cc878a0a2848c9095e68a6d10ec48f100212296deb81e490f869398"
|
|
38
|
+
},
|
|
39
|
+
"emitSignBidirectionalEvent.zkir": {
|
|
40
|
+
"type": "file",
|
|
41
|
+
"size": 66458,
|
|
42
|
+
"hash": "691b8c191befa6f8a31aaba5925e475be3ed967d610899068dc9e1d0ad5a1750"
|
|
43
|
+
},
|
|
44
|
+
"postRespondBidirectional.bzkir": {
|
|
45
|
+
"type": "file",
|
|
46
|
+
"size": 3113,
|
|
47
|
+
"hash": "feb2bdb14b2840cf2220102badbed0d4169f4a6f8a787d5c3475c88608d12c0c"
|
|
48
|
+
},
|
|
49
|
+
"postRespondBidirectional.zkir": {
|
|
50
|
+
"type": "file",
|
|
51
|
+
"size": 40996,
|
|
52
|
+
"hash": "58a69c3a72674f3a3fe97deff6803fcfaed573aca402bcc3d9c947d366b1dabb"
|
|
53
|
+
},
|
|
54
|
+
"postSignatureResponse.bzkir": {
|
|
55
|
+
"type": "file",
|
|
56
|
+
"size": 1464,
|
|
57
|
+
"hash": "a255997d57d9be1dbdd71be7e4d961df2b76e0d73e4b8cf8516c8f8c14930a5b"
|
|
58
|
+
},
|
|
59
|
+
"postSignatureResponse.zkir": {
|
|
60
|
+
"type": "file",
|
|
61
|
+
"size": 22174,
|
|
62
|
+
"hash": "1da096135eef73400ef5c82d38686b9afba3be1a58d2e3985e666f8c0e842294"
|
|
63
|
+
}
|
|
64
|
+
},
|
|
65
|
+
"keys": {
|
|
66
|
+
"type": "directory",
|
|
67
|
+
"emitSignBidirectionalEvent.prover": {
|
|
68
|
+
"type": "file",
|
|
69
|
+
"size": 134792363,
|
|
70
|
+
"hash": "03a0174e751a9c466388a5ebde5d11f1a380e65008b86a98667dd750333862d1"
|
|
71
|
+
},
|
|
72
|
+
"emitSignBidirectionalEvent.verifier": {
|
|
73
|
+
"type": "file",
|
|
74
|
+
"size": 1351,
|
|
75
|
+
"hash": "97af5bb456fae0ea3daf411d8031e6ceefe1cdc6dc0349372c56414d53fb8d6e"
|
|
76
|
+
},
|
|
77
|
+
"postRespondBidirectional.prover": {
|
|
78
|
+
"type": "file",
|
|
79
|
+
"size": 84822969,
|
|
80
|
+
"hash": "2fe26775cad177e03968f43b7617a4ab1bc1c2556fe298b410193575478238e2"
|
|
81
|
+
},
|
|
82
|
+
"postRespondBidirectional.verifier": {
|
|
83
|
+
"type": "file",
|
|
84
|
+
"size": 2311,
|
|
85
|
+
"hash": "feda5f59c6367153d6089edefc96a7a18597373393d1f0c3410e9790c65078c7"
|
|
86
|
+
},
|
|
87
|
+
"postSignatureResponse.prover": {
|
|
88
|
+
"type": "file",
|
|
89
|
+
"size": 33725342,
|
|
90
|
+
"hash": "931f5bf8726793e8110c30e00014055bd35e887f8edb3c3ea18ee0758acd4740"
|
|
91
|
+
},
|
|
92
|
+
"postSignatureResponse.verifier": {
|
|
93
|
+
"type": "file",
|
|
94
|
+
"size": 1351,
|
|
95
|
+
"hash": "1774d8bce0d5a9f4dcbd59f292b9cb5a9b69c5636ce9a95b7ec17ce797b425e7"
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
}
|
|
@@ -0,0 +1,129 @@
|
|
|
1
|
+
import type * as __compactRuntime from '@midnight-ntwrk/compact-runtime';
|
|
2
|
+
|
|
3
|
+
export type Witnesses<PS> = {
|
|
4
|
+
}
|
|
5
|
+
|
|
6
|
+
export type ImpureCircuits<PS> = {
|
|
7
|
+
emitSignBidirectionalEvent(context: __compactRuntime.CircuitContext<PS>,
|
|
8
|
+
signBidirectionalEvent_0: { version: bigint,
|
|
9
|
+
payload: Uint8Array
|
|
10
|
+
}): Promise<__compactRuntime.CircuitResults<PS, []>>;
|
|
11
|
+
postSignatureResponse(context: __compactRuntime.CircuitContext<PS>,
|
|
12
|
+
requestId_0: Uint8Array,
|
|
13
|
+
signatureResponse_0: { bigRx: Uint8Array,
|
|
14
|
+
bigRy: Uint8Array,
|
|
15
|
+
s: Uint8Array,
|
|
16
|
+
recoveryId: bigint
|
|
17
|
+
}): Promise<__compactRuntime.CircuitResults<PS, []>>;
|
|
18
|
+
postRespondBidirectional(context: __compactRuntime.CircuitContext<PS>,
|
|
19
|
+
requestId_0: Uint8Array,
|
|
20
|
+
respondBidirectional_0: { serializedOutput: Uint8Array,
|
|
21
|
+
outputLen: bigint,
|
|
22
|
+
pk: __compactRuntime.JubjubPoint,
|
|
23
|
+
announcement: __compactRuntime.JubjubPoint,
|
|
24
|
+
response: bigint
|
|
25
|
+
}): Promise<__compactRuntime.CircuitResults<PS, []>>;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
export type ProvableCircuits<PS> = {
|
|
29
|
+
emitSignBidirectionalEvent(context: __compactRuntime.CircuitContext<PS>,
|
|
30
|
+
signBidirectionalEvent_0: { version: bigint,
|
|
31
|
+
payload: Uint8Array
|
|
32
|
+
}): Promise<__compactRuntime.CircuitResults<PS, []>>;
|
|
33
|
+
postSignatureResponse(context: __compactRuntime.CircuitContext<PS>,
|
|
34
|
+
requestId_0: Uint8Array,
|
|
35
|
+
signatureResponse_0: { bigRx: Uint8Array,
|
|
36
|
+
bigRy: Uint8Array,
|
|
37
|
+
s: Uint8Array,
|
|
38
|
+
recoveryId: bigint
|
|
39
|
+
}): Promise<__compactRuntime.CircuitResults<PS, []>>;
|
|
40
|
+
postRespondBidirectional(context: __compactRuntime.CircuitContext<PS>,
|
|
41
|
+
requestId_0: Uint8Array,
|
|
42
|
+
respondBidirectional_0: { serializedOutput: Uint8Array,
|
|
43
|
+
outputLen: bigint,
|
|
44
|
+
pk: __compactRuntime.JubjubPoint,
|
|
45
|
+
announcement: __compactRuntime.JubjubPoint,
|
|
46
|
+
response: bigint
|
|
47
|
+
}): Promise<__compactRuntime.CircuitResults<PS, []>>;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
export type PureCircuits = {
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
export type Circuits<PS> = {
|
|
54
|
+
emitSignBidirectionalEvent(context: __compactRuntime.CircuitContext<PS>,
|
|
55
|
+
signBidirectionalEvent_0: { version: bigint,
|
|
56
|
+
payload: Uint8Array
|
|
57
|
+
}): Promise<__compactRuntime.CircuitResults<PS, []>>;
|
|
58
|
+
postSignatureResponse(context: __compactRuntime.CircuitContext<PS>,
|
|
59
|
+
requestId_0: Uint8Array,
|
|
60
|
+
signatureResponse_0: { bigRx: Uint8Array,
|
|
61
|
+
bigRy: Uint8Array,
|
|
62
|
+
s: Uint8Array,
|
|
63
|
+
recoveryId: bigint
|
|
64
|
+
}): Promise<__compactRuntime.CircuitResults<PS, []>>;
|
|
65
|
+
postRespondBidirectional(context: __compactRuntime.CircuitContext<PS>,
|
|
66
|
+
requestId_0: Uint8Array,
|
|
67
|
+
respondBidirectional_0: { serializedOutput: Uint8Array,
|
|
68
|
+
outputLen: bigint,
|
|
69
|
+
pk: __compactRuntime.JubjubPoint,
|
|
70
|
+
announcement: __compactRuntime.JubjubPoint,
|
|
71
|
+
response: bigint
|
|
72
|
+
}): Promise<__compactRuntime.CircuitResults<PS, []>>;
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
export type Ledger = {
|
|
76
|
+
signatureResponseCounterIndex: {
|
|
77
|
+
isEmpty(): boolean;
|
|
78
|
+
size(): bigint;
|
|
79
|
+
member(key_0: Uint8Array): boolean;
|
|
80
|
+
lookup(key_0: Uint8Array): { read(): bigint }
|
|
81
|
+
};
|
|
82
|
+
signatureResponseIndex: {
|
|
83
|
+
isEmpty(): boolean;
|
|
84
|
+
size(): bigint;
|
|
85
|
+
member(key_0: { count: bigint, requestId: Uint8Array }): boolean;
|
|
86
|
+
lookup(key_0: { count: bigint, requestId: Uint8Array }): { bigRx: Uint8Array,
|
|
87
|
+
bigRy: Uint8Array,
|
|
88
|
+
s: Uint8Array,
|
|
89
|
+
recoveryId: bigint
|
|
90
|
+
};
|
|
91
|
+
[Symbol.iterator](): Iterator<[{ count: bigint, requestId: Uint8Array }, { bigRx: Uint8Array, bigRy: Uint8Array, s: Uint8Array, recoveryId: bigint }]>
|
|
92
|
+
};
|
|
93
|
+
respondBidirectionalIndex: {
|
|
94
|
+
isEmpty(): boolean;
|
|
95
|
+
size(): bigint;
|
|
96
|
+
member(key_0: Uint8Array): boolean;
|
|
97
|
+
lookup(key_0: Uint8Array): { serializedOutput: Uint8Array,
|
|
98
|
+
outputLen: bigint,
|
|
99
|
+
pk: __compactRuntime.JubjubPoint,
|
|
100
|
+
announcement: __compactRuntime.JubjubPoint,
|
|
101
|
+
response: bigint
|
|
102
|
+
};
|
|
103
|
+
[Symbol.iterator](): Iterator<[Uint8Array, { serializedOutput: Uint8Array,
|
|
104
|
+
outputLen: bigint,
|
|
105
|
+
pk: __compactRuntime.JubjubPoint,
|
|
106
|
+
announcement: __compactRuntime.JubjubPoint,
|
|
107
|
+
response: bigint
|
|
108
|
+
}]>
|
|
109
|
+
};
|
|
110
|
+
readonly mpcPubKeyHash: Uint8Array;
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
export type ContractReferenceLocations = any;
|
|
114
|
+
|
|
115
|
+
export declare const contractReferenceLocations : ContractReferenceLocations;
|
|
116
|
+
|
|
117
|
+
export declare class Contract<PS = any, W extends Witnesses<PS> = Witnesses<PS>> {
|
|
118
|
+
witnesses: W;
|
|
119
|
+
circuits: Circuits<PS>;
|
|
120
|
+
impureCircuits: ImpureCircuits<PS>;
|
|
121
|
+
provableCircuits: ProvableCircuits<PS>;
|
|
122
|
+
constructor(witnesses: W);
|
|
123
|
+
initialState(context: __compactRuntime.ConstructorContext<PS>,
|
|
124
|
+
mpcPk_0: __compactRuntime.JubjubPoint): Promise<__compactRuntime.ConstructorResult<PS>>;
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
export declare function ledger(state: __compactRuntime.StateValue | __compactRuntime.ChargedState): Ledger;
|
|
128
|
+
export declare const pureCircuits: PureCircuits;
|
|
129
|
+
export declare const expectedVk: Record<string, string>;
|