Documentation ¶
Index ¶
- func NewNode(app *App, kb *Keybase, cfg *tmconfig.Config, ccfg *config.CosmosConfig) (*node.Node, error)
- type App
- type AppFactory
- func (a *AppFactory) Cdc() *codec.Codec
- func (a *AppFactory) DeliverTx(req abci.RequestDeliverTx) abci.ResponseDeliverTx
- func (a *AppFactory) RegisterModule(module module.AppModule)
- func (a *AppFactory) RegisterOrderBeginBlocks(beginBlockers ...string)
- func (a *AppFactory) RegisterOrderEndBlocks(endBlockers ...string)
- func (a *AppFactory) RegisterOrderInitGenesis(moduleNames ...string)
- func (a *AppFactory) RegisterStoreKey(storeKey *sdk.KVStoreKey)
- func (a *AppFactory) RegisterTransientStoreKey(transientStoreKey *sdk.TransientStoreKey)
- func (a *AppFactory) SetAnteHandler(anteHandler sdk.AnteHandler)
- type AppModule
- func (m AppModule) BeginBlock(_ sdk.Request, _ abci.RequestBeginBlock)
- func (m AppModule) EndBlock(sdk.Request, abci.RequestEndBlock) []abci.ValidatorUpdate
- func (m AppModule) ExportGenesis(request sdk.Request) json.RawMessage
- func (m AppModule) InitGenesis(request sdk.Request, data json.RawMessage) []abci.ValidatorUpdate
- func (m AppModule) NewHandler() sdk.Handler
- func (m AppModule) NewQuerierHandler() sdk.Querier
- func (m AppModule) QuerierRoute() string
- func (m AppModule) RegisterInvariants(ir sdk.InvariantRegistry)
- func (m AppModule) Route() string
- type AppModuleBasic
- func (AppModuleBasic) DefaultGenesis() json.RawMessage
- func (AppModuleBasic) GetQueryCmd(cdc *codec.Codec) *cobra.Command
- func (AppModuleBasic) GetTxCmd(cdc *codec.Codec) *cobra.Command
- func (m AppModuleBasic) Name() string
- func (AppModuleBasic) RegisterCodec(cdc *codec.Codec)
- func (AppModuleBasic) RegisterRESTRoutes(ctx context.CLIContext, rtr *mux.Router)
- func (AppModuleBasic) ValidateGenesis(bz json.RawMessage) error
- type Client
- type Keybase
- type Querier
- type TxBuilder
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type App ¶
App is a loaded Cosmos application that inherit from BaseApp.
func (*App) DefaultGenesis ¶
func (a *App) DefaultGenesis() map[string]json.RawMessage
DefaultGenesis returns the default genesis from the basic manager.
type AppFactory ¶
type AppFactory struct {
// contains filtered or unexported fields
}
AppFactory is a Cosmos application factory.
func NewAppFactory ¶
func NewAppFactory(logger log.Logger, db dbm.DB) *AppFactory
NewAppFactory returns a new AppFactory.
func (*AppFactory) DeliverTx ¶
func (a *AppFactory) DeliverTx(req abci.RequestDeliverTx) abci.ResponseDeliverTx
DeliverTx implement baseApp.DeliverTx
func (*AppFactory) RegisterModule ¶
func (a *AppFactory) RegisterModule(module module.AppModule)
RegisterModule registers a module to the app.
func (*AppFactory) RegisterOrderBeginBlocks ¶
func (a *AppFactory) RegisterOrderBeginBlocks(beginBlockers ...string)
RegisterOrderBeginBlocks sets the order of the modules when they are called on the begin block event.
func (*AppFactory) RegisterOrderEndBlocks ¶
func (a *AppFactory) RegisterOrderEndBlocks(endBlockers ...string)
RegisterOrderEndBlocks sets the order of the modules when they are called on the end block event.
func (*AppFactory) RegisterOrderInitGenesis ¶
func (a *AppFactory) RegisterOrderInitGenesis(moduleNames ...string)
RegisterOrderInitGenesis sets the order of the modules when they are called to initialize the genesis.
func (*AppFactory) RegisterStoreKey ¶
func (a *AppFactory) RegisterStoreKey(storeKey *sdk.KVStoreKey)
RegisterStoreKey registers a store key to the app.
func (*AppFactory) RegisterTransientStoreKey ¶
func (a *AppFactory) RegisterTransientStoreKey(transientStoreKey *sdk.TransientStoreKey)
RegisterTransientStoreKey registers a transient store key to the app.
func (*AppFactory) SetAnteHandler ¶
func (a *AppFactory) SetAnteHandler(anteHandler sdk.AnteHandler)
SetAnteHandler registers the authentication handler to the app.
type AppModule ¶
type AppModule struct { AppModuleBasic // contains filtered or unexported fields }
AppModule is a main element of an cosmos app.
func NewAppModule ¶
func NewAppModule(moduleBasic AppModuleBasic, cdc *codec.Codec, handler sdk.Handler, querier Querier) AppModule
NewAppModule inits an AppModule using an AppModuleBasic, Codec, Handler and Querier.
func (AppModule) BeginBlock ¶
func (m AppModule) BeginBlock(_ sdk.Request, _ abci.RequestBeginBlock)
BeginBlock is called at the beginning of the process of a new block.
func (AppModule) EndBlock ¶
func (m AppModule) EndBlock(sdk.Request, abci.RequestEndBlock) []abci.ValidatorUpdate
EndBlock is called at the end of the process of a new block.
func (AppModule) ExportGenesis ¶
func (m AppModule) ExportGenesis(request sdk.Request) json.RawMessage
ExportGenesis exports the current state of the app.
func (AppModule) InitGenesis ¶
func (m AppModule) InitGenesis(request sdk.Request, data json.RawMessage) []abci.ValidatorUpdate
InitGenesis initializes the genesis from a request and data.
func (AppModule) NewHandler ¶
NewHandler returns the handler used to apply transactions.
func (AppModule) NewQuerierHandler ¶
NewQuerierHandler returns the handler used to reply ABCI query.
func (AppModule) QuerierRoute ¶
QuerierRoute the route prefix for query of the module.
func (AppModule) RegisterInvariants ¶
func (m AppModule) RegisterInvariants(ir sdk.InvariantRegistry)
RegisterInvariants registers invariants to the registry.
type AppModuleBasic ¶
type AppModuleBasic struct {
// contains filtered or unexported fields
}
AppModuleBasic is a basic element of an cosmos app.
func NewAppModuleBasic ¶
func NewAppModuleBasic(name string) AppModuleBasic
NewAppModuleBasic inits an AppModuleBasic using a name.
func (AppModuleBasic) DefaultGenesis ¶
func (AppModuleBasic) DefaultGenesis() json.RawMessage
DefaultGenesis returns the default genesis of the module.
func (AppModuleBasic) GetQueryCmd ¶
func (AppModuleBasic) GetQueryCmd(cdc *codec.Codec) *cobra.Command
GetQueryCmd returns the root query command of this module
func (AppModuleBasic) GetTxCmd ¶
func (AppModuleBasic) GetTxCmd(cdc *codec.Codec) *cobra.Command
GetTxCmd returns the root tx command of this module
func (AppModuleBasic) Name ¶
func (m AppModuleBasic) Name() string
Name returns the name of the module.
func (AppModuleBasic) RegisterCodec ¶
func (AppModuleBasic) RegisterCodec(cdc *codec.Codec)
RegisterCodec registers the module's structs in the codec.
func (AppModuleBasic) RegisterRESTRoutes ¶
func (AppModuleBasic) RegisterRESTRoutes(ctx context.CLIContext, rtr *mux.Router)
RegisterRESTRoutes registers rest routes
func (AppModuleBasic) ValidateGenesis ¶
func (AppModuleBasic) ValidateGenesis(bz json.RawMessage) error
ValidateGenesis checks a Genesis.
type Client ¶
Client is a tendermint client with helper functions.
func (*Client) BuildAndBroadcastMsg ¶
func (c *Client) BuildAndBroadcastMsg(msg sdktypes.Msg, accName, accPassword string, accNumber, accSeq uint64) (*abci.ResponseDeliverTx, error)
BuildAndBroadcastMsg builds and signs message and broadcast it to node.
type Keybase ¶
Keybase is a standard cosmos keybase.
func NewKeybase ¶
NewKeybase initializes a filesystem keybase at a particular dir.
func (*Keybase) NewMnemonic ¶ added in v0.15.0
NewMnemonic returns a new mnemonic phrase.
type Querier ¶
type Querier func(request sdk.Request, path []string, req abci.RequestQuery) (res interface{}, err error)
Querier is responsible to answer to ABCI queries.
type TxBuilder ¶
TxBuilder implements a transaction context created in SDK modules.
func NewTxBuilder ¶
func NewTxBuilder(cdc *codec.Codec, accNumber, accSeq uint64, kb keys.Keybase, chainID string) TxBuilder
NewTxBuilder returns a new initialized TxBuilder.