@sig-net/midnight-contract 0.0.6 → 0.0.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/dist/managed/compiler/contract-info.json +148 -70
- package/dist/managed/compiler/contract-manifest.json +42 -42
- package/dist/managed/contract/index.d.ts +85 -68
- package/dist/managed/contract/index.js +559 -407
- 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 +43 -131
- package/dist/managed/zkir/postSignatureResponse.bzkir +0 -0
- package/dist/managed/zkir/postSignatureResponse.zkir +20 -20
- package/dist/managed/zkir/signBidirectionalEvent.bzkir +0 -0
- package/dist/managed/zkir/signBidirectionalEvent.zkir +56 -0
- package/dist/witnesses.js +2 -2
- package/dist/witnesses.js.map +1 -1
- package/package.json +3 -3
- 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 -27
|
@@ -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,95 +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
|
-
}
|
|
31
|
+
const _descriptor_6 = new __compactRuntime.CompactTypeUnsignedInteger(255n, 1);
|
|
47
32
|
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
const _descriptor_7 = new __compactRuntime.CompactTypeBytes(128);
|
|
51
|
-
|
|
52
|
-
class _RespondBidirectional_0 {
|
|
33
|
+
class _RespondBidirectionalEvent_0 {
|
|
53
34
|
alignment() {
|
|
54
|
-
return
|
|
35
|
+
return _descriptor_5.alignment().concat(_descriptor_6.alignment().concat(_descriptor_0.alignment().concat(_descriptor_0.alignment().concat(_descriptor_6.alignment()))));
|
|
55
36
|
}
|
|
56
37
|
fromValue(value_0) {
|
|
57
38
|
return {
|
|
58
|
-
serializedOutput:
|
|
59
|
-
outputLen:
|
|
60
|
-
|
|
61
|
-
|
|
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)
|
|
62
44
|
}
|
|
63
45
|
}
|
|
64
46
|
toValue(value_0) {
|
|
65
|
-
return
|
|
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)))));
|
|
66
48
|
}
|
|
67
49
|
}
|
|
68
50
|
|
|
69
|
-
const
|
|
51
|
+
const _descriptor_7 = new _RespondBidirectionalEvent_0();
|
|
70
52
|
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
const _descriptor_10 = new __compactRuntime.CompactTypeBytes(65);
|
|
74
|
-
|
|
75
|
-
class _SignBidirectionalNotification_0 {
|
|
53
|
+
class _SignBidirectionalEventNotification_0 {
|
|
76
54
|
alignment() {
|
|
77
|
-
return
|
|
55
|
+
return _descriptor_6.alignment().concat(_descriptor_5.alignment());
|
|
78
56
|
}
|
|
79
57
|
fromValue(value_0) {
|
|
80
58
|
return {
|
|
81
|
-
version:
|
|
82
|
-
payload:
|
|
59
|
+
version: _descriptor_6.fromValue(value_0),
|
|
60
|
+
payload: _descriptor_5.fromValue(value_0)
|
|
83
61
|
}
|
|
84
62
|
}
|
|
85
63
|
toValue(value_0) {
|
|
86
|
-
return
|
|
64
|
+
return _descriptor_6.toValue(value_0.version).concat(_descriptor_5.toValue(value_0.payload));
|
|
87
65
|
}
|
|
88
66
|
}
|
|
89
67
|
|
|
90
|
-
const
|
|
91
|
-
|
|
92
|
-
const _descriptor_12 = __compactRuntime.CompactTypeSecp256k1Scalar;
|
|
68
|
+
const _descriptor_8 = new _SignBidirectionalEventNotification_0();
|
|
93
69
|
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
const _descriptor_14 = new __compactRuntime.CompactTypeVector(3, _descriptor_0);
|
|
97
|
-
|
|
98
|
-
const _descriptor_15 = new __compactRuntime.CompactTypeVector(2, _descriptor_0);
|
|
99
|
-
|
|
100
|
-
class _Secp256k1EcdsaSignature_0 {
|
|
70
|
+
class _SignatureRespondedEvent_0 {
|
|
101
71
|
alignment() {
|
|
102
|
-
return
|
|
72
|
+
return _descriptor_0.alignment().concat(_descriptor_0.alignment().concat(_descriptor_0.alignment().concat(_descriptor_6.alignment())));
|
|
103
73
|
}
|
|
104
74
|
fromValue(value_0) {
|
|
105
75
|
return {
|
|
106
|
-
|
|
107
|
-
|
|
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)
|
|
108
80
|
}
|
|
109
81
|
}
|
|
110
82
|
toValue(value_0) {
|
|
111
|
-
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))));
|
|
112
84
|
}
|
|
113
85
|
}
|
|
114
86
|
|
|
115
|
-
const
|
|
87
|
+
const _descriptor_9 = new _SignatureRespondedEvent_0();
|
|
116
88
|
|
|
117
89
|
class _Either_0 {
|
|
118
90
|
alignment() {
|
|
@@ -130,9 +102,9 @@ class _Either_0 {
|
|
|
130
102
|
}
|
|
131
103
|
}
|
|
132
104
|
|
|
133
|
-
const
|
|
105
|
+
const _descriptor_10 = new _Either_0();
|
|
134
106
|
|
|
135
|
-
const
|
|
107
|
+
const _descriptor_11 = new __compactRuntime.CompactTypeUnsignedInteger(340282366920938463463374607431768211455n, 16);
|
|
136
108
|
|
|
137
109
|
class _ContractAddress_0 {
|
|
138
110
|
alignment() {
|
|
@@ -148,9 +120,9 @@ class _ContractAddress_0 {
|
|
|
148
120
|
}
|
|
149
121
|
}
|
|
150
122
|
|
|
151
|
-
const
|
|
123
|
+
const _descriptor_12 = new _ContractAddress_0();
|
|
152
124
|
|
|
153
|
-
const
|
|
125
|
+
const _descriptor_13 = new __compactRuntime.CompactTypeUnsignedInteger(4294967295n, 4);
|
|
154
126
|
|
|
155
127
|
export class Contract {
|
|
156
128
|
witnesses;
|
|
@@ -164,49 +136,49 @@ export class Contract {
|
|
|
164
136
|
}
|
|
165
137
|
this.witnesses = witnesses_0;
|
|
166
138
|
this.circuits = {
|
|
167
|
-
|
|
139
|
+
signBidirectionalEvent: async (...args_1) => {
|
|
168
140
|
if (args_1.length !== 3) {
|
|
169
|
-
throw new __compactRuntime.CompactError(`
|
|
141
|
+
throw new __compactRuntime.CompactError(`signBidirectionalEvent: expected 3 arguments (as invoked from Typescript), received ${args_1.length}`);
|
|
170
142
|
}
|
|
171
143
|
const contextOrig_0 = args_1[0];
|
|
172
144
|
const requestId_0 = args_1[1];
|
|
173
145
|
const notification_0 = args_1[2];
|
|
174
146
|
if (!(typeof(contextOrig_0) === 'object' && contextOrig_0.callContext.currentQueryContext != undefined)) {
|
|
175
|
-
__compactRuntime.typeError('
|
|
147
|
+
__compactRuntime.typeError('signBidirectionalEvent',
|
|
176
148
|
'argument 1 (as invoked from Typescript)',
|
|
177
|
-
'signet-contract.compact line
|
|
149
|
+
'signet-contract.compact line 37 char 1',
|
|
178
150
|
'CircuitContext',
|
|
179
151
|
contextOrig_0)
|
|
180
152
|
}
|
|
181
153
|
if (!(requestId_0.buffer instanceof ArrayBuffer && requestId_0.BYTES_PER_ELEMENT === 1 && requestId_0.length === 32)) {
|
|
182
|
-
__compactRuntime.typeError('
|
|
154
|
+
__compactRuntime.typeError('signBidirectionalEvent',
|
|
183
155
|
'argument 1 (argument 2 as invoked from Typescript)',
|
|
184
|
-
'signet-contract.compact line
|
|
156
|
+
'signet-contract.compact line 37 char 1',
|
|
185
157
|
'Bytes<32>',
|
|
186
158
|
requestId_0)
|
|
187
159
|
}
|
|
188
|
-
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 ===
|
|
189
|
-
__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',
|
|
190
162
|
'argument 2 (argument 3 as invoked from Typescript)',
|
|
191
|
-
'signet-contract.compact line
|
|
192
|
-
'struct
|
|
163
|
+
'signet-contract.compact line 37 char 1',
|
|
164
|
+
'struct SignBidirectionalEventNotification<version: Uint<0..256>, payload: Bytes<128>>',
|
|
193
165
|
notification_0)
|
|
194
166
|
}
|
|
195
167
|
const context = __compactRuntime.copyCircuitContext(contextOrig_0);
|
|
196
168
|
const partialProofData = {
|
|
197
169
|
input: {
|
|
198
|
-
value: _descriptor_0.toValue(requestId_0).concat(
|
|
199
|
-
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())
|
|
200
172
|
},
|
|
201
173
|
output: undefined,
|
|
202
174
|
publicTranscript: [],
|
|
203
175
|
privateTranscriptOutputs: []
|
|
204
176
|
};
|
|
205
|
-
const result_0 = await this.
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
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() };
|
|
210
182
|
__compactRuntime.finalizeCallProofData(context, partialProofData);
|
|
211
183
|
return { result: result_0, context: context, gasCost: context.callContext.currentGasCost };
|
|
212
184
|
},
|
|
@@ -216,33 +188,33 @@ export class Contract {
|
|
|
216
188
|
}
|
|
217
189
|
const contextOrig_0 = args_1[0];
|
|
218
190
|
const requestId_0 = args_1[1];
|
|
219
|
-
const
|
|
191
|
+
const signatureRespondedEvent_0 = args_1[2];
|
|
220
192
|
if (!(typeof(contextOrig_0) === 'object' && contextOrig_0.callContext.currentQueryContext != undefined)) {
|
|
221
193
|
__compactRuntime.typeError('postSignatureResponse',
|
|
222
194
|
'argument 1 (as invoked from Typescript)',
|
|
223
|
-
'signet-contract.compact line
|
|
195
|
+
'signet-contract.compact line 66 char 1',
|
|
224
196
|
'CircuitContext',
|
|
225
197
|
contextOrig_0)
|
|
226
198
|
}
|
|
227
199
|
if (!(requestId_0.buffer instanceof ArrayBuffer && requestId_0.BYTES_PER_ELEMENT === 1 && requestId_0.length === 32)) {
|
|
228
200
|
__compactRuntime.typeError('postSignatureResponse',
|
|
229
201
|
'argument 1 (argument 2 as invoked from Typescript)',
|
|
230
|
-
'signet-contract.compact line
|
|
202
|
+
'signet-contract.compact line 66 char 1',
|
|
231
203
|
'Bytes<32>',
|
|
232
204
|
requestId_0)
|
|
233
205
|
}
|
|
234
|
-
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)) {
|
|
235
207
|
__compactRuntime.typeError('postSignatureResponse',
|
|
236
208
|
'argument 2 (argument 3 as invoked from Typescript)',
|
|
237
|
-
'signet-contract.compact line
|
|
238
|
-
'struct
|
|
239
|
-
|
|
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)
|
|
240
212
|
}
|
|
241
213
|
const context = __compactRuntime.copyCircuitContext(contextOrig_0);
|
|
242
214
|
const partialProofData = {
|
|
243
215
|
input: {
|
|
244
|
-
value: _descriptor_0.toValue(requestId_0).concat(
|
|
245
|
-
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())
|
|
246
218
|
},
|
|
247
219
|
output: undefined,
|
|
248
220
|
publicTranscript: [],
|
|
@@ -251,45 +223,44 @@ export class Contract {
|
|
|
251
223
|
const result_0 = await this._postSignatureResponse_0(context,
|
|
252
224
|
partialProofData,
|
|
253
225
|
requestId_0,
|
|
254
|
-
|
|
226
|
+
signatureRespondedEvent_0);
|
|
255
227
|
partialProofData.output = { value: [], alignment: [] };
|
|
256
228
|
__compactRuntime.finalizeCallProofData(context, partialProofData);
|
|
257
229
|
return { result: result_0, context: context, gasCost: context.callContext.currentGasCost };
|
|
258
230
|
},
|
|
259
231
|
postRespondBidirectional: async (...args_1) => {
|
|
260
|
-
if (args_1.length !==
|
|
261
|
-
throw new __compactRuntime.CompactError(`postRespondBidirectional: expected
|
|
232
|
+
if (args_1.length !== 3) {
|
|
233
|
+
throw new __compactRuntime.CompactError(`postRespondBidirectional: expected 3 arguments (as invoked from Typescript), received ${args_1.length}`);
|
|
262
234
|
}
|
|
263
235
|
const contextOrig_0 = args_1[0];
|
|
264
236
|
const requestId_0 = args_1[1];
|
|
265
|
-
const
|
|
266
|
-
const pk_0 = args_1[3];
|
|
237
|
+
const respondBidirectionalEvent_0 = args_1[2];
|
|
267
238
|
if (!(typeof(contextOrig_0) === 'object' && contextOrig_0.callContext.currentQueryContext != undefined)) {
|
|
268
239
|
__compactRuntime.typeError('postRespondBidirectional',
|
|
269
240
|
'argument 1 (as invoked from Typescript)',
|
|
270
|
-
'signet-contract.compact line
|
|
241
|
+
'signet-contract.compact line 97 char 1',
|
|
271
242
|
'CircuitContext',
|
|
272
243
|
contextOrig_0)
|
|
273
244
|
}
|
|
274
245
|
if (!(requestId_0.buffer instanceof ArrayBuffer && requestId_0.BYTES_PER_ELEMENT === 1 && requestId_0.length === 32)) {
|
|
275
246
|
__compactRuntime.typeError('postRespondBidirectional',
|
|
276
247
|
'argument 1 (argument 2 as invoked from Typescript)',
|
|
277
|
-
'signet-contract.compact line
|
|
248
|
+
'signet-contract.compact line 97 char 1',
|
|
278
249
|
'Bytes<32>',
|
|
279
250
|
requestId_0)
|
|
280
251
|
}
|
|
281
|
-
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)) {
|
|
282
253
|
__compactRuntime.typeError('postRespondBidirectional',
|
|
283
254
|
'argument 2 (argument 3 as invoked from Typescript)',
|
|
284
|
-
'signet-contract.compact line
|
|
285
|
-
'struct
|
|
286
|
-
|
|
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)
|
|
287
258
|
}
|
|
288
259
|
const context = __compactRuntime.copyCircuitContext(contextOrig_0);
|
|
289
260
|
const partialProofData = {
|
|
290
261
|
input: {
|
|
291
|
-
value: _descriptor_0.toValue(requestId_0).concat(
|
|
292
|
-
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())
|
|
293
264
|
},
|
|
294
265
|
output: undefined,
|
|
295
266
|
publicTranscript: [],
|
|
@@ -298,30 +269,28 @@ export class Contract {
|
|
|
298
269
|
const result_0 = await this._postRespondBidirectional_0(context,
|
|
299
270
|
partialProofData,
|
|
300
271
|
requestId_0,
|
|
301
|
-
|
|
302
|
-
pk_0);
|
|
272
|
+
respondBidirectionalEvent_0);
|
|
303
273
|
partialProofData.output = { value: [], alignment: [] };
|
|
304
274
|
__compactRuntime.finalizeCallProofData(context, partialProofData);
|
|
305
275
|
return { result: result_0, context: context, gasCost: context.callContext.currentGasCost };
|
|
306
276
|
}
|
|
307
277
|
};
|
|
308
278
|
this.impureCircuits = {
|
|
309
|
-
|
|
279
|
+
signBidirectionalEvent: this.circuits.signBidirectionalEvent,
|
|
310
280
|
postSignatureResponse: this.circuits.postSignatureResponse,
|
|
311
281
|
postRespondBidirectional: this.circuits.postRespondBidirectional
|
|
312
282
|
};
|
|
313
283
|
this.provableCircuits = {
|
|
314
|
-
|
|
284
|
+
signBidirectionalEvent: this.circuits.signBidirectionalEvent,
|
|
315
285
|
postSignatureResponse: this.circuits.postSignatureResponse,
|
|
316
286
|
postRespondBidirectional: this.circuits.postRespondBidirectional
|
|
317
287
|
};
|
|
318
288
|
}
|
|
319
289
|
async initialState(...args_0) {
|
|
320
|
-
if (args_0.length !==
|
|
321
|
-
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}`);
|
|
322
292
|
}
|
|
323
293
|
const constructorContext_0 = args_0[0];
|
|
324
|
-
const mpcPk_0 = args_0[1];
|
|
325
294
|
if (typeof(constructorContext_0) !== 'object') {
|
|
326
295
|
throw new __compactRuntime.CompactError(`Contract state constructor: expected 'constructorContext' in argument 1 (as invoked from Typescript) to be an object`);
|
|
327
296
|
}
|
|
@@ -338,8 +307,9 @@ export class Contract {
|
|
|
338
307
|
stateValue_0 = stateValue_0.arrayPush(__compactRuntime.StateValue.newNull());
|
|
339
308
|
stateValue_0 = stateValue_0.arrayPush(__compactRuntime.StateValue.newNull());
|
|
340
309
|
stateValue_0 = stateValue_0.arrayPush(__compactRuntime.StateValue.newNull());
|
|
310
|
+
stateValue_0 = stateValue_0.arrayPush(__compactRuntime.StateValue.newNull());
|
|
341
311
|
state_0.data = new __compactRuntime.ChargedState(stateValue_0);
|
|
342
|
-
state_0.setOperation('
|
|
312
|
+
state_0.setOperation('signBidirectionalEvent', new __compactRuntime.ContractOperation());
|
|
343
313
|
state_0.setOperation('postSignatureResponse', new __compactRuntime.ContractOperation());
|
|
344
314
|
state_0.setOperation('postRespondBidirectional', new __compactRuntime.ContractOperation());
|
|
345
315
|
const context = __compactRuntime.createCircuitContext('constructor', __compactRuntime.dummyContractAddress(), constructorContext_0.initialZswapLocalState.coinPublicKey, state_0.data, constructorContext_0.initialPrivateState);
|
|
@@ -353,8 +323,8 @@ export class Contract {
|
|
|
353
323
|
partialProofData,
|
|
354
324
|
[
|
|
355
325
|
{ push: { storage: false,
|
|
356
|
-
value: __compactRuntime.StateValue.newCell({ value:
|
|
357
|
-
alignment:
|
|
326
|
+
value: __compactRuntime.StateValue.newCell({ value: _descriptor_6.toValue(0n),
|
|
327
|
+
alignment: _descriptor_6.alignment() }).encode() } },
|
|
358
328
|
{ push: { storage: true,
|
|
359
329
|
value: __compactRuntime.StateValue.newMap(
|
|
360
330
|
new __compactRuntime.StateMap()
|
|
@@ -364,8 +334,8 @@ export class Contract {
|
|
|
364
334
|
partialProofData,
|
|
365
335
|
[
|
|
366
336
|
{ push: { storage: false,
|
|
367
|
-
value: __compactRuntime.StateValue.newCell({ value:
|
|
368
|
-
alignment:
|
|
337
|
+
value: __compactRuntime.StateValue.newCell({ value: _descriptor_6.toValue(1n),
|
|
338
|
+
alignment: _descriptor_6.alignment() }).encode() } },
|
|
369
339
|
{ push: { storage: true,
|
|
370
340
|
value: __compactRuntime.StateValue.newMap(
|
|
371
341
|
new __compactRuntime.StateMap()
|
|
@@ -375,8 +345,8 @@ export class Contract {
|
|
|
375
345
|
partialProofData,
|
|
376
346
|
[
|
|
377
347
|
{ push: { storage: false,
|
|
378
|
-
value: __compactRuntime.StateValue.newCell({ value:
|
|
379
|
-
alignment:
|
|
348
|
+
value: __compactRuntime.StateValue.newCell({ value: _descriptor_6.toValue(2n),
|
|
349
|
+
alignment: _descriptor_6.alignment() }).encode() } },
|
|
380
350
|
{ push: { storage: true,
|
|
381
351
|
value: __compactRuntime.StateValue.newMap(
|
|
382
352
|
new __compactRuntime.StateMap()
|
|
@@ -386,33 +356,34 @@ export class Contract {
|
|
|
386
356
|
partialProofData,
|
|
387
357
|
[
|
|
388
358
|
{ push: { storage: false,
|
|
389
|
-
value: __compactRuntime.StateValue.newCell({ value:
|
|
390
|
-
alignment:
|
|
359
|
+
value: __compactRuntime.StateValue.newCell({ value: _descriptor_6.toValue(3n),
|
|
360
|
+
alignment: _descriptor_6.alignment() }).encode() } },
|
|
391
361
|
{ push: { storage: true,
|
|
392
|
-
value: __compactRuntime.StateValue.
|
|
393
|
-
|
|
362
|
+
value: __compactRuntime.StateValue.newMap(
|
|
363
|
+
new __compactRuntime.StateMap()
|
|
364
|
+
).encode() } },
|
|
394
365
|
{ ins: { cached: false, n: 1 } }]);
|
|
395
366
|
__compactRuntime.queryLedgerState(context,
|
|
396
367
|
partialProofData,
|
|
397
368
|
[
|
|
398
369
|
{ push: { storage: false,
|
|
399
|
-
value: __compactRuntime.StateValue.newCell({ value:
|
|
400
|
-
alignment:
|
|
370
|
+
value: __compactRuntime.StateValue.newCell({ value: _descriptor_6.toValue(4n),
|
|
371
|
+
alignment: _descriptor_6.alignment() }).encode() } },
|
|
401
372
|
{ push: { storage: true,
|
|
402
373
|
value: __compactRuntime.StateValue.newMap(
|
|
403
374
|
new __compactRuntime.StateMap()
|
|
404
375
|
).encode() } },
|
|
405
376
|
{ ins: { cached: false, n: 1 } }]);
|
|
406
|
-
const tmp_0 = this._persistentHash_0(mpcPk_0);
|
|
407
377
|
__compactRuntime.queryLedgerState(context,
|
|
408
378
|
partialProofData,
|
|
409
379
|
[
|
|
410
380
|
{ push: { storage: false,
|
|
411
|
-
value: __compactRuntime.StateValue.newCell({ value:
|
|
412
|
-
alignment:
|
|
381
|
+
value: __compactRuntime.StateValue.newCell({ value: _descriptor_6.toValue(5n),
|
|
382
|
+
alignment: _descriptor_6.alignment() }).encode() } },
|
|
413
383
|
{ push: { storage: true,
|
|
414
|
-
value: __compactRuntime.StateValue.
|
|
415
|
-
|
|
384
|
+
value: __compactRuntime.StateValue.newMap(
|
|
385
|
+
new __compactRuntime.StateMap()
|
|
386
|
+
).encode() } },
|
|
416
387
|
{ ins: { cached: false, n: 1 } }]);
|
|
417
388
|
state_0.data = new __compactRuntime.ChargedState(context.callContext.currentQueryContext.state.state);
|
|
418
389
|
return {
|
|
@@ -421,121 +392,84 @@ export class Contract {
|
|
|
421
392
|
currentZswapLocalState: context.callContext.currentZswapLocalState
|
|
422
393
|
}
|
|
423
394
|
}
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
v_0[29],
|
|
429
|
-
v_0[28],
|
|
430
|
-
v_0[27],
|
|
431
|
-
v_0[26],
|
|
432
|
-
v_0[25],
|
|
433
|
-
v_0[24],
|
|
434
|
-
v_0[23],
|
|
435
|
-
v_0[22],
|
|
436
|
-
v_0[21],
|
|
437
|
-
v_0[20],
|
|
438
|
-
v_0[19],
|
|
439
|
-
v_0[18],
|
|
440
|
-
v_0[17],
|
|
441
|
-
v_0[16],
|
|
442
|
-
v_0[15],
|
|
443
|
-
v_0[14],
|
|
444
|
-
v_0[13],
|
|
445
|
-
v_0[12],
|
|
446
|
-
v_0[11],
|
|
447
|
-
v_0[10],
|
|
448
|
-
v_0[9],
|
|
449
|
-
v_0[8],
|
|
450
|
-
v_0[7],
|
|
451
|
-
v_0[6],
|
|
452
|
-
v_0[5],
|
|
453
|
-
v_0[4],
|
|
454
|
-
v_0[3],
|
|
455
|
-
v_0[2],
|
|
456
|
-
v_0[1],
|
|
457
|
-
v_0[0]],
|
|
458
|
-
Number);
|
|
459
|
-
return __compactRuntime.convertBytesToField(115792089237316195423570985008687907852837564279074904382605163141518161494336n,
|
|
460
|
-
32,
|
|
461
|
-
beReversed_0,
|
|
462
|
-
'Secp256k1Scalar',
|
|
463
|
-
'<standard library>');
|
|
464
|
-
}
|
|
465
|
-
_secp256k1EcdsaVerify_0(msgHash_0, sig_0, pk_0) {
|
|
466
|
-
const z_0 = this._hashToSecp256k1Scalar_0(msgHash_0);
|
|
467
|
-
const __compact_pattern_tmp1_0 = sig_0;
|
|
468
|
-
const r_0 = __compact_pattern_tmp1_0.r;
|
|
469
|
-
const s_0 = __compact_pattern_tmp1_0.s;
|
|
470
|
-
const w_0 = this._inv_0(s_0);
|
|
471
|
-
const u1_0 = this._mul_0(z_0, w_0);
|
|
472
|
-
const u2_0 = this._mul_0(r_0, w_0);
|
|
473
|
-
const point_0 = this._ecAdd_0(this._ecMulGenerator_0(u1_0),
|
|
474
|
-
this._ecMul_0(pk_0, u2_0));
|
|
475
|
-
return __compactRuntime.convertBytesToField(115792089237316195423570985008687907852837564279074904382605163141518161494336n,
|
|
476
|
-
32,
|
|
477
|
-
__compactRuntime.convertBigintToBytes(32,
|
|
478
|
-
this._secp256k1PointX_0(point_0),
|
|
479
|
-
'<standard library>'),
|
|
480
|
-
'Secp256k1Scalar',
|
|
481
|
-
'<standard library>')
|
|
482
|
-
===
|
|
483
|
-
r_0;
|
|
484
|
-
}
|
|
485
|
-
_persistentHash_0(value_0) {
|
|
486
|
-
const result_0 = __compactRuntime.persistentHash(_descriptor_9, value_0);
|
|
487
|
-
return result_0;
|
|
488
|
-
}
|
|
489
|
-
_persistentHash_1(value_0) {
|
|
490
|
-
const result_0 = __compactRuntime.persistentHash(_descriptor_15, value_0);
|
|
491
|
-
return result_0;
|
|
492
|
-
}
|
|
493
|
-
_persistentHash_2(value_0) {
|
|
494
|
-
const result_0 = __compactRuntime.persistentHash(_descriptor_7, value_0);
|
|
495
|
-
return result_0;
|
|
496
|
-
}
|
|
497
|
-
_persistentHash_3(value_0) {
|
|
498
|
-
const result_0 = __compactRuntime.persistentHash(_descriptor_14, value_0);
|
|
499
|
-
return result_0;
|
|
500
|
-
}
|
|
501
|
-
_mul_0(x_0, y_0) {
|
|
502
|
-
const result_0 = __compactRuntime.secp256k1ScalarMul(x_0, y_0);
|
|
503
|
-
return result_0;
|
|
504
|
-
}
|
|
505
|
-
_inv_0(s_0) {
|
|
506
|
-
const result_0 = __compactRuntime.secp256k1ScalarInv(s_0);
|
|
507
|
-
return result_0;
|
|
508
|
-
}
|
|
509
|
-
_secp256k1PointX_0(pt_0) {
|
|
510
|
-
const result_0 = __compactRuntime.secp256k1PointX(pt_0);
|
|
511
|
-
return result_0;
|
|
512
|
-
}
|
|
513
|
-
_ecAdd_0(a_0, b_0) {
|
|
514
|
-
const result_0 = __compactRuntime.secp256k1Add(a_0, b_0);
|
|
515
|
-
return result_0;
|
|
516
|
-
}
|
|
517
|
-
_ecMul_0(a_0, b_0) {
|
|
518
|
-
const result_0 = __compactRuntime.secp256k1Mul(a_0, b_0);
|
|
519
|
-
return result_0;
|
|
520
|
-
}
|
|
521
|
-
_ecMulGenerator_0(b_0) {
|
|
522
|
-
const result_0 = __compactRuntime.secp256k1MulGenerator(b_0);
|
|
523
|
-
return result_0;
|
|
524
|
-
}
|
|
525
|
-
_signetAttestationMessage_0(requestId_0, serializedOutput_0, outputLen_0) {
|
|
526
|
-
const outHash_0 = this._persistentHash_1([this._persistentHash_2(serializedOutput_0),
|
|
527
|
-
__compactRuntime.convertBigintToBytes(32,
|
|
528
|
-
outputLen_0,
|
|
529
|
-
'Signet.compact line 380 char 7')]);
|
|
530
|
-
return this._persistentHash_3([new Uint8Array([115, 105, 103, 110, 101, 116, 58, 109, 105, 100, 110, 105, 103, 104, 116, 58, 97, 116, 116, 101, 115, 116, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]),
|
|
531
|
-
requestId_0,
|
|
532
|
-
outHash_0]);
|
|
533
|
-
}
|
|
534
|
-
async _notifyBidirectionalSignatureRequest_0(context,
|
|
535
|
-
partialProofData,
|
|
536
|
-
requestId_0,
|
|
537
|
-
notification_0)
|
|
395
|
+
async _signBidirectionalEvent_0(context,
|
|
396
|
+
partialProofData,
|
|
397
|
+
requestId_0,
|
|
398
|
+
notification_0)
|
|
538
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 } }]);
|
|
539
473
|
__compactRuntime.queryLedgerState(context,
|
|
540
474
|
partialProofData,
|
|
541
475
|
[
|
|
@@ -543,22 +477,22 @@ export class Contract {
|
|
|
543
477
|
pushPath: true,
|
|
544
478
|
path: [
|
|
545
479
|
{ tag: 'value',
|
|
546
|
-
value: { value:
|
|
547
|
-
alignment:
|
|
480
|
+
value: { value: _descriptor_6.toValue(1n),
|
|
481
|
+
alignment: _descriptor_6.alignment() } }] } },
|
|
548
482
|
{ push: { storage: false,
|
|
549
|
-
value: __compactRuntime.StateValue.newCell({ value:
|
|
550
|
-
alignment:
|
|
483
|
+
value: __compactRuntime.StateValue.newCell({ value: _descriptor_4.toValue(signBidirectionalEventNotificationMapKey_0),
|
|
484
|
+
alignment: _descriptor_4.alignment() }).encode() } },
|
|
551
485
|
{ push: { storage: true,
|
|
552
|
-
value: __compactRuntime.StateValue.newCell({ value:
|
|
553
|
-
alignment:
|
|
486
|
+
value: __compactRuntime.StateValue.newCell({ value: _descriptor_8.toValue(notification_0),
|
|
487
|
+
alignment: _descriptor_8.alignment() }).encode() } },
|
|
554
488
|
{ ins: { cached: false, n: 1 } },
|
|
555
489
|
{ ins: { cached: true, n: 1 } }]);
|
|
556
|
-
return
|
|
490
|
+
return signBidirectionalEventNotificationMapKey_0;
|
|
557
491
|
}
|
|
558
492
|
async _postSignatureResponse_0(context,
|
|
559
493
|
partialProofData,
|
|
560
494
|
requestId_0,
|
|
561
|
-
|
|
495
|
+
signatureRespondedEvent_0)
|
|
562
496
|
{
|
|
563
497
|
const disclosedRequestId_0 = requestId_0;
|
|
564
498
|
if (!_descriptor_2.fromValue(__compactRuntime.queryLedgerState(context,
|
|
@@ -569,8 +503,8 @@ export class Contract {
|
|
|
569
503
|
pushPath: false,
|
|
570
504
|
path: [
|
|
571
505
|
{ tag: 'value',
|
|
572
|
-
value: { value:
|
|
573
|
-
alignment:
|
|
506
|
+
value: { value: _descriptor_6.toValue(2n),
|
|
507
|
+
alignment: _descriptor_6.alignment() } }] } },
|
|
574
508
|
{ push: { storage: false,
|
|
575
509
|
value: __compactRuntime.StateValue.newCell({ value: _descriptor_0.toValue(disclosedRequestId_0),
|
|
576
510
|
alignment: _descriptor_0.alignment() }).encode() } },
|
|
@@ -585,8 +519,8 @@ export class Contract {
|
|
|
585
519
|
pushPath: true,
|
|
586
520
|
path: [
|
|
587
521
|
{ tag: 'value',
|
|
588
|
-
value: { value:
|
|
589
|
-
alignment:
|
|
522
|
+
value: { value: _descriptor_6.toValue(2n),
|
|
523
|
+
alignment: _descriptor_6.alignment() } }] } },
|
|
590
524
|
{ push: { storage: false,
|
|
591
525
|
value: __compactRuntime.StateValue.newCell({ value: _descriptor_0.toValue(disclosedRequestId_0),
|
|
592
526
|
alignment: _descriptor_0.alignment() }).encode() } },
|
|
@@ -604,8 +538,8 @@ export class Contract {
|
|
|
604
538
|
pushPath: false,
|
|
605
539
|
path: [
|
|
606
540
|
{ tag: 'value',
|
|
607
|
-
value: { value:
|
|
608
|
-
alignment:
|
|
541
|
+
value: { value: _descriptor_6.toValue(2n),
|
|
542
|
+
alignment: _descriptor_6.alignment() } },
|
|
609
543
|
{ tag: 'value',
|
|
610
544
|
value: { value: _descriptor_0.toValue(disclosedRequestId_0),
|
|
611
545
|
alignment: _descriptor_0.alignment() } }] } },
|
|
@@ -619,8 +553,8 @@ export class Contract {
|
|
|
619
553
|
pushPath: true,
|
|
620
554
|
path: [
|
|
621
555
|
{ tag: 'value',
|
|
622
|
-
value: { value:
|
|
623
|
-
alignment:
|
|
556
|
+
value: { value: _descriptor_6.toValue(2n),
|
|
557
|
+
alignment: _descriptor_6.alignment() } },
|
|
624
558
|
{ tag: 'value',
|
|
625
559
|
value: { value: _descriptor_0.toValue(disclosedRequestId_0),
|
|
626
560
|
alignment: _descriptor_0.alignment() } }] } },
|
|
@@ -638,14 +572,14 @@ export class Contract {
|
|
|
638
572
|
pushPath: true,
|
|
639
573
|
path: [
|
|
640
574
|
{ tag: 'value',
|
|
641
|
-
value: { value:
|
|
642
|
-
alignment:
|
|
575
|
+
value: { value: _descriptor_6.toValue(3n),
|
|
576
|
+
alignment: _descriptor_6.alignment() } }] } },
|
|
643
577
|
{ push: { storage: false,
|
|
644
578
|
value: __compactRuntime.StateValue.newCell({ value: _descriptor_4.toValue(tmp_1),
|
|
645
579
|
alignment: _descriptor_4.alignment() }).encode() } },
|
|
646
580
|
{ push: { storage: true,
|
|
647
|
-
value: __compactRuntime.StateValue.newCell({ value:
|
|
648
|
-
alignment:
|
|
581
|
+
value: __compactRuntime.StateValue.newCell({ value: _descriptor_9.toValue(signatureRespondedEvent_0),
|
|
582
|
+
alignment: _descriptor_9.alignment() }).encode() } },
|
|
649
583
|
{ ins: { cached: false, n: 1 } },
|
|
650
584
|
{ ins: { cached: true, n: 1 } }]);
|
|
651
585
|
return [];
|
|
@@ -653,62 +587,26 @@ export class Contract {
|
|
|
653
587
|
async _postRespondBidirectional_0(context,
|
|
654
588
|
partialProofData,
|
|
655
589
|
requestId_0,
|
|
656
|
-
|
|
657
|
-
pk_0)
|
|
590
|
+
respondBidirectionalEvent_0)
|
|
658
591
|
{
|
|
659
592
|
const disclosedRequestId_0 = requestId_0;
|
|
660
|
-
|
|
661
|
-
|
|
662
|
-
|
|
663
|
-
|
|
664
|
-
|
|
665
|
-
|
|
666
|
-
|
|
667
|
-
|
|
668
|
-
|
|
669
|
-
|
|
670
|
-
|
|
671
|
-
|
|
672
|
-
|
|
673
|
-
|
|
674
|
-
|
|
675
|
-
|
|
676
|
-
__compactRuntime.assert(this._secp256k1EcdsaVerify_0(this._signetAttestationMessage_0(disclosedRequestId_0,
|
|
677
|
-
disclosedResponse_0.serializedOutput,
|
|
678
|
-
disclosedResponse_0.outputLen),
|
|
679
|
-
{ r:
|
|
680
|
-
__compactRuntime.convertBytesToField(115792089237316195423570985008687907852837564279074904382605163141518161494336n,
|
|
681
|
-
32,
|
|
682
|
-
disclosedResponse_0.sigR,
|
|
683
|
-
'Secp256k1Scalar',
|
|
684
|
-
'signet-contract.compact line 116 char 20'),
|
|
685
|
-
s:
|
|
686
|
-
__compactRuntime.convertBytesToField(115792089237316195423570985008687907852837564279074904382605163141518161494336n,
|
|
687
|
-
32,
|
|
688
|
-
disclosedResponse_0.sigS,
|
|
689
|
-
'Secp256k1Scalar',
|
|
690
|
-
'signet-contract.compact line 117 char 20') },
|
|
691
|
-
disclosedPk_0),
|
|
692
|
-
'Invalid attestation signature');
|
|
693
|
-
if (_descriptor_2.fromValue(__compactRuntime.queryLedgerState(context,
|
|
694
|
-
partialProofData,
|
|
695
|
-
[
|
|
696
|
-
{ dup: { n: 0 } },
|
|
697
|
-
{ idx: { cached: false,
|
|
698
|
-
pushPath: false,
|
|
699
|
-
path: [
|
|
700
|
-
{ tag: 'value',
|
|
701
|
-
value: { value: _descriptor_5.toValue(2n),
|
|
702
|
-
alignment: _descriptor_5.alignment() } }] } },
|
|
703
|
-
{ push: { storage: false,
|
|
704
|
-
value: __compactRuntime.StateValue.newCell({ value: _descriptor_0.toValue(disclosedRequestId_0),
|
|
705
|
-
alignment: _descriptor_0.alignment() }).encode() } },
|
|
706
|
-
'member',
|
|
707
|
-
{ popeq: { cached: true,
|
|
708
|
-
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))
|
|
709
609
|
{
|
|
710
|
-
return [];
|
|
711
|
-
} else {
|
|
712
610
|
__compactRuntime.queryLedgerState(context,
|
|
713
611
|
partialProofData,
|
|
714
612
|
[
|
|
@@ -716,22 +614,70 @@ export class Contract {
|
|
|
716
614
|
pushPath: true,
|
|
717
615
|
path: [
|
|
718
616
|
{ tag: 'value',
|
|
719
|
-
value: { value:
|
|
720
|
-
alignment:
|
|
617
|
+
value: { value: _descriptor_6.toValue(4n),
|
|
618
|
+
alignment: _descriptor_6.alignment() } }] } },
|
|
721
619
|
{ push: { storage: false,
|
|
722
620
|
value: __compactRuntime.StateValue.newCell({ value: _descriptor_0.toValue(disclosedRequestId_0),
|
|
723
621
|
alignment: _descriptor_0.alignment() }).encode() } },
|
|
724
622
|
{ push: { storage: true,
|
|
725
|
-
value: __compactRuntime.StateValue.newCell({ value:
|
|
726
|
-
alignment:
|
|
623
|
+
value: __compactRuntime.StateValue.newCell({ value: _descriptor_1.toValue(0n),
|
|
624
|
+
alignment: _descriptor_1.alignment() }).encode() } },
|
|
727
625
|
{ ins: { cached: false, n: 1 } },
|
|
728
626
|
{ ins: { cached: true, n: 1 } }]);
|
|
729
|
-
return [];
|
|
730
627
|
}
|
|
731
|
-
|
|
732
|
-
|
|
733
|
-
|
|
734
|
-
|
|
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 [];
|
|
735
681
|
}
|
|
736
682
|
}
|
|
737
683
|
export function ledger(stateOrChargedState) {
|
|
@@ -748,7 +694,7 @@ export function ledger(stateOrChargedState) {
|
|
|
748
694
|
privateTranscriptOutputs: []
|
|
749
695
|
};
|
|
750
696
|
return {
|
|
751
|
-
|
|
697
|
+
signBidirectionalEventNotificationCounterMap: {
|
|
752
698
|
isEmpty(...args_0) {
|
|
753
699
|
if (args_0.length !== 0) {
|
|
754
700
|
throw new __compactRuntime.CompactError(`isEmpty: expected 0 arguments, received ${args_0.length}`);
|
|
@@ -761,8 +707,8 @@ export function ledger(stateOrChargedState) {
|
|
|
761
707
|
pushPath: false,
|
|
762
708
|
path: [
|
|
763
709
|
{ tag: 'value',
|
|
764
|
-
value: { value:
|
|
765
|
-
alignment:
|
|
710
|
+
value: { value: _descriptor_6.toValue(0n),
|
|
711
|
+
alignment: _descriptor_6.alignment() } }] } },
|
|
766
712
|
'size',
|
|
767
713
|
{ push: { storage: false,
|
|
768
714
|
value: __compactRuntime.StateValue.newCell({ value: _descriptor_1.toValue(0n),
|
|
@@ -783,8 +729,8 @@ export function ledger(stateOrChargedState) {
|
|
|
783
729
|
pushPath: false,
|
|
784
730
|
path: [
|
|
785
731
|
{ tag: 'value',
|
|
786
|
-
value: { value:
|
|
787
|
-
alignment:
|
|
732
|
+
value: { value: _descriptor_6.toValue(0n),
|
|
733
|
+
alignment: _descriptor_6.alignment() } }] } },
|
|
788
734
|
'size',
|
|
789
735
|
{ popeq: { cached: true,
|
|
790
736
|
result: undefined } }]).value);
|
|
@@ -797,7 +743,7 @@ export function ledger(stateOrChargedState) {
|
|
|
797
743
|
if (!(key_0.buffer instanceof ArrayBuffer && key_0.BYTES_PER_ELEMENT === 1 && key_0.length === 32)) {
|
|
798
744
|
__compactRuntime.typeError('member',
|
|
799
745
|
'argument 1',
|
|
800
|
-
'signet-contract.compact line
|
|
746
|
+
'signet-contract.compact line 20 char 1',
|
|
801
747
|
'Bytes<32>',
|
|
802
748
|
key_0)
|
|
803
749
|
}
|
|
@@ -809,8 +755,8 @@ export function ledger(stateOrChargedState) {
|
|
|
809
755
|
pushPath: false,
|
|
810
756
|
path: [
|
|
811
757
|
{ tag: 'value',
|
|
812
|
-
value: { value:
|
|
813
|
-
alignment:
|
|
758
|
+
value: { value: _descriptor_6.toValue(0n),
|
|
759
|
+
alignment: _descriptor_6.alignment() } }] } },
|
|
814
760
|
{ push: { storage: false,
|
|
815
761
|
value: __compactRuntime.StateValue.newCell({ value: _descriptor_0.toValue(key_0),
|
|
816
762
|
alignment: _descriptor_0.alignment() }).encode() } },
|
|
@@ -826,7 +772,7 @@ export function ledger(stateOrChargedState) {
|
|
|
826
772
|
if (!(key_0.buffer instanceof ArrayBuffer && key_0.BYTES_PER_ELEMENT === 1 && key_0.length === 32)) {
|
|
827
773
|
__compactRuntime.typeError('lookup',
|
|
828
774
|
'argument 1',
|
|
829
|
-
'signet-contract.compact line
|
|
775
|
+
'signet-contract.compact line 20 char 1',
|
|
830
776
|
'Bytes<32>',
|
|
831
777
|
key_0)
|
|
832
778
|
}
|
|
@@ -847,8 +793,8 @@ export function ledger(stateOrChargedState) {
|
|
|
847
793
|
pushPath: false,
|
|
848
794
|
path: [
|
|
849
795
|
{ tag: 'value',
|
|
850
|
-
value: { value:
|
|
851
|
-
alignment:
|
|
796
|
+
value: { value: _descriptor_6.toValue(0n),
|
|
797
|
+
alignment: _descriptor_6.alignment() } },
|
|
852
798
|
{ tag: 'value',
|
|
853
799
|
value: { value: _descriptor_0.toValue(key_0),
|
|
854
800
|
alignment: _descriptor_0.alignment() } }] } },
|
|
@@ -858,7 +804,7 @@ export function ledger(stateOrChargedState) {
|
|
|
858
804
|
}
|
|
859
805
|
}
|
|
860
806
|
},
|
|
861
|
-
|
|
807
|
+
signBidirectionalEventNotificationMap: {
|
|
862
808
|
isEmpty(...args_0) {
|
|
863
809
|
if (args_0.length !== 0) {
|
|
864
810
|
throw new __compactRuntime.CompactError(`isEmpty: expected 0 arguments, received ${args_0.length}`);
|
|
@@ -871,8 +817,8 @@ export function ledger(stateOrChargedState) {
|
|
|
871
817
|
pushPath: false,
|
|
872
818
|
path: [
|
|
873
819
|
{ tag: 'value',
|
|
874
|
-
value: { value:
|
|
875
|
-
alignment:
|
|
820
|
+
value: { value: _descriptor_6.toValue(1n),
|
|
821
|
+
alignment: _descriptor_6.alignment() } }] } },
|
|
876
822
|
'size',
|
|
877
823
|
{ push: { storage: false,
|
|
878
824
|
value: __compactRuntime.StateValue.newCell({ value: _descriptor_1.toValue(0n),
|
|
@@ -893,8 +839,8 @@ export function ledger(stateOrChargedState) {
|
|
|
893
839
|
pushPath: false,
|
|
894
840
|
path: [
|
|
895
841
|
{ tag: 'value',
|
|
896
|
-
value: { value:
|
|
897
|
-
alignment:
|
|
842
|
+
value: { value: _descriptor_6.toValue(1n),
|
|
843
|
+
alignment: _descriptor_6.alignment() } }] } },
|
|
898
844
|
'size',
|
|
899
845
|
{ popeq: { cached: true,
|
|
900
846
|
result: undefined } }]).value);
|
|
@@ -907,8 +853,8 @@ export function ledger(stateOrChargedState) {
|
|
|
907
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)) {
|
|
908
854
|
__compactRuntime.typeError('member',
|
|
909
855
|
'argument 1',
|
|
910
|
-
'signet-contract.compact line
|
|
911
|
-
'struct
|
|
856
|
+
'signet-contract.compact line 21 char 1',
|
|
857
|
+
'struct SignetMapKey<count: Uint<0..18446744073709551616>, requestId: Bytes<32>>',
|
|
912
858
|
key_0)
|
|
913
859
|
}
|
|
914
860
|
return _descriptor_2.fromValue(__compactRuntime.queryLedgerState(context,
|
|
@@ -919,8 +865,8 @@ export function ledger(stateOrChargedState) {
|
|
|
919
865
|
pushPath: false,
|
|
920
866
|
path: [
|
|
921
867
|
{ tag: 'value',
|
|
922
|
-
value: { value:
|
|
923
|
-
alignment:
|
|
868
|
+
value: { value: _descriptor_6.toValue(1n),
|
|
869
|
+
alignment: _descriptor_6.alignment() } }] } },
|
|
924
870
|
{ push: { storage: false,
|
|
925
871
|
value: __compactRuntime.StateValue.newCell({ value: _descriptor_4.toValue(key_0),
|
|
926
872
|
alignment: _descriptor_4.alignment() }).encode() } },
|
|
@@ -936,11 +882,11 @@ export function ledger(stateOrChargedState) {
|
|
|
936
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)) {
|
|
937
883
|
__compactRuntime.typeError('lookup',
|
|
938
884
|
'argument 1',
|
|
939
|
-
'signet-contract.compact line
|
|
940
|
-
'struct
|
|
885
|
+
'signet-contract.compact line 21 char 1',
|
|
886
|
+
'struct SignetMapKey<count: Uint<0..18446744073709551616>, requestId: Bytes<32>>',
|
|
941
887
|
key_0)
|
|
942
888
|
}
|
|
943
|
-
return
|
|
889
|
+
return _descriptor_8.fromValue(__compactRuntime.queryLedgerState(context,
|
|
944
890
|
partialProofData,
|
|
945
891
|
[
|
|
946
892
|
{ dup: { n: 0 } },
|
|
@@ -948,8 +894,8 @@ export function ledger(stateOrChargedState) {
|
|
|
948
894
|
pushPath: false,
|
|
949
895
|
path: [
|
|
950
896
|
{ tag: 'value',
|
|
951
|
-
value: { value:
|
|
952
|
-
alignment:
|
|
897
|
+
value: { value: _descriptor_6.toValue(1n),
|
|
898
|
+
alignment: _descriptor_6.alignment() } }] } },
|
|
953
899
|
{ idx: { cached: false,
|
|
954
900
|
pushPath: false,
|
|
955
901
|
path: [
|
|
@@ -964,10 +910,10 @@ export function ledger(stateOrChargedState) {
|
|
|
964
910
|
throw new __compactRuntime.CompactError(`iter: expected 0 arguments, received ${args_0.length}`);
|
|
965
911
|
}
|
|
966
912
|
const self_0 = state.asArray()[1];
|
|
967
|
-
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]();
|
|
968
914
|
}
|
|
969
915
|
},
|
|
970
|
-
|
|
916
|
+
signatureResponseCounterMap: {
|
|
971
917
|
isEmpty(...args_0) {
|
|
972
918
|
if (args_0.length !== 0) {
|
|
973
919
|
throw new __compactRuntime.CompactError(`isEmpty: expected 0 arguments, received ${args_0.length}`);
|
|
@@ -980,8 +926,8 @@ export function ledger(stateOrChargedState) {
|
|
|
980
926
|
pushPath: false,
|
|
981
927
|
path: [
|
|
982
928
|
{ tag: 'value',
|
|
983
|
-
value: { value:
|
|
984
|
-
alignment:
|
|
929
|
+
value: { value: _descriptor_6.toValue(2n),
|
|
930
|
+
alignment: _descriptor_6.alignment() } }] } },
|
|
985
931
|
'size',
|
|
986
932
|
{ push: { storage: false,
|
|
987
933
|
value: __compactRuntime.StateValue.newCell({ value: _descriptor_1.toValue(0n),
|
|
@@ -1002,8 +948,8 @@ export function ledger(stateOrChargedState) {
|
|
|
1002
948
|
pushPath: false,
|
|
1003
949
|
path: [
|
|
1004
950
|
{ tag: 'value',
|
|
1005
|
-
value: { value:
|
|
1006
|
-
alignment:
|
|
951
|
+
value: { value: _descriptor_6.toValue(2n),
|
|
952
|
+
alignment: _descriptor_6.alignment() } }] } },
|
|
1007
953
|
'size',
|
|
1008
954
|
{ popeq: { cached: true,
|
|
1009
955
|
result: undefined } }]).value);
|
|
@@ -1016,7 +962,7 @@ export function ledger(stateOrChargedState) {
|
|
|
1016
962
|
if (!(key_0.buffer instanceof ArrayBuffer && key_0.BYTES_PER_ELEMENT === 1 && key_0.length === 32)) {
|
|
1017
963
|
__compactRuntime.typeError('member',
|
|
1018
964
|
'argument 1',
|
|
1019
|
-
'signet-contract.compact line
|
|
965
|
+
'signet-contract.compact line 23 char 1',
|
|
1020
966
|
'Bytes<32>',
|
|
1021
967
|
key_0)
|
|
1022
968
|
}
|
|
@@ -1028,8 +974,8 @@ export function ledger(stateOrChargedState) {
|
|
|
1028
974
|
pushPath: false,
|
|
1029
975
|
path: [
|
|
1030
976
|
{ tag: 'value',
|
|
1031
|
-
value: { value:
|
|
1032
|
-
alignment:
|
|
977
|
+
value: { value: _descriptor_6.toValue(2n),
|
|
978
|
+
alignment: _descriptor_6.alignment() } }] } },
|
|
1033
979
|
{ push: { storage: false,
|
|
1034
980
|
value: __compactRuntime.StateValue.newCell({ value: _descriptor_0.toValue(key_0),
|
|
1035
981
|
alignment: _descriptor_0.alignment() }).encode() } },
|
|
@@ -1045,11 +991,92 @@ export function ledger(stateOrChargedState) {
|
|
|
1045
991
|
if (!(key_0.buffer instanceof ArrayBuffer && key_0.BYTES_PER_ELEMENT === 1 && key_0.length === 32)) {
|
|
1046
992
|
__compactRuntime.typeError('lookup',
|
|
1047
993
|
'argument 1',
|
|
1048
|
-
'signet-contract.compact line
|
|
994
|
+
'signet-contract.compact line 23 char 1',
|
|
1049
995
|
'Bytes<32>',
|
|
1050
996
|
key_0)
|
|
1051
997
|
}
|
|
1052
|
-
|
|
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,
|
|
1053
1080
|
partialProofData,
|
|
1054
1081
|
[
|
|
1055
1082
|
{ dup: { n: 0 } },
|
|
@@ -1057,14 +1084,43 @@ export function ledger(stateOrChargedState) {
|
|
|
1057
1084
|
pushPath: false,
|
|
1058
1085
|
path: [
|
|
1059
1086
|
{ tag: 'value',
|
|
1060
|
-
value: { value:
|
|
1061
|
-
alignment:
|
|
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 } },
|
|
1062
1112
|
{ idx: { cached: false,
|
|
1063
1113
|
pushPath: false,
|
|
1064
1114
|
path: [
|
|
1065
1115
|
{ tag: 'value',
|
|
1066
|
-
value: { value:
|
|
1067
|
-
alignment:
|
|
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() } }] } },
|
|
1068
1124
|
{ popeq: { cached: false,
|
|
1069
1125
|
result: undefined } }]).value);
|
|
1070
1126
|
},
|
|
@@ -1072,25 +1128,11 @@ export function ledger(stateOrChargedState) {
|
|
|
1072
1128
|
if (args_0.length !== 0) {
|
|
1073
1129
|
throw new __compactRuntime.CompactError(`iter: expected 0 arguments, received ${args_0.length}`);
|
|
1074
1130
|
}
|
|
1075
|
-
const self_0 = state.asArray()[
|
|
1076
|
-
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]();
|
|
1077
1133
|
}
|
|
1078
1134
|
},
|
|
1079
|
-
|
|
1080
|
-
return _descriptor_0.fromValue(__compactRuntime.queryLedgerState(context,
|
|
1081
|
-
partialProofData,
|
|
1082
|
-
[
|
|
1083
|
-
{ dup: { n: 0 } },
|
|
1084
|
-
{ idx: { cached: false,
|
|
1085
|
-
pushPath: false,
|
|
1086
|
-
path: [
|
|
1087
|
-
{ tag: 'value',
|
|
1088
|
-
value: { value: _descriptor_5.toValue(3n),
|
|
1089
|
-
alignment: _descriptor_5.alignment() } }] } },
|
|
1090
|
-
{ popeq: { cached: false,
|
|
1091
|
-
result: undefined } }]).value);
|
|
1092
|
-
},
|
|
1093
|
-
signBidirectionalNotificationIndex: {
|
|
1135
|
+
respondBidirectionalCounterMap: {
|
|
1094
1136
|
isEmpty(...args_0) {
|
|
1095
1137
|
if (args_0.length !== 0) {
|
|
1096
1138
|
throw new __compactRuntime.CompactError(`isEmpty: expected 0 arguments, received ${args_0.length}`);
|
|
@@ -1103,8 +1145,8 @@ export function ledger(stateOrChargedState) {
|
|
|
1103
1145
|
pushPath: false,
|
|
1104
1146
|
path: [
|
|
1105
1147
|
{ tag: 'value',
|
|
1106
|
-
value: { value:
|
|
1107
|
-
alignment:
|
|
1148
|
+
value: { value: _descriptor_6.toValue(4n),
|
|
1149
|
+
alignment: _descriptor_6.alignment() } }] } },
|
|
1108
1150
|
'size',
|
|
1109
1151
|
{ push: { storage: false,
|
|
1110
1152
|
value: __compactRuntime.StateValue.newCell({ value: _descriptor_1.toValue(0n),
|
|
@@ -1125,8 +1167,8 @@ export function ledger(stateOrChargedState) {
|
|
|
1125
1167
|
pushPath: false,
|
|
1126
1168
|
path: [
|
|
1127
1169
|
{ tag: 'value',
|
|
1128
|
-
value: { value:
|
|
1129
|
-
alignment:
|
|
1170
|
+
value: { value: _descriptor_6.toValue(4n),
|
|
1171
|
+
alignment: _descriptor_6.alignment() } }] } },
|
|
1130
1172
|
'size',
|
|
1131
1173
|
{ popeq: { cached: true,
|
|
1132
1174
|
result: undefined } }]).value);
|
|
@@ -1139,7 +1181,7 @@ export function ledger(stateOrChargedState) {
|
|
|
1139
1181
|
if (!(key_0.buffer instanceof ArrayBuffer && key_0.BYTES_PER_ELEMENT === 1 && key_0.length === 32)) {
|
|
1140
1182
|
__compactRuntime.typeError('member',
|
|
1141
1183
|
'argument 1',
|
|
1142
|
-
'signet-contract.compact line
|
|
1184
|
+
'signet-contract.compact line 26 char 1',
|
|
1143
1185
|
'Bytes<32>',
|
|
1144
1186
|
key_0)
|
|
1145
1187
|
}
|
|
@@ -1151,8 +1193,8 @@ export function ledger(stateOrChargedState) {
|
|
|
1151
1193
|
pushPath: false,
|
|
1152
1194
|
path: [
|
|
1153
1195
|
{ tag: 'value',
|
|
1154
|
-
value: { value:
|
|
1155
|
-
alignment:
|
|
1196
|
+
value: { value: _descriptor_6.toValue(4n),
|
|
1197
|
+
alignment: _descriptor_6.alignment() } }] } },
|
|
1156
1198
|
{ push: { storage: false,
|
|
1157
1199
|
value: __compactRuntime.StateValue.newCell({ value: _descriptor_0.toValue(key_0),
|
|
1158
1200
|
alignment: _descriptor_0.alignment() }).encode() } },
|
|
@@ -1168,35 +1210,145 @@ export function ledger(stateOrChargedState) {
|
|
|
1168
1210
|
if (!(key_0.buffer instanceof ArrayBuffer && key_0.BYTES_PER_ELEMENT === 1 && key_0.length === 32)) {
|
|
1169
1211
|
__compactRuntime.typeError('lookup',
|
|
1170
1212
|
'argument 1',
|
|
1171
|
-
'signet-contract.compact line
|
|
1213
|
+
'signet-contract.compact line 26 char 1',
|
|
1172
1214
|
'Bytes<32>',
|
|
1173
1215
|
key_0)
|
|
1174
1216
|
}
|
|
1175
|
-
|
|
1176
|
-
|
|
1177
|
-
|
|
1178
|
-
|
|
1179
|
-
|
|
1180
|
-
|
|
1181
|
-
|
|
1182
|
-
|
|
1183
|
-
|
|
1184
|
-
|
|
1185
|
-
|
|
1186
|
-
|
|
1187
|
-
|
|
1188
|
-
|
|
1189
|
-
|
|
1190
|
-
|
|
1191
|
-
|
|
1192
|
-
|
|
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);
|
|
1193
1345
|
},
|
|
1194
1346
|
[Symbol.iterator](...args_0) {
|
|
1195
1347
|
if (args_0.length !== 0) {
|
|
1196
1348
|
throw new __compactRuntime.CompactError(`iter: expected 0 arguments, received ${args_0.length}`);
|
|
1197
1349
|
}
|
|
1198
|
-
const self_0 = state.asArray()[
|
|
1199
|
-
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]();
|
|
1200
1352
|
}
|
|
1201
1353
|
}
|
|
1202
1354
|
};
|
|
@@ -1209,9 +1361,9 @@ export const pureCircuits = {};
|
|
|
1209
1361
|
export const contractReferenceLocations =
|
|
1210
1362
|
{ tag: 'publicLedgerArray', indices: { } };
|
|
1211
1363
|
export const expectedVk = {
|
|
1212
|
-
'
|
|
1213
|
-
'
|
|
1214
|
-
'
|
|
1364
|
+
'postRespondBidirectional': 'fa5fd5e2c04bf3553e601fb43482df5e0de872f2469216f6ac1b9f2b7e1248ee',
|
|
1365
|
+
'postSignatureResponse': '22938eaebc029fd624db271e92857b132977c0373bf2f9ce823e21d011973e0d',
|
|
1366
|
+
'signBidirectionalEvent': '3e603e64ac930b8e4e1412e0afb5b3769e3d9db62c3a0bace1fe367eb7dc868e',
|
|
1215
1367
|
};
|
|
1216
1368
|
|
|
1217
1369
|
//# sourceMappingURL=index.js.map
|