Documentation ¶
Index ¶
- Constants
- func KVStoreAdapter(store store.KVStore) storetypes.KVStore
- func NewEventManager(ctx context.Context) event.Manager
- func NewKVStoreService(storeKey *storetypes.KVStoreKey) store.KVStoreService
- func NewMemStoreService(storeKey *storetypes.MemoryStoreKey) store.MemoryStoreService
- func NewTransientStoreService(storeKey *storetypes.TransientStoreKey) store.TransientStoreService
- func ProvideAddressCodec(in AddressCodecInputs) (address.Codec, ValidatorAddressCodec, ConsensusAddressCodec)
- func ProvideBasicManager(app *AppBuilder) module.BasicManager
- func ProvideCometInfoService() comet.BlockInfoService
- func ProvideEventService() event.Service
- func ProvideGenesisTxHandler(appBuilder *AppBuilder) genesis.TxHandler
- func ProvideHeaderInfoService(app *AppBuilder) header.Service
- func ProvideInterfaceRegistry(addressCodec address.Codec, validatorAddressCodec ValidatorAddressCodec, ...) (codectypes.InterfaceRegistry, error)
- func ProvideKVStoreKey(config *runtimev1alpha1.Module, key depinject.ModuleKey, app *AppBuilder) *storetypes.KVStoreKey
- func ProvideKVStoreService(config *runtimev1alpha1.Module, key depinject.ModuleKey, app *AppBuilder) store.KVStoreService
- func ProvideMemoryStoreKey(key depinject.ModuleKey, app *AppBuilder) *storetypes.MemoryStoreKey
- func ProvideMemoryStoreService(key depinject.ModuleKey, app *AppBuilder) store.MemoryStoreService
- func ProvideTransientStoreKey(key depinject.ModuleKey, app *AppBuilder) *storetypes.TransientStoreKey
- func ProvideTransientStoreService(key depinject.ModuleKey, app *AppBuilder) store.TransientStoreService
- func SetupAppBuilder(inputs AppInputs)
- type AddressCodecInputs
- type App
- func (a *App) BeginBlocker(ctx sdk.Context) (sdk.BeginBlock, error)
- func (a *App) Configurator() module.Configurator
- func (a *App) DefaultGenesis() map[string]json.RawMessage
- func (a *App) EndBlocker(ctx sdk.Context) (sdk.EndBlock, error)
- func (a *App) GetStoreKeys() []storetypes.StoreKey
- func (a *App) InitChainer(ctx sdk.Context, req *abci.RequestInitChain) (*abci.ResponseInitChain, error)
- func (a *App) Load(loadLatest bool) error
- func (a *App) LoadHeight(height int64) error
- func (a *App) PreBlocker(ctx sdk.Context, _ *abci.RequestFinalizeBlock) (*sdk.ResponsePreBlock, error)
- func (a *App) Precommiter(ctx sdk.Context)
- func (a *App) PrepareCheckStater(ctx sdk.Context)
- func (a *App) RegisterAPIRoutes(apiSvr *api.Server, _ config.APIConfig)
- func (a *App) RegisterModules(modules ...module.AppModule) error
- func (a *App) RegisterNodeService(clientCtx client.Context, cfg config.Config)
- func (a *App) RegisterStores(keys ...storetypes.StoreKey) error
- func (a *App) RegisterTendermintService(clientCtx client.Context)
- func (a *App) RegisterTxService(clientCtx client.Context)
- func (a *App) SetInitChainer(initChainer sdk.InitChainer)
- func (a *App) UnsafeFindStoreKey(storeKey string) storetypes.StoreKey
- type AppBuilder
- type AppI
- type AppInputs
- type BaseAppOption
- type ConsensusAddressCodec
- type EventService
- type Events
- type ValidatorAddressCodec
Constants ¶
const ModuleName = "runtime"
Variables ¶
This section is empty.
Functions ¶
func KVStoreAdapter ¶ added in v0.50.0
func KVStoreAdapter(store store.KVStore) storetypes.KVStore
func NewKVStoreService ¶ added in v0.50.0
func NewKVStoreService(storeKey *storetypes.KVStoreKey) store.KVStoreService
func NewMemStoreService ¶ added in v0.50.10
func NewMemStoreService(storeKey *storetypes.MemoryStoreKey) store.MemoryStoreService
func NewTransientStoreService ¶ added in v0.50.7
func NewTransientStoreService(storeKey *storetypes.TransientStoreKey) store.TransientStoreService
func ProvideAddressCodec ¶ added in v0.50.0
func ProvideAddressCodec(in AddressCodecInputs) (address.Codec, ValidatorAddressCodec, ConsensusAddressCodec)
ProvideAddressCodec provides an address.Codec to the container for any modules that want to do address string <> bytes conversion.
func ProvideBasicManager ¶ added in v0.50.0
func ProvideBasicManager(app *AppBuilder) module.BasicManager
func ProvideCometInfoService ¶ added in v0.50.1
func ProvideCometInfoService() comet.BlockInfoService
func ProvideEventService ¶ added in v0.50.0
func ProvideGenesisTxHandler ¶ added in v0.50.0
func ProvideGenesisTxHandler(appBuilder *AppBuilder) genesis.TxHandler
func ProvideHeaderInfoService ¶ added in v0.50.1
func ProvideHeaderInfoService(app *AppBuilder) header.Service
func ProvideInterfaceRegistry ¶ added in v0.50.0
func ProvideInterfaceRegistry(addressCodec address.Codec, validatorAddressCodec ValidatorAddressCodec, customGetSigners []signing.CustomGetSigner) (codectypes.InterfaceRegistry, error)
func ProvideKVStoreKey ¶
func ProvideKVStoreKey(config *runtimev1alpha1.Module, key depinject.ModuleKey, app *AppBuilder) *storetypes.KVStoreKey
func ProvideKVStoreService ¶ added in v0.50.0
func ProvideKVStoreService(config *runtimev1alpha1.Module, key depinject.ModuleKey, app *AppBuilder) store.KVStoreService
func ProvideMemoryStoreKey ¶
func ProvideMemoryStoreKey(key depinject.ModuleKey, app *AppBuilder) *storetypes.MemoryStoreKey
func ProvideMemoryStoreService ¶ added in v0.50.0
func ProvideMemoryStoreService(key depinject.ModuleKey, app *AppBuilder) store.MemoryStoreService
func ProvideTransientStoreKey ¶
func ProvideTransientStoreKey(key depinject.ModuleKey, app *AppBuilder) *storetypes.TransientStoreKey
func ProvideTransientStoreService ¶ added in v0.50.0
func ProvideTransientStoreService(key depinject.ModuleKey, app *AppBuilder) store.TransientStoreService
func SetupAppBuilder ¶
func SetupAppBuilder(inputs AppInputs)
Types ¶
type AddressCodecInputs ¶ added in v0.50.0
type AddressCodecInputs struct { depinject.In AuthConfig *authmodulev1.Module `optional:"true"` StakingConfig *stakingmodulev1.Module `optional:"true"` AddressCodecFactory func() address.Codec `optional:"true"` ValidatorAddressCodecFactory func() ValidatorAddressCodec `optional:"true"` ConsensusAddressCodecFactory func() ConsensusAddressCodec `optional:"true"` }
type App ¶
type App struct { *baseapp.BaseApp ModuleManager *module.Manager // contains filtered or unexported fields }
App is a wrapper around BaseApp and ModuleManager that can be used in hybrid app.go/app config scenarios or directly as a servertypes.Application instance. To get an instance of *App, *AppBuilder must be requested as a dependency in a container which declares the runtime module and the AppBuilder.Build() method must be called.
App can be used to create a hybrid app.go setup where some configuration is done declaratively with an app config and the rest of it is done the old way. See simapp/app.go for an example of this setup.
func (*App) BeginBlocker ¶
BeginBlocker application updates every begin block
func (*App) Configurator ¶
func (a *App) Configurator() module.Configurator
Configurator returns the app's configurator.
func (*App) DefaultGenesis ¶
func (a *App) DefaultGenesis() map[string]json.RawMessage
DefaultGenesis returns a default genesis from the registered AppModuleBasic's.
func (*App) EndBlocker ¶
EndBlocker application updates every end block
func (*App) GetStoreKeys ¶
func (a *App) GetStoreKeys() []storetypes.StoreKey
GetStoreKeys returns all the stored store keys.
func (*App) InitChainer ¶
func (a *App) InitChainer(ctx sdk.Context, req *abci.RequestInitChain) (*abci.ResponseInitChain, error)
InitChainer initializes the chain.
func (*App) LoadHeight ¶
LoadHeight loads a particular height
func (*App) PreBlocker ¶ added in v0.50.0
func (a *App) PreBlocker(ctx sdk.Context, _ *abci.RequestFinalizeBlock) (*sdk.ResponsePreBlock, error)
PreBlocker application updates every pre block
func (*App) Precommiter ¶ added in v0.50.0
Precommiter application updates every commit
func (*App) PrepareCheckStater ¶ added in v0.50.0
PrepareCheckStater application updates every commit
func (*App) RegisterAPIRoutes ¶
RegisterAPIRoutes registers all application module routes with the provided API server.
func (*App) RegisterModules ¶
RegisterModules registers the provided modules with the module manager and the basic module manager. This is the primary hook for integrating with modules which are not registered using the app config.
func (*App) RegisterNodeService ¶
RegisterNodeService registers the node gRPC service on the app gRPC router.
func (*App) RegisterStores ¶ added in v0.47.5
func (a *App) RegisterStores(keys ...storetypes.StoreKey) error
RegisterStores registers the provided store keys. This method should only be used for registering extra stores wiich is necessary for modules that not registered using the app config. To be used in combination of RegisterModules.
func (*App) RegisterTendermintService ¶
RegisterTendermintService implements the Application.RegisterTendermintService method.
func (*App) RegisterTxService ¶
RegisterTxService implements the Application.RegisterTxService method.
func (*App) SetInitChainer ¶
func (a *App) SetInitChainer(initChainer sdk.InitChainer)
SetInitChainer sets the init chainer function It wraps `BaseApp.SetInitChainer` to allow setting a custom init chainer from an app.
func (*App) UnsafeFindStoreKey ¶
func (a *App) UnsafeFindStoreKey(storeKey string) storetypes.StoreKey
UnsafeFindStoreKey fetches a registered StoreKey from the App in linear time.
NOTE: This should only be used in testing.
type AppBuilder ¶
type AppBuilder struct {
// contains filtered or unexported fields
}
AppBuilder is a type that is injected into a container by the runtime module (as *AppBuilder) which can be used to create an app which is compatible with the existing app.go initialization conventions.
func ProvideApp ¶
func ProvideApp(interfaceRegistry codectypes.InterfaceRegistry) ( codec.Codec, *codec.LegacyAmino, *AppBuilder, *baseapp.MsgServiceRouter, *baseapp.GRPCQueryRouter, appmodule.AppModule, protodesc.Resolver, protoregistry.MessageTypeResolver, error, )
func (*AppBuilder) Build ¶
func (a *AppBuilder) Build(db dbm.DB, traceStore io.Writer, baseAppOptions ...func(*baseapp.BaseApp)) *App
Build builds an *App instance.
func (*AppBuilder) DefaultGenesis ¶
func (a *AppBuilder) DefaultGenesis() map[string]json.RawMessage
DefaultGenesis returns a default genesis from the registered AppModuleBasic's.
type AppI ¶
type AppI interface { // The assigned name of the app. Name() string // The application types codec. // NOTE: This should NOT be sealed before being returned. LegacyAmino() *codec.LegacyAmino // Application updates every begin block. BeginBlocker(ctx sdk.Context) (sdk.BeginBlock, error) // Application updates every end block. EndBlocker(ctx sdk.Context) (sdk.EndBlock, error) // Application update at chain (i.e app) initialization. InitChainer(ctx sdk.Context, req *abci.RequestInitChain) (*abci.ResponseInitChain, error) // Loads the app at a given height. LoadHeight(height int64) error // Exports the state of the application for a genesis file. ExportAppStateAndValidators(forZeroHeight bool, jailAllowedAddrs, modulesToExport []string) (types.ExportedApp, error) // Helper for the simulation framework. SimulationManager() *module.SimulationManager }
App implements the common methods for a Cosmos SDK-based application specific blockchain.
type AppInputs ¶
type AppInputs struct { depinject.In AppConfig *appv1alpha1.Config `optional:"true"` Config *runtimev1alpha1.Module AppBuilder *AppBuilder Modules map[string]appmodule.AppModule CustomModuleBasics map[string]module.AppModuleBasic `optional:"true"` BaseAppOptions []BaseAppOption InterfaceRegistry codectypes.InterfaceRegistry LegacyAmino *codec.LegacyAmino Logger log.Logger }
type BaseAppOption ¶
BaseAppOption is a depinject.AutoGroupType which can be used to pass BaseApp options into the depinject. It should be used carefully.
func (BaseAppOption) IsManyPerContainerType ¶
func (b BaseAppOption) IsManyPerContainerType()
IsManyPerContainerType indicates that this is a depinject.ManyPerContainerType.
type ConsensusAddressCodec ¶ added in v0.50.0
ConsensusAddressCodec is an alias for address.Codec for validator consensus addresses.
type EventService ¶ added in v0.50.0
type EventService struct {
Events
}
func (EventService) EventManager ¶ added in v0.50.0
func (es EventService) EventManager(ctx context.Context) event.Manager
type Events ¶ added in v0.50.0
type Events struct {
sdk.EventManagerI
}
func (Events) Emit ¶ added in v0.50.0
Emit emits an typed event that is defined in the protobuf file. In the future these events will be added to consensus.
func (Events) EmitNonConsensus ¶ added in v0.50.0
Emit emits an typed event that is defined in the protobuf file. In the future these events will be added to consensus.
type ValidatorAddressCodec ¶ added in v0.50.0
ValidatorAddressCodec is an alias for address.Codec for validator addresses.