"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.messageSigner = exports.cliTools = exports.bridge = void 0;
const js_1 = require("@ledgerhq/coin-ton/bridge/js");
const cli_transaction_1 = __importDefault(require("@ledgerhq/coin-ton/cli-transaction"));
const hw_getAddress_1 = __importDefault(require("@ledgerhq/coin-ton/hw-getAddress"));
const hw_signMessage_1 = require("@ledgerhq/coin-ton/hw-signMessage");
const currencies_1 = require("@ledgerhq/cryptoassets/currencies");
const ton_ledger_1 = require("@ton-community/ton-ledger");
const setup_1 = require("../../bridge/setup");
const config_1 = require("../../config");
const createSigner = (transport) => new ton_ledger_1.TonTransport(transport);
const getCoinConfig = () => (0, config_1.getCurrencyConfiguration)((0, currencies_1.getCryptoCurrencyById)("ton"));
const bridge = (0, js_1.createBridges)((0, setup_1.executeWithSigner)(createSigner), getCoinConfig);
exports.bridge = bridge;
const messageSigner = {
    signMessage: hw_signMessage_1.signMessage,
};
exports.messageSigner = messageSigner;
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