Documentation ¶
Index ¶
- Variables
- type Account
- type App
- type CannotBuildAppError
- type CannotStartAppError
- type Chain
- func (c *Chain) AppTOMLPath() (string, error)
- func (c *Chain) Binaries() ([]string, error)
- func (c *Chain) Binary() (string, error)
- func (c *Chain) BinaryCLI() string
- func (c *Chain) Build(ctx context.Context) error
- func (c *Chain) CLIHome() (string, error)
- func (c *Chain) Commands(ctx context.Context) (chaincmdrunner.Runner, error)
- func (c *Chain) Config() (conf.Config, error)
- func (c *Chain) ConfigTOMLPath() (string, error)
- func (c *Chain) DefaultHome() (string, error)
- func (c *Chain) Faucet(ctx context.Context) (cosmosfaucet.Faucet, error)
- func (c *Chain) GenesisPath() (string, error)
- func (c *Chain) Home() (string, error)
- func (c *Chain) ID() (string, error)
- func (c *Chain) Init(ctx context.Context) error
- func (c *Chain) InitAccounts(ctx context.Context, conf conf.Config) error
- func (c *Chain) IsInitialized() (bool, error)
- func (c *Chain) RPCPublicAddress() (string, error)
- func (c *Chain) RelayerAdd(base64Info string) error
- func (c *Chain) RelayerInfo() (base64Info string, err error)
- func (c *Chain) SDKVersion() cosmosver.MajorVersion
- func (c *Chain) Serve(ctx context.Context, options ...ServeOption) error
- func (c *Chain) StoragePaths() (paths []string, err error)
- type Config
- type LogLvl
- type Option
- type Plugin
- type ServeOption
- type Validator
Constants ¶
This section is empty.
Variables ¶
var ( // ErrFaucetIsNotEnabled is returned when faucet is not enabled in the config.yml. ErrFaucetIsNotEnabled = errors.New("faucet is not enabled in the config.yml") // ErrFaucetAccountDoesNotExist returned when specified faucet account in the config.yml does not exist. ErrFaucetAccountDoesNotExist = errors.New("specified account (faucet.name) does not exist") )
Functions ¶
This section is empty.
Types ¶
type App ¶
App keeps info about chain.
type CannotBuildAppError ¶
type CannotBuildAppError struct {
Err error
}
func (*CannotBuildAppError) Error ¶
func (e *CannotBuildAppError) Error() string
func (*CannotBuildAppError) Unwrap ¶
func (e *CannotBuildAppError) Unwrap() error
type CannotStartAppError ¶
func (*CannotStartAppError) Error ¶
func (e *CannotStartAppError) Error() string
func (*CannotStartAppError) ParseStartError ¶
func (e *CannotStartAppError) ParseStartError() string
ParseStartError parses the error into a clear error string The error logs from Cosmos SDK application are too extensive to be directly printed If the error is not recognized, returns an empty string
func (*CannotStartAppError) Unwrap ¶
func (e *CannotStartAppError) Unwrap() error
type Chain ¶
Chain provides programatic access and tools for a Cosmos SDK blockchain.
func (*Chain) AppTOMLPath ¶
AppTOMLPath returns app.toml path of the app.
func (*Chain) CLIHome ¶
CLIHome returns the blockchain node's home dir. This directory is the same as home for Stargate, it is a separate directory for Launchpad
func (*Chain) ConfigTOMLPath ¶
ConfigTOMLPath returns config.toml path of the app.
func (*Chain) DefaultHome ¶
DefaultHome returns the blockchain node's default home dir when not specified in the app
func (*Chain) Faucet ¶
Faucet returns the faucet for the chain or an error if the faucet configuration is wrong or not configured (not enabled) at all.
func (*Chain) GenesisPath ¶
GenesisPath returns genesis.json path of the app.
func (*Chain) InitAccounts ¶
InitAccounts initializes the chain accounts and creates validator gentxs
func (*Chain) IsInitialized ¶
IsInitialized checks if the chain is initialized the check is performed by checking if the gentx dir exist in the config
func (*Chain) RPCPublicAddress ¶
RPCPublicAddress points to the public address of Tendermint RPC, this is shared by other chains for relayer related actions.
func (*Chain) RelayerAdd ¶
RelayerAdd adds another chain by its relayer info to establish a connnection in between.
func (*Chain) RelayerInfo ¶
RelayerInfo initializes or updates relayer setup for the chain itself and returns a meta info to share with other chains so they can connect.
func (*Chain) SDKVersion ¶
func (c *Chain) SDKVersion() cosmosver.MajorVersion
SDKVersion returns the version of SDK used to build the blockchain.
func (*Chain) Serve ¶
func (c *Chain) Serve(ctx context.Context, options ...ServeOption) error
Serve serves an app.
func (*Chain) StoragePaths ¶
type Config ¶
type Config struct { SdkVersion string EngineAddr string AppBackendAddr string AppFrontendAddr string }
Config used to configure development handler.
type Option ¶
type Option func(*Chain)
Option configures Chain.
func CLIHomePath ¶
CLIHomePath replaces chain's cli configuration home path with given path.
func KeyringBackend ¶
func KeyringBackend(keyringBackend chaincmd.KeyringBackend) Option
KeyringBackend specify the keyring backend to use for the chain command
type Plugin ¶
type Plugin interface { // Name of a Cosmos version. Name() string // Setup performs the initial setup for plugin. Setup(context.Context) error // ConfigCommands returns step.Exec configuration for config commands. Configure(context.Context, chaincmdrunner.Runner, string) error // GentxCommand returns step.Exec configuration for gentx command. Gentx(context.Context, chaincmdrunner.Runner, Validator) (path string, err error) // PostInit hook. PostInit(string, starportconf.Config) error // StartCommands returns step.Exec configuration to start servers. Start(context.Context, chaincmdrunner.Runner, starportconf.Config) error // StoragePaths returns a list of where persistent data kept. StoragePaths() []string // Home returns the blockchain node's home dir. Home() string // CLIHome returns the cli blockchain node's home dir. CLIHome() string // Version of the plugin. Version() cosmosver.MajorVersion // SupportsIBC reports if app support IBC. SupportsIBC() bool }
type ServeOption ¶
type ServeOption func(*serveOptions)
ServeOption provides options for the serve command
func ServeForceReset ¶
func ServeForceReset() ServeOption
ServeForceReset allows to force reset of the state when the chain is served and on every source change
func ServeResetOnce ¶
func ServeResetOnce() ServeOption
ServeResetOnce allows to reset of the state when the chain is served once