@sig-net/midnight-contract 0.0.5 → 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 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**: Schnorr attestations by the MPC's Jubjub key, verified in-circuit at post time.
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": "pk",
149
+ "name": "sigR",
150
150
  "type": {
151
- "type-name": "Alias",
152
- "name": "JubjubPoint",
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": "response",
156
+ "name": "sigS",
172
157
  "type": {
173
- "type-name": "Field"
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": "pk",
302
+ "name": "sigR",
306
303
  "type": {
307
- "type-name": "Alias",
308
- "name": "JubjubPoint",
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": "response",
309
+ "name": "sigS",
328
310
  "type": {
329
- "type-name": "Field"
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": 8633,
11
- "hash": "72d03046b056dd7fb01af5b97b9992b95d952cef1fbbc7a600d5d5ea29c361c5"
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": 7447,
19
- "hash": "57e23fbaf8474c004ada057df09d3398a0345a26a843911a5a95588d0c9b81d6"
18
+ "size": 7154,
19
+ "hash": "b240a3cca7b3aac78ab2bd79062961f634131b474619da5f5842b435ba361d33"
20
20
  },
21
21
  "index.js": {
22
22
  "type": "file",
23
- "size": 84363,
24
- "hash": "45747bcf588a8fb96a9413ca532e578f6e9023c9198f7c97ad25e3f2de31790d"
23
+ "size": 85513,
24
+ "hash": "8c3e19d2cae4f28b71689743a015f253bcddd7d4472079b30db55577a9baa9e6"
25
25
  },
26
26
  "index.js.map": {
27
27
  "type": "file",
28
- "size": 3251,
29
- "hash": "8d82e5ba5aced9fc8dc821154cc513a3064e4f8bf40228fcebf157fbcb884996"
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": 133,
37
- "hash": "4aac47417255c1a525bdce018caef0bc734d8a2d13c39b6ece41f5375301303d"
36
+ "size": 469,
37
+ "hash": "7dc07d54258ab2fd49dbfbb71c6971302e548fffa7a8d5a1df33daff8d6508ce"
38
38
  },
39
39
  "notifyBidirectionalSignatureRequest.zkir": {
40
40
  "type": "file",
41
- "size": 2038,
42
- "hash": "f51972650b77993359be13954c7322e7e8a25b5fa29825dd6facc38f99640c87"
41
+ "size": 1432,
42
+ "hash": "d8190dfc0e44aca693556a960a94dd3981f8efd6323fb47caf5a436c1f8b6ccc"
43
43
  },
44
44
  "postRespondBidirectional.bzkir": {
45
45
  "type": "file",
46
- "size": 1436,
47
- "hash": "a4d8a42c9425293824f0edbc6cf5ea1d5ecd8dc6fbb30cc536e110c77fb3f5ff"
46
+ "size": 4223,
47
+ "hash": "2e49db13ef3b01c2b98991376ce8b95206843d114efc1c74cb2a6d54b377534b"
48
48
  },
49
49
  "postRespondBidirectional.zkir": {
50
50
  "type": "file",
51
- "size": 20224,
52
- "hash": "c392e5d2038504de0341cfd3707c98bb200d2f011293fc2a402e88d1cf9ea5ed"
51
+ "size": 14162,
52
+ "hash": "8e082e3fa54cbf933c6a7fced8c6c2644718c0f011fa12c7cca6309f0953b1f6"
53
53
  },
54
54
  "postSignatureResponse.bzkir": {
55
55
  "type": "file",
56
- "size": 409,
57
- "hash": "2e7d101ec696bdc1a953443b02d4919e84601cd832ecf78fa7da48eb22a09f88"
56
+ "size": 1353,
57
+ "hash": "ae24553c5fa2883b0275c603b3f7b5aeb020529c8a0dcc512487ad231dabd607"
58
58
  },
59
59
  "postSignatureResponse.zkir": {
60
60
  "type": "file",
61
- "size": 7046,
62
- "hash": "cd77fda5cdb1798df4855ad675f222af6d29b9444be52b028be063c7d485807e"
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": 279422,
70
- "hash": "838883437ad8e18d791836c2c0f197956bce52f98cd1ec2e0956cc19bff78169"
69
+ "size": 445605,
70
+ "hash": "00098d5d1961b7d49a912ae1b82cc09dd528c3b4d84e7562821344599ccb1ea4"
71
71
  },
72
72
  "notifyBidirectionalSignatureRequest.verifier": {
73
73
  "type": "file",
74
- "size": 1351,
75
- "hash": "d36e5392bc781c69b136080843b96458d170304502f346f0d784fa8e133a54c3"
74
+ "size": 1353,
75
+ "hash": "79a18d16c3486302eeb8ec7129d928778a408b9e5eba7d45bec6fea4594311bc"
76
76
  },
77
77
  "postRespondBidirectional.prover": {
78
78
  "type": "file",
79
- "size": 42669264,
80
- "hash": "ed3c339e691a1aed030f3b173f09254174e1021aced0eb42e8315a4e7e762888"
79
+ "size": 117450403,
80
+ "hash": "199fe22cb12a4c32e8033a0cdc53f30880a42b33ca6f11305b581028229a5327"
81
81
  },
82
82
  "postRespondBidirectional.verifier": {
83
83
  "type": "file",
84
- "size": 2311,
85
- "hash": "0c245f8a93de6fec296de814b7b6424ebad1ac62375ab134fb4d9868b6df95d0"
84
+ "size": 2745,
85
+ "hash": "02f784f3fde56567349ba646b0afb3bfdd70af5da4d822764b9d9f1c2138ab88"
86
86
  },
87
87
  "postSignatureResponse.prover": {
88
88
  "type": "file",
89
- "size": 544009,
90
- "hash": "7437538793a12c5eb6f83cec155d49ad64a0190cec76ec46e58fd282fe7923d9"
89
+ "size": 446489,
90
+ "hash": "964b3039fa2c3775d89cdf882b37a9b6548bd9979f999383ce81ae9d19031a2f"
91
91
  },
92
92
  "postSignatureResponse.verifier": {
93
93
  "type": "file",
94
- "size": 1351,
95
- "hash": "aece39967c6c69cac6a8215b841ef62dd49ceb16a97804a0b67621ef36cdc22e"
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
- pk: __compactRuntime.JubjubPoint,
24
- announcement: __compactRuntime.JubjubPoint,
25
- response: bigint
26
- }): Promise<__compactRuntime.CircuitResults<PS, []>>;
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
- pk: __compactRuntime.JubjubPoint,
47
- announcement: __compactRuntime.JubjubPoint,
48
- response: bigint
49
- }): Promise<__compactRuntime.CircuitResults<PS, []>>;
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
- pk: __compactRuntime.JubjubPoint,
73
- announcement: __compactRuntime.JubjubPoint,
74
- response: bigint
75
- }): Promise<__compactRuntime.CircuitResults<PS, []>>;
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
- pk: __compactRuntime.JubjubPoint,
103
- announcement: __compactRuntime.JubjubPoint,
104
- response: bigint
102
+ sigR: Uint8Array,
103
+ sigS: Uint8Array
105
104
  };
106
105
  [Symbol.iterator](): Iterator<[Uint8Array, { serializedOutput: Uint8Array,
107
106
  outputLen: bigint,
108
- pk: __compactRuntime.JubjubPoint,
109
- announcement: __compactRuntime.JubjubPoint,
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.JubjubPoint): Promise<__compactRuntime.ConstructorResult<PS>>;
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;