Documentation ¶
Index ¶
- Variables
- 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
- type Pairs
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // paired against USD ErrInvalidTokenPair = sdkerrors.Register("asset", 1, "invalid token pair") )
View Source
var PairKeyEncoder collections.KeyEncoder[Pair] = pairKeyEncoder{}
View Source
var Registry registry
Functions ¶
This section is empty.
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 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.