cosmos-sdk/x/stake/client/cli/flags.go

42 lines
1.5 KiB
Go
Raw Normal View History

2018-04-25 07:18:06 -07:00
package cli
import (
flag "github.com/spf13/pflag"
)
// nolint
const (
FlagAddressDelegator = "address-delegator"
2018-05-09 21:01:58 -07:00
FlagAddressValidator = "address-validator"
FlagPubKey = "pubkey"
FlagAmount = "amount"
FlagShares = "shares"
FlagMoniker = "moniker"
FlagIdentity = "keybase-sig"
FlagWebsite = "website"
FlagDetails = "details"
)
// common flagsets to add to various functions
var (
fsPk = flag.NewFlagSet("", flag.ContinueOnError)
fsAmount = flag.NewFlagSet("", flag.ContinueOnError)
fsShares = flag.NewFlagSet("", flag.ContinueOnError)
fsDescription = flag.NewFlagSet("", flag.ContinueOnError)
2018-05-09 21:01:58 -07:00
fsValidator = flag.NewFlagSet("", flag.ContinueOnError)
fsDelegator = flag.NewFlagSet("", flag.ContinueOnError)
)
func init() {
2018-05-09 21:01:58 -07:00
fsPk.String(FlagPubKey, "", "Go-Amino encoded hex PubKey of the validator-validator. For Ed25519 the go-amino prepend hex is 1624de6220")
2018-04-30 16:24:46 -07:00
fsAmount.String(FlagAmount, "1steak", "Amount of coins to bond")
fsShares.String(FlagShares, "", "Amount of shares to unbond, either in decimal or keyword MAX (ex. 1.23456789, 99, MAX)")
2018-05-09 21:01:58 -07:00
fsDescription.String(FlagMoniker, "", "validator-validator name")
fsDescription.String(FlagIdentity, "", "optional keybase signature")
fsDescription.String(FlagWebsite, "", "optional website")
fsDescription.String(FlagDetails, "", "optional details")
2018-05-09 21:01:58 -07:00
fsValidator.String(FlagAddressValidator, "", "hex address of the validator/validator")
fsDelegator.String(FlagAddressDelegator, "", "hex address of the delegator")
}