github.com/cosmos/cosmos-sdk@v0.50.10/runtime/types.go (about) 1 package runtime 2 3 import ( 4 abci "github.com/cometbft/cometbft/abci/types" 5 6 "github.com/cosmos/cosmos-sdk/codec" 7 "github.com/cosmos/cosmos-sdk/server/types" 8 sdk "github.com/cosmos/cosmos-sdk/types" 9 "github.com/cosmos/cosmos-sdk/types/module" 10 ) 11 12 const ModuleName = "runtime" 13 14 // App implements the common methods for a Cosmos SDK-based application 15 // specific blockchain. 16 type AppI interface { 17 // The assigned name of the app. 18 Name() string 19 20 // The application types codec. 21 // NOTE: This should NOT be sealed before being returned. 22 LegacyAmino() *codec.LegacyAmino 23 24 // Application updates every begin block. 25 BeginBlocker(ctx sdk.Context) (sdk.BeginBlock, error) 26 27 // Application updates every end block. 28 EndBlocker(ctx sdk.Context) (sdk.EndBlock, error) 29 30 // Application update at chain (i.e app) initialization. 31 InitChainer(ctx sdk.Context, req *abci.RequestInitChain) (*abci.ResponseInitChain, error) 32 33 // Loads the app at a given height. 34 LoadHeight(height int64) error 35 36 // Exports the state of the application for a genesis file. 37 ExportAppStateAndValidators(forZeroHeight bool, jailAllowedAddrs, modulesToExport []string) (types.ExportedApp, error) 38 39 // Helper for the simulation framework. 40 SimulationManager() *module.SimulationManager 41 }