app

package
v0.0.0-...-74e6f8a Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 19, 2023 License: Apache-2.0 Imports: 75 Imported by: 0

Documentation

Index

Constants

View Source
const Name = "dkg"

Name is the name of the application

Variables

View Source
var (
	// DefaultNodeHome default home directories for the application daemon
	DefaultNodeHome string

	// ModuleBasics defines the module BasicManager is in charge of setting up basic,
	// non-dependant module elements, such as codec registration
	// and genesis verification.
	ModuleBasics = module.NewBasicManager(
		auth.AppModuleBasic{},
		genutil.AppModuleBasic{},
		bank.AppModuleBasic{},
		capability.AppModuleBasic{},
		staking.AppModuleBasic{},
		mint.AppModuleBasic{},
		distr.AppModuleBasic{},
		gov.NewAppModuleBasic(
			paramsclient.ProposalHandler, distrclient.ProposalHandler, upgradeclient.ProposalHandler, upgradeclient.CancelProposalHandler,
		),
		params.AppModuleBasic{},
		crisis.AppModuleBasic{},
		slashing.AppModuleBasic{},
		feegrantmodule.AppModuleBasic{},
		upgrade.AppModuleBasic{},
		evidence.AppModuleBasic{},
		vesting.AppModuleBasic{},
		ibc.AppModuleBasic{},
		transfer.AppModuleBasic{},
	)
)
View Source
var (
	AccountAddressPrefix   = "cosmos"
	AccountPubKeyPrefix    = AccountAddressPrefix + sdk.PrefixPublic
	ValidatorAddressPrefix = AccountAddressPrefix + sdk.PrefixValidator + sdk.PrefixOperator
	ValidatorPubKeyPrefix  = AccountAddressPrefix + sdk.PrefixValidator + sdk.PrefixOperator + sdk.PrefixPublic
	ConsNodeAddressPrefix  = AccountAddressPrefix + sdk.PrefixValidator + sdk.PrefixConsensus
	ConsNodePubKeyPrefix   = AccountAddressPrefix + sdk.PrefixValidator + sdk.PrefixConsensus + sdk.PrefixPublic
)

Bech32 prefixes

Functions

func MakeEncodingConfig

func MakeEncodingConfig() params.EncodingConfig

MakeEncodingConfig creates an EncodingConfig for testing

func RegisterSwaggerAPI

func RegisterSwaggerAPI(rtr *mux.Router)

RegisterSwaggerAPI registers swagger route with API Server

func SetConfig

func SetConfig()

SetConfig sets the prefix config for the bech32 encoding

Types

type DKGApp

type DKGApp struct {
	*baseapp.BaseApp
	// contains filtered or unexported fields
}

func NewDKGApp

func NewDKGApp(logger log.Logger, db dbm.DB, traceStore io.Writer, loadLatest bool, skipUpgradeHeights map[int64]bool,
	homePath string, invCheckPeriod uint, encodingConfig dkgParams.EncodingConfig,
	appOpts servertypes.AppOptions, baseAppOptions ...func(*bam.BaseApp)) *DKGApp

func (*DKGApp) AppCodec

func (app *DKGApp) AppCodec() codec.Codec

AppCodec returns DKGApp's app codec.

NOTE: This is solely to be used for testing purposes as it may be desirable for modules to register their own custom testing types.

func (*DKGApp) BeginBlocker

func (app *DKGApp) BeginBlocker(ctx sdk.Context, req abci.RequestBeginBlock) abci.ResponseBeginBlock

BeginBlocker calls the BeginBlock() function of every module at the beginning of a new block

func (*DKGApp) EndBlocker

func (app *DKGApp) EndBlocker(ctx sdk.Context, req abci.RequestEndBlock) abci.ResponseEndBlock

EndBlocker calls the EndBlock() function of every module at the end of a block

func (*DKGApp) ExportAppStateAndValidators

func (app *DKGApp) ExportAppStateAndValidators(forZeroHeight bool, jailAllowedAddrs []string) (servertypes.ExportedApp, error)

ExportAppStateAndValidators exports the state of the application for a genesis file.

func (*DKGApp) InitChainer

func (app *DKGApp) InitChainer(ctx sdk.Context, req abci.RequestInitChain) abci.ResponseInitChain

InitChainer handles the chain initialization from a genesis file

func (*DKGApp) LegacyAmino

func (app *DKGApp) LegacyAmino() *codec.LegacyAmino

LegacyAmino returns DKGApp's amino codec.

NOTE: This is solely to be used for testing purposes as it may be desirable for modules to register their own custom testing types.

func (*DKGApp) LoadHeight

func (app *DKGApp) LoadHeight(height int64) error

LoadHeight loads the application version at a given height. It will panic if called more than once on a running baseapp.

func (*DKGApp) ModuleAccountAddrs

func (app *DKGApp) ModuleAccountAddrs() map[string]bool

ModuleAccountAddrs returns all the app's module account addresses.

func (*DKGApp) RegisterAPIRoutes

func (app *DKGApp) RegisterAPIRoutes(apiSvr *api.Server, apiConfig config.APIConfig)

RegisterAPIRoutes registers all application module routes with the provided API server.

func (*DKGApp) RegisterTendermintService

func (app *DKGApp) RegisterTendermintService(clientCtx client.Context)

RegisterTendermintService implements the Application.RegisterTendermintService method.

func (*DKGApp) RegisterTxService

func (app *DKGApp) RegisterTxService(clientCtx client.Context)

RegisterTxService implements the Application.RegisterTxService method.

type GenesisState

type GenesisState map[string]json.RawMessage

GenesisState represents chain state at the start of the chain. Any initial state (account balances) are stored here.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL