Documentation
¶
Index ¶
- func ConfirmAction(skipConfirmation bool, message string) bool
- func DecodeHexWithPrefix(hexStr string) ([]byte, error)
- func FormatBasisPointsToPercent(basisPoints *big.Int) string
- func FormatWeiToEther(wei *big.Int) string
- func GetAddressFromPrivateKey(privKey string) (string, error)
- func IncreaseFee(value *big.Int, fee *big.Int) *big.Int
- func LoadPrivateKeyFromPrivValidatorKey(keyfilePath string) (*ecdsa.PrivateKey, error)
- func ParsePercentageToBasisPoints(value string) (*big.Int, error)
- func ParseValue(value string) (*big.Int, error)
- func ParseValueAsWei(value string) (*big.Int, error)
- func ValidateAddress(addr string) (common.Address, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ConfirmAction ¶
ConfirmAction prompts the user to confirm an action
func DecodeHexWithPrefix ¶
DecodeHexWithPrefix decodes a hex string with 0x prefix
func FormatBasisPointsToPercent ¶
FormatBasisPointsToPercent formats basis points as a percentage string with % symbol
func FormatWeiToEther ¶
FormatWeiToEther formats Wei to MITO for display
func GetAddressFromPrivateKey ¶
GetAddressFromPrivateKey returns the address corresponding to a private key
func IncreaseFee ¶
IncreaseFee adds the fee amount to the transaction value
func LoadPrivateKeyFromPrivValidatorKey ¶
func LoadPrivateKeyFromPrivValidatorKey(keyfilePath string) (*ecdsa.PrivateKey, error)
LoadPrivateKeyFromPrivValidatorKey loads a private key from cosmos priv_validator_key.json file
func ParsePercentageToBasisPoints ¶
ParsePercentageToBasisPoints parses a percentage string (with % sign) into basis points (1% = 100 basis points)
func ParseValue ¶
ParseValue parses a string into a big.Int value
func ParseValueAsWei ¶
ParseValueAsWei parses a decimal string (e.g. "1.5") into wei units (multiplied by 10^18)
Types ¶
This section is empty.