"use strict";
var __importDefault = (this && this.__importDefault) || function (mod) {
    return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
const LiveConfig_1 = require("@ledgerhq/live-config/LiveConfig");
const live_env_1 = require("@ledgerhq/live-env");
const logs_1 = require("@ledgerhq/logs");
const winston_1 = __importDefault(require("winston"));
const sharedConfig_1 = require("../../config/sharedConfig");
const currencies_1 = require("../../currencies");
const constants_1 = require("../../wallet-api/constants");
const version_1 = require("../../wallet-api/version");
(0, version_1.setWalletAPIVersion)(constants_1.WALLET_API_VERSION);
(0, currencies_1.setSupportedCurrencies)([
    "avalanche_c_chain",
    "axelar",
    "stargaze",
    "secret_network",
    "umee",
    "desmos",
    "dydx",
    "onomy",
    "sei_network",
    "quicksilver",
    "persistence",
    "bitcoin",
    "ethereum",
    "bsc",
    "polygon",
    "elrond",
    "ripple",
    "bitcoin_cash",
    "litecoin",
    "dash",
    "ethereum_classic",
    "tezos",
    "qtum",
    "zcash",
    "bitcoin_gold",
    "stratis",
    "dogecoin",
    "digibyte",
    "komodo",
    "zencash",
    "decred",
    "tron",
    "stellar",
    "cosmos",
    "algorand",
    "polkadot",
    "assethub_polkadot",
    "bitcoin_testnet",
    "bitcoin_regtest",
    "ethereum_sepolia",
    "ethereum_holesky",
    "ethereum_hoodi",
    "crypto_org_croeseid",
    "crypto_org",
    "filecoin",
    "solana",
    "celo",
    "hedera",
    "cardano",
    "cardano_testnet",
    "osmosis",
    "filecoin",
    "fantom",
    "core",
    "cronos",
    "moonbeam",
    "songbird",
    "flare",
    "near",
    "icon",
    "icon_berlin_testnet",
    "optimism",
    "optimism_sepolia",
    "arbitrum",
    "arbitrum_sepolia",
    "rsk",
    "bittorrent",
    "energy_web",
    "astar",
    "metis",
    "boba",
    "moonriver",
    "velas_evm",
    "syscoin",
    "internet_computer",
    "klaytn",
    "polygon_zk_evm",
    "polygon_zk_evm_testnet",
    "base",
    "base_sepolia",
    "stacks",
    "telos_evm",
    "sei_evm",
    "berachain",
    "hyperevm",
    "coreum",
    "injective",
    "vechain",
    "casper",
    "neon_evm",
    "lukso",
    "linea",
    "linea_sepolia",
    "blast",
    "blast_sepolia",
    "scroll",
    "scroll_sepolia",
    "ton",
    "etherlink",
    "zksync",
    "zksync_sepolia",
    "mantra",
    "aptos",
    "aptos_testnet",
    "xion",
    "sui",
    "zenrock",
    "sonic",
    "sonic_blaze",
    "mina",
    "babylon",
    "canton_network",
    "canton_network_devnet",
    "canton_network_testnet",
    "kaspa",
    "monad",
    "monad_testnet",
    "somnia",
    "zero_gravity",
    "concordium",
    "concordium_testnet",
]);
LiveConfig_1.LiveConfig.setConfig(sharedConfig_1.liveConfig);
for (const k in process.env)
    (0, live_env_1.setEnvUnsafe)(k, process.env[k]);
const { VERBOSE, VERBOSE_FILE } = process.env;
const logger = winston_1.default.createLogger({
    level: "debug",
    transports: [],
});
const { format } = winston_1.default;
const { combine, timestamp, json } = format;
const winstonFormat = combine(timestamp(), json());
if (VERBOSE_FILE) {
    logger.add(new winston_1.default.transports.File({
        format: winstonFormat,
        filename: VERBOSE_FILE,
        level: "debug",
    }));
}
logger.add(new winston_1.default.transports.Console({
    format: winstonFormat,
    silent: !VERBOSE,
}));
// eslint-disable-next-line no-unused-vars
(0, logs_1.listen)(({ type, message, ...rest }) => {
    logger.log("debug", {
        message: type + (message ? ": " + message : ""),
        // $FlowFixMe
        ...rest,
    });
});
const value = "ll-ci/0.0.0";
(0, live_env_1.setEnv)("LEDGER_CLIENT_VERSION", value);
//# sourceMappingURL=environment.js.map