@odatano/contract-m402-vault 0.1.0 → 0.2.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.
@@ -1,5 +1,5 @@
1
1
  import * as __compactRuntime from '@midnight-ntwrk/compact-runtime';
2
- __compactRuntime.checkRuntimeVersion('0.16.0');
2
+ __compactRuntime.checkRuntimeVersion('0.21.0');
3
3
 
4
4
  const _descriptor_0 = new __compactRuntime.CompactTypeBytes(32);
5
5
 
@@ -217,7 +217,26 @@ class _ShieldedSendResult_0 {
217
217
 
218
218
  const _descriptor_22 = new _ShieldedSendResult_0();
219
219
 
220
- const _descriptor_23 = new __compactRuntime.CompactTypeUnsignedInteger(255n, 1);
220
+ class _Maybe_1 {
221
+ alignment() {
222
+ return _descriptor_1.alignment().concat(_descriptor_20.alignment());
223
+ }
224
+ fromValue(value_0) {
225
+ return {
226
+ is_some: _descriptor_1.fromValue(value_0),
227
+ value: _descriptor_20.fromValue(value_0)
228
+ }
229
+ }
230
+ toValue(value_0) {
231
+ return _descriptor_1.toValue(value_0.is_some).concat(_descriptor_20.toValue(value_0.value));
232
+ }
233
+ }
234
+
235
+ const _descriptor_23 = new _Maybe_1();
236
+
237
+ const _descriptor_24 = new __compactRuntime.CompactTypeUnsignedInteger(255n, 1);
238
+
239
+ const _descriptor_25 = new __compactRuntime.CompactTypeUnsignedInteger(4294967295n, 4);
221
240
 
222
241
  export class Contract {
223
242
  witnesses;
@@ -231,16 +250,16 @@ export class Contract {
231
250
  }
232
251
  this.witnesses = witnesses_0;
233
252
  this.circuits = {
234
- creditColor(context, ...args_1) {
253
+ async creditColor(context, ...args_1) {
235
254
  return { result: pureCircuits.creditColor(...args_1), context };
236
255
  },
237
- deriveReceipt(context, ...args_1) {
256
+ async deriveReceipt(context, ...args_1) {
238
257
  return { result: pureCircuits.deriveReceipt(...args_1), context };
239
258
  },
240
- deriveServiceId(context, ...args_1) {
259
+ async deriveServiceId(context, ...args_1) {
241
260
  return { result: pureCircuits.deriveServiceId(...args_1), context };
242
261
  },
243
- registerService: (...args_1) => {
262
+ registerService: async (...args_1) => {
244
263
  if (args_1.length !== 4) {
245
264
  throw new __compactRuntime.CompactError(`registerService: expected 4 arguments (as invoked from Typescript), received ${args_1.length}`);
246
265
  }
@@ -248,7 +267,7 @@ export class Contract {
248
267
  const salt_0 = args_1[1];
249
268
  const price_0 = args_1[2];
250
269
  const owner_0 = args_1[3];
251
- if (!(typeof(contextOrig_0) === 'object' && contextOrig_0.currentQueryContext != undefined)) {
270
+ if (!(typeof(contextOrig_0) === 'object' && contextOrig_0.callContext.currentQueryContext != undefined)) {
252
271
  __compactRuntime.typeError('registerService',
253
272
  'argument 1 (as invoked from Typescript)',
254
273
  'm402-vault.compact line 44 char 1',
@@ -276,7 +295,7 @@ export class Contract {
276
295
  'Bytes<32>',
277
296
  owner_0)
278
297
  }
279
- const context = { ...contextOrig_0, gasCost: __compactRuntime.emptyRunningCost() };
298
+ const context = __compactRuntime.copyCircuitContext(contextOrig_0);
280
299
  const partialProofData = {
281
300
  input: {
282
301
  value: _descriptor_0.toValue(salt_0).concat(_descriptor_2.toValue(price_0).concat(_descriptor_0.toValue(owner_0))),
@@ -286,22 +305,23 @@ export class Contract {
286
305
  publicTranscript: [],
287
306
  privateTranscriptOutputs: []
288
307
  };
289
- const result_0 = this._registerService_0(context,
290
- partialProofData,
291
- salt_0,
292
- price_0,
293
- owner_0);
308
+ const result_0 = await this._registerService_0(context,
309
+ partialProofData,
310
+ salt_0,
311
+ price_0,
312
+ owner_0);
294
313
  partialProofData.output = { value: [], alignment: [] };
295
- return { result: result_0, context: context, proofData: partialProofData, gasCost: context.gasCost };
314
+ __compactRuntime.finalizeCallProofData(context, partialProofData);
315
+ return { result: result_0, context: context, gasCost: context.callContext.currentGasCost };
296
316
  },
297
- deposit: (...args_1) => {
317
+ deposit: async (...args_1) => {
298
318
  if (args_1.length !== 3) {
299
319
  throw new __compactRuntime.CompactError(`deposit: expected 3 arguments (as invoked from Typescript), received ${args_1.length}`);
300
320
  }
301
321
  const contextOrig_0 = args_1[0];
302
322
  const amount_0 = args_1[1];
303
323
  const nonceSeed_0 = args_1[2];
304
- if (!(typeof(contextOrig_0) === 'object' && contextOrig_0.currentQueryContext != undefined)) {
324
+ if (!(typeof(contextOrig_0) === 'object' && contextOrig_0.callContext.currentQueryContext != undefined)) {
305
325
  __compactRuntime.typeError('deposit',
306
326
  'argument 1 (as invoked from Typescript)',
307
327
  'm402-vault.compact line 59 char 1',
@@ -322,7 +342,7 @@ export class Contract {
322
342
  'Bytes<32>',
323
343
  nonceSeed_0)
324
344
  }
325
- const context = { ...contextOrig_0, gasCost: __compactRuntime.emptyRunningCost() };
345
+ const context = __compactRuntime.copyCircuitContext(contextOrig_0);
326
346
  const partialProofData = {
327
347
  input: {
328
348
  value: _descriptor_2.toValue(amount_0).concat(_descriptor_0.toValue(nonceSeed_0)),
@@ -332,14 +352,15 @@ export class Contract {
332
352
  publicTranscript: [],
333
353
  privateTranscriptOutputs: []
334
354
  };
335
- const result_0 = this._deposit_0(context,
336
- partialProofData,
337
- amount_0,
338
- nonceSeed_0);
355
+ const result_0 = await this._deposit_0(context,
356
+ partialProofData,
357
+ amount_0,
358
+ nonceSeed_0);
339
359
  partialProofData.output = { value: [], alignment: [] };
340
- return { result: result_0, context: context, proofData: partialProofData, gasCost: context.gasCost };
360
+ __compactRuntime.finalizeCallProofData(context, partialProofData);
361
+ return { result: result_0, context: context, gasCost: context.callContext.currentGasCost };
341
362
  },
342
- pay: (...args_1) => {
363
+ pay: async (...args_1) => {
343
364
  if (args_1.length !== 4) {
344
365
  throw new __compactRuntime.CompactError(`pay: expected 4 arguments (as invoked from Typescript), received ${args_1.length}`);
345
366
  }
@@ -347,7 +368,7 @@ export class Contract {
347
368
  const serviceId_0 = args_1[1];
348
369
  const credit_0 = args_1[2];
349
370
  const receiptSecret_0 = args_1[3];
350
- if (!(typeof(contextOrig_0) === 'object' && contextOrig_0.currentQueryContext != undefined)) {
371
+ if (!(typeof(contextOrig_0) === 'object' && contextOrig_0.callContext.currentQueryContext != undefined)) {
351
372
  __compactRuntime.typeError('pay',
352
373
  'argument 1 (as invoked from Typescript)',
353
374
  'm402-vault.compact line 81 char 1',
@@ -375,7 +396,7 @@ export class Contract {
375
396
  'Bytes<32>',
376
397
  receiptSecret_0)
377
398
  }
378
- const context = { ...contextOrig_0, gasCost: __compactRuntime.emptyRunningCost() };
399
+ const context = __compactRuntime.copyCircuitContext(contextOrig_0);
379
400
  const partialProofData = {
380
401
  input: {
381
402
  value: _descriptor_0.toValue(serviceId_0).concat(_descriptor_5.toValue(credit_0).concat(_descriptor_0.toValue(receiptSecret_0))),
@@ -385,22 +406,23 @@ export class Contract {
385
406
  publicTranscript: [],
386
407
  privateTranscriptOutputs: []
387
408
  };
388
- const result_0 = this._pay_0(context,
389
- partialProofData,
390
- serviceId_0,
391
- credit_0,
392
- receiptSecret_0);
409
+ const result_0 = await this._pay_0(context,
410
+ partialProofData,
411
+ serviceId_0,
412
+ credit_0,
413
+ receiptSecret_0);
393
414
  partialProofData.output = { value: [], alignment: [] };
394
- return { result: result_0, context: context, proofData: partialProofData, gasCost: context.gasCost };
415
+ __compactRuntime.finalizeCallProofData(context, partialProofData);
416
+ return { result: result_0, context: context, gasCost: context.callContext.currentGasCost };
395
417
  },
396
- redeem: (...args_1) => {
418
+ redeem: async (...args_1) => {
397
419
  if (args_1.length !== 3) {
398
420
  throw new __compactRuntime.CompactError(`redeem: expected 3 arguments (as invoked from Typescript), received ${args_1.length}`);
399
421
  }
400
422
  const contextOrig_0 = args_1[0];
401
423
  const recipient_0 = args_1[1];
402
424
  const credit_0 = args_1[2];
403
- if (!(typeof(contextOrig_0) === 'object' && contextOrig_0.currentQueryContext != undefined)) {
425
+ if (!(typeof(contextOrig_0) === 'object' && contextOrig_0.callContext.currentQueryContext != undefined)) {
404
426
  __compactRuntime.typeError('redeem',
405
427
  'argument 1 (as invoked from Typescript)',
406
428
  'm402-vault.compact line 104 char 1',
@@ -421,7 +443,7 @@ export class Contract {
421
443
  'struct ShieldedCoinInfo<nonce: Bytes<32>, color: Bytes<32>, value: Uint<0..340282366920938463463374607431768211456>>',
422
444
  credit_0)
423
445
  }
424
- const context = { ...contextOrig_0, gasCost: __compactRuntime.emptyRunningCost() };
446
+ const context = __compactRuntime.copyCircuitContext(contextOrig_0);
425
447
  const partialProofData = {
426
448
  input: {
427
449
  value: _descriptor_0.toValue(recipient_0).concat(_descriptor_5.toValue(credit_0)),
@@ -431,21 +453,22 @@ export class Contract {
431
453
  publicTranscript: [],
432
454
  privateTranscriptOutputs: []
433
455
  };
434
- const result_0 = this._redeem_0(context,
435
- partialProofData,
436
- recipient_0,
437
- credit_0);
456
+ const result_0 = await this._redeem_0(context,
457
+ partialProofData,
458
+ recipient_0,
459
+ credit_0);
438
460
  partialProofData.output = { value: [], alignment: [] };
439
- return { result: result_0, context: context, proofData: partialProofData, gasCost: context.gasCost };
461
+ __compactRuntime.finalizeCallProofData(context, partialProofData);
462
+ return { result: result_0, context: context, gasCost: context.callContext.currentGasCost };
440
463
  },
441
- withdraw: (...args_1) => {
464
+ withdraw: async (...args_1) => {
442
465
  if (args_1.length !== 3) {
443
466
  throw new __compactRuntime.CompactError(`withdraw: expected 3 arguments (as invoked from Typescript), received ${args_1.length}`);
444
467
  }
445
468
  const contextOrig_0 = args_1[0];
446
469
  const serviceId_0 = args_1[1];
447
470
  const amount_0 = args_1[2];
448
- if (!(typeof(contextOrig_0) === 'object' && contextOrig_0.currentQueryContext != undefined)) {
471
+ if (!(typeof(contextOrig_0) === 'object' && contextOrig_0.callContext.currentQueryContext != undefined)) {
449
472
  __compactRuntime.typeError('withdraw',
450
473
  'argument 1 (as invoked from Typescript)',
451
474
  'm402-vault.compact line 118 char 1',
@@ -466,7 +489,7 @@ export class Contract {
466
489
  'Uint<0..18446744073709551616>',
467
490
  amount_0)
468
491
  }
469
- const context = { ...contextOrig_0, gasCost: __compactRuntime.emptyRunningCost() };
492
+ const context = __compactRuntime.copyCircuitContext(contextOrig_0);
470
493
  const partialProofData = {
471
494
  input: {
472
495
  value: _descriptor_0.toValue(serviceId_0).concat(_descriptor_2.toValue(amount_0)),
@@ -476,12 +499,13 @@ export class Contract {
476
499
  publicTranscript: [],
477
500
  privateTranscriptOutputs: []
478
501
  };
479
- const result_0 = this._withdraw_0(context,
480
- partialProofData,
481
- serviceId_0,
482
- amount_0);
502
+ const result_0 = await this._withdraw_0(context,
503
+ partialProofData,
504
+ serviceId_0,
505
+ amount_0);
483
506
  partialProofData.output = { value: [], alignment: [] };
484
- return { result: result_0, context: context, proofData: partialProofData, gasCost: context.gasCost };
507
+ __compactRuntime.finalizeCallProofData(context, partialProofData);
508
+ return { result: result_0, context: context, gasCost: context.callContext.currentGasCost };
485
509
  }
486
510
  };
487
511
  this.impureCircuits = {
@@ -499,7 +523,7 @@ export class Contract {
499
523
  withdraw: this.circuits.withdraw
500
524
  };
501
525
  }
502
- initialState(...args_0) {
526
+ async initialState(...args_0) {
503
527
  if (args_0.length !== 1) {
504
528
  throw new __compactRuntime.CompactError(`Contract state constructor: expected 1 argument (as invoked from Typescript), received ${args_0.length}`);
505
529
  }
@@ -526,7 +550,7 @@ export class Contract {
526
550
  state_0.setOperation('pay', new __compactRuntime.ContractOperation());
527
551
  state_0.setOperation('redeem', new __compactRuntime.ContractOperation());
528
552
  state_0.setOperation('withdraw', new __compactRuntime.ContractOperation());
529
- const context = __compactRuntime.createCircuitContext(__compactRuntime.dummyContractAddress(), constructorContext_0.initialZswapLocalState.coinPublicKey, state_0.data, constructorContext_0.initialPrivateState);
553
+ const context = __compactRuntime.createCircuitContext({circuitId: 'constructor', contractAddress: __compactRuntime.dummyContractAddress(), coinPublicKeyOrZswapState: constructorContext_0.initialZswapLocalState.coinPublicKey, contractState: state_0.data, privateState: constructorContext_0.initialPrivateState});
530
554
  const partialProofData = {
531
555
  input: { value: [], alignment: [] },
532
556
  output: undefined,
@@ -537,8 +561,8 @@ export class Contract {
537
561
  partialProofData,
538
562
  [
539
563
  { push: { storage: false,
540
- value: __compactRuntime.StateValue.newCell({ value: _descriptor_23.toValue(0n),
541
- alignment: _descriptor_23.alignment() }).encode() } },
564
+ value: __compactRuntime.StateValue.newCell({ value: _descriptor_24.toValue(0n),
565
+ alignment: _descriptor_24.alignment() }).encode() } },
542
566
  { push: { storage: true,
543
567
  value: __compactRuntime.StateValue.newMap(
544
568
  new __compactRuntime.StateMap()
@@ -548,8 +572,8 @@ export class Contract {
548
572
  partialProofData,
549
573
  [
550
574
  { push: { storage: false,
551
- value: __compactRuntime.StateValue.newCell({ value: _descriptor_23.toValue(1n),
552
- alignment: _descriptor_23.alignment() }).encode() } },
575
+ value: __compactRuntime.StateValue.newCell({ value: _descriptor_24.toValue(1n),
576
+ alignment: _descriptor_24.alignment() }).encode() } },
553
577
  { push: { storage: true,
554
578
  value: __compactRuntime.StateValue.newMap(
555
579
  new __compactRuntime.StateMap()
@@ -559,8 +583,8 @@ export class Contract {
559
583
  partialProofData,
560
584
  [
561
585
  { push: { storage: false,
562
- value: __compactRuntime.StateValue.newCell({ value: _descriptor_23.toValue(2n),
563
- alignment: _descriptor_23.alignment() }).encode() } },
586
+ value: __compactRuntime.StateValue.newCell({ value: _descriptor_24.toValue(2n),
587
+ alignment: _descriptor_24.alignment() }).encode() } },
564
588
  { push: { storage: true,
565
589
  value: __compactRuntime.StateValue.newMap(
566
590
  new __compactRuntime.StateMap()
@@ -570,8 +594,8 @@ export class Contract {
570
594
  partialProofData,
571
595
  [
572
596
  { push: { storage: false,
573
- value: __compactRuntime.StateValue.newCell({ value: _descriptor_23.toValue(3n),
574
- alignment: _descriptor_23.alignment() }).encode() } },
597
+ value: __compactRuntime.StateValue.newCell({ value: _descriptor_24.toValue(3n),
598
+ alignment: _descriptor_24.alignment() }).encode() } },
575
599
  { push: { storage: true,
576
600
  value: __compactRuntime.StateValue.newMap(
577
601
  new __compactRuntime.StateMap()
@@ -581,17 +605,17 @@ export class Contract {
581
605
  partialProofData,
582
606
  [
583
607
  { push: { storage: false,
584
- value: __compactRuntime.StateValue.newCell({ value: _descriptor_23.toValue(4n),
585
- alignment: _descriptor_23.alignment() }).encode() } },
608
+ value: __compactRuntime.StateValue.newCell({ value: _descriptor_24.toValue(4n),
609
+ alignment: _descriptor_24.alignment() }).encode() } },
586
610
  { push: { storage: true,
587
611
  value: __compactRuntime.StateValue.newCell({ value: _descriptor_2.toValue(0n),
588
612
  alignment: _descriptor_2.alignment() }).encode() } },
589
613
  { ins: { cached: false, n: 1 } }]);
590
- state_0.data = new __compactRuntime.ChargedState(context.currentQueryContext.state.state);
614
+ state_0.data = new __compactRuntime.ChargedState(context.callContext.currentQueryContext.state.state);
591
615
  return {
592
616
  currentContractState: state_0,
593
- currentPrivateState: context.currentPrivateState,
594
- currentZswapLocalState: context.currentZswapLocalState
617
+ currentPrivateState: context.callContext.currentPrivateState,
618
+ currentZswapLocalState: context.callContext.currentZswapLocalState
595
619
  }
596
620
  }
597
621
  _some_0(value_0) { return { is_some: true, value: value_0 }; }
@@ -619,12 +643,12 @@ export class Contract {
619
643
  return this._persistentCommit_0([domain_sep_0, contractAddress_0.bytes],
620
644
  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]));
621
645
  }
622
- _mintShieldedToken_0(context,
623
- partialProofData,
624
- domain_sep_0,
625
- value_0,
626
- nonce_0,
627
- recipient_0)
646
+ async _mintShieldedToken_0(context,
647
+ partialProofData,
648
+ domain_sep_0,
649
+ value_0,
650
+ nonce_0,
651
+ recipient_0)
628
652
  {
629
653
  const coin_0 = { nonce: nonce_0,
630
654
  color:
@@ -637,8 +661,8 @@ export class Contract {
637
661
  pushPath: false,
638
662
  path: [
639
663
  { tag: 'value',
640
- value: { value: _descriptor_23.toValue(0n),
641
- alignment: _descriptor_23.alignment() } }] } },
664
+ value: { value: _descriptor_24.toValue(0n),
665
+ alignment: _descriptor_24.alignment() } }] } },
642
666
  { popeq: { cached: true,
643
667
  result: undefined } }]).value)),
644
668
  value: value_0 };
@@ -650,8 +674,8 @@ export class Contract {
650
674
  pushPath: true,
651
675
  path: [
652
676
  { tag: 'value',
653
- value: { value: _descriptor_23.toValue(4n),
654
- alignment: _descriptor_23.alignment() } }] } },
677
+ value: { value: _descriptor_24.toValue(4n),
678
+ alignment: _descriptor_24.alignment() } }] } },
655
679
  { push: { storage: false,
656
680
  value: __compactRuntime.StateValue.newCell({ value: _descriptor_0.toValue(domain_sep_0),
657
681
  alignment: _descriptor_0.alignment() }).encode() } },
@@ -682,8 +706,8 @@ export class Contract {
682
706
  pushPath: true,
683
707
  path: [
684
708
  { tag: 'value',
685
- value: { value: _descriptor_23.toValue(2n),
686
- alignment: _descriptor_23.alignment() } }] } },
709
+ value: { value: _descriptor_24.toValue(2n),
710
+ alignment: _descriptor_24.alignment() } }] } },
687
711
  { push: { storage: false,
688
712
  value: __compactRuntime.StateValue.newCell({ value: _descriptor_0.toValue(cm_0),
689
713
  alignment: _descriptor_0.alignment() }).encode() } },
@@ -702,8 +726,8 @@ export class Contract {
702
726
  pushPath: false,
703
727
  path: [
704
728
  { tag: 'value',
705
- value: { value: _descriptor_23.toValue(0n),
706
- alignment: _descriptor_23.alignment() } }] } },
729
+ value: { value: _descriptor_24.toValue(0n),
730
+ alignment: _descriptor_24.alignment() } }] } },
707
731
  { popeq: { cached: true,
708
732
  result: undefined } }]).value).bytes))
709
733
  {
@@ -715,8 +739,8 @@ export class Contract {
715
739
  pushPath: true,
716
740
  path: [
717
741
  { tag: 'value',
718
- value: { value: _descriptor_23.toValue(1n),
719
- alignment: _descriptor_23.alignment() } }] } },
742
+ value: { value: _descriptor_24.toValue(1n),
743
+ alignment: _descriptor_24.alignment() } }] } },
720
744
  { push: { storage: false,
721
745
  value: __compactRuntime.StateValue.newCell({ value: _descriptor_0.toValue(cm_0),
722
746
  alignment: _descriptor_0.alignment() }).encode() } },
@@ -728,13 +752,15 @@ export class Contract {
728
752
  return coin_0;
729
753
  }
730
754
  _evolveNonce_0(index_0, nonce_0) {
731
- return this._upgradeFromTransient_0(this._transientHash_0([__compactRuntime.convertBytesToField(28,
732
- new Uint8Array([109, 105, 100, 110, 105, 103, 104, 116, 58, 107, 101, 114, 110, 101, 108, 58, 110, 111, 110, 99, 101, 95, 101, 118, 111, 108, 118, 101]),
733
- '<standard library>'),
755
+ return this._upgradeFromTransient_0(this._transientHash_0([__compactRuntime.convertBytesToUint(52435875175126190479447740508185965837690552500527637822603658699938581184512n,
756
+ 28,
757
+ new Uint8Array([109, 105, 100, 110, 105, 103, 104, 116, 58, 107, 101, 114, 110, 101, 108, 58, 110, 111, 110, 99, 101, 95, 101, 118, 111, 108, 118, 101]),
758
+ 'Field',
759
+ '<standard library>'),
734
760
  index_0,
735
761
  this._degradeToTransient_0(nonce_0)]));
736
762
  }
737
- _receiveShielded_0(context, partialProofData, coin_0) {
763
+ async _receiveShielded_0(context, partialProofData, coin_0) {
738
764
  const recipient_0 = this._right_0(_descriptor_3.fromValue(__compactRuntime.queryLedgerState(context,
739
765
  partialProofData,
740
766
  [
@@ -743,8 +769,8 @@ export class Contract {
743
769
  pushPath: false,
744
770
  path: [
745
771
  { tag: 'value',
746
- value: { value: _descriptor_23.toValue(0n),
747
- alignment: _descriptor_23.alignment() } }] } },
772
+ value: { value: _descriptor_24.toValue(0n),
773
+ alignment: _descriptor_24.alignment() } }] } },
748
774
  { popeq: { cached: true,
749
775
  result: undefined } }]).value));
750
776
  this._createZswapOutput_0(context, partialProofData, coin_0, recipient_0);
@@ -757,8 +783,8 @@ export class Contract {
757
783
  pushPath: true,
758
784
  path: [
759
785
  { tag: 'value',
760
- value: { value: _descriptor_23.toValue(1n),
761
- alignment: _descriptor_23.alignment() } }] } },
786
+ value: { value: _descriptor_24.toValue(1n),
787
+ alignment: _descriptor_24.alignment() } }] } },
762
788
  { push: { storage: false,
763
789
  value: __compactRuntime.StateValue.newCell({ value: _descriptor_0.toValue(tmp_0),
764
790
  alignment: _descriptor_0.alignment() }).encode() } },
@@ -768,7 +794,8 @@ export class Contract {
768
794
  { swap: { n: 0 } }]);
769
795
  return [];
770
796
  }
771
- _sendShielded_0(context, partialProofData, input_0, recipient_0, value_0) {
797
+ async _sendShielded_0(context, partialProofData, input_0, recipient_0, value_0)
798
+ {
772
799
  const selfAddr_0 = _descriptor_3.fromValue(__compactRuntime.queryLedgerState(context,
773
800
  partialProofData,
774
801
  [
@@ -777,8 +804,8 @@ export class Contract {
777
804
  pushPath: false,
778
805
  path: [
779
806
  { tag: 'value',
780
- value: { value: _descriptor_23.toValue(0n),
781
- alignment: _descriptor_23.alignment() } }] } },
807
+ value: { value: _descriptor_24.toValue(0n),
808
+ alignment: _descriptor_24.alignment() } }] } },
782
809
  { popeq: { cached: true,
783
810
  result: undefined } }]).value);
784
811
  this._createZswapInput_0(context, partialProofData, input_0);
@@ -792,8 +819,8 @@ export class Contract {
792
819
  pushPath: true,
793
820
  path: [
794
821
  { tag: 'value',
795
- value: { value: _descriptor_23.toValue(0n),
796
- alignment: _descriptor_23.alignment() } }] } },
822
+ value: { value: _descriptor_24.toValue(0n),
823
+ alignment: _descriptor_24.alignment() } }] } },
797
824
  { push: { storage: false,
798
825
  value: __compactRuntime.StateValue.newCell({ value: _descriptor_0.toValue(tmp_0),
799
826
  alignment: _descriptor_0.alignment() }).encode() } },
@@ -807,9 +834,11 @@ export class Contract {
807
834
  'result of subtraction would be negative'),
808
835
  t_0 - value_0));
809
836
  const output_0 = { nonce:
810
- this._upgradeFromTransient_0(this._transientHash_1([__compactRuntime.convertBytesToField(28,
811
- new Uint8Array([109, 105, 100, 110, 105, 103, 104, 116, 58, 107, 101, 114, 110, 101, 108, 58, 110, 111, 110, 99, 101, 95, 101, 118, 111, 108, 118, 101]),
812
- '<standard library>'),
837
+ this._upgradeFromTransient_0(this._transientHash_1([__compactRuntime.convertBytesToUint(52435875175126190479447740508185965837690552500527637822603658699938581184512n,
838
+ 28,
839
+ new Uint8Array([109, 105, 100, 110, 105, 103, 104, 116, 58, 107, 101, 114, 110, 101, 108, 58, 110, 111, 110, 99, 101, 95, 101, 118, 111, 108, 118, 101]),
840
+ 'Field',
841
+ '<standard library>'),
813
842
  this._degradeToTransient_0(input_0.nonce)])),
814
843
  color: input_0.color,
815
844
  value: value_0 };
@@ -823,8 +852,8 @@ export class Contract {
823
852
  pushPath: true,
824
853
  path: [
825
854
  { tag: 'value',
826
- value: { value: _descriptor_23.toValue(2n),
827
- alignment: _descriptor_23.alignment() } }] } },
855
+ value: { value: _descriptor_24.toValue(2n),
856
+ alignment: _descriptor_24.alignment() } }] } },
828
857
  { push: { storage: false,
829
858
  value: __compactRuntime.StateValue.newCell({ value: _descriptor_0.toValue(tmp_1),
830
859
  alignment: _descriptor_0.alignment() }).encode() } },
@@ -845,8 +874,8 @@ export class Contract {
845
874
  pushPath: true,
846
875
  path: [
847
876
  { tag: 'value',
848
- value: { value: _descriptor_23.toValue(1n),
849
- alignment: _descriptor_23.alignment() } }] } },
877
+ value: { value: _descriptor_24.toValue(1n),
878
+ alignment: _descriptor_24.alignment() } }] } },
850
879
  { push: { storage: false,
851
880
  value: __compactRuntime.StateValue.newCell({ value: _descriptor_0.toValue(tmp_2),
852
881
  alignment: _descriptor_0.alignment() }).encode() } },
@@ -855,13 +884,15 @@ export class Contract {
855
884
  { ins: { cached: true, n: 2 } },
856
885
  { swap: { n: 0 } }]);
857
886
  }
858
- if (this._equal_2(change_0, 0n)) {
887
+ if (change_0 === 0n) {
859
888
  return { change: this._none_0(), sent: output_0 };
860
889
  } else {
861
890
  const changeCoin_0 = { nonce:
862
- this._upgradeFromTransient_0(this._transientHash_1([__compactRuntime.convertBytesToField(30,
863
- new Uint8Array([109, 105, 100, 110, 105, 103, 104, 116, 58, 107, 101, 114, 110, 101, 108, 58, 110, 111, 110, 99, 101, 95, 101, 118, 111, 108, 118, 101, 47, 50]),
864
- '<standard library>'),
891
+ this._upgradeFromTransient_0(this._transientHash_1([__compactRuntime.convertBytesToUint(52435875175126190479447740508185965837690552500527637822603658699938581184512n,
892
+ 30,
893
+ new Uint8Array([109, 105, 100, 110, 105, 103, 104, 116, 58, 107, 101, 114, 110, 101, 108, 58, 110, 111, 110, 99, 101, 95, 101, 118, 111, 108, 118, 101, 47, 50]),
894
+ 'Field',
895
+ '<standard library>'),
865
896
  this._degradeToTransient_0(input_0.nonce)])),
866
897
  color: input_0.color,
867
898
  value: change_0 };
@@ -879,8 +910,8 @@ export class Contract {
879
910
  pushPath: true,
880
911
  path: [
881
912
  { tag: 'value',
882
- value: { value: _descriptor_23.toValue(2n),
883
- alignment: _descriptor_23.alignment() } }] } },
913
+ value: { value: _descriptor_24.toValue(2n),
914
+ alignment: _descriptor_24.alignment() } }] } },
884
915
  { push: { storage: false,
885
916
  value: __compactRuntime.StateValue.newCell({ value: _descriptor_0.toValue(cm_0),
886
917
  alignment: _descriptor_0.alignment() }).encode() } },
@@ -896,8 +927,8 @@ export class Contract {
896
927
  pushPath: true,
897
928
  path: [
898
929
  { tag: 'value',
899
- value: { value: _descriptor_23.toValue(1n),
900
- alignment: _descriptor_23.alignment() } }] } },
930
+ value: { value: _descriptor_24.toValue(1n),
931
+ alignment: _descriptor_24.alignment() } }] } },
901
932
  { push: { storage: false,
902
933
  value: __compactRuntime.StateValue.newCell({ value: _descriptor_0.toValue(cm_0),
903
934
  alignment: _descriptor_0.alignment() }).encode() } },
@@ -908,13 +939,17 @@ export class Contract {
908
939
  return { change: this._some_0(changeCoin_0), sent: output_0 };
909
940
  }
910
941
  }
911
- _sendImmediateShielded_0(context, partialProofData, input_0, target_0, value_0)
942
+ async _sendImmediateShielded_0(context,
943
+ partialProofData,
944
+ input_0,
945
+ target_0,
946
+ value_0)
912
947
  {
913
- return this._sendShielded_0(context,
914
- partialProofData,
915
- this._upcastQualifiedCoin_0(input_0),
916
- target_0,
917
- value_0);
948
+ return await this._sendShielded_0(context,
949
+ partialProofData,
950
+ this._upcastQualifiedCoin_0(input_0),
951
+ target_0,
952
+ value_0);
918
953
  }
919
954
  _downcastQualifiedCoin_0(coin_0) {
920
955
  return { nonce: coin_0.nonce, color: coin_0.color, value: coin_0.value };
@@ -942,7 +977,12 @@ export class Contract {
942
977
  dataType: false,
943
978
  data: addr_0.bytes });
944
979
  }
945
- _sendUnshielded_0(context, partialProofData, color_0, amount_0, recipient_0) {
980
+ async _sendUnshielded_0(context,
981
+ partialProofData,
982
+ color_0,
983
+ amount_0,
984
+ recipient_0)
985
+ {
946
986
  const tmp_0 = this._left_1(color_0);
947
987
  __compactRuntime.queryLedgerState(context,
948
988
  partialProofData,
@@ -952,8 +992,8 @@ export class Contract {
952
992
  pushPath: true,
953
993
  path: [
954
994
  { tag: 'value',
955
- value: { value: _descriptor_23.toValue(7n),
956
- alignment: _descriptor_23.alignment() } }] } },
995
+ value: { value: _descriptor_24.toValue(7n),
996
+ alignment: _descriptor_24.alignment() } }] } },
957
997
  { push: { storage: false,
958
998
  value: __compactRuntime.StateValue.newCell({ value: _descriptor_17.toValue(tmp_0),
959
999
  alignment: _descriptor_17.alignment() }).encode() } },
@@ -983,8 +1023,8 @@ export class Contract {
983
1023
  pushPath: true,
984
1024
  path: [
985
1025
  { tag: 'value',
986
- value: { value: _descriptor_23.toValue(8n),
987
- alignment: _descriptor_23.alignment() } }] } },
1026
+ value: { value: _descriptor_24.toValue(8n),
1027
+ alignment: _descriptor_24.alignment() } }] } },
988
1028
  { push: { storage: false,
989
1029
  value: __compactRuntime.StateValue.newCell(__compactRuntime.alignedConcat(
990
1030
  { value: _descriptor_17.toValue(tmp_1),
@@ -1011,7 +1051,7 @@ export class Contract {
1011
1051
  { swap: { n: 0 } }]);
1012
1052
  if (recipient_0.is_left
1013
1053
  &&
1014
- this._equal_3(recipient_0.left.bytes,
1054
+ this._equal_2(recipient_0.left.bytes,
1015
1055
  _descriptor_3.fromValue(__compactRuntime.queryLedgerState(context,
1016
1056
  partialProofData,
1017
1057
  [
@@ -1020,8 +1060,8 @@ export class Contract {
1020
1060
  pushPath: false,
1021
1061
  path: [
1022
1062
  { tag: 'value',
1023
- value: { value: _descriptor_23.toValue(0n),
1024
- alignment: _descriptor_23.alignment() } }] } },
1063
+ value: { value: _descriptor_24.toValue(0n),
1064
+ alignment: _descriptor_24.alignment() } }] } },
1025
1065
  { popeq: { cached: true,
1026
1066
  result: undefined } }]).value).bytes))
1027
1067
  {
@@ -1034,8 +1074,8 @@ export class Contract {
1034
1074
  pushPath: true,
1035
1075
  path: [
1036
1076
  { tag: 'value',
1037
- value: { value: _descriptor_23.toValue(6n),
1038
- alignment: _descriptor_23.alignment() } }] } },
1077
+ value: { value: _descriptor_24.toValue(6n),
1078
+ alignment: _descriptor_24.alignment() } }] } },
1039
1079
  { push: { storage: false,
1040
1080
  value: __compactRuntime.StateValue.newCell({ value: _descriptor_17.toValue(tmp_2),
1041
1081
  alignment: _descriptor_17.alignment() }).encode() } },
@@ -1059,7 +1099,7 @@ export class Contract {
1059
1099
  }
1060
1100
  return [];
1061
1101
  }
1062
- _receiveUnshielded_0(context, partialProofData, color_0, amount_0) {
1102
+ async _receiveUnshielded_0(context, partialProofData, color_0, amount_0) {
1063
1103
  const tmp_0 = this._left_1(color_0);
1064
1104
  __compactRuntime.queryLedgerState(context,
1065
1105
  partialProofData,
@@ -1069,8 +1109,8 @@ export class Contract {
1069
1109
  pushPath: true,
1070
1110
  path: [
1071
1111
  { tag: 'value',
1072
- value: { value: _descriptor_23.toValue(6n),
1073
- alignment: _descriptor_23.alignment() } }] } },
1112
+ value: { value: _descriptor_24.toValue(6n),
1113
+ alignment: _descriptor_24.alignment() } }] } },
1074
1114
  { push: { storage: false,
1075
1115
  value: __compactRuntime.StateValue.newCell({ value: _descriptor_17.toValue(tmp_0),
1076
1116
  alignment: _descriptor_17.alignment() }).encode() } },
@@ -1168,13 +1208,14 @@ export class Contract {
1168
1208
  return this._persistentHash_1([new Uint8Array([109, 52, 48, 50, 58, 115, 105, 100, 58, 118, 49, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]),
1169
1209
  owner_0,
1170
1210
  salt_0,
1171
- __compactRuntime.convertFieldToBytes(32,
1172
- price_0,
1173
- 'm402-vault.compact line 40 char 43')]);
1211
+ __compactRuntime.convertBigintToBytes(32,
1212
+ price_0,
1213
+ 'm402-vault.compact line 40 char 43')]);
1174
1214
  }
1175
- _registerService_0(context, partialProofData, salt_0, price_0, owner_0) {
1215
+ async _registerService_0(context, partialProofData, salt_0, price_0, owner_0)
1216
+ {
1176
1217
  __compactRuntime.assert(price_0 > 0n, 'price must be positive');
1177
- __compactRuntime.assert(!this._equal_4(owner_0,
1218
+ __compactRuntime.assert(!this._equal_3(owner_0,
1178
1219
  new Uint8Array([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0])),
1179
1220
  'owner must be set');
1180
1221
  const serviceId_0 = this._deriveServiceId_0(owner_0, salt_0, price_0);
@@ -1186,8 +1227,8 @@ export class Contract {
1186
1227
  pushPath: false,
1187
1228
  path: [
1188
1229
  { tag: 'value',
1189
- value: { value: _descriptor_23.toValue(0n),
1190
- alignment: _descriptor_23.alignment() } }] } },
1230
+ value: { value: _descriptor_24.toValue(0n),
1231
+ alignment: _descriptor_24.alignment() } }] } },
1191
1232
  { push: { storage: false,
1192
1233
  value: __compactRuntime.StateValue.newCell({ value: _descriptor_0.toValue(serviceId_0),
1193
1234
  alignment: _descriptor_0.alignment() }).encode() } },
@@ -1203,8 +1244,8 @@ export class Contract {
1203
1244
  pushPath: false,
1204
1245
  path: [
1205
1246
  { tag: 'value',
1206
- value: { value: _descriptor_23.toValue(1n),
1207
- alignment: _descriptor_23.alignment() } }] } },
1247
+ value: { value: _descriptor_24.toValue(1n),
1248
+ alignment: _descriptor_24.alignment() } }] } },
1208
1249
  { push: { storage: false,
1209
1250
  value: __compactRuntime.StateValue.newCell({ value: _descriptor_0.toValue(serviceId_0),
1210
1251
  alignment: _descriptor_0.alignment() }).encode() } },
@@ -1219,8 +1260,8 @@ export class Contract {
1219
1260
  pushPath: true,
1220
1261
  path: [
1221
1262
  { tag: 'value',
1222
- value: { value: _descriptor_23.toValue(0n),
1223
- alignment: _descriptor_23.alignment() } }] } },
1263
+ value: { value: _descriptor_24.toValue(0n),
1264
+ alignment: _descriptor_24.alignment() } }] } },
1224
1265
  { push: { storage: false,
1225
1266
  value: __compactRuntime.StateValue.newCell({ value: _descriptor_0.toValue(serviceId_0),
1226
1267
  alignment: _descriptor_0.alignment() }).encode() } },
@@ -1236,8 +1277,8 @@ export class Contract {
1236
1277
  pushPath: true,
1237
1278
  path: [
1238
1279
  { tag: 'value',
1239
- value: { value: _descriptor_23.toValue(1n),
1240
- alignment: _descriptor_23.alignment() } }] } },
1280
+ value: { value: _descriptor_24.toValue(1n),
1281
+ alignment: _descriptor_24.alignment() } }] } },
1241
1282
  { push: { storage: false,
1242
1283
  value: __compactRuntime.StateValue.newCell({ value: _descriptor_0.toValue(serviceId_0),
1243
1284
  alignment: _descriptor_0.alignment() }).encode() } },
@@ -1248,12 +1289,12 @@ export class Contract {
1248
1289
  { ins: { cached: true, n: 1 } }]);
1249
1290
  return [];
1250
1291
  }
1251
- _deposit_0(context, partialProofData, amount_0, nonceSeed_0) {
1292
+ async _deposit_0(context, partialProofData, amount_0, nonceSeed_0) {
1252
1293
  __compactRuntime.assert(amount_0 > 0n, 'amount must be positive');
1253
- this._receiveUnshielded_0(context,
1254
- partialProofData,
1255
- this._nativeToken_0(),
1256
- amount_0);
1294
+ await this._receiveUnshielded_0(context,
1295
+ partialProofData,
1296
+ this._nativeToken_0(),
1297
+ amount_0);
1257
1298
  const nonce_0 = this._evolveNonce_0(((t1) => {
1258
1299
  if (t1 > 18446744073709551615n) {
1259
1300
  throw new __compactRuntime.CompactError('m402-vault.compact line 63 char 38: cast from Field or Uint value to smaller Uint value failed: ' + t1 + ' is greater than 18446744073709551615');
@@ -1267,34 +1308,34 @@ export class Contract {
1267
1308
  pushPath: false,
1268
1309
  path: [
1269
1310
  { tag: 'value',
1270
- value: { value: _descriptor_23.toValue(4n),
1271
- alignment: _descriptor_23.alignment() } }] } },
1311
+ value: { value: _descriptor_24.toValue(4n),
1312
+ alignment: _descriptor_24.alignment() } }] } },
1272
1313
  { popeq: { cached: true,
1273
1314
  result: undefined } }]).value)),
1274
1315
  nonceSeed_0);
1275
- const coin_0 = this._mintShieldedToken_0(context,
1276
- partialProofData,
1277
- this._creditDomain_0(),
1278
- amount_0,
1279
- nonce_0,
1280
- this._right_0(_descriptor_3.fromValue(__compactRuntime.queryLedgerState(context,
1281
- partialProofData,
1282
- [
1283
- { dup: { n: 2 } },
1284
- { idx: { cached: true,
1285
- pushPath: false,
1286
- path: [
1287
- { tag: 'value',
1288
- value: { value: _descriptor_23.toValue(0n),
1289
- alignment: _descriptor_23.alignment() } }] } },
1290
- { popeq: { cached: true,
1291
- result: undefined } }]).value)));
1292
- this._sendImmediateShielded_0(context,
1293
- partialProofData,
1294
- coin_0,
1295
- this._left_0(this._ownPublicKey_0(context,
1296
- partialProofData)),
1297
- coin_0.value);
1316
+ const coin_0 = await this._mintShieldedToken_0(context,
1317
+ partialProofData,
1318
+ this._creditDomain_0(),
1319
+ amount_0,
1320
+ nonce_0,
1321
+ this._right_0(_descriptor_3.fromValue(__compactRuntime.queryLedgerState(context,
1322
+ partialProofData,
1323
+ [
1324
+ { dup: { n: 2 } },
1325
+ { idx: { cached: true,
1326
+ pushPath: false,
1327
+ path: [
1328
+ { tag: 'value',
1329
+ value: { value: _descriptor_24.toValue(0n),
1330
+ alignment: _descriptor_24.alignment() } }] } },
1331
+ { popeq: { cached: true,
1332
+ result: undefined } }]).value)));
1333
+ await this._sendImmediateShielded_0(context,
1334
+ partialProofData,
1335
+ coin_0,
1336
+ this._left_0(this._ownPublicKey_0(context,
1337
+ partialProofData)),
1338
+ coin_0.value);
1298
1339
  const tmp_0 = 1n;
1299
1340
  __compactRuntime.queryLedgerState(context,
1300
1341
  partialProofData,
@@ -1303,8 +1344,8 @@ export class Contract {
1303
1344
  pushPath: true,
1304
1345
  path: [
1305
1346
  { tag: 'value',
1306
- value: { value: _descriptor_23.toValue(4n),
1307
- alignment: _descriptor_23.alignment() } }] } },
1347
+ value: { value: _descriptor_24.toValue(4n),
1348
+ alignment: _descriptor_24.alignment() } }] } },
1308
1349
  { addi: { immediate: parseInt(__compactRuntime.valueToBigInt(
1309
1350
  { value: _descriptor_6.toValue(tmp_0),
1310
1351
  alignment: _descriptor_6.alignment() }
@@ -1313,7 +1354,8 @@ export class Contract {
1313
1354
  { ins: { cached: true, n: 1 } }]);
1314
1355
  return [];
1315
1356
  }
1316
- _pay_0(context, partialProofData, serviceId_0, credit_0, receiptSecret_0) {
1357
+ async _pay_0(context, partialProofData, serviceId_0, credit_0, receiptSecret_0)
1358
+ {
1317
1359
  const sid_0 = serviceId_0;
1318
1360
  __compactRuntime.assert(_descriptor_1.fromValue(__compactRuntime.queryLedgerState(context,
1319
1361
  partialProofData,
@@ -1323,8 +1365,8 @@ export class Contract {
1323
1365
  pushPath: false,
1324
1366
  path: [
1325
1367
  { tag: 'value',
1326
- value: { value: _descriptor_23.toValue(0n),
1327
- alignment: _descriptor_23.alignment() } }] } },
1368
+ value: { value: _descriptor_24.toValue(0n),
1369
+ alignment: _descriptor_24.alignment() } }] } },
1328
1370
  { push: { storage: false,
1329
1371
  value: __compactRuntime.StateValue.newCell({ value: _descriptor_0.toValue(sid_0),
1330
1372
  alignment: _descriptor_0.alignment() }).encode() } },
@@ -1340,8 +1382,8 @@ export class Contract {
1340
1382
  pushPath: false,
1341
1383
  path: [
1342
1384
  { tag: 'value',
1343
- value: { value: _descriptor_23.toValue(0n),
1344
- alignment: _descriptor_23.alignment() } }] } },
1385
+ value: { value: _descriptor_24.toValue(0n),
1386
+ alignment: _descriptor_24.alignment() } }] } },
1345
1387
  { idx: { cached: false,
1346
1388
  pushPath: false,
1347
1389
  path: [
@@ -1350,7 +1392,7 @@ export class Contract {
1350
1392
  alignment: _descriptor_0.alignment() } }] } },
1351
1393
  { popeq: { cached: false,
1352
1394
  result: undefined } }]).value);
1353
- __compactRuntime.assert(this._equal_5(credit_0.color,
1395
+ __compactRuntime.assert(this._equal_4(credit_0.color,
1354
1396
  this._tokenType_0(this._creditDomain_0(),
1355
1397
  _descriptor_3.fromValue(__compactRuntime.queryLedgerState(context,
1356
1398
  partialProofData,
@@ -1360,13 +1402,12 @@ export class Contract {
1360
1402
  pushPath: false,
1361
1403
  path: [
1362
1404
  { tag: 'value',
1363
- value: { value: _descriptor_23.toValue(0n),
1364
- alignment: _descriptor_23.alignment() } }] } },
1405
+ value: { value: _descriptor_24.toValue(0n),
1406
+ alignment: _descriptor_24.alignment() } }] } },
1365
1407
  { popeq: { cached: true,
1366
1408
  result: undefined } }]).value))),
1367
1409
  'not an m402 credit');
1368
- __compactRuntime.assert(this._equal_6(credit_0.value, price_0),
1369
- 'wrong amount');
1410
+ __compactRuntime.assert(credit_0.value === price_0, 'wrong amount');
1370
1411
  const receipt_0 = this._deriveReceipt_0(receiptSecret_0, sid_0);
1371
1412
  __compactRuntime.assert(!_descriptor_1.fromValue(__compactRuntime.queryLedgerState(context,
1372
1413
  partialProofData,
@@ -1376,8 +1417,8 @@ export class Contract {
1376
1417
  pushPath: false,
1377
1418
  path: [
1378
1419
  { tag: 'value',
1379
- value: { value: _descriptor_23.toValue(2n),
1380
- alignment: _descriptor_23.alignment() } }] } },
1420
+ value: { value: _descriptor_24.toValue(2n),
1421
+ alignment: _descriptor_24.alignment() } }] } },
1381
1422
  { push: { storage: false,
1382
1423
  value: __compactRuntime.StateValue.newCell({ value: _descriptor_0.toValue(receipt_0),
1383
1424
  alignment: _descriptor_0.alignment() }).encode() } },
@@ -1385,7 +1426,7 @@ export class Contract {
1385
1426
  { popeq: { cached: true,
1386
1427
  result: undefined } }]).value),
1387
1428
  'receipt reused');
1388
- this._receiveShielded_0(context, partialProofData, credit_0);
1429
+ await this._receiveShielded_0(context, partialProofData, credit_0);
1389
1430
  __compactRuntime.queryLedgerState(context,
1390
1431
  partialProofData,
1391
1432
  [
@@ -1393,8 +1434,8 @@ export class Contract {
1393
1434
  pushPath: true,
1394
1435
  path: [
1395
1436
  { tag: 'value',
1396
- value: { value: _descriptor_23.toValue(2n),
1397
- alignment: _descriptor_23.alignment() } }] } },
1437
+ value: { value: _descriptor_24.toValue(2n),
1438
+ alignment: _descriptor_24.alignment() } }] } },
1398
1439
  { push: { storage: false,
1399
1440
  value: __compactRuntime.StateValue.newCell({ value: _descriptor_0.toValue(receipt_0),
1400
1441
  alignment: _descriptor_0.alignment() }).encode() } },
@@ -1410,8 +1451,8 @@ export class Contract {
1410
1451
  pushPath: false,
1411
1452
  path: [
1412
1453
  { tag: 'value',
1413
- value: { value: _descriptor_23.toValue(1n),
1414
- alignment: _descriptor_23.alignment() } }] } },
1454
+ value: { value: _descriptor_24.toValue(1n),
1455
+ alignment: _descriptor_24.alignment() } }] } },
1415
1456
  { idx: { cached: false,
1416
1457
  pushPath: false,
1417
1458
  path: [
@@ -1428,8 +1469,8 @@ export class Contract {
1428
1469
  pushPath: false,
1429
1470
  path: [
1430
1471
  { tag: 'value',
1431
- value: { value: _descriptor_23.toValue(3n),
1432
- alignment: _descriptor_23.alignment() } }] } },
1472
+ value: { value: _descriptor_24.toValue(3n),
1473
+ alignment: _descriptor_24.alignment() } }] } },
1433
1474
  { push: { storage: false,
1434
1475
  value: __compactRuntime.StateValue.newCell({ value: _descriptor_0.toValue(owner_0),
1435
1476
  alignment: _descriptor_0.alignment() }).encode() } },
@@ -1445,8 +1486,8 @@ export class Contract {
1445
1486
  pushPath: false,
1446
1487
  path: [
1447
1488
  { tag: 'value',
1448
- value: { value: _descriptor_23.toValue(3n),
1449
- alignment: _descriptor_23.alignment() } }] } },
1489
+ value: { value: _descriptor_24.toValue(3n),
1490
+ alignment: _descriptor_24.alignment() } }] } },
1450
1491
  { idx: { cached: false,
1451
1492
  pushPath: false,
1452
1493
  path: [
@@ -1470,8 +1511,8 @@ export class Contract {
1470
1511
  pushPath: true,
1471
1512
  path: [
1472
1513
  { tag: 'value',
1473
- value: { value: _descriptor_23.toValue(3n),
1474
- alignment: _descriptor_23.alignment() } }] } },
1514
+ value: { value: _descriptor_24.toValue(3n),
1515
+ alignment: _descriptor_24.alignment() } }] } },
1475
1516
  { push: { storage: false,
1476
1517
  value: __compactRuntime.StateValue.newCell({ value: _descriptor_0.toValue(owner_0),
1477
1518
  alignment: _descriptor_0.alignment() }).encode() } },
@@ -1482,11 +1523,11 @@ export class Contract {
1482
1523
  { ins: { cached: true, n: 1 } }]);
1483
1524
  return [];
1484
1525
  }
1485
- _redeem_0(context, partialProofData, recipient_0, credit_0) {
1486
- __compactRuntime.assert(!this._equal_7(recipient_0,
1526
+ async _redeem_0(context, partialProofData, recipient_0, credit_0) {
1527
+ __compactRuntime.assert(!this._equal_5(recipient_0,
1487
1528
  new Uint8Array([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0])),
1488
1529
  'recipient must be set');
1489
- __compactRuntime.assert(this._equal_8(credit_0.color,
1530
+ __compactRuntime.assert(this._equal_6(credit_0.color,
1490
1531
  this._tokenType_0(this._creditDomain_0(),
1491
1532
  _descriptor_3.fromValue(__compactRuntime.queryLedgerState(context,
1492
1533
  partialProofData,
@@ -1496,23 +1537,23 @@ export class Contract {
1496
1537
  pushPath: false,
1497
1538
  path: [
1498
1539
  { tag: 'value',
1499
- value: { value: _descriptor_23.toValue(0n),
1500
- alignment: _descriptor_23.alignment() } }] } },
1540
+ value: { value: _descriptor_24.toValue(0n),
1541
+ alignment: _descriptor_24.alignment() } }] } },
1501
1542
  { popeq: { cached: true,
1502
1543
  result: undefined } }]).value))),
1503
1544
  'not an m402 credit');
1504
1545
  let t_0;
1505
1546
  __compactRuntime.assert((t_0 = credit_0.value, t_0 > 0n),
1506
1547
  'nothing to redeem');
1507
- this._receiveShielded_0(context, partialProofData, credit_0);
1508
- this._sendUnshielded_0(context,
1509
- partialProofData,
1510
- this._nativeToken_0(),
1511
- credit_0.value,
1512
- this._right_1({ bytes: recipient_0 }));
1548
+ await this._receiveShielded_0(context, partialProofData, credit_0);
1549
+ await this._sendUnshielded_0(context,
1550
+ partialProofData,
1551
+ this._nativeToken_0(),
1552
+ credit_0.value,
1553
+ this._right_1({ bytes: recipient_0 }));
1513
1554
  return [];
1514
1555
  }
1515
- _withdraw_0(context, partialProofData, serviceId_0, amount_0) {
1556
+ async _withdraw_0(context, partialProofData, serviceId_0, amount_0) {
1516
1557
  const sid_0 = serviceId_0;
1517
1558
  __compactRuntime.assert(amount_0 > 0n, 'amount must be positive');
1518
1559
  __compactRuntime.assert(_descriptor_1.fromValue(__compactRuntime.queryLedgerState(context,
@@ -1523,8 +1564,8 @@ export class Contract {
1523
1564
  pushPath: false,
1524
1565
  path: [
1525
1566
  { tag: 'value',
1526
- value: { value: _descriptor_23.toValue(1n),
1527
- alignment: _descriptor_23.alignment() } }] } },
1567
+ value: { value: _descriptor_24.toValue(1n),
1568
+ alignment: _descriptor_24.alignment() } }] } },
1528
1569
  { push: { storage: false,
1529
1570
  value: __compactRuntime.StateValue.newCell({ value: _descriptor_0.toValue(sid_0),
1530
1571
  alignment: _descriptor_0.alignment() }).encode() } },
@@ -1540,8 +1581,8 @@ export class Contract {
1540
1581
  pushPath: false,
1541
1582
  path: [
1542
1583
  { tag: 'value',
1543
- value: { value: _descriptor_23.toValue(1n),
1544
- alignment: _descriptor_23.alignment() } }] } },
1584
+ value: { value: _descriptor_24.toValue(1n),
1585
+ alignment: _descriptor_24.alignment() } }] } },
1545
1586
  { idx: { cached: false,
1546
1587
  pushPath: false,
1547
1588
  path: [
@@ -1558,8 +1599,8 @@ export class Contract {
1558
1599
  pushPath: false,
1559
1600
  path: [
1560
1601
  { tag: 'value',
1561
- value: { value: _descriptor_23.toValue(3n),
1562
- alignment: _descriptor_23.alignment() } }] } },
1602
+ value: { value: _descriptor_24.toValue(3n),
1603
+ alignment: _descriptor_24.alignment() } }] } },
1563
1604
  { push: { storage: false,
1564
1605
  value: __compactRuntime.StateValue.newCell({ value: _descriptor_0.toValue(owner_0),
1565
1606
  alignment: _descriptor_0.alignment() }).encode() } },
@@ -1575,8 +1616,8 @@ export class Contract {
1575
1616
  pushPath: false,
1576
1617
  path: [
1577
1618
  { tag: 'value',
1578
- value: { value: _descriptor_23.toValue(3n),
1579
- alignment: _descriptor_23.alignment() } }] } },
1619
+ value: { value: _descriptor_24.toValue(3n),
1620
+ alignment: _descriptor_24.alignment() } }] } },
1580
1621
  { idx: { cached: false,
1581
1622
  pushPath: false,
1582
1623
  path: [
@@ -1586,11 +1627,11 @@ export class Contract {
1586
1627
  { popeq: { cached: false,
1587
1628
  result: undefined } }]).value);
1588
1629
  __compactRuntime.assert(balance_0 >= amount_0, 'insufficient balance');
1589
- this._sendUnshielded_0(context,
1590
- partialProofData,
1591
- this._nativeToken_0(),
1592
- amount_0,
1593
- this._right_1({ bytes: owner_0 }));
1630
+ await this._sendUnshielded_0(context,
1631
+ partialProofData,
1632
+ this._nativeToken_0(),
1633
+ amount_0,
1634
+ this._right_1({ bytes: owner_0 }));
1594
1635
  let t_0;
1595
1636
  const tmp_0 = (t_0 = amount_0,
1596
1637
  (__compactRuntime.assert(balance_0 >= t_0,
@@ -1603,8 +1644,8 @@ export class Contract {
1603
1644
  pushPath: true,
1604
1645
  path: [
1605
1646
  { tag: 'value',
1606
- value: { value: _descriptor_23.toValue(3n),
1607
- alignment: _descriptor_23.alignment() } }] } },
1647
+ value: { value: _descriptor_24.toValue(3n),
1648
+ alignment: _descriptor_24.alignment() } }] } },
1608
1649
  { push: { storage: false,
1609
1650
  value: __compactRuntime.StateValue.newCell({ value: _descriptor_0.toValue(owner_0),
1610
1651
  alignment: _descriptor_0.alignment() }).encode() } },
@@ -1624,7 +1665,7 @@ export class Contract {
1624
1665
  return true;
1625
1666
  }
1626
1667
  _equal_2(x0, y0) {
1627
- if (x0 !== y0) { return false; }
1668
+ if (!x0.every((x, i) => y0[i] === x)) { return false; }
1628
1669
  return true;
1629
1670
  }
1630
1671
  _equal_3(x0, y0) {
@@ -1640,14 +1681,6 @@ export class Contract {
1640
1681
  return true;
1641
1682
  }
1642
1683
  _equal_6(x0, y0) {
1643
- if (x0 !== y0) { return false; }
1644
- return true;
1645
- }
1646
- _equal_7(x0, y0) {
1647
- if (!x0.every((x, i) => y0[i] === x)) { return false; }
1648
- return true;
1649
- }
1650
- _equal_8(x0, y0) {
1651
1684
  if (!x0.every((x, i) => y0[i] === x)) { return false; }
1652
1685
  return true;
1653
1686
  }
@@ -1656,7 +1689,7 @@ export function ledger(stateOrChargedState) {
1656
1689
  const state = stateOrChargedState instanceof __compactRuntime.StateValue ? stateOrChargedState : stateOrChargedState.state;
1657
1690
  const chargedState = stateOrChargedState instanceof __compactRuntime.StateValue ? new __compactRuntime.ChargedState(stateOrChargedState) : stateOrChargedState;
1658
1691
  const context = {
1659
- currentQueryContext: new __compactRuntime.QueryContext(chargedState, __compactRuntime.dummyContractAddress()),
1692
+ callContext: { currentQueryContext: new __compactRuntime.QueryContext(chargedState, __compactRuntime.dummyContractAddress()), currentGasCost: __compactRuntime.emptyRunningCost() },
1660
1693
  costModel: __compactRuntime.CostModel.initialCostModel()
1661
1694
  };
1662
1695
  const partialProofData = {
@@ -1679,8 +1712,8 @@ export function ledger(stateOrChargedState) {
1679
1712
  pushPath: false,
1680
1713
  path: [
1681
1714
  { tag: 'value',
1682
- value: { value: _descriptor_23.toValue(0n),
1683
- alignment: _descriptor_23.alignment() } }] } },
1715
+ value: { value: _descriptor_24.toValue(0n),
1716
+ alignment: _descriptor_24.alignment() } }] } },
1684
1717
  'size',
1685
1718
  { push: { storage: false,
1686
1719
  value: __compactRuntime.StateValue.newCell({ value: _descriptor_2.toValue(0n),
@@ -1701,8 +1734,8 @@ export function ledger(stateOrChargedState) {
1701
1734
  pushPath: false,
1702
1735
  path: [
1703
1736
  { tag: 'value',
1704
- value: { value: _descriptor_23.toValue(0n),
1705
- alignment: _descriptor_23.alignment() } }] } },
1737
+ value: { value: _descriptor_24.toValue(0n),
1738
+ alignment: _descriptor_24.alignment() } }] } },
1706
1739
  'size',
1707
1740
  { popeq: { cached: true,
1708
1741
  result: undefined } }]).value);
@@ -1727,8 +1760,8 @@ export function ledger(stateOrChargedState) {
1727
1760
  pushPath: false,
1728
1761
  path: [
1729
1762
  { tag: 'value',
1730
- value: { value: _descriptor_23.toValue(0n),
1731
- alignment: _descriptor_23.alignment() } }] } },
1763
+ value: { value: _descriptor_24.toValue(0n),
1764
+ alignment: _descriptor_24.alignment() } }] } },
1732
1765
  { push: { storage: false,
1733
1766
  value: __compactRuntime.StateValue.newCell({ value: _descriptor_0.toValue(key_0),
1734
1767
  alignment: _descriptor_0.alignment() }).encode() } },
@@ -1756,8 +1789,8 @@ export function ledger(stateOrChargedState) {
1756
1789
  pushPath: false,
1757
1790
  path: [
1758
1791
  { tag: 'value',
1759
- value: { value: _descriptor_23.toValue(0n),
1760
- alignment: _descriptor_23.alignment() } }] } },
1792
+ value: { value: _descriptor_24.toValue(0n),
1793
+ alignment: _descriptor_24.alignment() } }] } },
1761
1794
  { idx: { cached: false,
1762
1795
  pushPath: false,
1763
1796
  path: [
@@ -1788,8 +1821,8 @@ export function ledger(stateOrChargedState) {
1788
1821
  pushPath: false,
1789
1822
  path: [
1790
1823
  { tag: 'value',
1791
- value: { value: _descriptor_23.toValue(1n),
1792
- alignment: _descriptor_23.alignment() } }] } },
1824
+ value: { value: _descriptor_24.toValue(1n),
1825
+ alignment: _descriptor_24.alignment() } }] } },
1793
1826
  'size',
1794
1827
  { push: { storage: false,
1795
1828
  value: __compactRuntime.StateValue.newCell({ value: _descriptor_2.toValue(0n),
@@ -1810,8 +1843,8 @@ export function ledger(stateOrChargedState) {
1810
1843
  pushPath: false,
1811
1844
  path: [
1812
1845
  { tag: 'value',
1813
- value: { value: _descriptor_23.toValue(1n),
1814
- alignment: _descriptor_23.alignment() } }] } },
1846
+ value: { value: _descriptor_24.toValue(1n),
1847
+ alignment: _descriptor_24.alignment() } }] } },
1815
1848
  'size',
1816
1849
  { popeq: { cached: true,
1817
1850
  result: undefined } }]).value);
@@ -1836,8 +1869,8 @@ export function ledger(stateOrChargedState) {
1836
1869
  pushPath: false,
1837
1870
  path: [
1838
1871
  { tag: 'value',
1839
- value: { value: _descriptor_23.toValue(1n),
1840
- alignment: _descriptor_23.alignment() } }] } },
1872
+ value: { value: _descriptor_24.toValue(1n),
1873
+ alignment: _descriptor_24.alignment() } }] } },
1841
1874
  { push: { storage: false,
1842
1875
  value: __compactRuntime.StateValue.newCell({ value: _descriptor_0.toValue(key_0),
1843
1876
  alignment: _descriptor_0.alignment() }).encode() } },
@@ -1865,8 +1898,8 @@ export function ledger(stateOrChargedState) {
1865
1898
  pushPath: false,
1866
1899
  path: [
1867
1900
  { tag: 'value',
1868
- value: { value: _descriptor_23.toValue(1n),
1869
- alignment: _descriptor_23.alignment() } }] } },
1901
+ value: { value: _descriptor_24.toValue(1n),
1902
+ alignment: _descriptor_24.alignment() } }] } },
1870
1903
  { idx: { cached: false,
1871
1904
  pushPath: false,
1872
1905
  path: [
@@ -1897,8 +1930,8 @@ export function ledger(stateOrChargedState) {
1897
1930
  pushPath: false,
1898
1931
  path: [
1899
1932
  { tag: 'value',
1900
- value: { value: _descriptor_23.toValue(2n),
1901
- alignment: _descriptor_23.alignment() } }] } },
1933
+ value: { value: _descriptor_24.toValue(2n),
1934
+ alignment: _descriptor_24.alignment() } }] } },
1902
1935
  'size',
1903
1936
  { push: { storage: false,
1904
1937
  value: __compactRuntime.StateValue.newCell({ value: _descriptor_2.toValue(0n),
@@ -1919,8 +1952,8 @@ export function ledger(stateOrChargedState) {
1919
1952
  pushPath: false,
1920
1953
  path: [
1921
1954
  { tag: 'value',
1922
- value: { value: _descriptor_23.toValue(2n),
1923
- alignment: _descriptor_23.alignment() } }] } },
1955
+ value: { value: _descriptor_24.toValue(2n),
1956
+ alignment: _descriptor_24.alignment() } }] } },
1924
1957
  'size',
1925
1958
  { popeq: { cached: true,
1926
1959
  result: undefined } }]).value);
@@ -1945,8 +1978,8 @@ export function ledger(stateOrChargedState) {
1945
1978
  pushPath: false,
1946
1979
  path: [
1947
1980
  { tag: 'value',
1948
- value: { value: _descriptor_23.toValue(2n),
1949
- alignment: _descriptor_23.alignment() } }] } },
1981
+ value: { value: _descriptor_24.toValue(2n),
1982
+ alignment: _descriptor_24.alignment() } }] } },
1950
1983
  { push: { storage: false,
1951
1984
  value: __compactRuntime.StateValue.newCell({ value: _descriptor_0.toValue(elem_0),
1952
1985
  alignment: _descriptor_0.alignment() }).encode() } },
@@ -1975,8 +2008,8 @@ export function ledger(stateOrChargedState) {
1975
2008
  pushPath: false,
1976
2009
  path: [
1977
2010
  { tag: 'value',
1978
- value: { value: _descriptor_23.toValue(3n),
1979
- alignment: _descriptor_23.alignment() } }] } },
2011
+ value: { value: _descriptor_24.toValue(3n),
2012
+ alignment: _descriptor_24.alignment() } }] } },
1980
2013
  'size',
1981
2014
  { push: { storage: false,
1982
2015
  value: __compactRuntime.StateValue.newCell({ value: _descriptor_2.toValue(0n),
@@ -1997,8 +2030,8 @@ export function ledger(stateOrChargedState) {
1997
2030
  pushPath: false,
1998
2031
  path: [
1999
2032
  { tag: 'value',
2000
- value: { value: _descriptor_23.toValue(3n),
2001
- alignment: _descriptor_23.alignment() } }] } },
2033
+ value: { value: _descriptor_24.toValue(3n),
2034
+ alignment: _descriptor_24.alignment() } }] } },
2002
2035
  'size',
2003
2036
  { popeq: { cached: true,
2004
2037
  result: undefined } }]).value);
@@ -2023,8 +2056,8 @@ export function ledger(stateOrChargedState) {
2023
2056
  pushPath: false,
2024
2057
  path: [
2025
2058
  { tag: 'value',
2026
- value: { value: _descriptor_23.toValue(3n),
2027
- alignment: _descriptor_23.alignment() } }] } },
2059
+ value: { value: _descriptor_24.toValue(3n),
2060
+ alignment: _descriptor_24.alignment() } }] } },
2028
2061
  { push: { storage: false,
2029
2062
  value: __compactRuntime.StateValue.newCell({ value: _descriptor_0.toValue(key_0),
2030
2063
  alignment: _descriptor_0.alignment() }).encode() } },
@@ -2052,8 +2085,8 @@ export function ledger(stateOrChargedState) {
2052
2085
  pushPath: false,
2053
2086
  path: [
2054
2087
  { tag: 'value',
2055
- value: { value: _descriptor_23.toValue(3n),
2056
- alignment: _descriptor_23.alignment() } }] } },
2088
+ value: { value: _descriptor_24.toValue(3n),
2089
+ alignment: _descriptor_24.alignment() } }] } },
2057
2090
  { idx: { cached: false,
2058
2091
  pushPath: false,
2059
2092
  path: [
@@ -2080,15 +2113,15 @@ export function ledger(stateOrChargedState) {
2080
2113
  pushPath: false,
2081
2114
  path: [
2082
2115
  { tag: 'value',
2083
- value: { value: _descriptor_23.toValue(4n),
2084
- alignment: _descriptor_23.alignment() } }] } },
2116
+ value: { value: _descriptor_24.toValue(4n),
2117
+ alignment: _descriptor_24.alignment() } }] } },
2085
2118
  { popeq: { cached: true,
2086
2119
  result: undefined } }]).value);
2087
2120
  }
2088
2121
  };
2089
2122
  }
2090
2123
  const _emptyContext = {
2091
- currentQueryContext: new __compactRuntime.QueryContext(new __compactRuntime.ContractState().data, __compactRuntime.dummyContractAddress())
2124
+ callContext: { currentQueryContext: new __compactRuntime.QueryContext(new __compactRuntime.ContractState().data, __compactRuntime.dummyContractAddress()), currentGasCost: __compactRuntime.emptyRunningCost() }
2092
2125
  };
2093
2126
  const _dummyContract = new Contract({ });
2094
2127
  export const pureCircuits = {
@@ -2159,6 +2192,25 @@ export const pureCircuits = {
2159
2192
  return _dummyContract._deriveServiceId_0(owner_0, salt_0, price_0);
2160
2193
  }
2161
2194
  };
2162
- export const contractReferenceLocations =
2163
- { tag: 'publicLedgerArray', indices: { } };
2195
+ export const expectedVk = {
2196
+ 'deposit': '3967aa980c22fa7db0111c36ab0580752d1c27d242cbef9461fea2b2c0562566',
2197
+ 'pay': '44146e9d3102fc60deb47d61cc44029424f841c589322d9944b866b9e8d44a34',
2198
+ 'redeem': '13b94ab51c5988bbfd64c2aabd243da27a3ffffe298aa7041ef957480d2fb915',
2199
+ 'registerService': 'dece03cc1c292c0d305f9bd23485399c71336c88d74765f1ab1e53ced6905ff8',
2200
+ 'withdraw': 'a61392d20dae6d8fa2d7faac960b0213b92264c267fbdef1ad3b4415794d12d8',
2201
+ };
2202
+
2203
+ export const circuitSignatures = {
2204
+ 'creditColor': {pure: true, provable: false, argumentTypes: [{tag: 'Struct', name: 'ContractAddress', elements: [{name: 'bytes', type: {tag: 'Bytes', length: 32}}]}], resultType: {tag: 'Bytes', length: 32}},
2205
+ 'deriveReceipt': {pure: true, provable: false, argumentTypes: [{tag: 'Bytes', length: 32}, {tag: 'Bytes', length: 32}], resultType: {tag: 'Bytes', length: 32}},
2206
+ 'deriveServiceId': {pure: true, provable: false, argumentTypes: [{tag: 'Bytes', length: 32}, {tag: 'Bytes', length: 32}, {tag: 'Uint', maxval: '18446744073709551615'}], resultType: {tag: 'Bytes', length: 32}},
2207
+ 'registerService': {pure: false, provable: true, argumentTypes: [{tag: 'Bytes', length: 32}, {tag: 'Uint', maxval: '18446744073709551615'}, {tag: 'Bytes', length: 32}], resultType: {tag: 'Tuple', types: []}},
2208
+ 'deposit': {pure: false, provable: true, argumentTypes: [{tag: 'Uint', maxval: '18446744073709551615'}, {tag: 'Bytes', length: 32}], resultType: {tag: 'Tuple', types: []}},
2209
+ 'pay': {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: 'Bytes', length: 32}], resultType: {tag: 'Tuple', types: []}},
2210
+ 'redeem': {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'}}]}], resultType: {tag: 'Tuple', types: []}},
2211
+ 'withdraw': {pure: false, provable: true, argumentTypes: [{tag: 'Bytes', length: 32}, {tag: 'Uint', maxval: '18446744073709551615'}], resultType: {tag: 'Tuple', types: []}},
2212
+ };
2213
+
2214
+ export const declaredInterfaces = {};
2215
+
2164
2216
  //# sourceMappingURL=index.js.map