"use strict";
/* eslint-disable-next-line no-unused-vars */
function __export(m) {
/* eslint-disable-next-line no-prototype-builtins */
    for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p];
}
Object.defineProperty(exports, "__esModule", { value: true });
/* eslint-disable-next-line no-unused-vars */
var jtv = require('@mojotech/json-type-validation');
/* eslint-disable-next-line no-unused-vars */
var damlTypes = require('@daml/types');

var pkg3ca1343ab26b453d38c8adb70dca5f1ead8440c42b59b68f070786955cbf9ec1 = require('../../..');
var pkg7804375fe5e4c6d5afe067bd314c42fe0b7d005a1300019c73154dd939da4dda = require('../../../Splice/Api/FeaturedAppRightV1');
var pkg9e70a8b3510d617f8a136213f33d6a903a10ca0eeec76bb06ba55d1ed9680f69 = require('../../../DA/Internal/Template');


exports.PersonalAirdrop_Archive = {
  decoder: damlTypes.lazyMemo(function () { return jtv.object({actor: damlTypes.Party.decoder, }); }),
  encode: function (__typed__) {
  return {
    actor: damlTypes.Party.encode(__typed__.actor),
  };
}
,
};



exports.PersonalAirdrop_ExecuteTransfer = {
  decoder: damlTypes.lazyMemo(function () { return jtv.object({amuletInputs: damlTypes.List(damlTypes.ContractId(pkg3ca1343ab26b453d38c8adb70dca5f1ead8440c42b59b68f070786955cbf9ec1.Amulet)).decoder, openMiningRoundCid: damlTypes.ContractId(pkg3ca1343ab26b453d38c8adb70dca5f1ead8440c42b59b68f070786955cbf9ec1.OpenMiningRound).decoder, amount: damlTypes.Numeric(10).decoder, numberOfTransfers: damlTypes.Int.decoder, optMergeAmuletInputs: jtv.Decoder.withDefault(null, damlTypes.Optional(damlTypes.List(damlTypes.ContractId(pkg3ca1343ab26b453d38c8adb70dca5f1ead8440c42b59b68f070786955cbf9ec1.Amulet))).decoder), amuletRulesCidOverride: jtv.Decoder.withDefault(null, damlTypes.Optional(damlTypes.ContractId(pkg3ca1343ab26b453d38c8adb70dca5f1ead8440c42b59b68f070786955cbf9ec1.AmuletRules)).decoder), }); }),
  encode: function (__typed__) {
  return {
    amuletInputs: damlTypes.List(damlTypes.ContractId(pkg3ca1343ab26b453d38c8adb70dca5f1ead8440c42b59b68f070786955cbf9ec1.Amulet)).encode(__typed__.amuletInputs),
    openMiningRoundCid: damlTypes.ContractId(pkg3ca1343ab26b453d38c8adb70dca5f1ead8440c42b59b68f070786955cbf9ec1.OpenMiningRound).encode(__typed__.openMiningRoundCid),
    amount: damlTypes.Numeric(10).encode(__typed__.amount),
    numberOfTransfers: damlTypes.Int.encode(__typed__.numberOfTransfers),
    optMergeAmuletInputs: damlTypes.Optional(damlTypes.List(damlTypes.ContractId(pkg3ca1343ab26b453d38c8adb70dca5f1ead8440c42b59b68f070786955cbf9ec1.Amulet))).encode(__typed__.optMergeAmuletInputs),
    amuletRulesCidOverride: damlTypes.Optional(damlTypes.ContractId(pkg3ca1343ab26b453d38c8adb70dca5f1ead8440c42b59b68f070786955cbf9ec1.AmuletRules)).encode(__typed__.amuletRulesCidOverride),
  };
}
,
};



exports.PersonalAirdrop = damlTypes.assembleTemplate(
{
  templateId: '#CantonPayments:CantonPayments.Airdrop.PersonalAirdrop:PersonalAirdrop',
  templateIdWithPackageId: '0f7d516dfca2f1bf5a73da756d4a2b69a5ed96cbb8275989fc3bdd862c6f71d3:CantonPayments.Airdrop.PersonalAirdrop:PersonalAirdrop',
  keyDecoder: damlTypes.lazyMemo(function () { return jtv.constant(undefined); }),
  keyEncode: function () { throw 'EncodeError'; },
  decoder: damlTypes.lazyMemo(function () { return jtv.object({dso: damlTypes.Party.decoder, sender: damlTypes.Party.decoder, provider: damlTypes.Party.decoder, featuredAppRight: damlTypes.ContractId(pkg3ca1343ab26b453d38c8adb70dca5f1ead8440c42b59b68f070786955cbf9ec1.FeaturedAppRight).decoder, amuletRulesCid: damlTypes.ContractId(pkg3ca1343ab26b453d38c8adb70dca5f1ead8440c42b59b68f070786955cbf9ec1.AmuletRules).decoder, appRewardBeneficiaries: damlTypes.List(pkg7804375fe5e4c6d5afe067bd314c42fe0b7d005a1300019c73154dd939da4dda.AppRewardBeneficiary).decoder, recipient: damlTypes.Party.decoder, }); }),
  encode: function (__typed__) {
  return {
    dso: damlTypes.Party.encode(__typed__.dso),
    sender: damlTypes.Party.encode(__typed__.sender),
    provider: damlTypes.Party.encode(__typed__.provider),
    featuredAppRight: damlTypes.ContractId(pkg3ca1343ab26b453d38c8adb70dca5f1ead8440c42b59b68f070786955cbf9ec1.FeaturedAppRight).encode(__typed__.featuredAppRight),
    amuletRulesCid: damlTypes.ContractId(pkg3ca1343ab26b453d38c8adb70dca5f1ead8440c42b59b68f070786955cbf9ec1.AmuletRules).encode(__typed__.amuletRulesCid),
    appRewardBeneficiaries: damlTypes.List(pkg7804375fe5e4c6d5afe067bd314c42fe0b7d005a1300019c73154dd939da4dda.AppRewardBeneficiary).encode(__typed__.appRewardBeneficiaries),
    recipient: damlTypes.Party.encode(__typed__.recipient),
  };
}
,
  PersonalAirdrop_Archive: {
    template: function () { return exports.PersonalAirdrop; },
    choiceName: 'PersonalAirdrop_Archive',
    argumentDecoder: damlTypes.lazyMemo(function () { return exports.PersonalAirdrop_Archive.decoder; }),
    argumentEncode: function (__typed__) { return exports.PersonalAirdrop_Archive.encode(__typed__); },
    resultDecoder: damlTypes.lazyMemo(function () { return damlTypes.Unit.decoder; }),
    resultEncode: function (__typed__) { return damlTypes.Unit.encode(__typed__); },
  },
  PersonalAirdrop_ExecuteTransfer: {
    template: function () { return exports.PersonalAirdrop; },
    choiceName: 'PersonalAirdrop_ExecuteTransfer',
    argumentDecoder: damlTypes.lazyMemo(function () { return exports.PersonalAirdrop_ExecuteTransfer.decoder; }),
    argumentEncode: function (__typed__) { return exports.PersonalAirdrop_ExecuteTransfer.encode(__typed__); },
    resultDecoder: damlTypes.lazyMemo(function () { return pkg3ca1343ab26b453d38c8adb70dca5f1ead8440c42b59b68f070786955cbf9ec1.TransferResult.decoder; }),
    resultEncode: function (__typed__) { return pkg3ca1343ab26b453d38c8adb70dca5f1ead8440c42b59b68f070786955cbf9ec1.TransferResult.encode(__typed__); },
  },
  Archive: {
    template: function () { return exports.PersonalAirdrop; },
    choiceName: 'Archive',
    argumentDecoder: damlTypes.lazyMemo(function () { return pkg9e70a8b3510d617f8a136213f33d6a903a10ca0eeec76bb06ba55d1ed9680f69.DA.Internal.Template.Archive.decoder; }),
    argumentEncode: function (__typed__) { return pkg9e70a8b3510d617f8a136213f33d6a903a10ca0eeec76bb06ba55d1ed9680f69.DA.Internal.Template.Archive.encode(__typed__); },
    resultDecoder: damlTypes.lazyMemo(function () { return damlTypes.Unit.decoder; }),
    resultEncode: function (__typed__) { return damlTypes.Unit.encode(__typed__); },
  },
}

);


damlTypes.registerTemplate(exports.PersonalAirdrop, ['0f7d516dfca2f1bf5a73da756d4a2b69a5ed96cbb8275989fc3bdd862c6f71d3', '#CantonPayments']);

