Documentation
¶
Index ¶
- Constants
- Variables
- func DepConfig() depinject.Config
- func EncryptAndStoreKey(key privval.FilePVKey, password, filePath string) error
- func InputPassword(promptText, confirmText string, shouldConfirmPassword bool, ...) (string, error)
- func LoadEncryptedPrivKey(password, encPrivKeyFile string) (privval.FilePVKey, error)
- func PasswordPrompt(promptText string, validateFunc func(string) error) (string, error)
- func RollbackCometAndAppState(a *App, cometCfg cmtcfg.Config, rollbackCfg config.RollbackConfig) (lastHeight int64, lastHash []byte, err error)
- func Run(ctx context.Context, cfg Config) error
- func Start(ctx context.Context, cfg Config) (func(context.Context) error, error)
- func ValidatePasswordInput(input string) error
- type App
- func (App) ExportAppStateAndValidators(_ bool, _, _ []string) (servertypes.ExportedApp, error)
- func (a App) GetAccountKeeper() authkeeper.AccountKeeper
- func (a App) GetBankKeeper() bankkeeper.Keeper
- func (a App) GetDistrKeeper() distrkeeper.Keeper
- func (a App) GetEvmStakingKeeper() *evmstakingkeeper.Keeper
- func (a App) GetMintKeeper() mintkeeper.Keeper
- func (a App) GetSlashingKeeper() slashingkeeper.Keeper
- func (a App) GetStakingKeeper() *stakingkeeper.Keeper
- func (a App) GetUpgradeKeeper() *upgradekeeper.Keeper
- func (App) LegacyAmino() *codec.LegacyAmino
- func (a *App) PreBlocker(ctx sdk.Context, _ *abci.RequestFinalizeBlock) (*sdk.ResponsePreBlock, error)
- func (a App) SetCometAPI(api comet.API)
- func (App) SimulationManager() *module.SimulationManager
- type Config
- type EncryptedKeyRepresentation
Constants ¶
const ( // NewKeyPasswordPromptText for key creation. NewKeyPasswordPromptText = "New key password (at least 8 characters)" // PasswordPromptText for wallet unlocking. PasswordPromptText = "Key password" // ConfirmPasswordPromptText for confirming a key password. ConfirmPasswordPromptText = "Confirm password" )
const (
Bech32HRP = "story"
)
Bech32HRP is the human-readable-part of the Bech32 address format.
const Name = "story"
Variables ¶
var ( // `Upgrades` defines the upgrade handlers and store loaders for the application. // New upgrades should be added to this slice after they are implemented. Upgrades = []upgrades.Upgrade{ virgil.Upgrade, v_1_2_0.Upgrade, polybius.Upgrade, } // Forks are for hard forks that breaks backward compatibility. Forks = []upgrades.Fork{ virgil.Fork, v_1_2_0.Fork, polybius.Fork, } )
var PasswordReader = passwordReaderFunc
PasswordReader has passwordReaderFunc as the default but can be changed for testing purposes.
Functions ¶
func EncryptAndStoreKey ¶ added in v1.2.0
func InputPassword ¶ added in v1.2.0
func InputPassword( promptText, confirmText string, shouldConfirmPassword bool, passwordValidator func(input string) error, ) (string, error)
InputPassword with a custom validator along capabilities of confirming the password.
func LoadEncryptedPrivKey ¶ added in v1.2.0
func PasswordPrompt ¶ added in v1.2.0
PasswordPrompt prompts the user for a password, that repeatedly requests the password until it qualifies the passed in validation function.
func RollbackCometAndAppState ¶ added in v0.14.0
func Start ¶
Start starts the story client returning a stop function or an error.
Note that the original context used to start the app must be canceled first before calling the stop function and a fresh context should be passed into the stop function.
func ValidatePasswordInput ¶ added in v1.2.0
ValidatePasswordInput validates a strong password input for new accounts, including a min length.
Types ¶
type App ¶
App extends an ABCI application, but with most of its parameters exported. They are exported for convenience in creating helper functions, as object capabilities aren't needed for testing.
func (App) ExportAppStateAndValidators ¶
func (App) ExportAppStateAndValidators(_ bool, _, _ []string) (servertypes.ExportedApp, error)
func (App) GetAccountKeeper ¶
func (a App) GetAccountKeeper() authkeeper.AccountKeeper
func (App) GetBankKeeper ¶
func (a App) GetBankKeeper() bankkeeper.Keeper
func (App) GetDistrKeeper ¶
func (a App) GetDistrKeeper() distrkeeper.Keeper
func (App) GetEvmStakingKeeper ¶ added in v0.10.0
func (a App) GetEvmStakingKeeper() *evmstakingkeeper.Keeper
func (App) GetMintKeeper ¶ added in v0.12.0
func (a App) GetMintKeeper() mintkeeper.Keeper
func (App) GetSlashingKeeper ¶ added in v0.10.0
func (a App) GetSlashingKeeper() slashingkeeper.Keeper
func (App) GetStakingKeeper ¶
func (a App) GetStakingKeeper() *stakingkeeper.Keeper
func (App) GetUpgradeKeeper ¶
func (a App) GetUpgradeKeeper() *upgradekeeper.Keeper
func (App) LegacyAmino ¶
func (App) LegacyAmino() *codec.LegacyAmino
func (*App) PreBlocker ¶
func (a *App) PreBlocker(ctx sdk.Context, _ *abci.RequestFinalizeBlock) (*sdk.ResponsePreBlock, error)
PreBlocker application updates every pre block.
func (App) SetCometAPI ¶
SetCometAPI sets the comet API client.
func (App) SimulationManager ¶
func (App) SimulationManager() *module.SimulationManager
type Config ¶
Config wraps the story (app) and comet (client) configurations.
func (Config) BackendType ¶
func (c Config) BackendType() dbm.BackendType
BackendType returns the story config backend type or the comet backend type otherwise.
type EncryptedKeyRepresentation ¶ added in v1.2.0
type EncryptedKeyRepresentation struct { Crypto map[string]interface{} `json:"crypto"` //nolint:revive // This is from Prysm. Version uint `json:"version"` Name string `json:"name"` }
EncryptedKeyRepresentation defines an internal representation of encrypted validator key.