"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.getAlpacaApi = void 0;
const index_1 = require("@ledgerhq/coin-xrp/api/index");
const config_1 = require("../../../config");
const currencies_1 = require("@ledgerhq/cryptoassets/currencies");
const network_alpaca_1 = require("./network/network-alpaca");
function getAlpacaApi(network, kind) {
    if (kind === "local") {
        switch (network) {
            case "ripple":
            case "xrp":
                return (0, index_1.createApi)((0, config_1.getCurrencyConfiguration)((0, currencies_1.getCryptoCurrencyById)("ripple")));
            // as unknown as Api<any>; // FIXME: createXrpApi returns a strongly typed Api<XrpSender>, fix Api<any> to allow it
        }
    }
    return (0, network_alpaca_1.getNetworkAlpacaApi)(network);
}
exports.getAlpacaApi = getAlpacaApi;
//# sourceMappingURL=index.js.map