package types import ( "encoding/json" "io" "github.com/gogo/protobuf/grpc" abci "github.com/tendermint/tendermint/abci/types" "github.com/tendermint/tendermint/libs/log" tmtypes "github.com/tendermint/tendermint/types" dbm "github.com/tendermint/tm-db" "github.com/cosmos/cosmos-sdk/server/api" ) type ( // AppOptions defines an interface that is passed into an application // constructor, typically used to set BaseApp options that are either supplied // via config file or through CLI arguments/flags. The underlying implementation // is defined by the server package and is typically implemented via a Viper // literal defined on the server Context. Note, casting Get calls may not yield // the expected types and could result in type assertion errors. It is recommend // to either use the cast package or perform manual conversion for safety. AppOptions interface { Get(string) interface{} } // Application defines an application interface that wraps abci.Application. // The interface defines the necessary contracts to be implemented in order // to fully bootstrap and start an application. Application interface { abci.Application RegisterAPIRoutes(*api.Server) // RegisterGRPCServer registers gRPC services directly with the gRPC // server. RegisterGRPCServer(grpc.Server) } // AppCreator is a function that allows us to lazily initialize an // application using various configurations. AppCreator func(log.Logger, dbm.DB, io.Writer, AppOptions) Application // AppExporter is a function that dumps all app state to // JSON-serializable structure and returns the current validator set. AppExporter func(log.Logger, dbm.DB, io.Writer, int64, bool, []string) (json.RawMessage, []tmtypes.GenesisValidator, *abci.ConsensusParams, error) )