validator

package
v0.1.114 Latest Latest
Warning

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

Go to latest
Published: Jul 3, 2026 License: AGPL-3.0 Imports: 13 Imported by: 0

Documentation

Overview

Package validator implements the `polycli heimdall validator` umbrella command (alias `val`) and its subcommands targeting Heimdall v2's `x/stake` module: set/validators, total-power, get, signer, status, proposer, proposers, is-old-stake-tx.

Per HEIMDALLCAST_REQUIREMENTS.md §3.2.4 these endpoints live under a single umbrella, and the umbrella also accepts a bare integer (`validator 4`) as a shorthand for `validator get 4`. The top-level `validators` command is registered separately as an alias for `validator set`.

Index

Constants

This section is empty.

Variables

View Source
var ValidatorCmd = &cobra.Command{
	Use:     "validator [ID]",
	Aliases: []string{"val"},
	Short:   "Query stake module endpoints.",
	Long:    usage,
	Args:    cobra.MaximumNArgs(1),

	RunE: func(cmd *cobra.Command, args []string) error {
		if len(args) == 0 {
			return cmd.Help()
		}
		if _, err := strconv.ParseUint(args[0], 10, 64); err != nil {
			return &client.UsageError{Msg: fmt.Sprintf("unknown validator subcommand or id %q", args[0])}
		}
		return runGet(cmd, args[0])
	},
}

ValidatorCmd is the umbrella `validator` command. Subcommands are attached by Register.

View Source
var ValidatorsCmd = &cobra.Command{
	Use:   "validators",
	Short: "Alias for `validator set`.",
	Args:  cobra.NoArgs,
	RunE:  runSet,
}

ValidatorsCmd is the top-level `validators` alias for `validator set`. It is attached to the root heimdall command alongside ValidatorCmd so operators can type either form.

Functions

func Register

func Register(parent *cobra.Command, f *config.Flags)

Register attaches the validator umbrella command (and the top-level `validators` alias) to parent, wiring in the shared flag struct.

Types

This section is empty.

Jump to

Keyboard shortcuts

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