"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 = void 0;
const ledger_signer_1 = require("@taquito/ledger-signer");
const cli_1 = __importDefault(require("@ledgerhq/coin-tezos/test/cli"));
const index_1 = __importDefault(require("@ledgerhq/coin-tezos/signer/index"));
const hw_app_tezos_1 = __importDefault(require("@ledgerhq/hw-app-tezos"));
const setup_1 = require("../../bridge/setup");
const createSigner = (transport) => {
    const xtz = new hw_app_tezos_1.default(transport);
    return {
        getAddress: (path, options) => xtz.getAddress(path, options),
        signOperation: (path, rawTxHex, options) => xtz.signOperation(path, rawTxHex, options),
        // Tezos [LedgerSigner](https://www.npmjs.com/package/@taquito/ledger-signer)
        createLedgerSigner: (path, prompt, derivationType) => {
            return new ledger_signer_1.LedgerSigner(transport, path, prompt, derivationType);
        },
    };
};
const resolver = (0, setup_1.createResolver)(createSigner, index_1.default);
exports.resolver = resolver;
const cliTools = (0, cli_1.default)();
exports.cliTools = cliTools;
//# sourceMappingURL=setup.js.map