"use strict";
// Goal of this file is to inject all necessary device/signer dependency to coin-modules
var __importDefault = (this && this.__importDefault) || function (mod) {
    return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.resolver = exports.cliTools = exports.bridge = void 0;
const index_1 = require("@ledgerhq/coin-icon/bridge/index");
const cli_transaction_1 = __importDefault(require("@ledgerhq/coin-icon/cli-transaction"));
const hw_getAddress_1 = __importDefault(require("@ledgerhq/coin-icon/hw-getAddress"));
const hw_app_icon_1 = __importDefault(require("@ledgerhq/hw-app-icon"));
const setup_1 = require("../../bridge/setup");
const live_env_1 = require("@ledgerhq/live-env");
const createSigner = (transport) => {
    return new hw_app_icon_1.default(transport);
};
const getCurrencyConfig = () => {
    return {
        status: {
            type: "active",
        },
        infra: {
            indexer: (0, live_env_1.getEnv)("ICON_INDEXER_ENDPOINT"),
            indexer_testnet: (0, live_env_1.getEnv)("ICON_TESTNET_INDEXER_ENDPOINT"),
            node_endpoint: (0, live_env_1.getEnv)("ICON_NODE_ENDPOINT"),
            node_testnet_endpoint: (0, live_env_1.getEnv)("ICON_TESTNET_NODE_ENDPOINT"),
            debug_endpoint: (0, live_env_1.getEnv)("ICON_DEBUG_ENDPOINT"),
            debug_testnet_endpoint: (0, live_env_1.getEnv)("ICON_TESTNET_DEBUG_ENDPOINT"),
        },
    };
};
const bridge = (0, index_1.createBridges)((0, setup_1.executeWithSigner)(createSigner), getCurrencyConfig);
exports.bridge = bridge;
const resolver = (0, setup_1.createResolver)(createSigner, hw_getAddress_1.default);
exports.resolver = resolver;
const cliTools = (0, cli_transaction_1.default)();
exports.cliTools = cliTools;
//# sourceMappingURL=setup.js.map