"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.Airdrop_Execute = {
  decoder: damlTypes.lazyMemo(function () { return jtv.object({transferSpecs: damlTypes.List(exports.RecipientTransferSpec).decoder, initialAmuletInputs: damlTypes.List(damlTypes.ContractId(pkg3ca1343ab26b453d38c8adb70dca5f1ead8440c42b59b68f070786955cbf9ec1.Amulet)).decoder, openMiningRoundCid: damlTypes.ContractId(pkg3ca1343ab26b453d38c8adb70dca5f1ead8440c42b59b68f070786955cbf9ec1.OpenMiningRound).decoder, amountPerTransfer: damlTypes.Numeric(10).decoder, amuletRules: jtv.Decoder.withDefault(null, damlTypes.Optional(damlTypes.ContractId(pkg3ca1343ab26b453d38c8adb70dca5f1ead8440c42b59b68f070786955cbf9ec1.AmuletRules)).decoder), }); }),
  encode: function (__typed__) {
  return {
    transferSpecs: damlTypes.List(exports.RecipientTransferSpec).encode(__typed__.transferSpecs),
    initialAmuletInputs: damlTypes.List(damlTypes.ContractId(pkg3ca1343ab26b453d38c8adb70dca5f1ead8440c42b59b68f070786955cbf9ec1.Amulet)).encode(__typed__.initialAmuletInputs),
    openMiningRoundCid: damlTypes.ContractId(pkg3ca1343ab26b453d38c8adb70dca5f1ead8440c42b59b68f070786955cbf9ec1.OpenMiningRound).encode(__typed__.openMiningRoundCid),
    amountPerTransfer: damlTypes.Numeric(10).encode(__typed__.amountPerTransfer),
    amuletRules: damlTypes.Optional(damlTypes.ContractId(pkg3ca1343ab26b453d38c8adb70dca5f1ead8440c42b59b68f070786955cbf9ec1.AmuletRules)).encode(__typed__.amuletRules),
  };
}
,
};



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



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



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



exports.Airdrop_UpdateConfig = {
  decoder: damlTypes.lazyMemo(function () { return jtv.object({newConfig: exports.AirdropConfig.decoder, }); }),
  encode: function (__typed__) {
  return {
    newConfig: exports.AirdropConfig.encode(__typed__.newConfig),
  };
}
,
};



exports.Airdrop = damlTypes.assembleTemplate(
{
  templateId: '#CantonPayments:CantonPayments.Airdrop.Airdrop:Airdrop',
  templateIdWithPackageId: 'b9b320d4b90b6367688d5eb6134b57c80da1bc8fe99b7b4f923f889da544947d:CantonPayments.Airdrop.Airdrop:Airdrop',
  keyDecoder: damlTypes.lazyMemo(function () { return jtv.constant(undefined); }),
  keyEncode: function () { throw 'EncodeError'; },
  decoder: damlTypes.lazyMemo(function () { return jtv.object({config: exports.AirdropConfig.decoder, joinedParties: damlTypes.List(damlTypes.Party).decoder, observers: damlTypes.List(damlTypes.Party).decoder, }); }),
  encode: function (__typed__) {
  return {
    config: exports.AirdropConfig.encode(__typed__.config),
    joinedParties: damlTypes.List(damlTypes.Party).encode(__typed__.joinedParties),
    observers: damlTypes.List(damlTypes.Party).encode(__typed__.observers),
  };
}
,
  Airdrop_UpdateConfig: {
    template: function () { return exports.Airdrop; },
    choiceName: 'Airdrop_UpdateConfig',
    argumentDecoder: damlTypes.lazyMemo(function () { return exports.Airdrop_UpdateConfig.decoder; }),
    argumentEncode: function (__typed__) { return exports.Airdrop_UpdateConfig.encode(__typed__); },
    resultDecoder: damlTypes.lazyMemo(function () { return damlTypes.Unit.decoder; }),
    resultEncode: function (__typed__) { return damlTypes.Unit.encode(__typed__); },
  },
  Airdrop_Archive: {
    template: function () { return exports.Airdrop; },
    choiceName: 'Airdrop_Archive',
    argumentDecoder: damlTypes.lazyMemo(function () { return exports.Airdrop_Archive.decoder; }),
    argumentEncode: function (__typed__) { return exports.Airdrop_Archive.encode(__typed__); },
    resultDecoder: damlTypes.lazyMemo(function () { return damlTypes.Unit.decoder; }),
    resultEncode: function (__typed__) { return damlTypes.Unit.encode(__typed__); },
  },
  Airdrop_AddObservers: {
    template: function () { return exports.Airdrop; },
    choiceName: 'Airdrop_AddObservers',
    argumentDecoder: damlTypes.lazyMemo(function () { return exports.Airdrop_AddObservers.decoder; }),
    argumentEncode: function (__typed__) { return exports.Airdrop_AddObservers.encode(__typed__); },
    resultDecoder: damlTypes.lazyMemo(function () { return damlTypes.Unit.decoder; }),
    resultEncode: function (__typed__) { return damlTypes.Unit.encode(__typed__); },
  },
  Airdrop_Join: {
    template: function () { return exports.Airdrop; },
    choiceName: 'Airdrop_Join',
    argumentDecoder: damlTypes.lazyMemo(function () { return exports.Airdrop_Join.decoder; }),
    argumentEncode: function (__typed__) { return exports.Airdrop_Join.encode(__typed__); },
    resultDecoder: damlTypes.lazyMemo(function () { return damlTypes.Unit.decoder; }),
    resultEncode: function (__typed__) { return damlTypes.Unit.encode(__typed__); },
  },
  Airdrop_Execute: {
    template: function () { return exports.Airdrop; },
    choiceName: 'Airdrop_Execute',
    argumentDecoder: damlTypes.lazyMemo(function () { return exports.Airdrop_Execute.decoder; }),
    argumentEncode: function (__typed__) { return exports.Airdrop_Execute.encode(__typed__); },
    resultDecoder: damlTypes.lazyMemo(function () { return damlTypes.Unit.decoder; }),
    resultEncode: function (__typed__) { return damlTypes.Unit.encode(__typed__); },
  },
  Archive: {
    template: function () { return exports.Airdrop; },
    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.Airdrop, ['b9b320d4b90b6367688d5eb6134b57c80da1bc8fe99b7b4f923f889da544947d', '#CantonPayments']);



exports.AirdropConfig = {
  decoder: damlTypes.lazyMemo(function () { return jtv.object({sender: damlTypes.Party.decoder, featuredAppRight: jtv.Decoder.withDefault(null, damlTypes.Optional(damlTypes.ContractId(pkg3ca1343ab26b453d38c8adb70dca5f1ead8440c42b59b68f070786955cbf9ec1.FeaturedAppRight)).decoder), amuletRulesCid: damlTypes.ContractId(pkg3ca1343ab26b453d38c8adb70dca5f1ead8440c42b59b68f070786955cbf9ec1.AmuletRules).decoder, dso: damlTypes.Party.decoder, }); }),
  encode: function (__typed__) {
  return {
    sender: damlTypes.Party.encode(__typed__.sender),
    featuredAppRight: damlTypes.Optional(damlTypes.ContractId(pkg3ca1343ab26b453d38c8adb70dca5f1ead8440c42b59b68f070786955cbf9ec1.FeaturedAppRight)).encode(__typed__.featuredAppRight),
    amuletRulesCid: damlTypes.ContractId(pkg3ca1343ab26b453d38c8adb70dca5f1ead8440c42b59b68f070786955cbf9ec1.AmuletRules).encode(__typed__.amuletRulesCid),
    dso: damlTypes.Party.encode(__typed__.dso),
  };
}
,
};



exports.RecipientTransferSpec = {
  decoder: damlTypes.lazyMemo(function () { return jtv.object({recipient: damlTypes.Party.decoder, numberOfTransfers: damlTypes.Int.decoder, appRewardBeneficiaries: damlTypes.List(pkg7804375fe5e4c6d5afe067bd314c42fe0b7d005a1300019c73154dd939da4dda.AppRewardBeneficiary).decoder, }); }),
  encode: function (__typed__) {
  return {
    recipient: damlTypes.Party.encode(__typed__.recipient),
    numberOfTransfers: damlTypes.Int.encode(__typed__.numberOfTransfers),
    appRewardBeneficiaries: damlTypes.List(pkg7804375fe5e4c6d5afe067bd314c42fe0b7d005a1300019c73154dd939da4dda.AppRewardBeneficiary).encode(__typed__.appRewardBeneficiaries),
  };
}
,
};

