chaincmd

package
v0.19.5 Latest Latest
Warning

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

Go to latest
Published: Mar 19, 2022 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func SimulationCommand added in v0.19.0

func SimulationCommand(appPath string, options ...SimappOption) step.Option

SimulationCommand returns the cli command for simapp tests

Types

type ChainCmd

type ChainCmd struct {
	// contains filtered or unexported fields
}

func New

func New(appCmd string, options ...Option) ChainCmd

New creates a new ChainCmd to launch command with the chain app

func (ChainCmd) AddGenesisAccountCommand

func (c ChainCmd) AddGenesisAccountCommand(address, coins string) step.Option

AddGenesisAccountCommand returns the command to add a new account in the genesis file of the chain

func (ChainCmd) AddKeyCommand

func (c ChainCmd) AddKeyCommand(accountName, coinType string) step.Option

AddKeyCommand returns the command to add a new key in the chain keyring

func (ChainCmd) AddVestingAccountCommand added in v0.19.0

func (c ChainCmd) AddVestingAccountCommand(address, originalCoins, vestingCoins string, vestingEndTime int64) step.Option

AddVestingAccountCommand returns the command to add a delayed vesting account in the genesis file of the chain

func (ChainCmd) BankSendCommand added in v0.14.0

func (c ChainCmd) BankSendCommand(fromAddress, toAddress, amount string) step.Option

BankSendCommand returns the command for transferring tokens.

func (ChainCmd) CollectGentxsCommand

func (c ChainCmd) CollectGentxsCommand() step.Option

CollectGentxsCommand returns the command to gather the gentxs in /gentx dir into the genesis file of the chain

func (ChainCmd) Copy added in v0.14.0

func (c ChainCmd) Copy(options ...Option) ChainCmd

Copy makes a copy of ChainCmd by overwriting its options with given options.

func (ChainCmd) ExportCommand added in v0.14.0

func (c ChainCmd) ExportCommand() step.Option

ExportCommand returns the command to export the state of the blockchain into a genesis file

func (ChainCmd) GentxCommand

func (c ChainCmd) GentxCommand(
	validatorName string,
	selfDelegation string,
	options ...GentxOption,
) step.Option

GentxCommand returns the command to generate a gentx for the chain

func (ChainCmd) ImportKeyCommand

func (c ChainCmd) ImportKeyCommand(accountName, keyFile string) step.Option

ImportKeyCommand returns the command to import a key into the chain keyring from a key file

func (ChainCmd) InitCommand

func (c ChainCmd) InitCommand(moniker string) step.Option

InitCommand returns the command to initialize the chain

func (ChainCmd) IsAutoChainIDDetectionEnabled added in v0.14.0

func (c ChainCmd) IsAutoChainIDDetectionEnabled() bool

func (ChainCmd) KeyringBackend added in v0.15.0

func (c ChainCmd) KeyringBackend() KeyringBackend

KeyringBackend returns the underlying keyring backend.

func (ChainCmd) KeyringPassword added in v0.15.0

func (c ChainCmd) KeyringPassword() string

KeyringPassword returns the underlying keyring password.

func (ChainCmd) LaunchpadRestServerCommand

func (c ChainCmd) LaunchpadRestServerCommand(apiAddress, rpcAddress string) step.Option

LaunchpadRestServerCommand returns the command to start the CLI REST server

func (ChainCmd) LaunchpadSetConfigCommand

func (c ChainCmd) LaunchpadSetConfigCommand(name, value string) step.Option

LaunchpadSetConfigCommand returns the command to set config value

func (ChainCmd) ListKeysCommand

func (c ChainCmd) ListKeysCommand() step.Option

ListKeysCommand returns the command to print the list of a keys in the chain keyring

func (ChainCmd) QueryTxCommand added in v0.19.2

func (c ChainCmd) QueryTxCommand(txHash string) step.Option

QueryTxCommand returns the command to query tx

func (ChainCmd) QueryTxEventsCommand added in v0.14.0

func (c ChainCmd) QueryTxEventsCommand(query string) step.Option

QueryTxEventsCommand returns the command to query events.

func (ChainCmd) RecoverKeyCommand added in v0.19.0

func (c ChainCmd) RecoverKeyCommand(accountName, coinType string) step.Option

RecoverKeyCommand returns the command to recover a key into the chain keyring from a mnemonic

func (ChainCmd) SDKVersion added in v0.14.0

func (c ChainCmd) SDKVersion() cosmosver.Version

func (ChainCmd) ShowKeyAddressCommand

func (c ChainCmd) ShowKeyAddressCommand(accountName string) step.Option

ShowKeyAddressCommand returns the command to print the address of a key in the chain keyring

func (ChainCmd) ShowNodeIDCommand

func (c ChainCmd) ShowNodeIDCommand() step.Option

ShowNodeIDCommand returns the command to print the node ID of the node for the chain

func (ChainCmd) StartCommand

func (c ChainCmd) StartCommand(options ...string) step.Option

StartCommand returns the command to start the daemon of the chain

func (ChainCmd) StatusCommand added in v0.14.0

func (c ChainCmd) StatusCommand() step.Option

StatusCommand returns the command that fetches node's status.

func (ChainCmd) UnsafeResetCommand added in v0.14.0

func (c ChainCmd) UnsafeResetCommand() step.Option

UnsafeResetCommand returns the command to reset the blockchain database

func (ChainCmd) ValidateGenesisCommand

func (c ChainCmd) ValidateGenesisCommand() step.Option

ValidateGenesisCommand returns the command to check the validity of the chain genesis

type GentxOption

type GentxOption func([]string) []string

GentxOption for the GentxCommand

func GentxWithCommissionMaxChangeRate

func GentxWithCommissionMaxChangeRate(commissionMaxChangeRate string) GentxOption

GentxWithCommissionMaxChangeRate provides commission max change rate option for the gentx command

func GentxWithCommissionMaxRate

func GentxWithCommissionMaxRate(commissionMaxRate string) GentxOption

GentxWithCommissionMaxRate provides commission max rate option for the gentx command

func GentxWithCommissionRate

func GentxWithCommissionRate(commissionRate string) GentxOption

GentxWithCommissionRate provides commission rate option for the gentx command

func GentxWithDetails added in v0.19.0

func GentxWithDetails(details string) GentxOption

GentxWithDetails provides validator details option for the gentx command

func GentxWithGasPrices

func GentxWithGasPrices(gasPrices string) GentxOption

GentxWithGasPrices provides gas price option for the gentx command

func GentxWithIdentity added in v0.19.0

func GentxWithIdentity(identity string) GentxOption

GentxWithIdentity provides validator identity option for the gentx command

func GentxWithMinSelfDelegation

func GentxWithMinSelfDelegation(minSelfDelegation string) GentxOption

GentxWithMinSelfDelegation provides minimum self delegation option for the gentx command

func GentxWithMoniker

func GentxWithMoniker(moniker string) GentxOption

GentxWithMoniker provides moniker option for the gentx command

func GentxWithSecurityContact added in v0.19.0

func GentxWithSecurityContact(securityContact string) GentxOption

GentxWithSecurityContact provides validator security contact option for the gentx command

func GentxWithWebsite added in v0.19.0

func GentxWithWebsite(website string) GentxOption

GentxWithWebsite provides validator website option for the gentx command

type KeyringBackend

type KeyringBackend string
const (
	KeyringBackendUnspecified KeyringBackend = ""
	KeyringBackendOS          KeyringBackend = "os"
	KeyringBackendFile        KeyringBackend = "file"
	KeyringBackendPass        KeyringBackend = "pass"
	KeyringBackendTest        KeyringBackend = "test"
	KeyringBackendKwallet     KeyringBackend = "kwallet"
)

func KeyringBackendFromString added in v0.14.0

func KeyringBackendFromString(kb string) (KeyringBackend, error)

KeyringBackendFromString returns the keyring backend from its string

type Option

type Option func(*ChainCmd)

Option configures ChainCmd.

func WithAutoChainIDDetection added in v0.14.0

func WithAutoChainIDDetection() Option

WithAutoChainIDDetection finds out the chain id by communicating with the node running.

func WithChainID

func WithChainID(chainID string) Option

WithChainID provides a specific chain ID for the commands that accept this option

func WithHome

func WithHome(home string) Option

WithHome replaces the default home used by the chain

func WithKeyringBackend

func WithKeyringBackend(keyringBackend KeyringBackend) Option

WithKeyringBackend provides a specific keyring backend for the commands that accept this option

func WithKeyringPassword added in v0.14.0

func WithKeyringPassword(password string) Option

WithKeyringPassword provides a password to unlock keyring

func WithLaunchpadCLI added in v0.14.0

func WithLaunchpadCLI(cliCmd string) Option

WithLaunchpadCLI provides the CLI application name for the blockchain this is necessary for Launchpad applications since it has two different binaries but not needed by Stargate applications

func WithLaunchpadCLIHome added in v0.14.0

func WithLaunchpadCLIHome(cliHome string) Option

WithLaunchpadCLIHome replaces the default home used by the Launchpad chain CLI

func WithLegacySendCommand added in v0.15.0

func WithLegacySendCommand() Option

WithLegacySendCommand will make the command use the legacy tx send syntax from launchpad on stargate chains. e.g.: CosmWasm

func WithNodeAddress added in v0.15.0

func WithNodeAddress(addr string) Option

WithNodeAddress sets the node address for the commands that needs to make an API request to the node that has a different node address other than the default one.

func WithVersion

func WithVersion(v cosmosver.Version) Option

WithVersion sets the version of the blockchain. when this is not provided, latest version of SDK is assumed.

type SimappOption added in v0.19.0

type SimappOption func([]string) []string

SimappOption for the SimulateCommand

func SimappWithBlockSize added in v0.19.0

func SimappWithBlockSize(blockSize int) SimappOption

SimappWithBlockSize provides blockSize option for the simapp command

func SimappWithCommit added in v0.19.0

func SimappWithCommit(commit bool) SimappOption

SimappWithCommit provides commit option for the simapp command

func SimappWithEnable added in v0.19.0

func SimappWithEnable(enable bool) SimappOption

SimappWithEnable provides enable option for the simapp command

func SimappWithExportParamsHeight added in v0.19.0

func SimappWithExportParamsHeight(exportParamsHeight int) SimappOption

SimappWithExportParamsHeight provides exportParamsHeight option for the simapp command

func SimappWithExportParamsPath added in v0.19.0

func SimappWithExportParamsPath(exportParamsPath string) SimappOption

SimappWithExportParamsPath provides exportParamsPath option for the simapp command

func SimappWithExportStatePath added in v0.19.0

func SimappWithExportStatePath(exportStatePath string) SimappOption

SimappWithExportStatePath provides exportStatePath option for the simapp command

func SimappWithExportStatsPath added in v0.19.0

func SimappWithExportStatsPath(exportStatsPath string) SimappOption

SimappWithExportStatsPath provides exportStatsPath option for the simapp command

func SimappWithGenesis added in v0.19.0

func SimappWithGenesis(genesis string) SimappOption

SimappWithGenesis provides genesis option for the simapp command

func SimappWithGenesisTime added in v0.19.0

func SimappWithGenesisTime(genesisTime int64) SimappOption

SimappWithGenesisTime provides genesisTime option for the simapp command

func SimappWithInitialBlockHeight added in v0.19.0

func SimappWithInitialBlockHeight(initialBlockHeight int) SimappOption

SimappWithInitialBlockHeight provides initialBlockHeight option for the simapp command

func SimappWithLean added in v0.19.0

func SimappWithLean(lean bool) SimappOption

SimappWithLean provides lean option for the simapp command

func SimappWithNumBlocks added in v0.19.0

func SimappWithNumBlocks(numBlocks int) SimappOption

SimappWithNumBlocks provides numBlocks option for the simapp command

func SimappWithParams added in v0.19.0

func SimappWithParams(params string) SimappOption

SimappWithParams provides params option for the simapp command

func SimappWithPeriod added in v0.19.0

func SimappWithPeriod(period uint) SimappOption

SimappWithPeriod provides period option for the simapp command

func SimappWithPrintAllInvariants added in v0.19.0

func SimappWithPrintAllInvariants(printAllInvariants bool) SimappOption

SimappWithPrintAllInvariants provides printAllInvariants option for the simapp command

func SimappWithSeed added in v0.19.0

func SimappWithSeed(seed int64) SimappOption

SimappWithSeed provides seed option for the simapp command

func SimappWithSimulateEveryOperation added in v0.19.0

func SimappWithSimulateEveryOperation(simulateEveryOperation bool) SimappOption

SimappWithSimulateEveryOperation provides simulateEveryOperation option for the simapp command

func SimappWithVerbose added in v0.19.0

func SimappWithVerbose(verbose bool) SimappOption

SimappWithVerbose provides verbose option for the simapp command

Directories

Path Synopsis
Package chaincmdrunner provides a high level access to a blockchain's commands.
Package chaincmdrunner provides a high level access to a blockchain's commands.

Jump to

Keyboard shortcuts

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