import { __extends } from "tslib";
import { createSolanaRpcFromTransport } from "@solana/kit";
// This is abstract base class for creating Solana RPC clients and transports.
var SolanaBaseRpcFactory = /** @class */ (function () {
    function SolanaBaseRpcFactory(chainId) {
        this.chainId = chainId;
    }
    // This method creates a Solana RPC client from the implemented transport.
    SolanaBaseRpcFactory.prototype.createRpcClient = function () {
        return createSolanaRpcFromTransport(this.createTransport());
    };
    return SolanaBaseRpcFactory;
}());
export { SolanaBaseRpcFactory };
// Enhanced class for creating Solana RPC clients and transports storing additional cluster info.
// This can be used by derived classes that are connected to a single base transport.
var SolanaClusterRpcFactory = /** @class */ (function (_super) {
    __extends(SolanaClusterRpcFactory, _super);
    function SolanaClusterRpcFactory(clusterUrl) {
        var baseConstructorParams = [];
        for (var _i = 1; _i < arguments.length; _i++) {
            baseConstructorParams[_i - 1] = arguments[_i];
        }
        var _this = _super.apply(this, baseConstructorParams) || this;
        _this.clusterUrl = clusterUrl;
        return _this;
    }
    return SolanaClusterRpcFactory;
}(SolanaBaseRpcFactory));
export { SolanaClusterRpcFactory };
//# sourceMappingURL=baseRpcFactories.js.map