"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.tezosSignTransaction = exports.stellarSignTransaction = exports.signTransaction = void 0;
const signTransaction = (signerContext) => {
    return async (deviceId, { path, rawTxHex }) => {
        const signedTx = await signerContext(deviceId, signer => signer.signTransaction(path, rawTxHex));
        return signedTx;
    };
};
exports.signTransaction = signTransaction;
const stellarSignTransaction = (signerContext) => {
    return async (deviceId, { path, transaction }) => {
        const signedTx = await signerContext(deviceId, signer => signer.signTransaction(path, transaction));
        return signedTx.signature.toString("base64"); // It should return a Buffer
    };
};
exports.stellarSignTransaction = stellarSignTransaction;
const tezosSignTransaction = (signerContext) => {
    return async (deviceId, { path, rawTxHex }) => {
        const signed = await signerContext(deviceId, signer => signer.signOperation(path, rawTxHex, {}));
        return signed.signature;
    };
};
exports.tezosSignTransaction = tezosSignTransaction;
//# sourceMappingURL=signTransaction.js.map