@sig-net/midnight-contract 0.0.4 → 0.0.6
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 +1 -1
- package/dist/managed/compiler/contract-info.json +23 -40
- package/dist/managed/compiler/contract-manifest.json +32 -32
- package/dist/managed/contract/index.d.ts +17 -19
- package/dist/managed/contract/index.js +166 -154
- package/dist/managed/contract/index.js.map +2 -2
- package/dist/managed/keys/notifyBidirectionalSignatureRequest.prover +0 -0
- package/dist/managed/keys/notifyBidirectionalSignatureRequest.verifier +0 -0
- package/dist/managed/keys/postRespondBidirectional.prover +0 -0
- package/dist/managed/keys/postRespondBidirectional.verifier +0 -0
- package/dist/managed/keys/postSignatureResponse.prover +0 -0
- package/dist/managed/keys/postSignatureResponse.verifier +0 -0
- package/dist/managed/zkir/notifyBidirectionalSignatureRequest.bzkir +0 -0
- package/dist/managed/zkir/notifyBidirectionalSignatureRequest.zkir +22 -44
- package/dist/managed/zkir/postRespondBidirectional.bzkir +0 -0
- package/dist/managed/zkir/postRespondBidirectional.zkir +143 -337
- package/dist/managed/zkir/postSignatureResponse.bzkir +0 -0
- package/dist/managed/zkir/postSignatureResponse.zkir +47 -150
- package/dist/witnesses.js +2 -2
- package/dist/witnesses.js.map +1 -1
- package/package.json +5 -5
package/README.md
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
The central [Sig Network](https://sig.network) signet contract on the [Midnight blockchain](https://midnight.network): the singleton that exposes the MPC's [sign bidirectional flow](https://docs.sig.network/architecture/sign-bidirectional) to other Midnight contracts. The MPC posts back to it and clients poll it:
|
|
4
4
|
|
|
5
5
|
- **Signature responses**: an unauthenticated counted log; callers verify the signatures off-chain or in their own circuits.
|
|
6
|
-
- **Remote execution responses**:
|
|
6
|
+
- **Remote execution responses**: secp256k1 ECDSA attestations by the MPC's key, verified in-circuit at post time.
|
|
7
7
|
- **Request-notification registry**: how the MPC discovers new signature requests.
|
|
8
8
|
|
|
9
9
|
## What is in it
|
|
@@ -146,35 +146,32 @@
|
|
|
146
146
|
}
|
|
147
147
|
},
|
|
148
148
|
{
|
|
149
|
-
"name": "
|
|
149
|
+
"name": "sigR",
|
|
150
150
|
"type": {
|
|
151
|
-
"type-name": "
|
|
152
|
-
"
|
|
153
|
-
"type": {
|
|
154
|
-
"type-name": "Opaque",
|
|
155
|
-
"tsType": "JubjubPoint"
|
|
156
|
-
}
|
|
157
|
-
}
|
|
158
|
-
},
|
|
159
|
-
{
|
|
160
|
-
"name": "announcement",
|
|
161
|
-
"type": {
|
|
162
|
-
"type-name": "Alias",
|
|
163
|
-
"name": "JubjubPoint",
|
|
164
|
-
"type": {
|
|
165
|
-
"type-name": "Opaque",
|
|
166
|
-
"tsType": "JubjubPoint"
|
|
167
|
-
}
|
|
151
|
+
"type-name": "Bytes",
|
|
152
|
+
"length": 32
|
|
168
153
|
}
|
|
169
154
|
},
|
|
170
155
|
{
|
|
171
|
-
"name": "
|
|
156
|
+
"name": "sigS",
|
|
172
157
|
"type": {
|
|
173
|
-
"type-name": "
|
|
158
|
+
"type-name": "Bytes",
|
|
159
|
+
"length": 32
|
|
174
160
|
}
|
|
175
161
|
}
|
|
176
162
|
]
|
|
177
163
|
}
|
|
164
|
+
},
|
|
165
|
+
{
|
|
166
|
+
"name": "pk",
|
|
167
|
+
"type": {
|
|
168
|
+
"type-name": "Alias",
|
|
169
|
+
"name": "Secp256k1Point",
|
|
170
|
+
"type": {
|
|
171
|
+
"type-name": "Opaque",
|
|
172
|
+
"tsType": "Secp256k1Point"
|
|
173
|
+
}
|
|
174
|
+
}
|
|
178
175
|
}
|
|
179
176
|
],
|
|
180
177
|
"result-type": {
|
|
@@ -302,31 +299,17 @@
|
|
|
302
299
|
}
|
|
303
300
|
},
|
|
304
301
|
{
|
|
305
|
-
"name": "
|
|
302
|
+
"name": "sigR",
|
|
306
303
|
"type": {
|
|
307
|
-
"type-name": "
|
|
308
|
-
"
|
|
309
|
-
"type": {
|
|
310
|
-
"type-name": "Opaque",
|
|
311
|
-
"tsType": "JubjubPoint"
|
|
312
|
-
}
|
|
313
|
-
}
|
|
314
|
-
},
|
|
315
|
-
{
|
|
316
|
-
"name": "announcement",
|
|
317
|
-
"type": {
|
|
318
|
-
"type-name": "Alias",
|
|
319
|
-
"name": "JubjubPoint",
|
|
320
|
-
"type": {
|
|
321
|
-
"type-name": "Opaque",
|
|
322
|
-
"tsType": "JubjubPoint"
|
|
323
|
-
}
|
|
304
|
+
"type-name": "Bytes",
|
|
305
|
+
"length": 32
|
|
324
306
|
}
|
|
325
307
|
},
|
|
326
308
|
{
|
|
327
|
-
"name": "
|
|
309
|
+
"name": "sigS",
|
|
328
310
|
"type": {
|
|
329
|
-
"type-name": "
|
|
311
|
+
"type-name": "Bytes",
|
|
312
|
+
"length": 32
|
|
330
313
|
}
|
|
331
314
|
}
|
|
332
315
|
]
|
|
@@ -7,92 +7,92 @@
|
|
|
7
7
|
"type": "directory",
|
|
8
8
|
"contract-info.json": {
|
|
9
9
|
"type": "file",
|
|
10
|
-
"size":
|
|
11
|
-
"hash": "
|
|
10
|
+
"size": 8056,
|
|
11
|
+
"hash": "359f534dfa533c4aac6b78bf5af3538e4eaab64d887e65d50dfca813b575b055"
|
|
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": 7154,
|
|
19
|
+
"hash": "b240a3cca7b3aac78ab2bd79062961f634131b474619da5f5842b435ba361d33"
|
|
20
20
|
},
|
|
21
21
|
"index.js": {
|
|
22
22
|
"type": "file",
|
|
23
|
-
"size":
|
|
24
|
-
"hash": "
|
|
23
|
+
"size": 85513,
|
|
24
|
+
"hash": "8c3e19d2cae4f28b71689743a015f253bcddd7d4472079b30db55577a9baa9e6"
|
|
25
25
|
},
|
|
26
26
|
"index.js.map": {
|
|
27
27
|
"type": "file",
|
|
28
|
-
"size":
|
|
29
|
-
"hash": "
|
|
28
|
+
"size": 3472,
|
|
29
|
+
"hash": "01137bb8498b0e0b5256044b651226a69c53f7bcbf203ad9c41ec3bdeec2e23b"
|
|
30
30
|
}
|
|
31
31
|
},
|
|
32
32
|
"zkir": {
|
|
33
33
|
"type": "directory",
|
|
34
34
|
"notifyBidirectionalSignatureRequest.bzkir": {
|
|
35
35
|
"type": "file",
|
|
36
|
-
"size":
|
|
37
|
-
"hash": "
|
|
36
|
+
"size": 469,
|
|
37
|
+
"hash": "7dc07d54258ab2fd49dbfbb71c6971302e548fffa7a8d5a1df33daff8d6508ce"
|
|
38
38
|
},
|
|
39
39
|
"notifyBidirectionalSignatureRequest.zkir": {
|
|
40
40
|
"type": "file",
|
|
41
|
-
"size":
|
|
42
|
-
"hash": "
|
|
41
|
+
"size": 1432,
|
|
42
|
+
"hash": "d8190dfc0e44aca693556a960a94dd3981f8efd6323fb47caf5a436c1f8b6ccc"
|
|
43
43
|
},
|
|
44
44
|
"postRespondBidirectional.bzkir": {
|
|
45
45
|
"type": "file",
|
|
46
|
-
"size":
|
|
47
|
-
"hash": "
|
|
46
|
+
"size": 4223,
|
|
47
|
+
"hash": "2e49db13ef3b01c2b98991376ce8b95206843d114efc1c74cb2a6d54b377534b"
|
|
48
48
|
},
|
|
49
49
|
"postRespondBidirectional.zkir": {
|
|
50
50
|
"type": "file",
|
|
51
|
-
"size":
|
|
52
|
-
"hash": "
|
|
51
|
+
"size": 14162,
|
|
52
|
+
"hash": "8e082e3fa54cbf933c6a7fced8c6c2644718c0f011fa12c7cca6309f0953b1f6"
|
|
53
53
|
},
|
|
54
54
|
"postSignatureResponse.bzkir": {
|
|
55
55
|
"type": "file",
|
|
56
|
-
"size":
|
|
57
|
-
"hash": "
|
|
56
|
+
"size": 1353,
|
|
57
|
+
"hash": "ae24553c5fa2883b0275c603b3f7b5aeb020529c8a0dcc512487ad231dabd607"
|
|
58
58
|
},
|
|
59
59
|
"postSignatureResponse.zkir": {
|
|
60
60
|
"type": "file",
|
|
61
|
-
"size":
|
|
62
|
-
"hash": "
|
|
61
|
+
"size": 3687,
|
|
62
|
+
"hash": "82682bd44c320b47c733ee0b8c22a781218b41c68add0f9c93a9b21a7163cae3"
|
|
63
63
|
}
|
|
64
64
|
},
|
|
65
65
|
"keys": {
|
|
66
66
|
"type": "directory",
|
|
67
67
|
"notifyBidirectionalSignatureRequest.prover": {
|
|
68
68
|
"type": "file",
|
|
69
|
-
"size":
|
|
70
|
-
"hash": "
|
|
69
|
+
"size": 445605,
|
|
70
|
+
"hash": "00098d5d1961b7d49a912ae1b82cc09dd528c3b4d84e7562821344599ccb1ea4"
|
|
71
71
|
},
|
|
72
72
|
"notifyBidirectionalSignatureRequest.verifier": {
|
|
73
73
|
"type": "file",
|
|
74
|
-
"size":
|
|
75
|
-
"hash": "
|
|
74
|
+
"size": 1353,
|
|
75
|
+
"hash": "79a18d16c3486302eeb8ec7129d928778a408b9e5eba7d45bec6fea4594311bc"
|
|
76
76
|
},
|
|
77
77
|
"postRespondBidirectional.prover": {
|
|
78
78
|
"type": "file",
|
|
79
|
-
"size":
|
|
80
|
-
"hash": "
|
|
79
|
+
"size": 117450403,
|
|
80
|
+
"hash": "199fe22cb12a4c32e8033a0cdc53f30880a42b33ca6f11305b581028229a5327"
|
|
81
81
|
},
|
|
82
82
|
"postRespondBidirectional.verifier": {
|
|
83
83
|
"type": "file",
|
|
84
|
-
"size":
|
|
85
|
-
"hash": "
|
|
84
|
+
"size": 2745,
|
|
85
|
+
"hash": "02f784f3fde56567349ba646b0afb3bfdd70af5da4d822764b9d9f1c2138ab88"
|
|
86
86
|
},
|
|
87
87
|
"postSignatureResponse.prover": {
|
|
88
88
|
"type": "file",
|
|
89
|
-
"size":
|
|
90
|
-
"hash": "
|
|
89
|
+
"size": 446489,
|
|
90
|
+
"hash": "964b3039fa2c3775d89cdf882b37a9b6548bd9979f999383ce81ae9d19031a2f"
|
|
91
91
|
},
|
|
92
92
|
"postSignatureResponse.verifier": {
|
|
93
93
|
"type": "file",
|
|
94
|
-
"size":
|
|
95
|
-
"hash": "
|
|
94
|
+
"size": 1353,
|
|
95
|
+
"hash": "493513937e36c24eb3b921e44e26be057b6160a5c9c89fecf0a738e1bb216a80"
|
|
96
96
|
}
|
|
97
97
|
}
|
|
98
98
|
}
|
|
@@ -20,10 +20,10 @@ export type ImpureCircuits<PS> = {
|
|
|
20
20
|
requestId_0: Uint8Array,
|
|
21
21
|
respondBidirectional_0: { serializedOutput: Uint8Array,
|
|
22
22
|
outputLen: bigint,
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
23
|
+
sigR: Uint8Array,
|
|
24
|
+
sigS: Uint8Array
|
|
25
|
+
},
|
|
26
|
+
pk_0: __compactRuntime.Secp256k1Point): Promise<__compactRuntime.CircuitResults<PS, []>>;
|
|
27
27
|
}
|
|
28
28
|
|
|
29
29
|
export type ProvableCircuits<PS> = {
|
|
@@ -43,10 +43,10 @@ export type ProvableCircuits<PS> = {
|
|
|
43
43
|
requestId_0: Uint8Array,
|
|
44
44
|
respondBidirectional_0: { serializedOutput: Uint8Array,
|
|
45
45
|
outputLen: bigint,
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
46
|
+
sigR: Uint8Array,
|
|
47
|
+
sigS: Uint8Array
|
|
48
|
+
},
|
|
49
|
+
pk_0: __compactRuntime.Secp256k1Point): Promise<__compactRuntime.CircuitResults<PS, []>>;
|
|
50
50
|
}
|
|
51
51
|
|
|
52
52
|
export type PureCircuits = {
|
|
@@ -69,10 +69,10 @@ export type Circuits<PS> = {
|
|
|
69
69
|
requestId_0: Uint8Array,
|
|
70
70
|
respondBidirectional_0: { serializedOutput: Uint8Array,
|
|
71
71
|
outputLen: bigint,
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
72
|
+
sigR: Uint8Array,
|
|
73
|
+
sigS: Uint8Array
|
|
74
|
+
},
|
|
75
|
+
pk_0: __compactRuntime.Secp256k1Point): Promise<__compactRuntime.CircuitResults<PS, []>>;
|
|
76
76
|
}
|
|
77
77
|
|
|
78
78
|
export type Ledger = {
|
|
@@ -99,15 +99,13 @@ export type Ledger = {
|
|
|
99
99
|
member(key_0: Uint8Array): boolean;
|
|
100
100
|
lookup(key_0: Uint8Array): { serializedOutput: Uint8Array,
|
|
101
101
|
outputLen: bigint,
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
response: bigint
|
|
102
|
+
sigR: Uint8Array,
|
|
103
|
+
sigS: Uint8Array
|
|
105
104
|
};
|
|
106
105
|
[Symbol.iterator](): Iterator<[Uint8Array, { serializedOutput: Uint8Array,
|
|
107
106
|
outputLen: bigint,
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
response: bigint
|
|
107
|
+
sigR: Uint8Array,
|
|
108
|
+
sigS: Uint8Array
|
|
111
109
|
}]>
|
|
112
110
|
};
|
|
113
111
|
readonly mpcPubKeyHash: Uint8Array;
|
|
@@ -131,7 +129,7 @@ export declare class Contract<PS = any, W extends Witnesses<PS> = Witnesses<PS>>
|
|
|
131
129
|
provableCircuits: ProvableCircuits<PS>;
|
|
132
130
|
constructor(witnesses: W);
|
|
133
131
|
initialState(context: __compactRuntime.ConstructorContext<PS>,
|
|
134
|
-
mpcPk_0: __compactRuntime.
|
|
132
|
+
mpcPk_0: __compactRuntime.Secp256k1Point): Promise<__compactRuntime.ConstructorResult<PS>>;
|
|
135
133
|
}
|
|
136
134
|
|
|
137
135
|
export declare function ledger(state: __compactRuntime.StateValue | __compactRuntime.ChargedState): Ledger;
|