import { createApi as createXrpApi } from "@ledgerhq/coin-xrp/api/index";
import { createApi as createStellarApi } from "@ledgerhq/coin-stellar/api/index";
import { createApi as createCantonApi } from "@ledgerhq/coin-canton/api/index";
import { createApi as createTronApi } from "@ledgerhq/coin-tron/api/index";
import { createApi as createEvmApi } from "@ledgerhq/coin-evm/api/index";
import { createApi as createTezosApi } from "@ledgerhq/coin-tezos/api/index";
import { getCurrencyConfiguration } from "../../../config";
import { getNetworkAlpacaApi } from "./network/network-alpaca";
import { findCryptoCurrencyByNetwork } from "../utils";
export function getAlpacaApi(network, kind) {
    if (kind === "local") {
        const currency = findCryptoCurrencyByNetwork(network);
        switch (currency?.family) {
            case "xrp":
                return createXrpApi(getCurrencyConfiguration(currency)); // FIXME: createXrpApi returns a strongly typed Api<XrpSender>, fix Api<any> to allow it
            case "stellar":
                return createStellarApi(getCurrencyConfiguration(currency));
            case "canton":
                return createCantonApi(getCurrencyConfiguration(currency));
            case "tron":
                return createTronApi(getCurrencyConfiguration(currency));
            case "evm":
                return createEvmApi(getCurrencyConfiguration(currency), currency.id);
            case "tezos":
                return createTezosApi(getCurrencyConfiguration(currency));
        }
    }
    return getNetworkAlpacaApi(network);
}
//# sourceMappingURL=index.js.map