coins

package
v0.12.0 Latest Latest
Warning

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

Go to latest
Published: Sep 13, 2023 License: Apache-2.0 Imports: 7 Imported by: 1

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.

Jump to

Keyboard shortcuts

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