Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FormatCoins ¶
func FormatCoins(coins []*basev1beta1.Coin, metadata []*bankv1beta1.Metadata) (string, error)
FormatCoins formats Coins into a value-rendered string, which uses `formatCoin` separated by ", " (a comma and a space), and sorted alphabetically by value-rendered denoms. It expects an array of metadata (optionally nil), where each metadata at index `i` MUST match the coin denom at the same index.
func ParseCoin ¶ added in v0.7.0
func ParseCoin(input string) (*basev1beta1.Coin, error)
ParseCoin parses a coin from a string. The string must be in the format <amount><denom>, where <amount> is a number and <denom> is a valid denom.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.