"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.createProvider = void 0;
const interfaces_1 = require("./interfaces");
const web3js_provider_1 = require("./web3js.provider");
const etherjs_provider_1 = require("./etherjs.provider");
function createProvider(options) {
    const { type, ...rest } = options;
    switch (type) {
        case interfaces_1.NodeProviderTypes.ETHERJS:
            return (0, etherjs_provider_1.createEtherJSProvider)(rest);
        case interfaces_1.NodeProviderTypes.WEB3JS:
            return (0, web3js_provider_1.createWeb3jsProvider)(rest);
        default:
            throw new Error(`Unsupported provider type: ${type}`);
    }
}
exports.createProvider = createProvider;
