Documentation ¶
Index ¶
- Variables
- func PairsToStrings(pairs []Pair) []string
- type Pair
- func (pair Pair) BaseDenom() string
- func (pair Pair) Equal(other Pair) bool
- func (pair Pair) Inverse() Pair
- func (pair Pair) Marshal() ([]byte, error)
- func (pair Pair) MarshalJSON() ([]byte, error)
- func (pair Pair) MarshalTo(data []byte) (n int, err error)
- func (pair Pair) QuoteDenom() string
- func (pair Pair) Size() int
- func (pair Pair) String() string
- func (pair *Pair) Unmarshal(data []byte) error
- func (pair *Pair) UnmarshalJSON(data []byte) error
- func (pair Pair) Validate() error
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrInvalidTokenPair = sdkerrors.Register("asset", 1, "invalid token pair")
paired against USD
View Source
var PairKeyEncoder collections.KeyEncoder[Pair] = pairKeyEncoder{}
View Source
var Registry registry
Functions ¶
func PairsToStrings ¶ added in v0.21.9
Types ¶
type Pair ¶
type Pair string
func MustNewPair ¶
MustNewPair returns a new asset pair. It will panic if 'pair' is invalid. The form, "token0:token1", is expected for 'pair'.
func MustNewPairs ¶ added in v0.21.9
MustNewPairs constructs a new asset pair set. A panic will occur if one of the provided pair names is invalid.
func TryNewPair ¶
New returns a new asset pair instance if the pair is valid. The form, "token0:token1", is expected for 'pair'. Use this function to return an error instead of panicking.
func (Pair) MarshalJSON ¶
func (Pair) QuoteDenom ¶
func (Pair) String ¶
String returns the string representation of the asset pair.
Note that this differs from the output of the proto-generated 'String' method.
func (*Pair) UnmarshalJSON ¶
Click to show internal directories.
Click to hide internal directories.