@shieldedpools/contracts 0.0.0-stage → 0.1.0
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/LICENSE +201 -0
- package/README.md +66 -2
- package/contract/managed/shielded-pools/compiler/contract-info.json +134 -0
- package/contract/managed/shielded-pools/compiler/contract-manifest.json +79 -0
- package/contract/managed/shielded-pools/contract/index.d.ts +67 -0
- package/contract/managed/shielded-pools/contract/index.js +791 -0
- package/contract/managed/shielded-pools/contract/index.js.map +8 -0
- package/contract/managed/shielded-pools/keys/shield.prover +0 -0
- package/contract/managed/shielded-pools/keys/shield.verifier +0 -0
- package/contract/managed/shielded-pools/keys/unshield.prover +0 -0
- package/contract/managed/shielded-pools/keys/unshield.verifier +0 -0
- package/contract/managed/shielded-pools/zkir/shield.bzkir +0 -0
- package/contract/managed/shielded-pools/zkir/shield.zkir +178 -0
- package/contract/managed/shielded-pools/zkir/unshield.bzkir +0 -0
- package/contract/managed/shielded-pools/zkir/unshield.zkir +210 -0
- package/contract/shielded-pools.compact +31 -0
- package/package.json +53 -4
|
@@ -0,0 +1,791 @@
|
|
|
1
|
+
import * as __compactRuntime from '@midnight-ntwrk/compact-runtime';
|
|
2
|
+
__compactRuntime.checkRuntimeVersion('0.20.0');
|
|
3
|
+
|
|
4
|
+
const _descriptor_0 = new __compactRuntime.CompactTypeBytes(32);
|
|
5
|
+
|
|
6
|
+
const _descriptor_1 = new __compactRuntime.CompactTypeUnsignedInteger(18446744073709551615n, 8);
|
|
7
|
+
|
|
8
|
+
const _descriptor_2 = new __compactRuntime.CompactTypeUnsignedInteger(340282366920938463463374607431768211455n, 16);
|
|
9
|
+
|
|
10
|
+
class _ShieldedCoinInfo_0 {
|
|
11
|
+
alignment() {
|
|
12
|
+
return _descriptor_0.alignment().concat(_descriptor_0.alignment().concat(_descriptor_2.alignment()));
|
|
13
|
+
}
|
|
14
|
+
fromValue(value_0) {
|
|
15
|
+
return {
|
|
16
|
+
nonce: _descriptor_0.fromValue(value_0),
|
|
17
|
+
color: _descriptor_0.fromValue(value_0),
|
|
18
|
+
value: _descriptor_2.fromValue(value_0)
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
toValue(value_0) {
|
|
22
|
+
return _descriptor_0.toValue(value_0.nonce).concat(_descriptor_0.toValue(value_0.color).concat(_descriptor_2.toValue(value_0.value)));
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
const _descriptor_3 = new _ShieldedCoinInfo_0();
|
|
27
|
+
|
|
28
|
+
class _ContractAddress_0 {
|
|
29
|
+
alignment() {
|
|
30
|
+
return _descriptor_0.alignment();
|
|
31
|
+
}
|
|
32
|
+
fromValue(value_0) {
|
|
33
|
+
return {
|
|
34
|
+
bytes: _descriptor_0.fromValue(value_0)
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
toValue(value_0) {
|
|
38
|
+
return _descriptor_0.toValue(value_0.bytes);
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
const _descriptor_4 = new _ContractAddress_0();
|
|
43
|
+
|
|
44
|
+
class _UserAddress_0 {
|
|
45
|
+
alignment() {
|
|
46
|
+
return _descriptor_0.alignment();
|
|
47
|
+
}
|
|
48
|
+
fromValue(value_0) {
|
|
49
|
+
return {
|
|
50
|
+
bytes: _descriptor_0.fromValue(value_0)
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
toValue(value_0) {
|
|
54
|
+
return _descriptor_0.toValue(value_0.bytes);
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
const _descriptor_5 = new _UserAddress_0();
|
|
59
|
+
|
|
60
|
+
class _ZswapCoinPublicKey_0 {
|
|
61
|
+
alignment() {
|
|
62
|
+
return _descriptor_0.alignment();
|
|
63
|
+
}
|
|
64
|
+
fromValue(value_0) {
|
|
65
|
+
return {
|
|
66
|
+
bytes: _descriptor_0.fromValue(value_0)
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
toValue(value_0) {
|
|
70
|
+
return _descriptor_0.toValue(value_0.bytes);
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
const _descriptor_6 = new _ZswapCoinPublicKey_0();
|
|
75
|
+
|
|
76
|
+
const _descriptor_7 = __compactRuntime.CompactTypeBoolean;
|
|
77
|
+
|
|
78
|
+
class _Either_0 {
|
|
79
|
+
alignment() {
|
|
80
|
+
return _descriptor_7.alignment().concat(_descriptor_6.alignment().concat(_descriptor_4.alignment()));
|
|
81
|
+
}
|
|
82
|
+
fromValue(value_0) {
|
|
83
|
+
return {
|
|
84
|
+
is_left: _descriptor_7.fromValue(value_0),
|
|
85
|
+
left: _descriptor_6.fromValue(value_0),
|
|
86
|
+
right: _descriptor_4.fromValue(value_0)
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
toValue(value_0) {
|
|
90
|
+
return _descriptor_7.toValue(value_0.is_left).concat(_descriptor_6.toValue(value_0.left).concat(_descriptor_4.toValue(value_0.right)));
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
const _descriptor_8 = new _Either_0();
|
|
95
|
+
|
|
96
|
+
const _descriptor_9 = new __compactRuntime.CompactTypeBytes(21);
|
|
97
|
+
|
|
98
|
+
class _CoinPreimage_0 {
|
|
99
|
+
alignment() {
|
|
100
|
+
return _descriptor_9.alignment().concat(_descriptor_3.alignment().concat(_descriptor_7.alignment().concat(_descriptor_0.alignment())));
|
|
101
|
+
}
|
|
102
|
+
fromValue(value_0) {
|
|
103
|
+
return {
|
|
104
|
+
domain_sep: _descriptor_9.fromValue(value_0),
|
|
105
|
+
info: _descriptor_3.fromValue(value_0),
|
|
106
|
+
dataType: _descriptor_7.fromValue(value_0),
|
|
107
|
+
data: _descriptor_0.fromValue(value_0)
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
toValue(value_0) {
|
|
111
|
+
return _descriptor_9.toValue(value_0.domain_sep).concat(_descriptor_3.toValue(value_0.info).concat(_descriptor_7.toValue(value_0.dataType).concat(_descriptor_0.toValue(value_0.data))));
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
const _descriptor_10 = new _CoinPreimage_0();
|
|
116
|
+
|
|
117
|
+
const _descriptor_11 = new __compactRuntime.CompactTypeVector(2, _descriptor_0);
|
|
118
|
+
|
|
119
|
+
class _Either_1 {
|
|
120
|
+
alignment() {
|
|
121
|
+
return _descriptor_7.alignment().concat(_descriptor_0.alignment().concat(_descriptor_0.alignment()));
|
|
122
|
+
}
|
|
123
|
+
fromValue(value_0) {
|
|
124
|
+
return {
|
|
125
|
+
is_left: _descriptor_7.fromValue(value_0),
|
|
126
|
+
left: _descriptor_0.fromValue(value_0),
|
|
127
|
+
right: _descriptor_0.fromValue(value_0)
|
|
128
|
+
}
|
|
129
|
+
}
|
|
130
|
+
toValue(value_0) {
|
|
131
|
+
return _descriptor_7.toValue(value_0.is_left).concat(_descriptor_0.toValue(value_0.left).concat(_descriptor_0.toValue(value_0.right)));
|
|
132
|
+
}
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
const _descriptor_12 = new _Either_1();
|
|
136
|
+
|
|
137
|
+
class _Either_2 {
|
|
138
|
+
alignment() {
|
|
139
|
+
return _descriptor_7.alignment().concat(_descriptor_4.alignment().concat(_descriptor_5.alignment()));
|
|
140
|
+
}
|
|
141
|
+
fromValue(value_0) {
|
|
142
|
+
return {
|
|
143
|
+
is_left: _descriptor_7.fromValue(value_0),
|
|
144
|
+
left: _descriptor_4.fromValue(value_0),
|
|
145
|
+
right: _descriptor_5.fromValue(value_0)
|
|
146
|
+
}
|
|
147
|
+
}
|
|
148
|
+
toValue(value_0) {
|
|
149
|
+
return _descriptor_7.toValue(value_0.is_left).concat(_descriptor_4.toValue(value_0.left).concat(_descriptor_5.toValue(value_0.right)));
|
|
150
|
+
}
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
const _descriptor_13 = new _Either_2();
|
|
154
|
+
|
|
155
|
+
class _Maybe_0 {
|
|
156
|
+
alignment() {
|
|
157
|
+
return _descriptor_7.alignment().concat(_descriptor_13.alignment());
|
|
158
|
+
}
|
|
159
|
+
fromValue(value_0) {
|
|
160
|
+
return {
|
|
161
|
+
is_some: _descriptor_7.fromValue(value_0),
|
|
162
|
+
value: _descriptor_13.fromValue(value_0)
|
|
163
|
+
}
|
|
164
|
+
}
|
|
165
|
+
toValue(value_0) {
|
|
166
|
+
return _descriptor_7.toValue(value_0.is_some).concat(_descriptor_13.toValue(value_0.value));
|
|
167
|
+
}
|
|
168
|
+
}
|
|
169
|
+
|
|
170
|
+
const _descriptor_14 = new _Maybe_0();
|
|
171
|
+
|
|
172
|
+
const _descriptor_15 = new __compactRuntime.CompactTypeUnsignedInteger(255n, 1);
|
|
173
|
+
|
|
174
|
+
const _descriptor_16 = new __compactRuntime.CompactTypeUnsignedInteger(4294967295n, 4);
|
|
175
|
+
|
|
176
|
+
export class Contract {
|
|
177
|
+
witnesses;
|
|
178
|
+
constructor(...args_0) {
|
|
179
|
+
if (args_0.length !== 1) {
|
|
180
|
+
throw new __compactRuntime.CompactError(`Contract constructor: expected 1 argument, received ${args_0.length}`);
|
|
181
|
+
}
|
|
182
|
+
const witnesses_0 = args_0[0];
|
|
183
|
+
if (typeof(witnesses_0) !== 'object') {
|
|
184
|
+
throw new __compactRuntime.CompactError('first (witnesses) argument to Contract constructor is not an object');
|
|
185
|
+
}
|
|
186
|
+
this.witnesses = witnesses_0;
|
|
187
|
+
this.circuits = {
|
|
188
|
+
shield: async (...args_1) => {
|
|
189
|
+
if (args_1.length !== 4) {
|
|
190
|
+
throw new __compactRuntime.CompactError(`shield: expected 4 arguments (as invoked from Typescript), received ${args_1.length}`);
|
|
191
|
+
}
|
|
192
|
+
const contextOrig_0 = args_1[0];
|
|
193
|
+
const token_0 = args_1[1];
|
|
194
|
+
const amount_0 = args_1[2];
|
|
195
|
+
const nonce_0 = args_1[3];
|
|
196
|
+
if (!(typeof(contextOrig_0) === 'object' && contextOrig_0.callContext.currentQueryContext != undefined)) {
|
|
197
|
+
__compactRuntime.typeError('shield',
|
|
198
|
+
'argument 1 (as invoked from Typescript)',
|
|
199
|
+
'shielded-pools.compact line 8 char 1',
|
|
200
|
+
'CircuitContext',
|
|
201
|
+
contextOrig_0)
|
|
202
|
+
}
|
|
203
|
+
if (!(token_0.buffer instanceof ArrayBuffer && token_0.BYTES_PER_ELEMENT === 1 && token_0.length === 32)) {
|
|
204
|
+
__compactRuntime.typeError('shield',
|
|
205
|
+
'argument 1 (argument 2 as invoked from Typescript)',
|
|
206
|
+
'shielded-pools.compact line 8 char 1',
|
|
207
|
+
'Bytes<32>',
|
|
208
|
+
token_0)
|
|
209
|
+
}
|
|
210
|
+
if (!(typeof(amount_0) === 'bigint' && amount_0 >= 0n && amount_0 <= 18446744073709551615n)) {
|
|
211
|
+
__compactRuntime.typeError('shield',
|
|
212
|
+
'argument 2 (argument 3 as invoked from Typescript)',
|
|
213
|
+
'shielded-pools.compact line 8 char 1',
|
|
214
|
+
'Uint<0..18446744073709551616>',
|
|
215
|
+
amount_0)
|
|
216
|
+
}
|
|
217
|
+
if (!(nonce_0.buffer instanceof ArrayBuffer && nonce_0.BYTES_PER_ELEMENT === 1 && nonce_0.length === 32)) {
|
|
218
|
+
__compactRuntime.typeError('shield',
|
|
219
|
+
'argument 3 (argument 4 as invoked from Typescript)',
|
|
220
|
+
'shielded-pools.compact line 8 char 1',
|
|
221
|
+
'Bytes<32>',
|
|
222
|
+
nonce_0)
|
|
223
|
+
}
|
|
224
|
+
const context = __compactRuntime.copyCircuitContext(contextOrig_0);
|
|
225
|
+
const partialProofData = {
|
|
226
|
+
input: {
|
|
227
|
+
value: _descriptor_0.toValue(token_0).concat(_descriptor_1.toValue(amount_0).concat(_descriptor_0.toValue(nonce_0))),
|
|
228
|
+
alignment: _descriptor_0.alignment().concat(_descriptor_1.alignment().concat(_descriptor_0.alignment()))
|
|
229
|
+
},
|
|
230
|
+
output: undefined,
|
|
231
|
+
publicTranscript: [],
|
|
232
|
+
privateTranscriptOutputs: []
|
|
233
|
+
};
|
|
234
|
+
const result_0 = await this._shield_0(context,
|
|
235
|
+
partialProofData,
|
|
236
|
+
token_0,
|
|
237
|
+
amount_0,
|
|
238
|
+
nonce_0);
|
|
239
|
+
partialProofData.output = { value: _descriptor_3.toValue(result_0), alignment: _descriptor_3.alignment() };
|
|
240
|
+
__compactRuntime.finalizeCallProofData(context, partialProofData);
|
|
241
|
+
return { result: result_0, context: context, gasCost: context.callContext.currentGasCost };
|
|
242
|
+
},
|
|
243
|
+
unshield: async (...args_1) => {
|
|
244
|
+
if (args_1.length !== 4) {
|
|
245
|
+
throw new __compactRuntime.CompactError(`unshield: expected 4 arguments (as invoked from Typescript), received ${args_1.length}`);
|
|
246
|
+
}
|
|
247
|
+
const contextOrig_0 = args_1[0];
|
|
248
|
+
const token_0 = args_1[1];
|
|
249
|
+
const coin_0 = args_1[2];
|
|
250
|
+
const recipient_0 = args_1[3];
|
|
251
|
+
if (!(typeof(contextOrig_0) === 'object' && contextOrig_0.callContext.currentQueryContext != undefined)) {
|
|
252
|
+
__compactRuntime.typeError('unshield',
|
|
253
|
+
'argument 1 (as invoked from Typescript)',
|
|
254
|
+
'shielded-pools.compact line 21 char 1',
|
|
255
|
+
'CircuitContext',
|
|
256
|
+
contextOrig_0)
|
|
257
|
+
}
|
|
258
|
+
if (!(token_0.buffer instanceof ArrayBuffer && token_0.BYTES_PER_ELEMENT === 1 && token_0.length === 32)) {
|
|
259
|
+
__compactRuntime.typeError('unshield',
|
|
260
|
+
'argument 1 (argument 2 as invoked from Typescript)',
|
|
261
|
+
'shielded-pools.compact line 21 char 1',
|
|
262
|
+
'Bytes<32>',
|
|
263
|
+
token_0)
|
|
264
|
+
}
|
|
265
|
+
if (!(typeof(coin_0) === 'object' && coin_0.nonce.buffer instanceof ArrayBuffer && coin_0.nonce.BYTES_PER_ELEMENT === 1 && coin_0.nonce.length === 32 && coin_0.color.buffer instanceof ArrayBuffer && coin_0.color.BYTES_PER_ELEMENT === 1 && coin_0.color.length === 32 && typeof(coin_0.value) === 'bigint' && coin_0.value >= 0n && coin_0.value <= 340282366920938463463374607431768211455n)) {
|
|
266
|
+
__compactRuntime.typeError('unshield',
|
|
267
|
+
'argument 2 (argument 3 as invoked from Typescript)',
|
|
268
|
+
'shielded-pools.compact line 21 char 1',
|
|
269
|
+
'struct ShieldedCoinInfo<nonce: Bytes<32>, color: Bytes<32>, value: Uint<0..340282366920938463463374607431768211456>>',
|
|
270
|
+
coin_0)
|
|
271
|
+
}
|
|
272
|
+
if (!(typeof(recipient_0) === 'object' && recipient_0.bytes.buffer instanceof ArrayBuffer && recipient_0.bytes.BYTES_PER_ELEMENT === 1 && recipient_0.bytes.length === 32)) {
|
|
273
|
+
__compactRuntime.typeError('unshield',
|
|
274
|
+
'argument 3 (argument 4 as invoked from Typescript)',
|
|
275
|
+
'shielded-pools.compact line 21 char 1',
|
|
276
|
+
'struct UserAddress<bytes: Bytes<32>>',
|
|
277
|
+
recipient_0)
|
|
278
|
+
}
|
|
279
|
+
const context = __compactRuntime.copyCircuitContext(contextOrig_0);
|
|
280
|
+
const partialProofData = {
|
|
281
|
+
input: {
|
|
282
|
+
value: _descriptor_0.toValue(token_0).concat(_descriptor_3.toValue(coin_0).concat(_descriptor_5.toValue(recipient_0))),
|
|
283
|
+
alignment: _descriptor_0.alignment().concat(_descriptor_3.alignment().concat(_descriptor_5.alignment()))
|
|
284
|
+
},
|
|
285
|
+
output: undefined,
|
|
286
|
+
publicTranscript: [],
|
|
287
|
+
privateTranscriptOutputs: []
|
|
288
|
+
};
|
|
289
|
+
const result_0 = await this._unshield_0(context,
|
|
290
|
+
partialProofData,
|
|
291
|
+
token_0,
|
|
292
|
+
coin_0,
|
|
293
|
+
recipient_0);
|
|
294
|
+
partialProofData.output = { value: [], alignment: [] };
|
|
295
|
+
__compactRuntime.finalizeCallProofData(context, partialProofData);
|
|
296
|
+
return { result: result_0, context: context, gasCost: context.callContext.currentGasCost };
|
|
297
|
+
}
|
|
298
|
+
};
|
|
299
|
+
this.impureCircuits = {
|
|
300
|
+
shield: this.circuits.shield,
|
|
301
|
+
unshield: this.circuits.unshield
|
|
302
|
+
};
|
|
303
|
+
this.provableCircuits = {
|
|
304
|
+
shield: this.circuits.shield,
|
|
305
|
+
unshield: this.circuits.unshield
|
|
306
|
+
};
|
|
307
|
+
}
|
|
308
|
+
async initialState(...args_0) {
|
|
309
|
+
if (args_0.length !== 1) {
|
|
310
|
+
throw new __compactRuntime.CompactError(`Contract state constructor: expected 1 argument (as invoked from Typescript), received ${args_0.length}`);
|
|
311
|
+
}
|
|
312
|
+
const constructorContext_0 = args_0[0];
|
|
313
|
+
if (typeof(constructorContext_0) !== 'object') {
|
|
314
|
+
throw new __compactRuntime.CompactError(`Contract state constructor: expected 'constructorContext' in argument 1 (as invoked from Typescript) to be an object`);
|
|
315
|
+
}
|
|
316
|
+
if (!('initialZswapLocalState' in constructorContext_0)) {
|
|
317
|
+
throw new __compactRuntime.CompactError(`Contract state constructor: expected 'initialZswapLocalState' in argument 1 (as invoked from Typescript)`);
|
|
318
|
+
}
|
|
319
|
+
if (typeof(constructorContext_0.initialZswapLocalState) !== 'object') {
|
|
320
|
+
throw new __compactRuntime.CompactError(`Contract state constructor: expected 'initialZswapLocalState' in argument 1 (as invoked from Typescript) to be an object`);
|
|
321
|
+
}
|
|
322
|
+
const state_0 = new __compactRuntime.ContractState();
|
|
323
|
+
let stateValue_0 = __compactRuntime.StateValue.newArray();
|
|
324
|
+
state_0.data = new __compactRuntime.ChargedState(stateValue_0);
|
|
325
|
+
state_0.setOperation('shield', new __compactRuntime.ContractOperation());
|
|
326
|
+
state_0.setOperation('unshield', new __compactRuntime.ContractOperation());
|
|
327
|
+
const context = __compactRuntime.createCircuitContext({circuitId: 'constructor', contractAddress: __compactRuntime.dummyContractAddress(), coinPublicKeyOrZswapState: constructorContext_0.initialZswapLocalState.coinPublicKey, contractState: state_0.data, privateState: constructorContext_0.initialPrivateState});
|
|
328
|
+
const partialProofData = {
|
|
329
|
+
input: { value: [], alignment: [] },
|
|
330
|
+
output: undefined,
|
|
331
|
+
publicTranscript: [],
|
|
332
|
+
privateTranscriptOutputs: []
|
|
333
|
+
};
|
|
334
|
+
state_0.data = new __compactRuntime.ChargedState(context.callContext.currentQueryContext.state.state);
|
|
335
|
+
return {
|
|
336
|
+
currentContractState: state_0,
|
|
337
|
+
currentPrivateState: context.callContext.currentPrivateState,
|
|
338
|
+
currentZswapLocalState: context.callContext.currentZswapLocalState
|
|
339
|
+
}
|
|
340
|
+
}
|
|
341
|
+
_left_0(value_0) {
|
|
342
|
+
return { is_left: true, left: value_0, right: { bytes: new Uint8Array(32) } };
|
|
343
|
+
}
|
|
344
|
+
_left_1(value_0) {
|
|
345
|
+
return { is_left: true, left: value_0, right: new Uint8Array(32) };
|
|
346
|
+
}
|
|
347
|
+
_right_0(value_0) {
|
|
348
|
+
return { is_left: false, left: { bytes: new Uint8Array(32) }, right: value_0 };
|
|
349
|
+
}
|
|
350
|
+
_right_1(value_0) {
|
|
351
|
+
return { is_left: false, left: { bytes: new Uint8Array(32) }, right: value_0 };
|
|
352
|
+
}
|
|
353
|
+
_tokenType_0(domain_sep_0, contractAddress_0) {
|
|
354
|
+
return this._persistentCommit_0([domain_sep_0, contractAddress_0.bytes],
|
|
355
|
+
new Uint8Array([109, 105, 100, 110, 105, 103, 104, 116, 58, 100, 101, 114, 105, 118, 101, 95, 116, 111, 107, 101, 110, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]));
|
|
356
|
+
}
|
|
357
|
+
async _mintShieldedToken_0(context,
|
|
358
|
+
partialProofData,
|
|
359
|
+
domain_sep_0,
|
|
360
|
+
value_0,
|
|
361
|
+
nonce_0,
|
|
362
|
+
recipient_0)
|
|
363
|
+
{
|
|
364
|
+
const coin_0 = { nonce: nonce_0,
|
|
365
|
+
color:
|
|
366
|
+
this._tokenType_0(domain_sep_0,
|
|
367
|
+
_descriptor_4.fromValue(__compactRuntime.queryLedgerState(context,
|
|
368
|
+
partialProofData,
|
|
369
|
+
[
|
|
370
|
+
{ dup: { n: 2 } },
|
|
371
|
+
{ idx: { cached: true,
|
|
372
|
+
pushPath: false,
|
|
373
|
+
path: [
|
|
374
|
+
{ tag: 'value',
|
|
375
|
+
value: { value: _descriptor_15.toValue(0n),
|
|
376
|
+
alignment: _descriptor_15.alignment() } }] } },
|
|
377
|
+
{ popeq: { cached: true,
|
|
378
|
+
result: undefined } }]).value)),
|
|
379
|
+
value: value_0 };
|
|
380
|
+
__compactRuntime.queryLedgerState(context,
|
|
381
|
+
partialProofData,
|
|
382
|
+
[
|
|
383
|
+
{ swap: { n: 0 } },
|
|
384
|
+
{ idx: { cached: true,
|
|
385
|
+
pushPath: true,
|
|
386
|
+
path: [
|
|
387
|
+
{ tag: 'value',
|
|
388
|
+
value: { value: _descriptor_15.toValue(4n),
|
|
389
|
+
alignment: _descriptor_15.alignment() } }] } },
|
|
390
|
+
{ push: { storage: false,
|
|
391
|
+
value: __compactRuntime.StateValue.newCell({ value: _descriptor_0.toValue(domain_sep_0),
|
|
392
|
+
alignment: _descriptor_0.alignment() }).encode() } },
|
|
393
|
+
{ dup: { n: 1 } },
|
|
394
|
+
{ dup: { n: 1 } },
|
|
395
|
+
'member',
|
|
396
|
+
{ push: { storage: false,
|
|
397
|
+
value: __compactRuntime.StateValue.newCell({ value: _descriptor_1.toValue(value_0),
|
|
398
|
+
alignment: _descriptor_1.alignment() }).encode() } },
|
|
399
|
+
{ swap: { n: 0 } },
|
|
400
|
+
'neg',
|
|
401
|
+
{ branch: { skip: 4 } },
|
|
402
|
+
{ dup: { n: 2 } },
|
|
403
|
+
{ dup: { n: 2 } },
|
|
404
|
+
{ idx: { cached: true,
|
|
405
|
+
pushPath: false,
|
|
406
|
+
path: [ { tag: 'stack' }] } },
|
|
407
|
+
'add',
|
|
408
|
+
{ ins: { cached: true, n: 2 } },
|
|
409
|
+
{ swap: { n: 0 } }]);
|
|
410
|
+
this._createZswapOutput_0(context, partialProofData, coin_0, recipient_0);
|
|
411
|
+
const cm_0 = this._coinCommitment_0(coin_0, recipient_0);
|
|
412
|
+
__compactRuntime.queryLedgerState(context,
|
|
413
|
+
partialProofData,
|
|
414
|
+
[
|
|
415
|
+
{ swap: { n: 0 } },
|
|
416
|
+
{ idx: { cached: true,
|
|
417
|
+
pushPath: true,
|
|
418
|
+
path: [
|
|
419
|
+
{ tag: 'value',
|
|
420
|
+
value: { value: _descriptor_15.toValue(2n),
|
|
421
|
+
alignment: _descriptor_15.alignment() } }] } },
|
|
422
|
+
{ push: { storage: false,
|
|
423
|
+
value: __compactRuntime.StateValue.newCell({ value: _descriptor_0.toValue(cm_0),
|
|
424
|
+
alignment: _descriptor_0.alignment() }).encode() } },
|
|
425
|
+
{ push: { storage: false,
|
|
426
|
+
value: __compactRuntime.StateValue.newNull().encode() } },
|
|
427
|
+
{ ins: { cached: true, n: 2 } },
|
|
428
|
+
{ swap: { n: 0 } }]);
|
|
429
|
+
if (!recipient_0.is_left
|
|
430
|
+
&&
|
|
431
|
+
this._equal_0(recipient_0.right.bytes,
|
|
432
|
+
_descriptor_4.fromValue(__compactRuntime.queryLedgerState(context,
|
|
433
|
+
partialProofData,
|
|
434
|
+
[
|
|
435
|
+
{ dup: { n: 2 } },
|
|
436
|
+
{ idx: { cached: true,
|
|
437
|
+
pushPath: false,
|
|
438
|
+
path: [
|
|
439
|
+
{ tag: 'value',
|
|
440
|
+
value: { value: _descriptor_15.toValue(0n),
|
|
441
|
+
alignment: _descriptor_15.alignment() } }] } },
|
|
442
|
+
{ popeq: { cached: true,
|
|
443
|
+
result: undefined } }]).value).bytes))
|
|
444
|
+
{
|
|
445
|
+
__compactRuntime.queryLedgerState(context,
|
|
446
|
+
partialProofData,
|
|
447
|
+
[
|
|
448
|
+
{ swap: { n: 0 } },
|
|
449
|
+
{ idx: { cached: true,
|
|
450
|
+
pushPath: true,
|
|
451
|
+
path: [
|
|
452
|
+
{ tag: 'value',
|
|
453
|
+
value: { value: _descriptor_15.toValue(1n),
|
|
454
|
+
alignment: _descriptor_15.alignment() } }] } },
|
|
455
|
+
{ push: { storage: false,
|
|
456
|
+
value: __compactRuntime.StateValue.newCell({ value: _descriptor_0.toValue(cm_0),
|
|
457
|
+
alignment: _descriptor_0.alignment() }).encode() } },
|
|
458
|
+
{ push: { storage: false,
|
|
459
|
+
value: __compactRuntime.StateValue.newNull().encode() } },
|
|
460
|
+
{ ins: { cached: true, n: 2 } },
|
|
461
|
+
{ swap: { n: 0 } }]);
|
|
462
|
+
}
|
|
463
|
+
return coin_0;
|
|
464
|
+
}
|
|
465
|
+
async _receiveShielded_0(context, partialProofData, coin_0) {
|
|
466
|
+
const recipient_0 = this._right_1(_descriptor_4.fromValue(__compactRuntime.queryLedgerState(context,
|
|
467
|
+
partialProofData,
|
|
468
|
+
[
|
|
469
|
+
{ dup: { n: 2 } },
|
|
470
|
+
{ idx: { cached: true,
|
|
471
|
+
pushPath: false,
|
|
472
|
+
path: [
|
|
473
|
+
{ tag: 'value',
|
|
474
|
+
value: { value: _descriptor_15.toValue(0n),
|
|
475
|
+
alignment: _descriptor_15.alignment() } }] } },
|
|
476
|
+
{ popeq: { cached: true,
|
|
477
|
+
result: undefined } }]).value));
|
|
478
|
+
this._createZswapOutput_0(context, partialProofData, coin_0, recipient_0);
|
|
479
|
+
const tmp_0 = this._coinCommitment_0(coin_0, recipient_0);
|
|
480
|
+
__compactRuntime.queryLedgerState(context,
|
|
481
|
+
partialProofData,
|
|
482
|
+
[
|
|
483
|
+
{ swap: { n: 0 } },
|
|
484
|
+
{ idx: { cached: true,
|
|
485
|
+
pushPath: true,
|
|
486
|
+
path: [
|
|
487
|
+
{ tag: 'value',
|
|
488
|
+
value: { value: _descriptor_15.toValue(1n),
|
|
489
|
+
alignment: _descriptor_15.alignment() } }] } },
|
|
490
|
+
{ push: { storage: false,
|
|
491
|
+
value: __compactRuntime.StateValue.newCell({ value: _descriptor_0.toValue(tmp_0),
|
|
492
|
+
alignment: _descriptor_0.alignment() }).encode() } },
|
|
493
|
+
{ push: { storage: false,
|
|
494
|
+
value: __compactRuntime.StateValue.newNull().encode() } },
|
|
495
|
+
{ ins: { cached: true, n: 2 } },
|
|
496
|
+
{ swap: { n: 0 } }]);
|
|
497
|
+
return [];
|
|
498
|
+
}
|
|
499
|
+
_coinCommitment_0(coin_0, recipient_0) {
|
|
500
|
+
return this._persistentHash_0({ domain_sep:
|
|
501
|
+
new Uint8Array([109, 105, 100, 110, 105, 103, 104, 116, 58, 122, 115, 119, 97, 112, 45, 99, 99, 91, 118, 49, 93]),
|
|
502
|
+
info: coin_0,
|
|
503
|
+
dataType: recipient_0.is_left,
|
|
504
|
+
data:
|
|
505
|
+
recipient_0.is_left ?
|
|
506
|
+
recipient_0.left.bytes :
|
|
507
|
+
recipient_0.right.bytes });
|
|
508
|
+
}
|
|
509
|
+
async _sendUnshielded_0(context,
|
|
510
|
+
partialProofData,
|
|
511
|
+
color_0,
|
|
512
|
+
amount_0,
|
|
513
|
+
recipient_0)
|
|
514
|
+
{
|
|
515
|
+
const tmp_0 = this._left_1(color_0);
|
|
516
|
+
__compactRuntime.queryLedgerState(context,
|
|
517
|
+
partialProofData,
|
|
518
|
+
[
|
|
519
|
+
{ swap: { n: 0 } },
|
|
520
|
+
{ idx: { cached: true,
|
|
521
|
+
pushPath: true,
|
|
522
|
+
path: [
|
|
523
|
+
{ tag: 'value',
|
|
524
|
+
value: { value: _descriptor_15.toValue(7n),
|
|
525
|
+
alignment: _descriptor_15.alignment() } }] } },
|
|
526
|
+
{ push: { storage: false,
|
|
527
|
+
value: __compactRuntime.StateValue.newCell({ value: _descriptor_12.toValue(tmp_0),
|
|
528
|
+
alignment: _descriptor_12.alignment() }).encode() } },
|
|
529
|
+
{ dup: { n: 1 } },
|
|
530
|
+
{ dup: { n: 1 } },
|
|
531
|
+
'member',
|
|
532
|
+
{ push: { storage: false,
|
|
533
|
+
value: __compactRuntime.StateValue.newCell({ value: _descriptor_2.toValue(amount_0),
|
|
534
|
+
alignment: _descriptor_2.alignment() }).encode() } },
|
|
535
|
+
{ swap: { n: 0 } },
|
|
536
|
+
'neg',
|
|
537
|
+
{ branch: { skip: 4 } },
|
|
538
|
+
{ dup: { n: 2 } },
|
|
539
|
+
{ dup: { n: 2 } },
|
|
540
|
+
{ idx: { cached: true,
|
|
541
|
+
pushPath: false,
|
|
542
|
+
path: [ { tag: 'stack' }] } },
|
|
543
|
+
'add',
|
|
544
|
+
{ ins: { cached: true, n: 2 } },
|
|
545
|
+
{ swap: { n: 0 } }]);
|
|
546
|
+
const tmp_1 = this._left_1(color_0);
|
|
547
|
+
__compactRuntime.queryLedgerState(context,
|
|
548
|
+
partialProofData,
|
|
549
|
+
[
|
|
550
|
+
{ swap: { n: 0 } },
|
|
551
|
+
{ idx: { cached: true,
|
|
552
|
+
pushPath: true,
|
|
553
|
+
path: [
|
|
554
|
+
{ tag: 'value',
|
|
555
|
+
value: { value: _descriptor_15.toValue(8n),
|
|
556
|
+
alignment: _descriptor_15.alignment() } }] } },
|
|
557
|
+
{ push: { storage: false,
|
|
558
|
+
value: __compactRuntime.StateValue.newCell(__compactRuntime.alignedConcat(
|
|
559
|
+
{ value: _descriptor_12.toValue(tmp_1),
|
|
560
|
+
alignment: _descriptor_12.alignment() },
|
|
561
|
+
{ value: _descriptor_13.toValue(recipient_0),
|
|
562
|
+
alignment: _descriptor_13.alignment() }
|
|
563
|
+
)).encode() } },
|
|
564
|
+
{ dup: { n: 1 } },
|
|
565
|
+
{ dup: { n: 1 } },
|
|
566
|
+
'member',
|
|
567
|
+
{ push: { storage: false,
|
|
568
|
+
value: __compactRuntime.StateValue.newCell({ value: _descriptor_2.toValue(amount_0),
|
|
569
|
+
alignment: _descriptor_2.alignment() }).encode() } },
|
|
570
|
+
{ swap: { n: 0 } },
|
|
571
|
+
'neg',
|
|
572
|
+
{ branch: { skip: 4 } },
|
|
573
|
+
{ dup: { n: 2 } },
|
|
574
|
+
{ dup: { n: 2 } },
|
|
575
|
+
{ idx: { cached: true,
|
|
576
|
+
pushPath: false,
|
|
577
|
+
path: [ { tag: 'stack' }] } },
|
|
578
|
+
'add',
|
|
579
|
+
{ ins: { cached: true, n: 2 } },
|
|
580
|
+
{ swap: { n: 0 } }]);
|
|
581
|
+
if (recipient_0.is_left
|
|
582
|
+
&&
|
|
583
|
+
this._equal_1(recipient_0.left.bytes,
|
|
584
|
+
_descriptor_4.fromValue(__compactRuntime.queryLedgerState(context,
|
|
585
|
+
partialProofData,
|
|
586
|
+
[
|
|
587
|
+
{ dup: { n: 2 } },
|
|
588
|
+
{ idx: { cached: true,
|
|
589
|
+
pushPath: false,
|
|
590
|
+
path: [
|
|
591
|
+
{ tag: 'value',
|
|
592
|
+
value: { value: _descriptor_15.toValue(0n),
|
|
593
|
+
alignment: _descriptor_15.alignment() } }] } },
|
|
594
|
+
{ popeq: { cached: true,
|
|
595
|
+
result: undefined } }]).value).bytes))
|
|
596
|
+
{
|
|
597
|
+
const tmp_2 = this._left_1(color_0);
|
|
598
|
+
__compactRuntime.queryLedgerState(context,
|
|
599
|
+
partialProofData,
|
|
600
|
+
[
|
|
601
|
+
{ swap: { n: 0 } },
|
|
602
|
+
{ idx: { cached: true,
|
|
603
|
+
pushPath: true,
|
|
604
|
+
path: [
|
|
605
|
+
{ tag: 'value',
|
|
606
|
+
value: { value: _descriptor_15.toValue(6n),
|
|
607
|
+
alignment: _descriptor_15.alignment() } }] } },
|
|
608
|
+
{ push: { storage: false,
|
|
609
|
+
value: __compactRuntime.StateValue.newCell({ value: _descriptor_12.toValue(tmp_2),
|
|
610
|
+
alignment: _descriptor_12.alignment() }).encode() } },
|
|
611
|
+
{ dup: { n: 1 } },
|
|
612
|
+
{ dup: { n: 1 } },
|
|
613
|
+
'member',
|
|
614
|
+
{ push: { storage: false,
|
|
615
|
+
value: __compactRuntime.StateValue.newCell({ value: _descriptor_2.toValue(amount_0),
|
|
616
|
+
alignment: _descriptor_2.alignment() }).encode() } },
|
|
617
|
+
{ swap: { n: 0 } },
|
|
618
|
+
'neg',
|
|
619
|
+
{ branch: { skip: 4 } },
|
|
620
|
+
{ dup: { n: 2 } },
|
|
621
|
+
{ dup: { n: 2 } },
|
|
622
|
+
{ idx: { cached: true,
|
|
623
|
+
pushPath: false,
|
|
624
|
+
path: [ { tag: 'stack' }] } },
|
|
625
|
+
'add',
|
|
626
|
+
{ ins: { cached: true, n: 2 } },
|
|
627
|
+
{ swap: { n: 0 } }]);
|
|
628
|
+
}
|
|
629
|
+
return [];
|
|
630
|
+
}
|
|
631
|
+
async _receiveUnshielded_0(context, partialProofData, color_0, amount_0) {
|
|
632
|
+
const tmp_0 = this._left_1(color_0);
|
|
633
|
+
__compactRuntime.queryLedgerState(context,
|
|
634
|
+
partialProofData,
|
|
635
|
+
[
|
|
636
|
+
{ swap: { n: 0 } },
|
|
637
|
+
{ idx: { cached: true,
|
|
638
|
+
pushPath: true,
|
|
639
|
+
path: [
|
|
640
|
+
{ tag: 'value',
|
|
641
|
+
value: { value: _descriptor_15.toValue(6n),
|
|
642
|
+
alignment: _descriptor_15.alignment() } }] } },
|
|
643
|
+
{ push: { storage: false,
|
|
644
|
+
value: __compactRuntime.StateValue.newCell({ value: _descriptor_12.toValue(tmp_0),
|
|
645
|
+
alignment: _descriptor_12.alignment() }).encode() } },
|
|
646
|
+
{ dup: { n: 1 } },
|
|
647
|
+
{ dup: { n: 1 } },
|
|
648
|
+
'member',
|
|
649
|
+
{ push: { storage: false,
|
|
650
|
+
value: __compactRuntime.StateValue.newCell({ value: _descriptor_2.toValue(amount_0),
|
|
651
|
+
alignment: _descriptor_2.alignment() }).encode() } },
|
|
652
|
+
{ swap: { n: 0 } },
|
|
653
|
+
'neg',
|
|
654
|
+
{ branch: { skip: 4 } },
|
|
655
|
+
{ dup: { n: 2 } },
|
|
656
|
+
{ dup: { n: 2 } },
|
|
657
|
+
{ idx: { cached: true,
|
|
658
|
+
pushPath: false,
|
|
659
|
+
path: [ { tag: 'stack' }] } },
|
|
660
|
+
'add',
|
|
661
|
+
{ ins: { cached: true, n: 2 } },
|
|
662
|
+
{ swap: { n: 0 } }]);
|
|
663
|
+
return [];
|
|
664
|
+
}
|
|
665
|
+
_persistentHash_0(value_0) {
|
|
666
|
+
const result_0 = __compactRuntime.persistentHash(_descriptor_10, value_0);
|
|
667
|
+
return result_0;
|
|
668
|
+
}
|
|
669
|
+
_persistentCommit_0(value_0, rand_0) {
|
|
670
|
+
const result_0 = __compactRuntime.persistentCommit(_descriptor_11,
|
|
671
|
+
value_0,
|
|
672
|
+
rand_0);
|
|
673
|
+
return result_0;
|
|
674
|
+
}
|
|
675
|
+
_ownPublicKey_0(context, partialProofData) {
|
|
676
|
+
const result_0 = __compactRuntime.ownPublicKey(context);
|
|
677
|
+
partialProofData.privateTranscriptOutputs.push({
|
|
678
|
+
value: _descriptor_6.toValue(result_0),
|
|
679
|
+
alignment: _descriptor_6.alignment()
|
|
680
|
+
});
|
|
681
|
+
return result_0;
|
|
682
|
+
}
|
|
683
|
+
_createZswapOutput_0(context, partialProofData, coin_0, recipient_0) {
|
|
684
|
+
const result_0 = __compactRuntime.createZswapOutput(context,
|
|
685
|
+
coin_0,
|
|
686
|
+
recipient_0);
|
|
687
|
+
partialProofData.privateTranscriptOutputs.push({
|
|
688
|
+
value: [],
|
|
689
|
+
alignment: []
|
|
690
|
+
});
|
|
691
|
+
return result_0;
|
|
692
|
+
}
|
|
693
|
+
async _shield_0(context, partialProofData, token_0, amount_0, nonce_0) {
|
|
694
|
+
const underlying_0 = token_0;
|
|
695
|
+
const value_0 = amount_0;
|
|
696
|
+
await this._receiveUnshielded_0(context,
|
|
697
|
+
partialProofData,
|
|
698
|
+
underlying_0,
|
|
699
|
+
value_0);
|
|
700
|
+
return await this._mintShieldedToken_0(context,
|
|
701
|
+
partialProofData,
|
|
702
|
+
underlying_0,
|
|
703
|
+
value_0,
|
|
704
|
+
nonce_0,
|
|
705
|
+
this._left_0(this._ownPublicKey_0(context,
|
|
706
|
+
partialProofData)));
|
|
707
|
+
}
|
|
708
|
+
async _unshield_0(context, partialProofData, token_0, coin_0, recipient_0) {
|
|
709
|
+
const underlying_0 = token_0;
|
|
710
|
+
const paid_0 = coin_0;
|
|
711
|
+
const to_0 = recipient_0;
|
|
712
|
+
__compactRuntime.assert(this._equal_2(paid_0.color,
|
|
713
|
+
this._tokenType_0(underlying_0,
|
|
714
|
+
_descriptor_4.fromValue(__compactRuntime.queryLedgerState(context,
|
|
715
|
+
partialProofData,
|
|
716
|
+
[
|
|
717
|
+
{ dup: { n: 2 } },
|
|
718
|
+
{ idx: { cached: true,
|
|
719
|
+
pushPath: false,
|
|
720
|
+
path: [
|
|
721
|
+
{ tag: 'value',
|
|
722
|
+
value: { value: _descriptor_15.toValue(0n),
|
|
723
|
+
alignment: _descriptor_15.alignment() } }] } },
|
|
724
|
+
{ popeq: { cached: true,
|
|
725
|
+
result: undefined } }]).value))),
|
|
726
|
+
'shielded-pools: wrong token');
|
|
727
|
+
__compactRuntime.assert(!this._equal_3(to_0, { bytes: new Uint8Array(32) }),
|
|
728
|
+
'shielded-pools: zero recipient');
|
|
729
|
+
await this._receiveShielded_0(context, partialProofData, paid_0);
|
|
730
|
+
await this._sendUnshielded_0(context,
|
|
731
|
+
partialProofData,
|
|
732
|
+
underlying_0,
|
|
733
|
+
paid_0.value,
|
|
734
|
+
this._right_0(to_0));
|
|
735
|
+
return [];
|
|
736
|
+
}
|
|
737
|
+
_equal_0(x0, y0) {
|
|
738
|
+
if (!x0.every((x, i) => y0[i] === x)) { return false; }
|
|
739
|
+
return true;
|
|
740
|
+
}
|
|
741
|
+
_equal_1(x0, y0) {
|
|
742
|
+
if (!x0.every((x, i) => y0[i] === x)) { return false; }
|
|
743
|
+
return true;
|
|
744
|
+
}
|
|
745
|
+
_equal_2(x0, y0) {
|
|
746
|
+
if (!x0.every((x, i) => y0[i] === x)) { return false; }
|
|
747
|
+
return true;
|
|
748
|
+
}
|
|
749
|
+
_equal_3(x0, y0) {
|
|
750
|
+
{
|
|
751
|
+
let x1 = x0.bytes;
|
|
752
|
+
let y1 = y0.bytes;
|
|
753
|
+
if (!x1.every((x, i) => y1[i] === x)) { return false; }
|
|
754
|
+
}
|
|
755
|
+
return true;
|
|
756
|
+
}
|
|
757
|
+
}
|
|
758
|
+
export function ledger(stateOrChargedState) {
|
|
759
|
+
const state = stateOrChargedState instanceof __compactRuntime.StateValue ? stateOrChargedState : stateOrChargedState.state;
|
|
760
|
+
const chargedState = stateOrChargedState instanceof __compactRuntime.StateValue ? new __compactRuntime.ChargedState(stateOrChargedState) : stateOrChargedState;
|
|
761
|
+
const context = {
|
|
762
|
+
callContext: { currentQueryContext: new __compactRuntime.QueryContext(chargedState, __compactRuntime.dummyContractAddress()), currentGasCost: __compactRuntime.emptyRunningCost() },
|
|
763
|
+
costModel: __compactRuntime.CostModel.initialCostModel()
|
|
764
|
+
};
|
|
765
|
+
const partialProofData = {
|
|
766
|
+
input: { value: [], alignment: [] },
|
|
767
|
+
output: undefined,
|
|
768
|
+
publicTranscript: [],
|
|
769
|
+
privateTranscriptOutputs: []
|
|
770
|
+
};
|
|
771
|
+
return {
|
|
772
|
+
};
|
|
773
|
+
}
|
|
774
|
+
const _emptyContext = {
|
|
775
|
+
callContext: { currentQueryContext: new __compactRuntime.QueryContext(new __compactRuntime.ContractState().data, __compactRuntime.dummyContractAddress()), currentGasCost: __compactRuntime.emptyRunningCost() }
|
|
776
|
+
};
|
|
777
|
+
const _dummyContract = new Contract({ });
|
|
778
|
+
export const pureCircuits = {};
|
|
779
|
+
export const expectedVk = {
|
|
780
|
+
'shield': '7d87eb5ab1bd2f753d3ba7290983ff1b81868aee789bc48c8979290627aec892',
|
|
781
|
+
'unshield': '8968d3bc80b8d03c21edf5d3363ac0b0f404e72f31457ee8ea1d0632df3bf546',
|
|
782
|
+
};
|
|
783
|
+
|
|
784
|
+
export const circuitSignatures = {
|
|
785
|
+
'shield': {pure: false, provable: true, argumentTypes: [{tag: 'Bytes', length: 32}, {tag: 'Uint', maxval: '18446744073709551615'}, {tag: 'Bytes', length: 32}], resultType: {tag: 'Struct', name: 'ShieldedCoinInfo', elements: [{name: 'nonce', type: {tag: 'Bytes', length: 32}}, {name: 'color', type: {tag: 'Bytes', length: 32}}, {name: 'value', type: {tag: 'Uint', maxval: '340282366920938463463374607431768211455'}}]}},
|
|
786
|
+
'unshield': {pure: false, provable: true, argumentTypes: [{tag: 'Bytes', length: 32}, {tag: 'Struct', name: 'ShieldedCoinInfo', elements: [{name: 'nonce', type: {tag: 'Bytes', length: 32}}, {name: 'color', type: {tag: 'Bytes', length: 32}}, {name: 'value', type: {tag: 'Uint', maxval: '340282366920938463463374607431768211455'}}]}, {tag: 'Struct', name: 'UserAddress', elements: [{name: 'bytes', type: {tag: 'Bytes', length: 32}}]}], resultType: {tag: 'Tuple', types: []}},
|
|
787
|
+
};
|
|
788
|
+
|
|
789
|
+
export const declaredInterfaces = {};
|
|
790
|
+
|
|
791
|
+
//# sourceMappingURL=index.js.map
|