Documentation ¶
Index ¶
- Constants
- func CheckClientStatus(rp *rocketpool.Client) error
- func Confirm(initialPrompt string) bool
- func ConfirmSecureSession(warning string) bool
- func ConfirmWithIAgree(initialPrompt string) bool
- func GetDateTimeString(dateTime uint64) string
- func GetPrettyAddress(address common.Address) string
- func PrettyPrintError(err error)
- func PrintDepositMismatchError(rpNetwork, beaconNetwork uint64, ...)
- func PrintMultiTransactionNonceWarning()
- func PrintNetwork(rp *rocketpool.Client) error
- func PrintTransactionHash(rp *rocketpool.Client, hash common.Hash)
- func PrintTransactionHashNoCancel(rp *rocketpool.Client, hash common.Hash)
- func Prompt(initialPrompt string, expectedFormat string, incorrectFormatPrompt string) string
- func PromptPassword(initialPrompt string, expectedFormat string, incorrectFormatPrompt string) string
- func Select(initialPrompt string, options []string) (int, string)
- func ValidateAddress(name, value string) (common.Address, error)
- func ValidateArgCount(c *cli.Context, count int) error
- func ValidateBigInt(name, value string) (*big.Int, error)
- func ValidateBool(name, value string) (bool, error)
- func ValidateBurnableTokenType(name, value string) (string, error)
- func ValidateDAOMemberID(name, value string) (string, error)
- func ValidateEthAmount(name, value string) (float64, error)
- func ValidateFraction(name, value string) (float64, error)
- func ValidateNodePassword(name, value string) (string, error)
- func ValidatePercentage(name, value string) (float64, error)
- func ValidatePositiveEthAmount(name, value string) (float64, error)
- func ValidatePositiveOrZeroWeiAmount(name, value string) (*big.Int, error)
- func ValidatePositiveUint(name, value string) (uint64, error)
- func ValidatePositiveWeiAmount(name, value string) (*big.Int, error)
- func ValidateProposalType(name, value string) (string, error)
- func ValidatePubkey(name, value string) (types.ValidatorPubkey, error)
- func ValidateTimezoneLocation(name, value string) (string, error)
- func ValidateTokenType(name, value string) (string, error)
- func ValidateTxHash(name, value string) (common.Hash, error)
- func ValidateUint(name, value string) (uint64, error)
- func ValidateWalletMnemonic(name, value string) (string, error)
- func ValidateWeiAmount(name, value string) (*big.Int, error)
Constants ¶
const (
MinDAOMemberIDLength = 3
)
Config
Variables ¶
This section is empty.
Functions ¶
func CheckClientStatus ¶
func CheckClientStatus(rp *rocketpool.Client) error
Check the status of the Execution and Consensus client(s) and provision the API with them
func ConfirmSecureSession ¶
Prompts the user to verify that there is nobody looking over their shoulder before printing sensitive information.
func ConfirmWithIAgree ¶
Prompt for 'I agree' confirmation (used on important questions to avoid a quick 'y' response from the user)
func GetDateTimeString ¶
Convert a Unix datetime to a string, or `---` if it's zero
func GetPrettyAddress ¶
Gets the hex string of an address, or "none" if it was the 0x0 address
func PrettyPrintError ¶
func PrettyPrintError(err error)
Prints an error in a prettier format, removing the "stack trace" if it represents a contract revert message
func PrintDepositMismatchError ¶
func PrintDepositMismatchError(rpNetwork, beaconNetwork uint64, rpDepositAddress, beaconDepositAddress common.Address)
Prints an error message when the Beacon client is not using the deposit contract address that poolsea Pool expects
func PrintMultiTransactionNonceWarning ¶
func PrintMultiTransactionNonceWarning()
Print a warning to the console if the user set a custom nonce, but this operation involves multiple transactions
func PrintNetwork ¶
func PrintNetwork(rp *rocketpool.Client) error
Prints what network you're currently on
func PrintTransactionHash ¶
func PrintTransactionHash(rp *rocketpool.Client, hash common.Hash)
Print a TX's details to the console.
func PrintTransactionHashNoCancel ¶
func PrintTransactionHashNoCancel(rp *rocketpool.Client, hash common.Hash)
Print a TX's details to the console, but inform the user NOT to cancel it.
func PromptPassword ¶
func PromptPassword(initialPrompt string, expectedFormat string, incorrectFormatPrompt string) string
Prompt for password input
func ValidateAddress ¶
Validate an address
func ValidateArgCount ¶
Validate command argument count
func ValidateBurnableTokenType ¶
Validate a burnable token type
func ValidateDAOMemberID ¶
Validate a DAO member ID
func ValidateEthAmount ¶
Validate an ether amount
func ValidateFraction ¶
Validate a fraction
func ValidateNodePassword ¶
Validate a node password
func ValidatePercentage ¶
Validate a percentage
func ValidatePositiveEthAmount ¶
Validate a positive ether amount
func ValidatePositiveOrZeroWeiAmount ¶
Validate a positive or zero wei amount
func ValidatePositiveUint ¶
Validate a positive unsigned integer value
func ValidatePositiveWeiAmount ¶
Validate a positive wei amount
func ValidateProposalType ¶
Validate a proposal type
func ValidatePubkey ¶
func ValidatePubkey(name, value string) (types.ValidatorPubkey, error)
Validate a validator pubkey
func ValidateTimezoneLocation ¶
Validate a timezone location
func ValidateTokenType ¶
Validate a token type
func ValidateTxHash ¶
Validate a transaction hash
func ValidateUint ¶
Validate an unsigned integer value
func ValidateWalletMnemonic ¶
Validate a wallet mnemonic phrase
Types ¶
This section is empty.