"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.batchConfigureCollateralParams = exports.unverifyTranche = exports.verifyTranche = exports.setGlobalAdmin = void 0;
const contract_getters_1 = require("./contract-getters");
async function setGlobalAdmin(params, callback) {
    const lendingPoolAddressesProvider = await contract_getters_1.getLendingPoolAddressesProvider({
        signer: params.signer,
        network: params.network,
        test: params.test,
        providerRpc: params.providerRpc,
    });
    const tx = await lendingPoolAddressesProvider.setGlobalAdmin(params.newGlobalAdmin);
    if (callback) {
        await callback();
    }
    return tx;
}
exports.setGlobalAdmin = setGlobalAdmin;
async function verifyTranche(params, callback) {
    const lendingPoolConfigurator = await contract_getters_1.getLendingPoolConfiguratorProxy({
        signer: params.signer,
        network: params.network,
        test: params.test,
        providerRpc: params.providerRpc,
    });
    const tx = await lendingPoolConfigurator.verifyTranche(params.trancheId);
    if (callback) {
        await callback();
    }
    return tx;
}
exports.verifyTranche = verifyTranche;
async function unverifyTranche(params, callback) {
    const lendingPoolConfigurator = await contract_getters_1.getLendingPoolConfiguratorProxy({
        signer: params.signer,
        network: params.network,
        test: params.test,
        providerRpc: params.providerRpc,
    });
    const tx = await lendingPoolConfigurator.unverifyTranche(params.trancheId);
    if (callback) {
        await callback();
    }
    return tx;
}
exports.unverifyTranche = unverifyTranche;
async function batchConfigureCollateralParams(params, callback) {
    const lendingPoolConfigurator = await contract_getters_1.getLendingPoolConfiguratorProxy({
        signer: params.signer,
        network: params.network,
        test: params.test,
        providerRpc: params.providerRpc,
    });
    const tx = await lendingPoolConfigurator.batchConfigureCollateralParams(params.input, params.trancheId);
    if (callback) {
        await callback();
    }
    return tx;
}
exports.batchConfigureCollateralParams = batchConfigureCollateralParams;
//# sourceMappingURL=admin.js.map