"use strict";
var __read = (this && this.__read) || function (o, n) {
    var m = typeof Symbol === "function" && o[Symbol.iterator];
    if (!m) return o;
    var i = m.call(o), r, ar = [], e;
    try {
        while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
    }
    catch (error) { e = { error: error }; }
    finally {
        try {
            if (r && !r.done && (m = i["return"])) m.call(i);
        }
        finally { if (e) throw e.error; }
    }
    return ar;
};
var _a;
Object.defineProperty(exports, "__esModule", { value: true });
exports.walletConnectHooks = exports.walletConnect = void 0;
var core_1 = require("@web3-react/core");
var walletconnect_1 = require("@web3-react/walletconnect");
var constants_1 = require("../constants");
var rpc = {};
Object.keys(constants_1.RPC_URLS).forEach(function (network) {
    var id = constants_1.CHAIN_IDS[network];
    if (!id)
        return;
    rpc[id] = constants_1.RPC_URLS[network];
});
exports.walletConnect = (_a = __read((0, core_1.initializeConnector)(function (actions) {
    return new walletconnect_1.WalletConnect({
        actions: actions,
        options: {
            rpc: rpc,
            bridge: 'https://walletconnect-bridge.1inch.io/',
        },
    });
}), 2), _a[0]), exports.walletConnectHooks = _a[1];
//# sourceMappingURL=walletconnect.js.map