@sig-net/midnight 0.0.5 → 0.0.7

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.
Files changed (58) hide show
  1. package/README.md +8 -0
  2. package/dist/constants.d.ts +4 -16
  3. package/dist/constants.d.ts.map +1 -1
  4. package/dist/constants.js +4 -16
  5. package/dist/constants.js.map +1 -1
  6. package/dist/ecdsa-attestation.d.ts +79 -0
  7. package/dist/ecdsa-attestation.d.ts.map +1 -0
  8. package/dist/ecdsa-attestation.js +140 -0
  9. package/dist/ecdsa-attestation.js.map +1 -0
  10. package/dist/epsilon-derivation.d.ts +60 -0
  11. package/dist/epsilon-derivation.d.ts.map +1 -1
  12. package/dist/epsilon-derivation.js +106 -5
  13. package/dist/epsilon-derivation.js.map +1 -1
  14. package/dist/index.d.ts +9 -7
  15. package/dist/index.d.ts.map +1 -1
  16. package/dist/index.js +9 -7
  17. package/dist/index.js.map +1 -1
  18. package/dist/managed/compiler/contract-info.json +70 -95
  19. package/dist/managed/compiler/contract-manifest.json +8 -8
  20. package/dist/managed/contract/index.d.ts +38 -42
  21. package/dist/managed/contract/index.js +225 -478
  22. package/dist/managed/contract/index.js.map +2 -2
  23. package/dist/signature-requests-state-reader.d.ts +14 -13
  24. package/dist/signature-requests-state-reader.d.ts.map +1 -1
  25. package/dist/signature-requests-state-reader.js +31 -20
  26. package/dist/signature-requests-state-reader.js.map +1 -1
  27. package/dist/signature-response-verification.d.ts +5 -5
  28. package/dist/signature-response-verification.d.ts.map +1 -1
  29. package/dist/signature-response-verification.js +4 -4
  30. package/dist/signature-response-verification.js.map +1 -1
  31. package/dist/signet-contract-state-reader.d.ts +102 -109
  32. package/dist/signet-contract-state-reader.d.ts.map +1 -1
  33. package/dist/signet-contract-state-reader.js +125 -119
  34. package/dist/signet-contract-state-reader.js.map +1 -1
  35. package/dist/signet-request-feed.d.ts +4 -3
  36. package/dist/signet-request-feed.d.ts.map +1 -1
  37. package/dist/signet-request-feed.js +9 -8
  38. package/dist/signet-request-feed.js.map +1 -1
  39. package/dist/signet-request-resolver.d.ts +6 -4
  40. package/dist/signet-request-resolver.d.ts.map +1 -1
  41. package/dist/signet-request-resolver.js +8 -6
  42. package/dist/signet-request-resolver.js.map +1 -1
  43. package/dist/signet-request-response-reader.d.ts +21 -20
  44. package/dist/signet-request-response-reader.d.ts.map +1 -1
  45. package/dist/signet-request-response-reader.js +35 -23
  46. package/dist/signet-request-response-reader.js.map +1 -1
  47. package/dist/signet-requests.d.ts +93 -59
  48. package/dist/signet-requests.d.ts.map +1 -1
  49. package/dist/signet-requests.js +84 -67
  50. package/dist/signet-requests.js.map +1 -1
  51. package/package.json +2 -2
  52. package/src/Signet.compact +275 -413
  53. package/src/circuits.compact +24 -25
  54. package/dist/schnorr.d.ts +0 -100
  55. package/dist/schnorr.d.ts.map +0 -1
  56. package/dist/schnorr.js +0 -144
  57. package/dist/schnorr.js.map +0 -1
  58. package/src/Schnorr.compact +0 -63
@@ -4,7 +4,7 @@
4
4
  "runtime-version": "0.18.0-rc.1",
5
5
  "circuits": [
6
6
  {
7
- "name": "constructSignBidirectionalNotificationV1",
7
+ "name": "constructSignBidirectionalEventNotificationV1",
8
8
  "pure": true,
9
9
  "proof": false,
10
10
  "arguments": [
@@ -24,13 +24,6 @@
24
24
  ]
25
25
  }
26
26
  },
27
- {
28
- "name": "requestId",
29
- "type": {
30
- "type-name": "Bytes",
31
- "length": 32
32
- }
33
- },
34
27
  {
35
28
  "name": "requestsIndexField",
36
29
  "type": {
@@ -41,7 +34,7 @@
41
34
  ],
42
35
  "result-type": {
43
36
  "type-name": "Struct",
44
- "name": "SignBidirectionalNotification",
37
+ "name": "SignBidirectionalEventNotification",
45
38
  "elements": [
46
39
  {
47
40
  "name": "version",
@@ -54,31 +47,14 @@
54
47
  "name": "payload",
55
48
  "type": {
56
49
  "type-name": "Bytes",
57
- "length": 65
50
+ "length": 128
58
51
  }
59
52
  }
60
53
  ]
61
54
  }
62
55
  },
63
56
  {
64
- "name": "evmAddressAbiValue",
65
- "pure": true,
66
- "proof": false,
67
- "arguments": [
68
- {
69
- "name": "addr",
70
- "type": {
71
- "type-name": "Bytes",
72
- "length": 20
73
- }
74
- }
75
- ],
76
- "result-type": {
77
- "type-name": "Field"
78
- }
79
- },
80
- {
81
- "name": "signetAttestationMessage",
57
+ "name": "signetAttestationDigest",
82
58
  "pure": true,
83
59
  "proof": false,
84
60
  "arguments": [
@@ -109,107 +85,106 @@
109
85
  }
110
86
  ],
111
87
  "result-type": {
112
- "type-name": "Vector",
113
- "length": 4,
114
- "type": {
115
- "type-name": "Field"
116
- }
88
+ "type-name": "Bytes",
89
+ "length": 32
117
90
  }
118
91
  },
119
92
  {
120
- "name": "assertHexOf",
93
+ "name": "verifyRespondBidirectionalEvent",
121
94
  "pure": true,
122
95
  "proof": false,
123
96
  "arguments": [
124
97
  {
125
- "name": "commitment",
98
+ "name": "requestId",
126
99
  "type": {
127
- "type-name": "Bytes",
128
- "length": 32
100
+ "type-name": "Alias",
101
+ "name": "RequestId",
102
+ "type": {
103
+ "type-name": "Bytes",
104
+ "length": 32
105
+ }
129
106
  }
130
107
  },
131
108
  {
132
- "name": "hexStr",
133
- "type": {
134
- "type-name": "Bytes",
135
- "length": 64
136
- }
137
- }
138
- ],
139
- "result-type": {
140
- "type-name": "Tuple",
141
- "types": [
142
- ]
143
- }
144
- },
145
- {
146
- "name": "assertPathCommitment",
147
- "pure": true,
148
- "proof": false,
149
- "arguments": [
150
- {
151
- "name": "commitment",
109
+ "name": "respondBidirectionalEvent",
152
110
  "type": {
153
- "type-name": "Bytes",
154
- "length": 32
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
+ ]
155
150
  }
156
151
  },
157
152
  {
158
- "name": "path",
153
+ "name": "mpcResponseKey",
159
154
  "type": {
160
- "type-name": "Bytes",
161
- "length": 256
155
+ "type-name": "Alias",
156
+ "name": "Secp256k1Point",
157
+ "type": {
158
+ "type-name": "Opaque",
159
+ "tsType": "Secp256k1Point"
160
+ }
162
161
  }
163
162
  }
164
163
  ],
165
164
  "result-type": {
166
- "type-name": "Tuple",
167
- "types": [
168
- ]
165
+ "type-name": "Boolean"
169
166
  }
170
167
  },
171
168
  {
172
- "name": "schnorrChallenge",
169
+ "name": "signetKeyHash",
173
170
  "pure": true,
174
171
  "proof": false,
175
172
  "arguments": [
176
173
  {
177
- "name": "ann_x",
178
- "type": {
179
- "type-name": "Field"
180
- }
181
- },
182
- {
183
- "name": "ann_y",
184
- "type": {
185
- "type-name": "Field"
186
- }
187
- },
188
- {
189
- "name": "pk_x",
190
- "type": {
191
- "type-name": "Field"
192
- }
193
- },
194
- {
195
- "name": "pk_y",
174
+ "name": "pk",
196
175
  "type": {
197
- "type-name": "Field"
198
- }
199
- },
200
- {
201
- "name": "msg",
202
- "type": {
203
- "type-name": "Vector",
204
- "length": 4,
176
+ "type-name": "Alias",
177
+ "name": "Secp256k1Point",
205
178
  "type": {
206
- "type-name": "Field"
179
+ "type-name": "Opaque",
180
+ "tsType": "Secp256k1Point"
207
181
  }
208
182
  }
209
183
  }
210
184
  ],
211
185
  "result-type": {
212
- "type-name": "Field"
186
+ "type-name": "Bytes",
187
+ "length": 32
213
188
  }
214
189
  }
215
190
  ],
@@ -7,26 +7,26 @@
7
7
  "type": "directory",
8
8
  "contract-info.json": {
9
9
  "type": "file",
10
- "size": 4406,
11
- "hash": "1318a883cafbc6340a7aa9623524eb941d37b5b4080ea79dff8948a63e092e47"
10
+ "size": 4397,
11
+ "hash": "a9962a641c6b791f1a476adc5875d36de5cedb28b2377f016a8efb7ff644e526"
12
12
  }
13
13
  },
14
14
  "contract": {
15
15
  "type": "directory",
16
16
  "index.d.ts": {
17
17
  "type": "file",
18
- "size": 3842,
19
- "hash": "4edb5966c4b41a810691af9a12abcd359a517d95dcf6bb91faedef4da2d23019"
18
+ "size": 4176,
19
+ "hash": "6319da925c6f853b419c1794e449f732179d94d04b76b7334a634d4eed8f838d"
20
20
  },
21
21
  "index.js": {
22
22
  "type": "file",
23
- "size": 42552,
24
- "hash": "729bf0bd029c64471406cef2c9da38eaa62c4a88808c9a5d80f566f457c06a6c"
23
+ "size": 21045,
24
+ "hash": "15e7ced35995de9bc5fad3bb3fb9fe070e2d63f59f205140293bdd4b896d3b83"
25
25
  },
26
26
  "index.js.map": {
27
27
  "type": "file",
28
- "size": 3115,
29
- "hash": "2bc6ceb4c0492981f7bf539948c96408f98134c967e04e7c83d9289437481d43"
28
+ "size": 1922,
29
+ "hash": "b78095e48c3a891b91e89c87b687b420ee1ad595e7d11ac27ed4656a74cc0ea7"
30
30
  }
31
31
  }
32
32
  }
@@ -10,51 +10,47 @@ export type ProvableCircuits<PS> = {
10
10
  }
11
11
 
12
12
  export type PureCircuits = {
13
- constructSignBidirectionalNotificationV1(callerAddress_0: { bytes: Uint8Array
14
- },
15
- requestId_0: Uint8Array,
16
- requestsIndexField_0: bigint): { version: bigint,
17
- payload: Uint8Array
18
- };
19
- evmAddressAbiValue(addr_0: Uint8Array): bigint;
20
- signetAttestationMessage(requestId_0: Uint8Array,
21
- serializedOutput_0: Uint8Array,
22
- outputLen_0: bigint): bigint[];
23
- assertHexOf(commitment_0: Uint8Array, hexStr_0: Uint8Array): [];
24
- assertPathCommitment(commitment_0: Uint8Array, path_0: Uint8Array): [];
25
- schnorrChallenge(ann_x_0: bigint,
26
- ann_y_0: bigint,
27
- pk_x_0: bigint,
28
- pk_y_0: bigint,
29
- msg_0: bigint[]): bigint;
13
+ constructSignBidirectionalEventNotificationV1(callerAddress_0: { bytes: Uint8Array
14
+ },
15
+ requestsIndexField_0: bigint): { version: bigint,
16
+ payload: Uint8Array
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
+ signetKeyHash(pk_0: __compactRuntime.Secp256k1Point): Uint8Array;
30
30
  }
31
31
 
32
32
  export type Circuits<PS> = {
33
- constructSignBidirectionalNotificationV1(context: __compactRuntime.CircuitContext<PS>,
34
- callerAddress_0: { bytes: Uint8Array
35
- },
36
- requestId_0: Uint8Array,
37
- requestsIndexField_0: bigint): Promise<__compactRuntime.CircuitResults<PS, { version: bigint,
38
- payload: Uint8Array
39
- }>>;
40
- evmAddressAbiValue(context: __compactRuntime.CircuitContext<PS>,
41
- addr_0: Uint8Array): Promise<__compactRuntime.CircuitResults<PS, bigint>>;
42
- signetAttestationMessage(context: __compactRuntime.CircuitContext<PS>,
43
- requestId_0: Uint8Array,
44
- serializedOutput_0: Uint8Array,
45
- outputLen_0: bigint): Promise<__compactRuntime.CircuitResults<PS, bigint[]>>;
46
- assertHexOf(context: __compactRuntime.CircuitContext<PS>,
47
- commitment_0: Uint8Array,
48
- hexStr_0: Uint8Array): Promise<__compactRuntime.CircuitResults<PS, []>>;
49
- assertPathCommitment(context: __compactRuntime.CircuitContext<PS>,
50
- commitment_0: Uint8Array,
51
- path_0: Uint8Array): Promise<__compactRuntime.CircuitResults<PS, []>>;
52
- schnorrChallenge(context: __compactRuntime.CircuitContext<PS>,
53
- ann_x_0: bigint,
54
- ann_y_0: bigint,
55
- pk_x_0: bigint,
56
- pk_y_0: bigint,
57
- msg_0: bigint[]): Promise<__compactRuntime.CircuitResults<PS, bigint>>;
33
+ constructSignBidirectionalEventNotificationV1(context: __compactRuntime.CircuitContext<PS>,
34
+ callerAddress_0: { bytes: Uint8Array
35
+ },
36
+ requestsIndexField_0: bigint): Promise<__compactRuntime.CircuitResults<PS, { version: bigint,
37
+ payload: Uint8Array
38
+ }>>;
39
+ signetAttestationDigest(context: __compactRuntime.CircuitContext<PS>,
40
+ requestId_0: Uint8Array,
41
+ serializedOutput_0: Uint8Array,
42
+ outputLen_0: bigint): Promise<__compactRuntime.CircuitResults<PS, Uint8Array>>;
43
+ verifyRespondBidirectionalEvent(context: __compactRuntime.CircuitContext<PS>,
44
+ requestId_0: Uint8Array,
45
+ respondBidirectionalEvent_0: { serializedOutput: Uint8Array,
46
+ outputLen: bigint,
47
+ r: Uint8Array,
48
+ s: Uint8Array,
49
+ recoveryId: bigint
50
+ },
51
+ mpcResponseKey_0: __compactRuntime.Secp256k1Point): Promise<__compactRuntime.CircuitResults<PS, boolean>>;
52
+ signetKeyHash(context: __compactRuntime.CircuitContext<PS>,
53
+ pk_0: __compactRuntime.Secp256k1Point): Promise<__compactRuntime.CircuitResults<PS, Uint8Array>>;
58
54
  }
59
55
 
60
56
  export type Ledger = {