import { ConnectorsByName , DefaultFlavor , FlavorName } from "@ganache/flavors" ; import ConnectorLoader from "./src/connector-loader" ; import { ProviderOptions , ServerOptions } from "./src/options" ; import Server from "./src/server" ; export { Server , ServerStatus , _DefaultServerOptions } from "./src/server" ; export type { Provider , EthereumProvider , FilecoinProvider } from "@ganache/flavors" ; export type { ProviderOptions , ServerOptions } from "./src/options" ; public const Ganache = { param options returns server : < T extends FlavorName = typeof DefaultFlavor > ( options ? ) => new Server ( options ) , param options returns provider : < T extends FlavorName = typeof DefaultFlavor > ( options ? ) : ConnectorsByName [ T ] [ "provider" ] => { const loader = ConnectorLoader . initialize < T > ( options ) ; return loader . connector . provider ; } } ; public export const server = Ganache . server ; public export const provider = Ganache . provider ; public export default Ganache ;