// Goal of this file is to inject all necessary device/signer dependency to coin-modules
import { createBridges, } from "@ledgerhq/coin-polkadot";
import Polkadot from "@ledgerhq/hw-app-polkadot";
import polkadotResolver from "@ledgerhq/coin-polkadot/signer/index";
import makeCliTools from "@ledgerhq/coin-polkadot/test/cli";
import { createResolver, executeWithSigner } from "../../bridge/setup";
import { getCurrencyConfiguration } from "../../config";
const createSigner = (transport) => {
    return new Polkadot(transport);
};
const getCurrencyConfig = (currency) => {
    if (!currency) {
        throw new Error("No currency provided");
    }
    return getCurrencyConfiguration(currency);
};
const bridge = createBridges(executeWithSigner(createSigner), getCurrencyConfig);
const resolver = createResolver(createSigner, polkadotResolver);
const cliTools = makeCliTools();
export { bridge, cliTools, resolver };
//# sourceMappingURL=setup.js.map