Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AddGenesisAccountCmd ¶
AddGenesisAccountCmd returns add-genesis-account cobra Command.
func SetPrefixes ¶
func SetPrefixes(accountAddressPrefix string)
Types ¶
type App ¶
type App interface {
servertypes.Application
ExportableApp
}
App represents a Cosmos SDK application that can be run as a server and with an exportable state
type AppBuilder ¶
type AppBuilder func( logger log.Logger, db dbm.DB, traceStore io.Writer, loadLatest bool, skipUpgradeHeights map[int64]bool, homePath string, invCheckPeriod uint, encodingConfig EncodingConfig, appOpts servertypes.AppOptions, baseAppOptions ...func(*baseapp.BaseApp), ) App
AppBuilder is a method that allows to build an app
type CosmosApp ¶
type CosmosApp interface {
// Name is the assigned name of the app.
Name() string
// The application types codec.
// NOTE: This should be sealed before being returned.
LegacyAmino() *codec.LegacyAmino
// BeginBlocker updates every begin block.
BeginBlocker(ctx sdk.Context, req abci.RequestBeginBlock) abci.ResponseBeginBlock
// EndBlocker updates every end block.
EndBlocker(ctx sdk.Context, req abci.RequestEndBlock) abci.ResponseEndBlock
// InitChainer updates at chain (i.e app) initialization.
InitChainer(ctx sdk.Context, req abci.RequestInitChain) abci.ResponseInitChain
// LoadHeight loads the app at a given height.
LoadHeight(height int64) error
// ExportAppStateAndValidators exports the state of the application for a genesis file.
ExportAppStateAndValidators(
forZeroHeight bool, jailAllowedAddrs []string,
) (types.ExportedApp, error)
// ModuleAccountAddrs are registered module account addreses.
ModuleAccountAddrs() map[string]bool
}
CosmosApp implements the common methods for a Cosmos SDK-based application specific blockchain.
type EncodingConfig ¶
type EncodingConfig struct {
InterfaceRegistry types.InterfaceRegistry
Marshaler codec.Codec
TxConfig client.TxConfig
Amino *codec.LegacyAmino
}
EncodingConfig specifies the concrete encoding types to use for a given app. This is provided for compatibility between protobuf and amino implementations.
func MakeEncodingConfig ¶
func MakeEncodingConfig(moduleBasics module.BasicManager) EncodingConfig
MakeEncodingConfig creates an EncodingConfig for testing
func NewRootCmd ¶
func NewRootCmd( appName, accountAddressPrefix, defaultNodeHome, defaultChainID string, moduleBasics module.BasicManager, buildApp AppBuilder, options ...Option, ) (*cobra.Command, EncodingConfig)
NewRootCmd creates a new root command for a Cosmos SDK application
type ExportableApp ¶
type ExportableApp interface {
ExportAppStateAndValidators(
forZeroHeight bool,
jailAllowedAddrs []string,
) (servertypes.ExportedApp, error)
LoadHeight(height int64) error
}
ExportableApp represents an app with an exportable state
type Option ¶
type Option func(*rootOptions)
Option configures root command option.
func CustomizeStartCmd ¶
CustomizeStartCmd accepts a handler to customize the start command.
func WithEnvPrefix ¶
WithEnvPrefix accepts a new prefix for environment variables.