@sig-net/midnight-contract 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.
- package/dist/managed/compiler/contract-info.json +148 -87
- package/dist/managed/compiler/contract-manifest.json +44 -44
- package/dist/managed/contract/index.d.ts +85 -70
- package/dist/managed/contract/index.js +570 -406
- package/dist/managed/contract/index.js.map +2 -2
- 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/keys/signBidirectionalEvent.prover +0 -0
- package/dist/managed/keys/signBidirectionalEvent.verifier +0 -0
- package/dist/managed/zkir/postRespondBidirectional.bzkir +0 -0
- package/dist/managed/zkir/postRespondBidirectional.zkir +55 -337
- package/dist/managed/zkir/postSignatureResponse.bzkir +0 -0
- package/dist/managed/zkir/postSignatureResponse.zkir +47 -150
- package/dist/managed/zkir/signBidirectionalEvent.bzkir +0 -0
- package/dist/managed/zkir/signBidirectionalEvent.zkir +56 -0
- package/package.json +4 -4
- package/dist/managed/keys/notifyBidirectionalSignatureRequest.prover +0 -0
- package/dist/managed/keys/notifyBidirectionalSignatureRequest.verifier +0 -0
- package/dist/managed/zkir/notifyBidirectionalSignatureRequest.bzkir +0 -0
- package/dist/managed/zkir/notifyBidirectionalSignatureRequest.zkir +0 -49
|
@@ -9,7 +9,7 @@ const _descriptor_2 = __compactRuntime.CompactTypeBoolean;
|
|
|
9
9
|
|
|
10
10
|
const _descriptor_3 = new __compactRuntime.CompactTypeUnsignedInteger(65535n, 2);
|
|
11
11
|
|
|
12
|
-
class
|
|
12
|
+
class _SignetMapKey_0 {
|
|
13
13
|
alignment() {
|
|
14
14
|
return _descriptor_1.alignment().concat(_descriptor_0.alignment());
|
|
15
15
|
}
|
|
@@ -24,116 +24,67 @@ class _SignetResponseKey_0 {
|
|
|
24
24
|
}
|
|
25
25
|
}
|
|
26
26
|
|
|
27
|
-
const _descriptor_4 = new
|
|
27
|
+
const _descriptor_4 = new _SignetMapKey_0();
|
|
28
28
|
|
|
29
|
-
const _descriptor_5 = new __compactRuntime.
|
|
29
|
+
const _descriptor_5 = new __compactRuntime.CompactTypeBytes(128);
|
|
30
30
|
|
|
31
|
-
|
|
32
|
-
alignment() {
|
|
33
|
-
return _descriptor_0.alignment().concat(_descriptor_0.alignment().concat(_descriptor_0.alignment().concat(_descriptor_5.alignment())));
|
|
34
|
-
}
|
|
35
|
-
fromValue(value_0) {
|
|
36
|
-
return {
|
|
37
|
-
bigRx: _descriptor_0.fromValue(value_0),
|
|
38
|
-
bigRy: _descriptor_0.fromValue(value_0),
|
|
39
|
-
s: _descriptor_0.fromValue(value_0),
|
|
40
|
-
recoveryId: _descriptor_5.fromValue(value_0)
|
|
41
|
-
}
|
|
42
|
-
}
|
|
43
|
-
toValue(value_0) {
|
|
44
|
-
return _descriptor_0.toValue(value_0.bigRx).concat(_descriptor_0.toValue(value_0.bigRy).concat(_descriptor_0.toValue(value_0.s).concat(_descriptor_5.toValue(value_0.recoveryId))));
|
|
45
|
-
}
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
const _descriptor_6 = new _SignatureResponse_0();
|
|
49
|
-
|
|
50
|
-
const _descriptor_7 = new __compactRuntime.CompactTypeBytes(128);
|
|
51
|
-
|
|
52
|
-
const _descriptor_8 = __compactRuntime.CompactTypeJubjubPoint;
|
|
53
|
-
|
|
54
|
-
const _descriptor_9 = __compactRuntime.CompactTypeField;
|
|
55
|
-
|
|
56
|
-
class _RespondBidirectional_0 {
|
|
57
|
-
alignment() {
|
|
58
|
-
return _descriptor_7.alignment().concat(_descriptor_5.alignment().concat(_descriptor_8.alignment().concat(_descriptor_8.alignment().concat(_descriptor_9.alignment()))));
|
|
59
|
-
}
|
|
60
|
-
fromValue(value_0) {
|
|
61
|
-
return {
|
|
62
|
-
serializedOutput: _descriptor_7.fromValue(value_0),
|
|
63
|
-
outputLen: _descriptor_5.fromValue(value_0),
|
|
64
|
-
pk: _descriptor_8.fromValue(value_0),
|
|
65
|
-
announcement: _descriptor_8.fromValue(value_0),
|
|
66
|
-
response: _descriptor_9.fromValue(value_0)
|
|
67
|
-
}
|
|
68
|
-
}
|
|
69
|
-
toValue(value_0) {
|
|
70
|
-
return _descriptor_7.toValue(value_0.serializedOutput).concat(_descriptor_5.toValue(value_0.outputLen).concat(_descriptor_8.toValue(value_0.pk).concat(_descriptor_8.toValue(value_0.announcement).concat(_descriptor_9.toValue(value_0.response)))));
|
|
71
|
-
}
|
|
72
|
-
}
|
|
73
|
-
|
|
74
|
-
const _descriptor_10 = new _RespondBidirectional_0();
|
|
75
|
-
|
|
76
|
-
const _descriptor_11 = new __compactRuntime.CompactTypeVector(4, _descriptor_9);
|
|
77
|
-
|
|
78
|
-
const _descriptor_12 = new __compactRuntime.CompactTypeBytes(65);
|
|
31
|
+
const _descriptor_6 = new __compactRuntime.CompactTypeUnsignedInteger(255n, 1);
|
|
79
32
|
|
|
80
|
-
class
|
|
33
|
+
class _RespondBidirectionalEvent_0 {
|
|
81
34
|
alignment() {
|
|
82
|
-
return _descriptor_5.alignment().concat(
|
|
35
|
+
return _descriptor_5.alignment().concat(_descriptor_6.alignment().concat(_descriptor_0.alignment().concat(_descriptor_0.alignment().concat(_descriptor_6.alignment()))));
|
|
83
36
|
}
|
|
84
37
|
fromValue(value_0) {
|
|
85
38
|
return {
|
|
86
|
-
|
|
87
|
-
|
|
39
|
+
serializedOutput: _descriptor_5.fromValue(value_0),
|
|
40
|
+
outputLen: _descriptor_6.fromValue(value_0),
|
|
41
|
+
r: _descriptor_0.fromValue(value_0),
|
|
42
|
+
s: _descriptor_0.fromValue(value_0),
|
|
43
|
+
recoveryId: _descriptor_6.fromValue(value_0)
|
|
88
44
|
}
|
|
89
45
|
}
|
|
90
46
|
toValue(value_0) {
|
|
91
|
-
return _descriptor_5.toValue(value_0.
|
|
47
|
+
return _descriptor_5.toValue(value_0.serializedOutput).concat(_descriptor_6.toValue(value_0.outputLen).concat(_descriptor_0.toValue(value_0.r).concat(_descriptor_0.toValue(value_0.s).concat(_descriptor_6.toValue(value_0.recoveryId)))));
|
|
92
48
|
}
|
|
93
49
|
}
|
|
94
50
|
|
|
95
|
-
const
|
|
96
|
-
|
|
97
|
-
const _descriptor_14 = __compactRuntime.CompactTypeField;
|
|
98
|
-
|
|
99
|
-
const _descriptor_15 = new __compactRuntime.CompactTypeVector(2, _descriptor_0);
|
|
51
|
+
const _descriptor_7 = new _RespondBidirectionalEvent_0();
|
|
100
52
|
|
|
101
|
-
class
|
|
53
|
+
class _SignBidirectionalEventNotification_0 {
|
|
102
54
|
alignment() {
|
|
103
|
-
return
|
|
55
|
+
return _descriptor_6.alignment().concat(_descriptor_5.alignment());
|
|
104
56
|
}
|
|
105
57
|
fromValue(value_0) {
|
|
106
58
|
return {
|
|
107
|
-
|
|
108
|
-
|
|
59
|
+
version: _descriptor_6.fromValue(value_0),
|
|
60
|
+
payload: _descriptor_5.fromValue(value_0)
|
|
109
61
|
}
|
|
110
62
|
}
|
|
111
63
|
toValue(value_0) {
|
|
112
|
-
return
|
|
64
|
+
return _descriptor_6.toValue(value_0.version).concat(_descriptor_5.toValue(value_0.payload));
|
|
113
65
|
}
|
|
114
66
|
}
|
|
115
67
|
|
|
116
|
-
const
|
|
68
|
+
const _descriptor_8 = new _SignBidirectionalEventNotification_0();
|
|
117
69
|
|
|
118
|
-
class
|
|
70
|
+
class _SignatureRespondedEvent_0 {
|
|
119
71
|
alignment() {
|
|
120
|
-
return
|
|
72
|
+
return _descriptor_0.alignment().concat(_descriptor_0.alignment().concat(_descriptor_0.alignment().concat(_descriptor_6.alignment())));
|
|
121
73
|
}
|
|
122
74
|
fromValue(value_0) {
|
|
123
75
|
return {
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
msg: _descriptor_11.fromValue(value_0)
|
|
76
|
+
bigRx: _descriptor_0.fromValue(value_0),
|
|
77
|
+
bigRy: _descriptor_0.fromValue(value_0),
|
|
78
|
+
s: _descriptor_0.fromValue(value_0),
|
|
79
|
+
recoveryId: _descriptor_6.fromValue(value_0)
|
|
129
80
|
}
|
|
130
81
|
}
|
|
131
82
|
toValue(value_0) {
|
|
132
|
-
return
|
|
83
|
+
return _descriptor_0.toValue(value_0.bigRx).concat(_descriptor_0.toValue(value_0.bigRy).concat(_descriptor_0.toValue(value_0.s).concat(_descriptor_6.toValue(value_0.recoveryId))));
|
|
133
84
|
}
|
|
134
85
|
}
|
|
135
86
|
|
|
136
|
-
const
|
|
87
|
+
const _descriptor_9 = new _SignatureRespondedEvent_0();
|
|
137
88
|
|
|
138
89
|
class _Either_0 {
|
|
139
90
|
alignment() {
|
|
@@ -151,9 +102,9 @@ class _Either_0 {
|
|
|
151
102
|
}
|
|
152
103
|
}
|
|
153
104
|
|
|
154
|
-
const
|
|
105
|
+
const _descriptor_10 = new _Either_0();
|
|
155
106
|
|
|
156
|
-
const
|
|
107
|
+
const _descriptor_11 = new __compactRuntime.CompactTypeUnsignedInteger(340282366920938463463374607431768211455n, 16);
|
|
157
108
|
|
|
158
109
|
class _ContractAddress_0 {
|
|
159
110
|
alignment() {
|
|
@@ -169,9 +120,9 @@ class _ContractAddress_0 {
|
|
|
169
120
|
}
|
|
170
121
|
}
|
|
171
122
|
|
|
172
|
-
const
|
|
123
|
+
const _descriptor_12 = new _ContractAddress_0();
|
|
173
124
|
|
|
174
|
-
const
|
|
125
|
+
const _descriptor_13 = new __compactRuntime.CompactTypeUnsignedInteger(4294967295n, 4);
|
|
175
126
|
|
|
176
127
|
export class Contract {
|
|
177
128
|
witnesses;
|
|
@@ -185,49 +136,49 @@ export class Contract {
|
|
|
185
136
|
}
|
|
186
137
|
this.witnesses = witnesses_0;
|
|
187
138
|
this.circuits = {
|
|
188
|
-
|
|
139
|
+
signBidirectionalEvent: async (...args_1) => {
|
|
189
140
|
if (args_1.length !== 3) {
|
|
190
|
-
throw new __compactRuntime.CompactError(`
|
|
141
|
+
throw new __compactRuntime.CompactError(`signBidirectionalEvent: expected 3 arguments (as invoked from Typescript), received ${args_1.length}`);
|
|
191
142
|
}
|
|
192
143
|
const contextOrig_0 = args_1[0];
|
|
193
144
|
const requestId_0 = args_1[1];
|
|
194
145
|
const notification_0 = args_1[2];
|
|
195
146
|
if (!(typeof(contextOrig_0) === 'object' && contextOrig_0.callContext.currentQueryContext != undefined)) {
|
|
196
|
-
__compactRuntime.typeError('
|
|
147
|
+
__compactRuntime.typeError('signBidirectionalEvent',
|
|
197
148
|
'argument 1 (as invoked from Typescript)',
|
|
198
|
-
'signet-contract.compact line
|
|
149
|
+
'signet-contract.compact line 37 char 1',
|
|
199
150
|
'CircuitContext',
|
|
200
151
|
contextOrig_0)
|
|
201
152
|
}
|
|
202
153
|
if (!(requestId_0.buffer instanceof ArrayBuffer && requestId_0.BYTES_PER_ELEMENT === 1 && requestId_0.length === 32)) {
|
|
203
|
-
__compactRuntime.typeError('
|
|
154
|
+
__compactRuntime.typeError('signBidirectionalEvent',
|
|
204
155
|
'argument 1 (argument 2 as invoked from Typescript)',
|
|
205
|
-
'signet-contract.compact line
|
|
156
|
+
'signet-contract.compact line 37 char 1',
|
|
206
157
|
'Bytes<32>',
|
|
207
158
|
requestId_0)
|
|
208
159
|
}
|
|
209
|
-
if (!(typeof(notification_0) === 'object' && typeof(notification_0.version) === 'bigint' && notification_0.version >= 0n && notification_0.version <= 255n && notification_0.payload.buffer instanceof ArrayBuffer && notification_0.payload.BYTES_PER_ELEMENT === 1 && notification_0.payload.length ===
|
|
210
|
-
__compactRuntime.typeError('
|
|
160
|
+
if (!(typeof(notification_0) === 'object' && typeof(notification_0.version) === 'bigint' && notification_0.version >= 0n && notification_0.version <= 255n && notification_0.payload.buffer instanceof ArrayBuffer && notification_0.payload.BYTES_PER_ELEMENT === 1 && notification_0.payload.length === 128)) {
|
|
161
|
+
__compactRuntime.typeError('signBidirectionalEvent',
|
|
211
162
|
'argument 2 (argument 3 as invoked from Typescript)',
|
|
212
|
-
'signet-contract.compact line
|
|
213
|
-
'struct
|
|
163
|
+
'signet-contract.compact line 37 char 1',
|
|
164
|
+
'struct SignBidirectionalEventNotification<version: Uint<0..256>, payload: Bytes<128>>',
|
|
214
165
|
notification_0)
|
|
215
166
|
}
|
|
216
167
|
const context = __compactRuntime.copyCircuitContext(contextOrig_0);
|
|
217
168
|
const partialProofData = {
|
|
218
169
|
input: {
|
|
219
|
-
value: _descriptor_0.toValue(requestId_0).concat(
|
|
220
|
-
alignment: _descriptor_0.alignment().concat(
|
|
170
|
+
value: _descriptor_0.toValue(requestId_0).concat(_descriptor_8.toValue(notification_0)),
|
|
171
|
+
alignment: _descriptor_0.alignment().concat(_descriptor_8.alignment())
|
|
221
172
|
},
|
|
222
173
|
output: undefined,
|
|
223
174
|
publicTranscript: [],
|
|
224
175
|
privateTranscriptOutputs: []
|
|
225
176
|
};
|
|
226
|
-
const result_0 = await this.
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
partialProofData.output = { value:
|
|
177
|
+
const result_0 = await this._signBidirectionalEvent_0(context,
|
|
178
|
+
partialProofData,
|
|
179
|
+
requestId_0,
|
|
180
|
+
notification_0);
|
|
181
|
+
partialProofData.output = { value: _descriptor_4.toValue(result_0), alignment: _descriptor_4.alignment() };
|
|
231
182
|
__compactRuntime.finalizeCallProofData(context, partialProofData);
|
|
232
183
|
return { result: result_0, context: context, gasCost: context.callContext.currentGasCost };
|
|
233
184
|
},
|
|
@@ -237,33 +188,33 @@ export class Contract {
|
|
|
237
188
|
}
|
|
238
189
|
const contextOrig_0 = args_1[0];
|
|
239
190
|
const requestId_0 = args_1[1];
|
|
240
|
-
const
|
|
191
|
+
const signatureRespondedEvent_0 = args_1[2];
|
|
241
192
|
if (!(typeof(contextOrig_0) === 'object' && contextOrig_0.callContext.currentQueryContext != undefined)) {
|
|
242
193
|
__compactRuntime.typeError('postSignatureResponse',
|
|
243
194
|
'argument 1 (as invoked from Typescript)',
|
|
244
|
-
'signet-contract.compact line
|
|
195
|
+
'signet-contract.compact line 66 char 1',
|
|
245
196
|
'CircuitContext',
|
|
246
197
|
contextOrig_0)
|
|
247
198
|
}
|
|
248
199
|
if (!(requestId_0.buffer instanceof ArrayBuffer && requestId_0.BYTES_PER_ELEMENT === 1 && requestId_0.length === 32)) {
|
|
249
200
|
__compactRuntime.typeError('postSignatureResponse',
|
|
250
201
|
'argument 1 (argument 2 as invoked from Typescript)',
|
|
251
|
-
'signet-contract.compact line
|
|
202
|
+
'signet-contract.compact line 66 char 1',
|
|
252
203
|
'Bytes<32>',
|
|
253
204
|
requestId_0)
|
|
254
205
|
}
|
|
255
|
-
if (!(typeof(
|
|
206
|
+
if (!(typeof(signatureRespondedEvent_0) === 'object' && signatureRespondedEvent_0.bigRx.buffer instanceof ArrayBuffer && signatureRespondedEvent_0.bigRx.BYTES_PER_ELEMENT === 1 && signatureRespondedEvent_0.bigRx.length === 32 && signatureRespondedEvent_0.bigRy.buffer instanceof ArrayBuffer && signatureRespondedEvent_0.bigRy.BYTES_PER_ELEMENT === 1 && signatureRespondedEvent_0.bigRy.length === 32 && signatureRespondedEvent_0.s.buffer instanceof ArrayBuffer && signatureRespondedEvent_0.s.BYTES_PER_ELEMENT === 1 && signatureRespondedEvent_0.s.length === 32 && typeof(signatureRespondedEvent_0.recoveryId) === 'bigint' && signatureRespondedEvent_0.recoveryId >= 0n && signatureRespondedEvent_0.recoveryId <= 255n)) {
|
|
256
207
|
__compactRuntime.typeError('postSignatureResponse',
|
|
257
208
|
'argument 2 (argument 3 as invoked from Typescript)',
|
|
258
|
-
'signet-contract.compact line
|
|
259
|
-
'struct
|
|
260
|
-
|
|
209
|
+
'signet-contract.compact line 66 char 1',
|
|
210
|
+
'struct SignatureRespondedEvent<bigRx: Bytes<32>, bigRy: Bytes<32>, s: Bytes<32>, recoveryId: Uint<0..256>>',
|
|
211
|
+
signatureRespondedEvent_0)
|
|
261
212
|
}
|
|
262
213
|
const context = __compactRuntime.copyCircuitContext(contextOrig_0);
|
|
263
214
|
const partialProofData = {
|
|
264
215
|
input: {
|
|
265
|
-
value: _descriptor_0.toValue(requestId_0).concat(
|
|
266
|
-
alignment: _descriptor_0.alignment().concat(
|
|
216
|
+
value: _descriptor_0.toValue(requestId_0).concat(_descriptor_9.toValue(signatureRespondedEvent_0)),
|
|
217
|
+
alignment: _descriptor_0.alignment().concat(_descriptor_9.alignment())
|
|
267
218
|
},
|
|
268
219
|
output: undefined,
|
|
269
220
|
publicTranscript: [],
|
|
@@ -272,7 +223,7 @@ export class Contract {
|
|
|
272
223
|
const result_0 = await this._postSignatureResponse_0(context,
|
|
273
224
|
partialProofData,
|
|
274
225
|
requestId_0,
|
|
275
|
-
|
|
226
|
+
signatureRespondedEvent_0);
|
|
276
227
|
partialProofData.output = { value: [], alignment: [] };
|
|
277
228
|
__compactRuntime.finalizeCallProofData(context, partialProofData);
|
|
278
229
|
return { result: result_0, context: context, gasCost: context.callContext.currentGasCost };
|
|
@@ -283,33 +234,33 @@ export class Contract {
|
|
|
283
234
|
}
|
|
284
235
|
const contextOrig_0 = args_1[0];
|
|
285
236
|
const requestId_0 = args_1[1];
|
|
286
|
-
const
|
|
237
|
+
const respondBidirectionalEvent_0 = args_1[2];
|
|
287
238
|
if (!(typeof(contextOrig_0) === 'object' && contextOrig_0.callContext.currentQueryContext != undefined)) {
|
|
288
239
|
__compactRuntime.typeError('postRespondBidirectional',
|
|
289
240
|
'argument 1 (as invoked from Typescript)',
|
|
290
|
-
'signet-contract.compact line
|
|
241
|
+
'signet-contract.compact line 97 char 1',
|
|
291
242
|
'CircuitContext',
|
|
292
243
|
contextOrig_0)
|
|
293
244
|
}
|
|
294
245
|
if (!(requestId_0.buffer instanceof ArrayBuffer && requestId_0.BYTES_PER_ELEMENT === 1 && requestId_0.length === 32)) {
|
|
295
246
|
__compactRuntime.typeError('postRespondBidirectional',
|
|
296
247
|
'argument 1 (argument 2 as invoked from Typescript)',
|
|
297
|
-
'signet-contract.compact line
|
|
248
|
+
'signet-contract.compact line 97 char 1',
|
|
298
249
|
'Bytes<32>',
|
|
299
250
|
requestId_0)
|
|
300
251
|
}
|
|
301
|
-
if (!(typeof(
|
|
252
|
+
if (!(typeof(respondBidirectionalEvent_0) === 'object' && respondBidirectionalEvent_0.serializedOutput.buffer instanceof ArrayBuffer && respondBidirectionalEvent_0.serializedOutput.BYTES_PER_ELEMENT === 1 && respondBidirectionalEvent_0.serializedOutput.length === 128 && typeof(respondBidirectionalEvent_0.outputLen) === 'bigint' && respondBidirectionalEvent_0.outputLen >= 0n && respondBidirectionalEvent_0.outputLen <= 255n && respondBidirectionalEvent_0.r.buffer instanceof ArrayBuffer && respondBidirectionalEvent_0.r.BYTES_PER_ELEMENT === 1 && respondBidirectionalEvent_0.r.length === 32 && respondBidirectionalEvent_0.s.buffer instanceof ArrayBuffer && respondBidirectionalEvent_0.s.BYTES_PER_ELEMENT === 1 && respondBidirectionalEvent_0.s.length === 32 && typeof(respondBidirectionalEvent_0.recoveryId) === 'bigint' && respondBidirectionalEvent_0.recoveryId >= 0n && respondBidirectionalEvent_0.recoveryId <= 255n)) {
|
|
302
253
|
__compactRuntime.typeError('postRespondBidirectional',
|
|
303
254
|
'argument 2 (argument 3 as invoked from Typescript)',
|
|
304
|
-
'signet-contract.compact line
|
|
305
|
-
'struct
|
|
306
|
-
|
|
255
|
+
'signet-contract.compact line 97 char 1',
|
|
256
|
+
'struct RespondBidirectionalEvent<serializedOutput: Bytes<128>, outputLen: Uint<0..256>, r: Bytes<32>, s: Bytes<32>, recoveryId: Uint<0..256>>',
|
|
257
|
+
respondBidirectionalEvent_0)
|
|
307
258
|
}
|
|
308
259
|
const context = __compactRuntime.copyCircuitContext(contextOrig_0);
|
|
309
260
|
const partialProofData = {
|
|
310
261
|
input: {
|
|
311
|
-
value: _descriptor_0.toValue(requestId_0).concat(
|
|
312
|
-
alignment: _descriptor_0.alignment().concat(
|
|
262
|
+
value: _descriptor_0.toValue(requestId_0).concat(_descriptor_7.toValue(respondBidirectionalEvent_0)),
|
|
263
|
+
alignment: _descriptor_0.alignment().concat(_descriptor_7.alignment())
|
|
313
264
|
},
|
|
314
265
|
output: undefined,
|
|
315
266
|
publicTranscript: [],
|
|
@@ -318,29 +269,28 @@ export class Contract {
|
|
|
318
269
|
const result_0 = await this._postRespondBidirectional_0(context,
|
|
319
270
|
partialProofData,
|
|
320
271
|
requestId_0,
|
|
321
|
-
|
|
272
|
+
respondBidirectionalEvent_0);
|
|
322
273
|
partialProofData.output = { value: [], alignment: [] };
|
|
323
274
|
__compactRuntime.finalizeCallProofData(context, partialProofData);
|
|
324
275
|
return { result: result_0, context: context, gasCost: context.callContext.currentGasCost };
|
|
325
276
|
}
|
|
326
277
|
};
|
|
327
278
|
this.impureCircuits = {
|
|
328
|
-
|
|
279
|
+
signBidirectionalEvent: this.circuits.signBidirectionalEvent,
|
|
329
280
|
postSignatureResponse: this.circuits.postSignatureResponse,
|
|
330
281
|
postRespondBidirectional: this.circuits.postRespondBidirectional
|
|
331
282
|
};
|
|
332
283
|
this.provableCircuits = {
|
|
333
|
-
|
|
284
|
+
signBidirectionalEvent: this.circuits.signBidirectionalEvent,
|
|
334
285
|
postSignatureResponse: this.circuits.postSignatureResponse,
|
|
335
286
|
postRespondBidirectional: this.circuits.postRespondBidirectional
|
|
336
287
|
};
|
|
337
288
|
}
|
|
338
289
|
async initialState(...args_0) {
|
|
339
|
-
if (args_0.length !==
|
|
340
|
-
throw new __compactRuntime.CompactError(`Contract state constructor: expected
|
|
290
|
+
if (args_0.length !== 1) {
|
|
291
|
+
throw new __compactRuntime.CompactError(`Contract state constructor: expected 1 argument (as invoked from Typescript), received ${args_0.length}`);
|
|
341
292
|
}
|
|
342
293
|
const constructorContext_0 = args_0[0];
|
|
343
|
-
const mpcPk_0 = args_0[1];
|
|
344
294
|
if (typeof(constructorContext_0) !== 'object') {
|
|
345
295
|
throw new __compactRuntime.CompactError(`Contract state constructor: expected 'constructorContext' in argument 1 (as invoked from Typescript) to be an object`);
|
|
346
296
|
}
|
|
@@ -357,8 +307,9 @@ export class Contract {
|
|
|
357
307
|
stateValue_0 = stateValue_0.arrayPush(__compactRuntime.StateValue.newNull());
|
|
358
308
|
stateValue_0 = stateValue_0.arrayPush(__compactRuntime.StateValue.newNull());
|
|
359
309
|
stateValue_0 = stateValue_0.arrayPush(__compactRuntime.StateValue.newNull());
|
|
310
|
+
stateValue_0 = stateValue_0.arrayPush(__compactRuntime.StateValue.newNull());
|
|
360
311
|
state_0.data = new __compactRuntime.ChargedState(stateValue_0);
|
|
361
|
-
state_0.setOperation('
|
|
312
|
+
state_0.setOperation('signBidirectionalEvent', new __compactRuntime.ContractOperation());
|
|
362
313
|
state_0.setOperation('postSignatureResponse', new __compactRuntime.ContractOperation());
|
|
363
314
|
state_0.setOperation('postRespondBidirectional', new __compactRuntime.ContractOperation());
|
|
364
315
|
const context = __compactRuntime.createCircuitContext('constructor', __compactRuntime.dummyContractAddress(), constructorContext_0.initialZswapLocalState.coinPublicKey, state_0.data, constructorContext_0.initialPrivateState);
|
|
@@ -372,8 +323,8 @@ export class Contract {
|
|
|
372
323
|
partialProofData,
|
|
373
324
|
[
|
|
374
325
|
{ push: { storage: false,
|
|
375
|
-
value: __compactRuntime.StateValue.newCell({ value:
|
|
376
|
-
alignment:
|
|
326
|
+
value: __compactRuntime.StateValue.newCell({ value: _descriptor_6.toValue(0n),
|
|
327
|
+
alignment: _descriptor_6.alignment() }).encode() } },
|
|
377
328
|
{ push: { storage: true,
|
|
378
329
|
value: __compactRuntime.StateValue.newMap(
|
|
379
330
|
new __compactRuntime.StateMap()
|
|
@@ -383,8 +334,8 @@ export class Contract {
|
|
|
383
334
|
partialProofData,
|
|
384
335
|
[
|
|
385
336
|
{ push: { storage: false,
|
|
386
|
-
value: __compactRuntime.StateValue.newCell({ value:
|
|
387
|
-
alignment:
|
|
337
|
+
value: __compactRuntime.StateValue.newCell({ value: _descriptor_6.toValue(1n),
|
|
338
|
+
alignment: _descriptor_6.alignment() }).encode() } },
|
|
388
339
|
{ push: { storage: true,
|
|
389
340
|
value: __compactRuntime.StateValue.newMap(
|
|
390
341
|
new __compactRuntime.StateMap()
|
|
@@ -394,8 +345,8 @@ export class Contract {
|
|
|
394
345
|
partialProofData,
|
|
395
346
|
[
|
|
396
347
|
{ push: { storage: false,
|
|
397
|
-
value: __compactRuntime.StateValue.newCell({ value:
|
|
398
|
-
alignment:
|
|
348
|
+
value: __compactRuntime.StateValue.newCell({ value: _descriptor_6.toValue(2n),
|
|
349
|
+
alignment: _descriptor_6.alignment() }).encode() } },
|
|
399
350
|
{ push: { storage: true,
|
|
400
351
|
value: __compactRuntime.StateValue.newMap(
|
|
401
352
|
new __compactRuntime.StateMap()
|
|
@@ -405,33 +356,34 @@ export class Contract {
|
|
|
405
356
|
partialProofData,
|
|
406
357
|
[
|
|
407
358
|
{ push: { storage: false,
|
|
408
|
-
value: __compactRuntime.StateValue.newCell({ value:
|
|
409
|
-
alignment:
|
|
359
|
+
value: __compactRuntime.StateValue.newCell({ value: _descriptor_6.toValue(3n),
|
|
360
|
+
alignment: _descriptor_6.alignment() }).encode() } },
|
|
410
361
|
{ push: { storage: true,
|
|
411
|
-
value: __compactRuntime.StateValue.
|
|
412
|
-
|
|
362
|
+
value: __compactRuntime.StateValue.newMap(
|
|
363
|
+
new __compactRuntime.StateMap()
|
|
364
|
+
).encode() } },
|
|
413
365
|
{ ins: { cached: false, n: 1 } }]);
|
|
414
366
|
__compactRuntime.queryLedgerState(context,
|
|
415
367
|
partialProofData,
|
|
416
368
|
[
|
|
417
369
|
{ push: { storage: false,
|
|
418
|
-
value: __compactRuntime.StateValue.newCell({ value:
|
|
419
|
-
alignment:
|
|
370
|
+
value: __compactRuntime.StateValue.newCell({ value: _descriptor_6.toValue(4n),
|
|
371
|
+
alignment: _descriptor_6.alignment() }).encode() } },
|
|
420
372
|
{ push: { storage: true,
|
|
421
373
|
value: __compactRuntime.StateValue.newMap(
|
|
422
374
|
new __compactRuntime.StateMap()
|
|
423
375
|
).encode() } },
|
|
424
376
|
{ ins: { cached: false, n: 1 } }]);
|
|
425
|
-
const tmp_0 = this._persistentHash_0(mpcPk_0);
|
|
426
377
|
__compactRuntime.queryLedgerState(context,
|
|
427
378
|
partialProofData,
|
|
428
379
|
[
|
|
429
380
|
{ push: { storage: false,
|
|
430
|
-
value: __compactRuntime.StateValue.newCell({ value:
|
|
431
|
-
alignment:
|
|
381
|
+
value: __compactRuntime.StateValue.newCell({ value: _descriptor_6.toValue(5n),
|
|
382
|
+
alignment: _descriptor_6.alignment() }).encode() } },
|
|
432
383
|
{ push: { storage: true,
|
|
433
|
-
value: __compactRuntime.StateValue.
|
|
434
|
-
|
|
384
|
+
value: __compactRuntime.StateValue.newMap(
|
|
385
|
+
new __compactRuntime.StateMap()
|
|
386
|
+
).encode() } },
|
|
435
387
|
{ ins: { cached: false, n: 1 } }]);
|
|
436
388
|
state_0.data = new __compactRuntime.ChargedState(context.callContext.currentQueryContext.state.state);
|
|
437
389
|
return {
|
|
@@ -440,94 +392,84 @@ export class Contract {
|
|
|
440
392
|
currentZswapLocalState: context.callContext.currentZswapLocalState
|
|
441
393
|
}
|
|
442
394
|
}
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
const cNative_0 = this._transientHash_0({ annX:
|
|
448
|
-
this._jubjubPointX_0(announcement_0),
|
|
449
|
-
annY:
|
|
450
|
-
this._jubjubPointY_0(announcement_0),
|
|
451
|
-
pkX: this._jubjubPointX_0(pk_0),
|
|
452
|
-
pkY: this._jubjubPointY_0(pk_0),
|
|
453
|
-
msg: msg_0 });
|
|
454
|
-
const c_0 = cNative_0;
|
|
455
|
-
const lhs_0 = this._ecMulGenerator_0(response_0);
|
|
456
|
-
const rhs_0 = this._ecAdd_0(announcement_0, this._ecMul_0(pk_0, c_0));
|
|
457
|
-
return this._equal_0(lhs_0, rhs_0);
|
|
458
|
-
}
|
|
459
|
-
_transientHash_0(value_0) {
|
|
460
|
-
const result_0 = __compactRuntime.transientHash(_descriptor_17, value_0);
|
|
461
|
-
return result_0;
|
|
462
|
-
}
|
|
463
|
-
_persistentHash_0(value_0) {
|
|
464
|
-
const result_0 = __compactRuntime.persistentHash(_descriptor_8, value_0);
|
|
465
|
-
return result_0;
|
|
466
|
-
}
|
|
467
|
-
_persistentHash_1(value_0) {
|
|
468
|
-
const result_0 = __compactRuntime.persistentHash(_descriptor_15, value_0);
|
|
469
|
-
return result_0;
|
|
470
|
-
}
|
|
471
|
-
_persistentHash_2(value_0) {
|
|
472
|
-
const result_0 = __compactRuntime.persistentHash(_descriptor_7, value_0);
|
|
473
|
-
return result_0;
|
|
474
|
-
}
|
|
475
|
-
_jubjubPointX_0(pt_0) {
|
|
476
|
-
const result_0 = __compactRuntime.jubjubPointX(pt_0);
|
|
477
|
-
return result_0;
|
|
478
|
-
}
|
|
479
|
-
_jubjubPointY_0(pt_0) {
|
|
480
|
-
const result_0 = __compactRuntime.jubjubPointY(pt_0);
|
|
481
|
-
return result_0;
|
|
482
|
-
}
|
|
483
|
-
_ecAdd_0(a_0, b_0) {
|
|
484
|
-
const result_0 = __compactRuntime.ecAdd(a_0, b_0);
|
|
485
|
-
return result_0;
|
|
486
|
-
}
|
|
487
|
-
_ecMul_0(a_0, b_0) {
|
|
488
|
-
const result_0 = __compactRuntime.ecMul(a_0, b_0);
|
|
489
|
-
return result_0;
|
|
490
|
-
}
|
|
491
|
-
_ecMulGenerator_0(b_0) {
|
|
492
|
-
const result_0 = __compactRuntime.ecMulGenerator(b_0);
|
|
493
|
-
return result_0;
|
|
494
|
-
}
|
|
495
|
-
_signetAttestationMessage_0(requestId_0, serializedOutput_0, outputLen_0) {
|
|
496
|
-
const rid_0 = requestId_0;
|
|
497
|
-
const outHash_0 = this._persistentHash_1([this._persistentHash_2(serializedOutput_0),
|
|
498
|
-
__compactRuntime.convertBigintToBytes(32,
|
|
499
|
-
outputLen_0,
|
|
500
|
-
'Signet.compact line 369 char 7')]);
|
|
501
|
-
return [__compactRuntime.convertBytesToUint(52435875175126190479447740508185965837690552500527637822603658699938581184512n,
|
|
502
|
-
16,
|
|
503
|
-
((e, i) => e.slice(i, i+16))(rid_0,
|
|
504
|
-
Number(0n)),
|
|
505
|
-
'Field',
|
|
506
|
-
'Signet.compact line 372 char 7'),
|
|
507
|
-
__compactRuntime.convertBytesToUint(52435875175126190479447740508185965837690552500527637822603658699938581184512n,
|
|
508
|
-
16,
|
|
509
|
-
((e, i) => e.slice(i, i+16))(rid_0,
|
|
510
|
-
Number(16n)),
|
|
511
|
-
'Field',
|
|
512
|
-
'Signet.compact line 373 char 7'),
|
|
513
|
-
__compactRuntime.convertBytesToUint(52435875175126190479447740508185965837690552500527637822603658699938581184512n,
|
|
514
|
-
16,
|
|
515
|
-
((e, i) => e.slice(i, i+16))(outHash_0,
|
|
516
|
-
Number(0n)),
|
|
517
|
-
'Field',
|
|
518
|
-
'Signet.compact line 374 char 7'),
|
|
519
|
-
__compactRuntime.convertBytesToUint(52435875175126190479447740508185965837690552500527637822603658699938581184512n,
|
|
520
|
-
16,
|
|
521
|
-
((e, i) => e.slice(i, i+16))(outHash_0,
|
|
522
|
-
Number(16n)),
|
|
523
|
-
'Field',
|
|
524
|
-
'Signet.compact line 375 char 7')];
|
|
525
|
-
}
|
|
526
|
-
async _notifyBidirectionalSignatureRequest_0(context,
|
|
527
|
-
partialProofData,
|
|
528
|
-
requestId_0,
|
|
529
|
-
notification_0)
|
|
395
|
+
async _signBidirectionalEvent_0(context,
|
|
396
|
+
partialProofData,
|
|
397
|
+
requestId_0,
|
|
398
|
+
notification_0)
|
|
530
399
|
{
|
|
400
|
+
__compactRuntime.assert(notification_0.version === 1n,
|
|
401
|
+
'only version 1 notification supported');
|
|
402
|
+
if (!_descriptor_2.fromValue(__compactRuntime.queryLedgerState(context,
|
|
403
|
+
partialProofData,
|
|
404
|
+
[
|
|
405
|
+
{ dup: { n: 0 } },
|
|
406
|
+
{ idx: { cached: false,
|
|
407
|
+
pushPath: false,
|
|
408
|
+
path: [
|
|
409
|
+
{ tag: 'value',
|
|
410
|
+
value: { value: _descriptor_6.toValue(0n),
|
|
411
|
+
alignment: _descriptor_6.alignment() } }] } },
|
|
412
|
+
{ push: { storage: false,
|
|
413
|
+
value: __compactRuntime.StateValue.newCell({ value: _descriptor_0.toValue(requestId_0),
|
|
414
|
+
alignment: _descriptor_0.alignment() }).encode() } },
|
|
415
|
+
'member',
|
|
416
|
+
{ popeq: { cached: true,
|
|
417
|
+
result: undefined } }]).value))
|
|
418
|
+
{
|
|
419
|
+
__compactRuntime.queryLedgerState(context,
|
|
420
|
+
partialProofData,
|
|
421
|
+
[
|
|
422
|
+
{ idx: { cached: false,
|
|
423
|
+
pushPath: true,
|
|
424
|
+
path: [
|
|
425
|
+
{ tag: 'value',
|
|
426
|
+
value: { value: _descriptor_6.toValue(0n),
|
|
427
|
+
alignment: _descriptor_6.alignment() } }] } },
|
|
428
|
+
{ push: { storage: false,
|
|
429
|
+
value: __compactRuntime.StateValue.newCell({ value: _descriptor_0.toValue(requestId_0),
|
|
430
|
+
alignment: _descriptor_0.alignment() }).encode() } },
|
|
431
|
+
{ push: { storage: true,
|
|
432
|
+
value: __compactRuntime.StateValue.newCell({ value: _descriptor_1.toValue(0n),
|
|
433
|
+
alignment: _descriptor_1.alignment() }).encode() } },
|
|
434
|
+
{ ins: { cached: false, n: 1 } },
|
|
435
|
+
{ ins: { cached: true, n: 1 } }]);
|
|
436
|
+
}
|
|
437
|
+
const signBidirectionalEventNotificationMapKey_0 = { count:
|
|
438
|
+
_descriptor_1.fromValue(__compactRuntime.queryLedgerState(context,
|
|
439
|
+
partialProofData,
|
|
440
|
+
[
|
|
441
|
+
{ dup: { n: 0 } },
|
|
442
|
+
{ idx: { cached: false,
|
|
443
|
+
pushPath: false,
|
|
444
|
+
path: [
|
|
445
|
+
{ tag: 'value',
|
|
446
|
+
value: { value: _descriptor_6.toValue(0n),
|
|
447
|
+
alignment: _descriptor_6.alignment() } },
|
|
448
|
+
{ tag: 'value',
|
|
449
|
+
value: { value: _descriptor_0.toValue(requestId_0),
|
|
450
|
+
alignment: _descriptor_0.alignment() } }] } },
|
|
451
|
+
{ popeq: { cached: true,
|
|
452
|
+
result: undefined } }]).value),
|
|
453
|
+
requestId: requestId_0 };
|
|
454
|
+
const tmp_0 = 1n;
|
|
455
|
+
__compactRuntime.queryLedgerState(context,
|
|
456
|
+
partialProofData,
|
|
457
|
+
[
|
|
458
|
+
{ idx: { cached: false,
|
|
459
|
+
pushPath: true,
|
|
460
|
+
path: [
|
|
461
|
+
{ tag: 'value',
|
|
462
|
+
value: { value: _descriptor_6.toValue(0n),
|
|
463
|
+
alignment: _descriptor_6.alignment() } },
|
|
464
|
+
{ tag: 'value',
|
|
465
|
+
value: { value: _descriptor_0.toValue(requestId_0),
|
|
466
|
+
alignment: _descriptor_0.alignment() } }] } },
|
|
467
|
+
{ addi: { immediate: parseInt(__compactRuntime.valueToBigInt(
|
|
468
|
+
{ value: _descriptor_3.toValue(tmp_0),
|
|
469
|
+
alignment: _descriptor_3.alignment() }
|
|
470
|
+
.value
|
|
471
|
+
)) } },
|
|
472
|
+
{ ins: { cached: true, n: 2 } }]);
|
|
531
473
|
__compactRuntime.queryLedgerState(context,
|
|
532
474
|
partialProofData,
|
|
533
475
|
[
|
|
@@ -535,22 +477,22 @@ export class Contract {
|
|
|
535
477
|
pushPath: true,
|
|
536
478
|
path: [
|
|
537
479
|
{ tag: 'value',
|
|
538
|
-
value: { value:
|
|
539
|
-
alignment:
|
|
480
|
+
value: { value: _descriptor_6.toValue(1n),
|
|
481
|
+
alignment: _descriptor_6.alignment() } }] } },
|
|
540
482
|
{ push: { storage: false,
|
|
541
|
-
value: __compactRuntime.StateValue.newCell({ value:
|
|
542
|
-
alignment:
|
|
483
|
+
value: __compactRuntime.StateValue.newCell({ value: _descriptor_4.toValue(signBidirectionalEventNotificationMapKey_0),
|
|
484
|
+
alignment: _descriptor_4.alignment() }).encode() } },
|
|
543
485
|
{ push: { storage: true,
|
|
544
|
-
value: __compactRuntime.StateValue.newCell({ value:
|
|
545
|
-
alignment:
|
|
486
|
+
value: __compactRuntime.StateValue.newCell({ value: _descriptor_8.toValue(notification_0),
|
|
487
|
+
alignment: _descriptor_8.alignment() }).encode() } },
|
|
546
488
|
{ ins: { cached: false, n: 1 } },
|
|
547
489
|
{ ins: { cached: true, n: 1 } }]);
|
|
548
|
-
return
|
|
490
|
+
return signBidirectionalEventNotificationMapKey_0;
|
|
549
491
|
}
|
|
550
492
|
async _postSignatureResponse_0(context,
|
|
551
493
|
partialProofData,
|
|
552
494
|
requestId_0,
|
|
553
|
-
|
|
495
|
+
signatureRespondedEvent_0)
|
|
554
496
|
{
|
|
555
497
|
const disclosedRequestId_0 = requestId_0;
|
|
556
498
|
if (!_descriptor_2.fromValue(__compactRuntime.queryLedgerState(context,
|
|
@@ -561,8 +503,8 @@ export class Contract {
|
|
|
561
503
|
pushPath: false,
|
|
562
504
|
path: [
|
|
563
505
|
{ tag: 'value',
|
|
564
|
-
value: { value:
|
|
565
|
-
alignment:
|
|
506
|
+
value: { value: _descriptor_6.toValue(2n),
|
|
507
|
+
alignment: _descriptor_6.alignment() } }] } },
|
|
566
508
|
{ push: { storage: false,
|
|
567
509
|
value: __compactRuntime.StateValue.newCell({ value: _descriptor_0.toValue(disclosedRequestId_0),
|
|
568
510
|
alignment: _descriptor_0.alignment() }).encode() } },
|
|
@@ -577,8 +519,8 @@ export class Contract {
|
|
|
577
519
|
pushPath: true,
|
|
578
520
|
path: [
|
|
579
521
|
{ tag: 'value',
|
|
580
|
-
value: { value:
|
|
581
|
-
alignment:
|
|
522
|
+
value: { value: _descriptor_6.toValue(2n),
|
|
523
|
+
alignment: _descriptor_6.alignment() } }] } },
|
|
582
524
|
{ push: { storage: false,
|
|
583
525
|
value: __compactRuntime.StateValue.newCell({ value: _descriptor_0.toValue(disclosedRequestId_0),
|
|
584
526
|
alignment: _descriptor_0.alignment() }).encode() } },
|
|
@@ -596,8 +538,8 @@ export class Contract {
|
|
|
596
538
|
pushPath: false,
|
|
597
539
|
path: [
|
|
598
540
|
{ tag: 'value',
|
|
599
|
-
value: { value:
|
|
600
|
-
alignment:
|
|
541
|
+
value: { value: _descriptor_6.toValue(2n),
|
|
542
|
+
alignment: _descriptor_6.alignment() } },
|
|
601
543
|
{ tag: 'value',
|
|
602
544
|
value: { value: _descriptor_0.toValue(disclosedRequestId_0),
|
|
603
545
|
alignment: _descriptor_0.alignment() } }] } },
|
|
@@ -611,8 +553,8 @@ export class Contract {
|
|
|
611
553
|
pushPath: true,
|
|
612
554
|
path: [
|
|
613
555
|
{ tag: 'value',
|
|
614
|
-
value: { value:
|
|
615
|
-
alignment:
|
|
556
|
+
value: { value: _descriptor_6.toValue(2n),
|
|
557
|
+
alignment: _descriptor_6.alignment() } },
|
|
616
558
|
{ tag: 'value',
|
|
617
559
|
value: { value: _descriptor_0.toValue(disclosedRequestId_0),
|
|
618
560
|
alignment: _descriptor_0.alignment() } }] } },
|
|
@@ -630,14 +572,14 @@ export class Contract {
|
|
|
630
572
|
pushPath: true,
|
|
631
573
|
path: [
|
|
632
574
|
{ tag: 'value',
|
|
633
|
-
value: { value:
|
|
634
|
-
alignment:
|
|
575
|
+
value: { value: _descriptor_6.toValue(3n),
|
|
576
|
+
alignment: _descriptor_6.alignment() } }] } },
|
|
635
577
|
{ push: { storage: false,
|
|
636
578
|
value: __compactRuntime.StateValue.newCell({ value: _descriptor_4.toValue(tmp_1),
|
|
637
579
|
alignment: _descriptor_4.alignment() }).encode() } },
|
|
638
580
|
{ push: { storage: true,
|
|
639
|
-
value: __compactRuntime.StateValue.newCell({ value:
|
|
640
|
-
alignment:
|
|
581
|
+
value: __compactRuntime.StateValue.newCell({ value: _descriptor_9.toValue(signatureRespondedEvent_0),
|
|
582
|
+
alignment: _descriptor_9.alignment() }).encode() } },
|
|
641
583
|
{ ins: { cached: false, n: 1 } },
|
|
642
584
|
{ ins: { cached: true, n: 1 } }]);
|
|
643
585
|
return [];
|
|
@@ -645,52 +587,26 @@ export class Contract {
|
|
|
645
587
|
async _postRespondBidirectional_0(context,
|
|
646
588
|
partialProofData,
|
|
647
589
|
requestId_0,
|
|
648
|
-
|
|
590
|
+
respondBidirectionalEvent_0)
|
|
649
591
|
{
|
|
650
592
|
const disclosedRequestId_0 = requestId_0;
|
|
651
|
-
|
|
652
|
-
|
|
653
|
-
|
|
654
|
-
|
|
655
|
-
|
|
656
|
-
|
|
657
|
-
|
|
658
|
-
|
|
659
|
-
|
|
660
|
-
|
|
661
|
-
|
|
662
|
-
|
|
663
|
-
|
|
664
|
-
|
|
665
|
-
|
|
666
|
-
|
|
667
|
-
disclosedResponse_0.serializedOutput,
|
|
668
|
-
disclosedResponse_0.outputLen),
|
|
669
|
-
{ announcement:
|
|
670
|
-
disclosedResponse_0.announcement,
|
|
671
|
-
response:
|
|
672
|
-
disclosedResponse_0.response },
|
|
673
|
-
disclosedResponse_0.pk),
|
|
674
|
-
'Invalid attestation signature');
|
|
675
|
-
if (_descriptor_2.fromValue(__compactRuntime.queryLedgerState(context,
|
|
676
|
-
partialProofData,
|
|
677
|
-
[
|
|
678
|
-
{ dup: { n: 0 } },
|
|
679
|
-
{ idx: { cached: false,
|
|
680
|
-
pushPath: false,
|
|
681
|
-
path: [
|
|
682
|
-
{ tag: 'value',
|
|
683
|
-
value: { value: _descriptor_5.toValue(2n),
|
|
684
|
-
alignment: _descriptor_5.alignment() } }] } },
|
|
685
|
-
{ push: { storage: false,
|
|
686
|
-
value: __compactRuntime.StateValue.newCell({ value: _descriptor_0.toValue(disclosedRequestId_0),
|
|
687
|
-
alignment: _descriptor_0.alignment() }).encode() } },
|
|
688
|
-
'member',
|
|
689
|
-
{ popeq: { cached: true,
|
|
690
|
-
result: undefined } }]).value))
|
|
593
|
+
if (!_descriptor_2.fromValue(__compactRuntime.queryLedgerState(context,
|
|
594
|
+
partialProofData,
|
|
595
|
+
[
|
|
596
|
+
{ dup: { n: 0 } },
|
|
597
|
+
{ idx: { cached: false,
|
|
598
|
+
pushPath: false,
|
|
599
|
+
path: [
|
|
600
|
+
{ tag: 'value',
|
|
601
|
+
value: { value: _descriptor_6.toValue(4n),
|
|
602
|
+
alignment: _descriptor_6.alignment() } }] } },
|
|
603
|
+
{ push: { storage: false,
|
|
604
|
+
value: __compactRuntime.StateValue.newCell({ value: _descriptor_0.toValue(disclosedRequestId_0),
|
|
605
|
+
alignment: _descriptor_0.alignment() }).encode() } },
|
|
606
|
+
'member',
|
|
607
|
+
{ popeq: { cached: true,
|
|
608
|
+
result: undefined } }]).value))
|
|
691
609
|
{
|
|
692
|
-
return [];
|
|
693
|
-
} else {
|
|
694
610
|
__compactRuntime.queryLedgerState(context,
|
|
695
611
|
partialProofData,
|
|
696
612
|
[
|
|
@@ -698,28 +614,70 @@ export class Contract {
|
|
|
698
614
|
pushPath: true,
|
|
699
615
|
path: [
|
|
700
616
|
{ tag: 'value',
|
|
701
|
-
value: { value:
|
|
702
|
-
alignment:
|
|
617
|
+
value: { value: _descriptor_6.toValue(4n),
|
|
618
|
+
alignment: _descriptor_6.alignment() } }] } },
|
|
703
619
|
{ push: { storage: false,
|
|
704
620
|
value: __compactRuntime.StateValue.newCell({ value: _descriptor_0.toValue(disclosedRequestId_0),
|
|
705
621
|
alignment: _descriptor_0.alignment() }).encode() } },
|
|
706
622
|
{ push: { storage: true,
|
|
707
|
-
value: __compactRuntime.StateValue.newCell({ value:
|
|
708
|
-
alignment:
|
|
623
|
+
value: __compactRuntime.StateValue.newCell({ value: _descriptor_1.toValue(0n),
|
|
624
|
+
alignment: _descriptor_1.alignment() }).encode() } },
|
|
709
625
|
{ ins: { cached: false, n: 1 } },
|
|
710
626
|
{ ins: { cached: true, n: 1 } }]);
|
|
711
|
-
return [];
|
|
712
|
-
}
|
|
713
|
-
}
|
|
714
|
-
_equal_0(x0, y0) {
|
|
715
|
-
if (x0.x != y0.x || x0.y != y0.y) {
|
|
716
|
-
return false;
|
|
717
627
|
}
|
|
718
|
-
|
|
719
|
-
|
|
720
|
-
|
|
721
|
-
|
|
722
|
-
|
|
628
|
+
const count_0 = _descriptor_1.fromValue(__compactRuntime.queryLedgerState(context,
|
|
629
|
+
partialProofData,
|
|
630
|
+
[
|
|
631
|
+
{ dup: { n: 0 } },
|
|
632
|
+
{ idx: { cached: false,
|
|
633
|
+
pushPath: false,
|
|
634
|
+
path: [
|
|
635
|
+
{ tag: 'value',
|
|
636
|
+
value: { value: _descriptor_6.toValue(4n),
|
|
637
|
+
alignment: _descriptor_6.alignment() } },
|
|
638
|
+
{ tag: 'value',
|
|
639
|
+
value: { value: _descriptor_0.toValue(disclosedRequestId_0),
|
|
640
|
+
alignment: _descriptor_0.alignment() } }] } },
|
|
641
|
+
{ popeq: { cached: true,
|
|
642
|
+
result: undefined } }]).value);
|
|
643
|
+
const tmp_0 = 1n;
|
|
644
|
+
__compactRuntime.queryLedgerState(context,
|
|
645
|
+
partialProofData,
|
|
646
|
+
[
|
|
647
|
+
{ idx: { cached: false,
|
|
648
|
+
pushPath: true,
|
|
649
|
+
path: [
|
|
650
|
+
{ tag: 'value',
|
|
651
|
+
value: { value: _descriptor_6.toValue(4n),
|
|
652
|
+
alignment: _descriptor_6.alignment() } },
|
|
653
|
+
{ tag: 'value',
|
|
654
|
+
value: { value: _descriptor_0.toValue(disclosedRequestId_0),
|
|
655
|
+
alignment: _descriptor_0.alignment() } }] } },
|
|
656
|
+
{ addi: { immediate: parseInt(__compactRuntime.valueToBigInt(
|
|
657
|
+
{ value: _descriptor_3.toValue(tmp_0),
|
|
658
|
+
alignment: _descriptor_3.alignment() }
|
|
659
|
+
.value
|
|
660
|
+
)) } },
|
|
661
|
+
{ ins: { cached: true, n: 2 } }]);
|
|
662
|
+
const tmp_1 = { count: count_0, requestId: disclosedRequestId_0 };
|
|
663
|
+
__compactRuntime.queryLedgerState(context,
|
|
664
|
+
partialProofData,
|
|
665
|
+
[
|
|
666
|
+
{ idx: { cached: false,
|
|
667
|
+
pushPath: true,
|
|
668
|
+
path: [
|
|
669
|
+
{ tag: 'value',
|
|
670
|
+
value: { value: _descriptor_6.toValue(5n),
|
|
671
|
+
alignment: _descriptor_6.alignment() } }] } },
|
|
672
|
+
{ push: { storage: false,
|
|
673
|
+
value: __compactRuntime.StateValue.newCell({ value: _descriptor_4.toValue(tmp_1),
|
|
674
|
+
alignment: _descriptor_4.alignment() }).encode() } },
|
|
675
|
+
{ push: { storage: true,
|
|
676
|
+
value: __compactRuntime.StateValue.newCell({ value: _descriptor_7.toValue(respondBidirectionalEvent_0),
|
|
677
|
+
alignment: _descriptor_7.alignment() }).encode() } },
|
|
678
|
+
{ ins: { cached: false, n: 1 } },
|
|
679
|
+
{ ins: { cached: true, n: 1 } }]);
|
|
680
|
+
return [];
|
|
723
681
|
}
|
|
724
682
|
}
|
|
725
683
|
export function ledger(stateOrChargedState) {
|
|
@@ -736,7 +694,7 @@ export function ledger(stateOrChargedState) {
|
|
|
736
694
|
privateTranscriptOutputs: []
|
|
737
695
|
};
|
|
738
696
|
return {
|
|
739
|
-
|
|
697
|
+
signBidirectionalEventNotificationCounterMap: {
|
|
740
698
|
isEmpty(...args_0) {
|
|
741
699
|
if (args_0.length !== 0) {
|
|
742
700
|
throw new __compactRuntime.CompactError(`isEmpty: expected 0 arguments, received ${args_0.length}`);
|
|
@@ -749,8 +707,8 @@ export function ledger(stateOrChargedState) {
|
|
|
749
707
|
pushPath: false,
|
|
750
708
|
path: [
|
|
751
709
|
{ tag: 'value',
|
|
752
|
-
value: { value:
|
|
753
|
-
alignment:
|
|
710
|
+
value: { value: _descriptor_6.toValue(0n),
|
|
711
|
+
alignment: _descriptor_6.alignment() } }] } },
|
|
754
712
|
'size',
|
|
755
713
|
{ push: { storage: false,
|
|
756
714
|
value: __compactRuntime.StateValue.newCell({ value: _descriptor_1.toValue(0n),
|
|
@@ -771,8 +729,8 @@ export function ledger(stateOrChargedState) {
|
|
|
771
729
|
pushPath: false,
|
|
772
730
|
path: [
|
|
773
731
|
{ tag: 'value',
|
|
774
|
-
value: { value:
|
|
775
|
-
alignment:
|
|
732
|
+
value: { value: _descriptor_6.toValue(0n),
|
|
733
|
+
alignment: _descriptor_6.alignment() } }] } },
|
|
776
734
|
'size',
|
|
777
735
|
{ popeq: { cached: true,
|
|
778
736
|
result: undefined } }]).value);
|
|
@@ -785,7 +743,7 @@ export function ledger(stateOrChargedState) {
|
|
|
785
743
|
if (!(key_0.buffer instanceof ArrayBuffer && key_0.BYTES_PER_ELEMENT === 1 && key_0.length === 32)) {
|
|
786
744
|
__compactRuntime.typeError('member',
|
|
787
745
|
'argument 1',
|
|
788
|
-
'signet-contract.compact line
|
|
746
|
+
'signet-contract.compact line 20 char 1',
|
|
789
747
|
'Bytes<32>',
|
|
790
748
|
key_0)
|
|
791
749
|
}
|
|
@@ -797,8 +755,8 @@ export function ledger(stateOrChargedState) {
|
|
|
797
755
|
pushPath: false,
|
|
798
756
|
path: [
|
|
799
757
|
{ tag: 'value',
|
|
800
|
-
value: { value:
|
|
801
|
-
alignment:
|
|
758
|
+
value: { value: _descriptor_6.toValue(0n),
|
|
759
|
+
alignment: _descriptor_6.alignment() } }] } },
|
|
802
760
|
{ push: { storage: false,
|
|
803
761
|
value: __compactRuntime.StateValue.newCell({ value: _descriptor_0.toValue(key_0),
|
|
804
762
|
alignment: _descriptor_0.alignment() }).encode() } },
|
|
@@ -814,7 +772,7 @@ export function ledger(stateOrChargedState) {
|
|
|
814
772
|
if (!(key_0.buffer instanceof ArrayBuffer && key_0.BYTES_PER_ELEMENT === 1 && key_0.length === 32)) {
|
|
815
773
|
__compactRuntime.typeError('lookup',
|
|
816
774
|
'argument 1',
|
|
817
|
-
'signet-contract.compact line
|
|
775
|
+
'signet-contract.compact line 20 char 1',
|
|
818
776
|
'Bytes<32>',
|
|
819
777
|
key_0)
|
|
820
778
|
}
|
|
@@ -835,8 +793,8 @@ export function ledger(stateOrChargedState) {
|
|
|
835
793
|
pushPath: false,
|
|
836
794
|
path: [
|
|
837
795
|
{ tag: 'value',
|
|
838
|
-
value: { value:
|
|
839
|
-
alignment:
|
|
796
|
+
value: { value: _descriptor_6.toValue(0n),
|
|
797
|
+
alignment: _descriptor_6.alignment() } },
|
|
840
798
|
{ tag: 'value',
|
|
841
799
|
value: { value: _descriptor_0.toValue(key_0),
|
|
842
800
|
alignment: _descriptor_0.alignment() } }] } },
|
|
@@ -846,7 +804,7 @@ export function ledger(stateOrChargedState) {
|
|
|
846
804
|
}
|
|
847
805
|
}
|
|
848
806
|
},
|
|
849
|
-
|
|
807
|
+
signBidirectionalEventNotificationMap: {
|
|
850
808
|
isEmpty(...args_0) {
|
|
851
809
|
if (args_0.length !== 0) {
|
|
852
810
|
throw new __compactRuntime.CompactError(`isEmpty: expected 0 arguments, received ${args_0.length}`);
|
|
@@ -859,8 +817,8 @@ export function ledger(stateOrChargedState) {
|
|
|
859
817
|
pushPath: false,
|
|
860
818
|
path: [
|
|
861
819
|
{ tag: 'value',
|
|
862
|
-
value: { value:
|
|
863
|
-
alignment:
|
|
820
|
+
value: { value: _descriptor_6.toValue(1n),
|
|
821
|
+
alignment: _descriptor_6.alignment() } }] } },
|
|
864
822
|
'size',
|
|
865
823
|
{ push: { storage: false,
|
|
866
824
|
value: __compactRuntime.StateValue.newCell({ value: _descriptor_1.toValue(0n),
|
|
@@ -881,8 +839,8 @@ export function ledger(stateOrChargedState) {
|
|
|
881
839
|
pushPath: false,
|
|
882
840
|
path: [
|
|
883
841
|
{ tag: 'value',
|
|
884
|
-
value: { value:
|
|
885
|
-
alignment:
|
|
842
|
+
value: { value: _descriptor_6.toValue(1n),
|
|
843
|
+
alignment: _descriptor_6.alignment() } }] } },
|
|
886
844
|
'size',
|
|
887
845
|
{ popeq: { cached: true,
|
|
888
846
|
result: undefined } }]).value);
|
|
@@ -895,8 +853,8 @@ export function ledger(stateOrChargedState) {
|
|
|
895
853
|
if (!(typeof(key_0) === 'object' && typeof(key_0.count) === 'bigint' && key_0.count >= 0n && key_0.count <= 18446744073709551615n && key_0.requestId.buffer instanceof ArrayBuffer && key_0.requestId.BYTES_PER_ELEMENT === 1 && key_0.requestId.length === 32)) {
|
|
896
854
|
__compactRuntime.typeError('member',
|
|
897
855
|
'argument 1',
|
|
898
|
-
'signet-contract.compact line
|
|
899
|
-
'struct
|
|
856
|
+
'signet-contract.compact line 21 char 1',
|
|
857
|
+
'struct SignetMapKey<count: Uint<0..18446744073709551616>, requestId: Bytes<32>>',
|
|
900
858
|
key_0)
|
|
901
859
|
}
|
|
902
860
|
return _descriptor_2.fromValue(__compactRuntime.queryLedgerState(context,
|
|
@@ -907,8 +865,8 @@ export function ledger(stateOrChargedState) {
|
|
|
907
865
|
pushPath: false,
|
|
908
866
|
path: [
|
|
909
867
|
{ tag: 'value',
|
|
910
|
-
value: { value:
|
|
911
|
-
alignment:
|
|
868
|
+
value: { value: _descriptor_6.toValue(1n),
|
|
869
|
+
alignment: _descriptor_6.alignment() } }] } },
|
|
912
870
|
{ push: { storage: false,
|
|
913
871
|
value: __compactRuntime.StateValue.newCell({ value: _descriptor_4.toValue(key_0),
|
|
914
872
|
alignment: _descriptor_4.alignment() }).encode() } },
|
|
@@ -924,11 +882,11 @@ export function ledger(stateOrChargedState) {
|
|
|
924
882
|
if (!(typeof(key_0) === 'object' && typeof(key_0.count) === 'bigint' && key_0.count >= 0n && key_0.count <= 18446744073709551615n && key_0.requestId.buffer instanceof ArrayBuffer && key_0.requestId.BYTES_PER_ELEMENT === 1 && key_0.requestId.length === 32)) {
|
|
925
883
|
__compactRuntime.typeError('lookup',
|
|
926
884
|
'argument 1',
|
|
927
|
-
'signet-contract.compact line
|
|
928
|
-
'struct
|
|
885
|
+
'signet-contract.compact line 21 char 1',
|
|
886
|
+
'struct SignetMapKey<count: Uint<0..18446744073709551616>, requestId: Bytes<32>>',
|
|
929
887
|
key_0)
|
|
930
888
|
}
|
|
931
|
-
return
|
|
889
|
+
return _descriptor_8.fromValue(__compactRuntime.queryLedgerState(context,
|
|
932
890
|
partialProofData,
|
|
933
891
|
[
|
|
934
892
|
{ dup: { n: 0 } },
|
|
@@ -936,8 +894,8 @@ export function ledger(stateOrChargedState) {
|
|
|
936
894
|
pushPath: false,
|
|
937
895
|
path: [
|
|
938
896
|
{ tag: 'value',
|
|
939
|
-
value: { value:
|
|
940
|
-
alignment:
|
|
897
|
+
value: { value: _descriptor_6.toValue(1n),
|
|
898
|
+
alignment: _descriptor_6.alignment() } }] } },
|
|
941
899
|
{ idx: { cached: false,
|
|
942
900
|
pushPath: false,
|
|
943
901
|
path: [
|
|
@@ -952,10 +910,10 @@ export function ledger(stateOrChargedState) {
|
|
|
952
910
|
throw new __compactRuntime.CompactError(`iter: expected 0 arguments, received ${args_0.length}`);
|
|
953
911
|
}
|
|
954
912
|
const self_0 = state.asArray()[1];
|
|
955
|
-
return self_0.asMap().keys().map( (key) => { const value = self_0.asMap().get(key).asCell(); return [ _descriptor_4.fromValue(key.value),
|
|
913
|
+
return self_0.asMap().keys().map( (key) => { const value = self_0.asMap().get(key).asCell(); return [ _descriptor_4.fromValue(key.value), _descriptor_8.fromValue(value.value) ]; })[Symbol.iterator]();
|
|
956
914
|
}
|
|
957
915
|
},
|
|
958
|
-
|
|
916
|
+
signatureResponseCounterMap: {
|
|
959
917
|
isEmpty(...args_0) {
|
|
960
918
|
if (args_0.length !== 0) {
|
|
961
919
|
throw new __compactRuntime.CompactError(`isEmpty: expected 0 arguments, received ${args_0.length}`);
|
|
@@ -968,8 +926,8 @@ export function ledger(stateOrChargedState) {
|
|
|
968
926
|
pushPath: false,
|
|
969
927
|
path: [
|
|
970
928
|
{ tag: 'value',
|
|
971
|
-
value: { value:
|
|
972
|
-
alignment:
|
|
929
|
+
value: { value: _descriptor_6.toValue(2n),
|
|
930
|
+
alignment: _descriptor_6.alignment() } }] } },
|
|
973
931
|
'size',
|
|
974
932
|
{ push: { storage: false,
|
|
975
933
|
value: __compactRuntime.StateValue.newCell({ value: _descriptor_1.toValue(0n),
|
|
@@ -990,8 +948,8 @@ export function ledger(stateOrChargedState) {
|
|
|
990
948
|
pushPath: false,
|
|
991
949
|
path: [
|
|
992
950
|
{ tag: 'value',
|
|
993
|
-
value: { value:
|
|
994
|
-
alignment:
|
|
951
|
+
value: { value: _descriptor_6.toValue(2n),
|
|
952
|
+
alignment: _descriptor_6.alignment() } }] } },
|
|
995
953
|
'size',
|
|
996
954
|
{ popeq: { cached: true,
|
|
997
955
|
result: undefined } }]).value);
|
|
@@ -1004,7 +962,7 @@ export function ledger(stateOrChargedState) {
|
|
|
1004
962
|
if (!(key_0.buffer instanceof ArrayBuffer && key_0.BYTES_PER_ELEMENT === 1 && key_0.length === 32)) {
|
|
1005
963
|
__compactRuntime.typeError('member',
|
|
1006
964
|
'argument 1',
|
|
1007
|
-
'signet-contract.compact line
|
|
965
|
+
'signet-contract.compact line 23 char 1',
|
|
1008
966
|
'Bytes<32>',
|
|
1009
967
|
key_0)
|
|
1010
968
|
}
|
|
@@ -1016,8 +974,8 @@ export function ledger(stateOrChargedState) {
|
|
|
1016
974
|
pushPath: false,
|
|
1017
975
|
path: [
|
|
1018
976
|
{ tag: 'value',
|
|
1019
|
-
value: { value:
|
|
1020
|
-
alignment:
|
|
977
|
+
value: { value: _descriptor_6.toValue(2n),
|
|
978
|
+
alignment: _descriptor_6.alignment() } }] } },
|
|
1021
979
|
{ push: { storage: false,
|
|
1022
980
|
value: __compactRuntime.StateValue.newCell({ value: _descriptor_0.toValue(key_0),
|
|
1023
981
|
alignment: _descriptor_0.alignment() }).encode() } },
|
|
@@ -1033,52 +991,148 @@ export function ledger(stateOrChargedState) {
|
|
|
1033
991
|
if (!(key_0.buffer instanceof ArrayBuffer && key_0.BYTES_PER_ELEMENT === 1 && key_0.length === 32)) {
|
|
1034
992
|
__compactRuntime.typeError('lookup',
|
|
1035
993
|
'argument 1',
|
|
1036
|
-
'signet-contract.compact line
|
|
994
|
+
'signet-contract.compact line 23 char 1',
|
|
1037
995
|
'Bytes<32>',
|
|
1038
996
|
key_0)
|
|
1039
997
|
}
|
|
1040
|
-
|
|
1041
|
-
|
|
1042
|
-
|
|
1043
|
-
|
|
1044
|
-
|
|
1045
|
-
|
|
1046
|
-
|
|
1047
|
-
|
|
1048
|
-
|
|
1049
|
-
|
|
1050
|
-
|
|
1051
|
-
|
|
1052
|
-
|
|
1053
|
-
|
|
1054
|
-
|
|
1055
|
-
|
|
1056
|
-
|
|
1057
|
-
|
|
998
|
+
if (state.asArray()[2].asMap().get({ value: _descriptor_0.toValue(key_0),
|
|
999
|
+
alignment: _descriptor_0.alignment() }) === undefined) {
|
|
1000
|
+
throw new __compactRuntime.CompactError(`Map value undefined for ${key_0}`);
|
|
1001
|
+
}
|
|
1002
|
+
return {
|
|
1003
|
+
read(...args_1) {
|
|
1004
|
+
if (args_1.length !== 0) {
|
|
1005
|
+
throw new __compactRuntime.CompactError(`read: expected 0 arguments, received ${args_1.length}`);
|
|
1006
|
+
}
|
|
1007
|
+
return _descriptor_1.fromValue(__compactRuntime.queryLedgerState(context,
|
|
1008
|
+
partialProofData,
|
|
1009
|
+
[
|
|
1010
|
+
{ dup: { n: 0 } },
|
|
1011
|
+
{ idx: { cached: false,
|
|
1012
|
+
pushPath: false,
|
|
1013
|
+
path: [
|
|
1014
|
+
{ tag: 'value',
|
|
1015
|
+
value: { value: _descriptor_6.toValue(2n),
|
|
1016
|
+
alignment: _descriptor_6.alignment() } },
|
|
1017
|
+
{ tag: 'value',
|
|
1018
|
+
value: { value: _descriptor_0.toValue(key_0),
|
|
1019
|
+
alignment: _descriptor_0.alignment() } }] } },
|
|
1020
|
+
{ popeq: { cached: true,
|
|
1021
|
+
result: undefined } }]).value);
|
|
1022
|
+
}
|
|
1023
|
+
}
|
|
1024
|
+
}
|
|
1025
|
+
},
|
|
1026
|
+
signatureResponseMap: {
|
|
1027
|
+
isEmpty(...args_0) {
|
|
1028
|
+
if (args_0.length !== 0) {
|
|
1029
|
+
throw new __compactRuntime.CompactError(`isEmpty: expected 0 arguments, received ${args_0.length}`);
|
|
1030
|
+
}
|
|
1031
|
+
return _descriptor_2.fromValue(__compactRuntime.queryLedgerState(context,
|
|
1032
|
+
partialProofData,
|
|
1033
|
+
[
|
|
1034
|
+
{ dup: { n: 0 } },
|
|
1035
|
+
{ idx: { cached: false,
|
|
1036
|
+
pushPath: false,
|
|
1037
|
+
path: [
|
|
1038
|
+
{ tag: 'value',
|
|
1039
|
+
value: { value: _descriptor_6.toValue(3n),
|
|
1040
|
+
alignment: _descriptor_6.alignment() } }] } },
|
|
1041
|
+
'size',
|
|
1042
|
+
{ push: { storage: false,
|
|
1043
|
+
value: __compactRuntime.StateValue.newCell({ value: _descriptor_1.toValue(0n),
|
|
1044
|
+
alignment: _descriptor_1.alignment() }).encode() } },
|
|
1045
|
+
'eq',
|
|
1046
|
+
{ popeq: { cached: true,
|
|
1047
|
+
result: undefined } }]).value);
|
|
1048
|
+
},
|
|
1049
|
+
size(...args_0) {
|
|
1050
|
+
if (args_0.length !== 0) {
|
|
1051
|
+
throw new __compactRuntime.CompactError(`size: expected 0 arguments, received ${args_0.length}`);
|
|
1052
|
+
}
|
|
1053
|
+
return _descriptor_1.fromValue(__compactRuntime.queryLedgerState(context,
|
|
1054
|
+
partialProofData,
|
|
1055
|
+
[
|
|
1056
|
+
{ dup: { n: 0 } },
|
|
1057
|
+
{ idx: { cached: false,
|
|
1058
|
+
pushPath: false,
|
|
1059
|
+
path: [
|
|
1060
|
+
{ tag: 'value',
|
|
1061
|
+
value: { value: _descriptor_6.toValue(3n),
|
|
1062
|
+
alignment: _descriptor_6.alignment() } }] } },
|
|
1063
|
+
'size',
|
|
1064
|
+
{ popeq: { cached: true,
|
|
1065
|
+
result: undefined } }]).value);
|
|
1066
|
+
},
|
|
1067
|
+
member(...args_0) {
|
|
1068
|
+
if (args_0.length !== 1) {
|
|
1069
|
+
throw new __compactRuntime.CompactError(`member: expected 1 argument, received ${args_0.length}`);
|
|
1070
|
+
}
|
|
1071
|
+
const key_0 = args_0[0];
|
|
1072
|
+
if (!(typeof(key_0) === 'object' && typeof(key_0.count) === 'bigint' && key_0.count >= 0n && key_0.count <= 18446744073709551615n && key_0.requestId.buffer instanceof ArrayBuffer && key_0.requestId.BYTES_PER_ELEMENT === 1 && key_0.requestId.length === 32)) {
|
|
1073
|
+
__compactRuntime.typeError('member',
|
|
1074
|
+
'argument 1',
|
|
1075
|
+
'signet-contract.compact line 24 char 1',
|
|
1076
|
+
'struct SignetMapKey<count: Uint<0..18446744073709551616>, requestId: Bytes<32>>',
|
|
1077
|
+
key_0)
|
|
1078
|
+
}
|
|
1079
|
+
return _descriptor_2.fromValue(__compactRuntime.queryLedgerState(context,
|
|
1080
|
+
partialProofData,
|
|
1081
|
+
[
|
|
1082
|
+
{ dup: { n: 0 } },
|
|
1083
|
+
{ idx: { cached: false,
|
|
1084
|
+
pushPath: false,
|
|
1085
|
+
path: [
|
|
1086
|
+
{ tag: 'value',
|
|
1087
|
+
value: { value: _descriptor_6.toValue(3n),
|
|
1088
|
+
alignment: _descriptor_6.alignment() } }] } },
|
|
1089
|
+
{ push: { storage: false,
|
|
1090
|
+
value: __compactRuntime.StateValue.newCell({ value: _descriptor_4.toValue(key_0),
|
|
1091
|
+
alignment: _descriptor_4.alignment() }).encode() } },
|
|
1092
|
+
'member',
|
|
1093
|
+
{ popeq: { cached: true,
|
|
1094
|
+
result: undefined } }]).value);
|
|
1095
|
+
},
|
|
1096
|
+
lookup(...args_0) {
|
|
1097
|
+
if (args_0.length !== 1) {
|
|
1098
|
+
throw new __compactRuntime.CompactError(`lookup: expected 1 argument, received ${args_0.length}`);
|
|
1099
|
+
}
|
|
1100
|
+
const key_0 = args_0[0];
|
|
1101
|
+
if (!(typeof(key_0) === 'object' && typeof(key_0.count) === 'bigint' && key_0.count >= 0n && key_0.count <= 18446744073709551615n && key_0.requestId.buffer instanceof ArrayBuffer && key_0.requestId.BYTES_PER_ELEMENT === 1 && key_0.requestId.length === 32)) {
|
|
1102
|
+
__compactRuntime.typeError('lookup',
|
|
1103
|
+
'argument 1',
|
|
1104
|
+
'signet-contract.compact line 24 char 1',
|
|
1105
|
+
'struct SignetMapKey<count: Uint<0..18446744073709551616>, requestId: Bytes<32>>',
|
|
1106
|
+
key_0)
|
|
1107
|
+
}
|
|
1108
|
+
return _descriptor_9.fromValue(__compactRuntime.queryLedgerState(context,
|
|
1109
|
+
partialProofData,
|
|
1110
|
+
[
|
|
1111
|
+
{ dup: { n: 0 } },
|
|
1112
|
+
{ idx: { cached: false,
|
|
1113
|
+
pushPath: false,
|
|
1114
|
+
path: [
|
|
1115
|
+
{ tag: 'value',
|
|
1116
|
+
value: { value: _descriptor_6.toValue(3n),
|
|
1117
|
+
alignment: _descriptor_6.alignment() } }] } },
|
|
1118
|
+
{ idx: { cached: false,
|
|
1119
|
+
pushPath: false,
|
|
1120
|
+
path: [
|
|
1121
|
+
{ tag: 'value',
|
|
1122
|
+
value: { value: _descriptor_4.toValue(key_0),
|
|
1123
|
+
alignment: _descriptor_4.alignment() } }] } },
|
|
1124
|
+
{ popeq: { cached: false,
|
|
1125
|
+
result: undefined } }]).value);
|
|
1058
1126
|
},
|
|
1059
1127
|
[Symbol.iterator](...args_0) {
|
|
1060
1128
|
if (args_0.length !== 0) {
|
|
1061
1129
|
throw new __compactRuntime.CompactError(`iter: expected 0 arguments, received ${args_0.length}`);
|
|
1062
1130
|
}
|
|
1063
|
-
const self_0 = state.asArray()[
|
|
1064
|
-
return self_0.asMap().keys().map( (key) => { const value = self_0.asMap().get(key).asCell(); return [
|
|
1131
|
+
const self_0 = state.asArray()[3];
|
|
1132
|
+
return self_0.asMap().keys().map( (key) => { const value = self_0.asMap().get(key).asCell(); return [ _descriptor_4.fromValue(key.value), _descriptor_9.fromValue(value.value) ]; })[Symbol.iterator]();
|
|
1065
1133
|
}
|
|
1066
1134
|
},
|
|
1067
|
-
|
|
1068
|
-
return _descriptor_0.fromValue(__compactRuntime.queryLedgerState(context,
|
|
1069
|
-
partialProofData,
|
|
1070
|
-
[
|
|
1071
|
-
{ dup: { n: 0 } },
|
|
1072
|
-
{ idx: { cached: false,
|
|
1073
|
-
pushPath: false,
|
|
1074
|
-
path: [
|
|
1075
|
-
{ tag: 'value',
|
|
1076
|
-
value: { value: _descriptor_5.toValue(3n),
|
|
1077
|
-
alignment: _descriptor_5.alignment() } }] } },
|
|
1078
|
-
{ popeq: { cached: false,
|
|
1079
|
-
result: undefined } }]).value);
|
|
1080
|
-
},
|
|
1081
|
-
signBidirectionalNotificationIndex: {
|
|
1135
|
+
respondBidirectionalCounterMap: {
|
|
1082
1136
|
isEmpty(...args_0) {
|
|
1083
1137
|
if (args_0.length !== 0) {
|
|
1084
1138
|
throw new __compactRuntime.CompactError(`isEmpty: expected 0 arguments, received ${args_0.length}`);
|
|
@@ -1091,8 +1145,8 @@ export function ledger(stateOrChargedState) {
|
|
|
1091
1145
|
pushPath: false,
|
|
1092
1146
|
path: [
|
|
1093
1147
|
{ tag: 'value',
|
|
1094
|
-
value: { value:
|
|
1095
|
-
alignment:
|
|
1148
|
+
value: { value: _descriptor_6.toValue(4n),
|
|
1149
|
+
alignment: _descriptor_6.alignment() } }] } },
|
|
1096
1150
|
'size',
|
|
1097
1151
|
{ push: { storage: false,
|
|
1098
1152
|
value: __compactRuntime.StateValue.newCell({ value: _descriptor_1.toValue(0n),
|
|
@@ -1113,8 +1167,8 @@ export function ledger(stateOrChargedState) {
|
|
|
1113
1167
|
pushPath: false,
|
|
1114
1168
|
path: [
|
|
1115
1169
|
{ tag: 'value',
|
|
1116
|
-
value: { value:
|
|
1117
|
-
alignment:
|
|
1170
|
+
value: { value: _descriptor_6.toValue(4n),
|
|
1171
|
+
alignment: _descriptor_6.alignment() } }] } },
|
|
1118
1172
|
'size',
|
|
1119
1173
|
{ popeq: { cached: true,
|
|
1120
1174
|
result: undefined } }]).value);
|
|
@@ -1127,7 +1181,7 @@ export function ledger(stateOrChargedState) {
|
|
|
1127
1181
|
if (!(key_0.buffer instanceof ArrayBuffer && key_0.BYTES_PER_ELEMENT === 1 && key_0.length === 32)) {
|
|
1128
1182
|
__compactRuntime.typeError('member',
|
|
1129
1183
|
'argument 1',
|
|
1130
|
-
'signet-contract.compact line
|
|
1184
|
+
'signet-contract.compact line 26 char 1',
|
|
1131
1185
|
'Bytes<32>',
|
|
1132
1186
|
key_0)
|
|
1133
1187
|
}
|
|
@@ -1139,8 +1193,8 @@ export function ledger(stateOrChargedState) {
|
|
|
1139
1193
|
pushPath: false,
|
|
1140
1194
|
path: [
|
|
1141
1195
|
{ tag: 'value',
|
|
1142
|
-
value: { value:
|
|
1143
|
-
alignment:
|
|
1196
|
+
value: { value: _descriptor_6.toValue(4n),
|
|
1197
|
+
alignment: _descriptor_6.alignment() } }] } },
|
|
1144
1198
|
{ push: { storage: false,
|
|
1145
1199
|
value: __compactRuntime.StateValue.newCell({ value: _descriptor_0.toValue(key_0),
|
|
1146
1200
|
alignment: _descriptor_0.alignment() }).encode() } },
|
|
@@ -1156,35 +1210,145 @@ export function ledger(stateOrChargedState) {
|
|
|
1156
1210
|
if (!(key_0.buffer instanceof ArrayBuffer && key_0.BYTES_PER_ELEMENT === 1 && key_0.length === 32)) {
|
|
1157
1211
|
__compactRuntime.typeError('lookup',
|
|
1158
1212
|
'argument 1',
|
|
1159
|
-
'signet-contract.compact line
|
|
1213
|
+
'signet-contract.compact line 26 char 1',
|
|
1160
1214
|
'Bytes<32>',
|
|
1161
1215
|
key_0)
|
|
1162
1216
|
}
|
|
1163
|
-
|
|
1164
|
-
|
|
1165
|
-
|
|
1166
|
-
|
|
1167
|
-
|
|
1168
|
-
|
|
1169
|
-
|
|
1170
|
-
|
|
1171
|
-
|
|
1172
|
-
|
|
1173
|
-
|
|
1174
|
-
|
|
1175
|
-
|
|
1176
|
-
|
|
1177
|
-
|
|
1178
|
-
|
|
1179
|
-
|
|
1180
|
-
|
|
1217
|
+
if (state.asArray()[4].asMap().get({ value: _descriptor_0.toValue(key_0),
|
|
1218
|
+
alignment: _descriptor_0.alignment() }) === undefined) {
|
|
1219
|
+
throw new __compactRuntime.CompactError(`Map value undefined for ${key_0}`);
|
|
1220
|
+
}
|
|
1221
|
+
return {
|
|
1222
|
+
read(...args_1) {
|
|
1223
|
+
if (args_1.length !== 0) {
|
|
1224
|
+
throw new __compactRuntime.CompactError(`read: expected 0 arguments, received ${args_1.length}`);
|
|
1225
|
+
}
|
|
1226
|
+
return _descriptor_1.fromValue(__compactRuntime.queryLedgerState(context,
|
|
1227
|
+
partialProofData,
|
|
1228
|
+
[
|
|
1229
|
+
{ dup: { n: 0 } },
|
|
1230
|
+
{ idx: { cached: false,
|
|
1231
|
+
pushPath: false,
|
|
1232
|
+
path: [
|
|
1233
|
+
{ tag: 'value',
|
|
1234
|
+
value: { value: _descriptor_6.toValue(4n),
|
|
1235
|
+
alignment: _descriptor_6.alignment() } },
|
|
1236
|
+
{ tag: 'value',
|
|
1237
|
+
value: { value: _descriptor_0.toValue(key_0),
|
|
1238
|
+
alignment: _descriptor_0.alignment() } }] } },
|
|
1239
|
+
{ popeq: { cached: true,
|
|
1240
|
+
result: undefined } }]).value);
|
|
1241
|
+
}
|
|
1242
|
+
}
|
|
1243
|
+
}
|
|
1244
|
+
},
|
|
1245
|
+
respondBidirectionalMap: {
|
|
1246
|
+
isEmpty(...args_0) {
|
|
1247
|
+
if (args_0.length !== 0) {
|
|
1248
|
+
throw new __compactRuntime.CompactError(`isEmpty: expected 0 arguments, received ${args_0.length}`);
|
|
1249
|
+
}
|
|
1250
|
+
return _descriptor_2.fromValue(__compactRuntime.queryLedgerState(context,
|
|
1251
|
+
partialProofData,
|
|
1252
|
+
[
|
|
1253
|
+
{ dup: { n: 0 } },
|
|
1254
|
+
{ idx: { cached: false,
|
|
1255
|
+
pushPath: false,
|
|
1256
|
+
path: [
|
|
1257
|
+
{ tag: 'value',
|
|
1258
|
+
value: { value: _descriptor_6.toValue(5n),
|
|
1259
|
+
alignment: _descriptor_6.alignment() } }] } },
|
|
1260
|
+
'size',
|
|
1261
|
+
{ push: { storage: false,
|
|
1262
|
+
value: __compactRuntime.StateValue.newCell({ value: _descriptor_1.toValue(0n),
|
|
1263
|
+
alignment: _descriptor_1.alignment() }).encode() } },
|
|
1264
|
+
'eq',
|
|
1265
|
+
{ popeq: { cached: true,
|
|
1266
|
+
result: undefined } }]).value);
|
|
1267
|
+
},
|
|
1268
|
+
size(...args_0) {
|
|
1269
|
+
if (args_0.length !== 0) {
|
|
1270
|
+
throw new __compactRuntime.CompactError(`size: expected 0 arguments, received ${args_0.length}`);
|
|
1271
|
+
}
|
|
1272
|
+
return _descriptor_1.fromValue(__compactRuntime.queryLedgerState(context,
|
|
1273
|
+
partialProofData,
|
|
1274
|
+
[
|
|
1275
|
+
{ dup: { n: 0 } },
|
|
1276
|
+
{ idx: { cached: false,
|
|
1277
|
+
pushPath: false,
|
|
1278
|
+
path: [
|
|
1279
|
+
{ tag: 'value',
|
|
1280
|
+
value: { value: _descriptor_6.toValue(5n),
|
|
1281
|
+
alignment: _descriptor_6.alignment() } }] } },
|
|
1282
|
+
'size',
|
|
1283
|
+
{ popeq: { cached: true,
|
|
1284
|
+
result: undefined } }]).value);
|
|
1285
|
+
},
|
|
1286
|
+
member(...args_0) {
|
|
1287
|
+
if (args_0.length !== 1) {
|
|
1288
|
+
throw new __compactRuntime.CompactError(`member: expected 1 argument, received ${args_0.length}`);
|
|
1289
|
+
}
|
|
1290
|
+
const key_0 = args_0[0];
|
|
1291
|
+
if (!(typeof(key_0) === 'object' && typeof(key_0.count) === 'bigint' && key_0.count >= 0n && key_0.count <= 18446744073709551615n && key_0.requestId.buffer instanceof ArrayBuffer && key_0.requestId.BYTES_PER_ELEMENT === 1 && key_0.requestId.length === 32)) {
|
|
1292
|
+
__compactRuntime.typeError('member',
|
|
1293
|
+
'argument 1',
|
|
1294
|
+
'signet-contract.compact line 27 char 1',
|
|
1295
|
+
'struct SignetMapKey<count: Uint<0..18446744073709551616>, requestId: Bytes<32>>',
|
|
1296
|
+
key_0)
|
|
1297
|
+
}
|
|
1298
|
+
return _descriptor_2.fromValue(__compactRuntime.queryLedgerState(context,
|
|
1299
|
+
partialProofData,
|
|
1300
|
+
[
|
|
1301
|
+
{ dup: { n: 0 } },
|
|
1302
|
+
{ idx: { cached: false,
|
|
1303
|
+
pushPath: false,
|
|
1304
|
+
path: [
|
|
1305
|
+
{ tag: 'value',
|
|
1306
|
+
value: { value: _descriptor_6.toValue(5n),
|
|
1307
|
+
alignment: _descriptor_6.alignment() } }] } },
|
|
1308
|
+
{ push: { storage: false,
|
|
1309
|
+
value: __compactRuntime.StateValue.newCell({ value: _descriptor_4.toValue(key_0),
|
|
1310
|
+
alignment: _descriptor_4.alignment() }).encode() } },
|
|
1311
|
+
'member',
|
|
1312
|
+
{ popeq: { cached: true,
|
|
1313
|
+
result: undefined } }]).value);
|
|
1314
|
+
},
|
|
1315
|
+
lookup(...args_0) {
|
|
1316
|
+
if (args_0.length !== 1) {
|
|
1317
|
+
throw new __compactRuntime.CompactError(`lookup: expected 1 argument, received ${args_0.length}`);
|
|
1318
|
+
}
|
|
1319
|
+
const key_0 = args_0[0];
|
|
1320
|
+
if (!(typeof(key_0) === 'object' && typeof(key_0.count) === 'bigint' && key_0.count >= 0n && key_0.count <= 18446744073709551615n && key_0.requestId.buffer instanceof ArrayBuffer && key_0.requestId.BYTES_PER_ELEMENT === 1 && key_0.requestId.length === 32)) {
|
|
1321
|
+
__compactRuntime.typeError('lookup',
|
|
1322
|
+
'argument 1',
|
|
1323
|
+
'signet-contract.compact line 27 char 1',
|
|
1324
|
+
'struct SignetMapKey<count: Uint<0..18446744073709551616>, requestId: Bytes<32>>',
|
|
1325
|
+
key_0)
|
|
1326
|
+
}
|
|
1327
|
+
return _descriptor_7.fromValue(__compactRuntime.queryLedgerState(context,
|
|
1328
|
+
partialProofData,
|
|
1329
|
+
[
|
|
1330
|
+
{ dup: { n: 0 } },
|
|
1331
|
+
{ idx: { cached: false,
|
|
1332
|
+
pushPath: false,
|
|
1333
|
+
path: [
|
|
1334
|
+
{ tag: 'value',
|
|
1335
|
+
value: { value: _descriptor_6.toValue(5n),
|
|
1336
|
+
alignment: _descriptor_6.alignment() } }] } },
|
|
1337
|
+
{ idx: { cached: false,
|
|
1338
|
+
pushPath: false,
|
|
1339
|
+
path: [
|
|
1340
|
+
{ tag: 'value',
|
|
1341
|
+
value: { value: _descriptor_4.toValue(key_0),
|
|
1342
|
+
alignment: _descriptor_4.alignment() } }] } },
|
|
1343
|
+
{ popeq: { cached: false,
|
|
1344
|
+
result: undefined } }]).value);
|
|
1181
1345
|
},
|
|
1182
1346
|
[Symbol.iterator](...args_0) {
|
|
1183
1347
|
if (args_0.length !== 0) {
|
|
1184
1348
|
throw new __compactRuntime.CompactError(`iter: expected 0 arguments, received ${args_0.length}`);
|
|
1185
1349
|
}
|
|
1186
|
-
const self_0 = state.asArray()[
|
|
1187
|
-
return self_0.asMap().keys().map( (key) => { const value = self_0.asMap().get(key).asCell(); return [
|
|
1350
|
+
const self_0 = state.asArray()[5];
|
|
1351
|
+
return self_0.asMap().keys().map( (key) => { const value = self_0.asMap().get(key).asCell(); return [ _descriptor_4.fromValue(key.value), _descriptor_7.fromValue(value.value) ]; })[Symbol.iterator]();
|
|
1188
1352
|
}
|
|
1189
1353
|
}
|
|
1190
1354
|
};
|
|
@@ -1197,9 +1361,9 @@ export const pureCircuits = {};
|
|
|
1197
1361
|
export const contractReferenceLocations =
|
|
1198
1362
|
{ tag: 'publicLedgerArray', indices: { } };
|
|
1199
1363
|
export const expectedVk = {
|
|
1200
|
-
'
|
|
1201
|
-
'
|
|
1202
|
-
'
|
|
1364
|
+
'postRespondBidirectional': 'fa5fd5e2c04bf3553e601fb43482df5e0de872f2469216f6ac1b9f2b7e1248ee',
|
|
1365
|
+
'postSignatureResponse': '22938eaebc029fd624db271e92857b132977c0373bf2f9ce823e21d011973e0d',
|
|
1366
|
+
'signBidirectionalEvent': '3e603e64ac930b8e4e1412e0afb5b3769e3d9db62c3a0bace1fe367eb7dc868e',
|
|
1203
1367
|
};
|
|
1204
1368
|
|
|
1205
1369
|
//# sourceMappingURL=index.js.map
|