"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const webBase = require("@gny/web-base");
const web_base_1 = require("@gny/web-base");
function createTransactionEx(params) {
    if (!params.secret)
        throw new Error('Secret needed');
    const keys = webBase.getKeys(params.secret);
    if (params.secondSecret) {
        const secondKeys = webBase.getKeys(params.secondSecret);
        return web_base_1.TransactionWebBase.create({
            keypair: keys.keypair,
            secondKeypair: secondKeys.keypair,
            type: params.type,
            fee: String(params.fee),
            message: params.message,
            args: params.args,
        });
    }
    return web_base_1.TransactionWebBase.create({
        keypair: keys.keypair,
        type: params.type,
        fee: String(params.fee),
        message: params.message,
        args: params.args,
    });
}
exports.createTransactionEx = createTransactionEx;
//# sourceMappingURL=transaction.js.map