// Goal of this file is to inject all necessary device/signer dependency to coin-modules
import { createBridges } from "@ledgerhq/coin-tron/bridge";
import tronResolver from "@ledgerhq/coin-tron/signer";
import makeCliTools from "@ledgerhq/coin-tron/test/cli";
import { getCryptoCurrencyById } from "@ledgerhq/cryptoassets";
import Trx from "@ledgerhq/hw-app-trx";
import { createResolver, executeWithSigner } from "../../bridge/setup";
import { getCurrencyConfiguration } from "../../config";
const createSigner = (transport) => {
    const trx = new Trx(transport);
    return {
        getAddress: (path, boolDisplay) => trx.getAddress(path, boolDisplay),
        sign: (path, rawTxHex, tokenSignatures) => trx.signTransaction(path, rawTxHex, tokenSignatures),
    };
};
const getCurrencyConfig = () => {
    return getCurrencyConfiguration(getCryptoCurrencyById("tron"));
};
const bridge = createBridges(executeWithSigner(createSigner), getCurrencyConfig);
const resolver = createResolver(createSigner, tronResolver);
const cliTools = makeCliTools();
export { bridge, cliTools, resolver };
//# sourceMappingURL=setup.js.map