"use strict";
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
    if (k2 === undefined) k2 = k;
    Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
}) : (function(o, m, k, k2) {
    if (k2 === undefined) k2 = k;
    o[k2] = m[k];
}));
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
    Object.defineProperty(o, "default", { enumerable: true, value: v });
}) : function(o, v) {
    o["default"] = v;
});
var __importStar = (this && this.__importStar) || function (mod) {
    if (mod && mod.__esModule) return mod;
    var result = {};
    if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
    __setModuleDefault(result, mod);
    return result;
};
var __importDefault = (this && this.__importDefault) || function (mod) {
    return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.createDepositTransaction = exports.createSetOutcomeTransaction = exports.createClaimAllTransaction = exports.createTransferAllTransaction = void 0;
var ethers_1 = require("ethers");
var ETHAssetHolder_json_1 = __importDefault(require("../../../artifacts/contracts/ETHAssetHolder.sol/ETHAssetHolder.json"));
var assetHolderTransactionCreator = __importStar(require("./asset-holder"));
var EthAssetHolderContractInterface = new ethers_1.ethers.utils.Interface(ETHAssetHolder_json_1.default.abi);
function createTransferAllTransaction(channelId, allocation) {
    return assetHolderTransactionCreator.createTransferAllTransaction(EthAssetHolderContractInterface, channelId, allocation);
}
exports.createTransferAllTransaction = createTransferAllTransaction;
function createClaimAllTransaction(channelId, guarantee, allocation) {
    return assetHolderTransactionCreator.createClaimAllTransaction(EthAssetHolderContractInterface, channelId, guarantee, allocation);
}
exports.createClaimAllTransaction = createClaimAllTransaction;
function createSetOutcomeTransaction(channelId, outcome) {
    return assetHolderTransactionCreator.createSetOutcomeTransaction(EthAssetHolderContractInterface, channelId, outcome);
}
exports.createSetOutcomeTransaction = createSetOutcomeTransaction;
function createDepositTransaction(destination, expectedHeld, amount) {
    var data = EthAssetHolderContractInterface.encodeFunctionData('deposit', [
        destination,
        expectedHeld,
        amount,
    ]);
    return { data: data };
}
exports.createDepositTransaction = createDepositTransaction;
//# sourceMappingURL=eth-asset-holder.js.map