import { NodeProviderTypes } from './interfaces';
import { createWeb3jsProvider } from './web3js.provider';
import { createEtherJSProvider } from './etherjs.provider';
export function createProvider(options) {
    const { type, ...rest } = options;
    switch (type) {
        case NodeProviderTypes.ETHERJS:
            return createEtherJSProvider(rest);
        case NodeProviderTypes.WEB3JS:
            return createWeb3jsProvider(rest);
        default:
            throw new Error(`Unsupported provider type: ${type}`);
    }
}
