"use strict";
var __importDefault = (this && this.__importDefault) || function (mod) {
    return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.getSigner = void 0;
const getAddress_1 = __importDefault(require("@ledgerhq/coin-xrp/signer/getAddress"));
const setup_1 = require("../../setup");
const hw_app_xrp_1 = __importDefault(require("@ledgerhq/hw-app-xrp"));
const signTransaction_1 = require("./signTransaction");
function getSigner(network) {
    switch (network) {
        case "ripple":
        case "xrp": {
            const createSigner = (transport) => {
                return new hw_app_xrp_1.default(transport);
            };
            return {
                getAddress: (0, getAddress_1.default)((0, setup_1.executeWithSigner)(createSigner)),
                signTransaction: (0, signTransaction_1.signTransaction)((0, setup_1.executeWithSigner)(createSigner)),
                context: (0, setup_1.executeWithSigner)(createSigner),
            };
        }
    }
    throw new Error(`signer for ${network} not implemented`);
}
exports.getSigner = getSigner;
//# sourceMappingURL=index.js.map