Documentation
¶
Index ¶
- func Bech32DelegatorAddressToEvmAddress(bech32DelegatorAddress string) (string, error)
- func Bech32ValidatorAddressToEvmAddress(bech32ValidatorAddress string) (string, error)
- func CmpPubKeyToBech32ConsAddress(hexCmpPubKey string) (sdk.ConsAddress, error)
- func EvmAddressToBech32AccAddress(evmAddress string) (sdk.AccAddress, error)
- func EvmAddressToBech32ValAddress(evmAddress string) (sdk.ValAddress, error)
- func QueryMapToVal(query url.Values, val any) error
- func WrapTypeAny[T any](v *codectypes.Any) codectypes.UnpackInterfacesMessage
- type AutoSimpleInterfaceWrapFunc
- type HTTPError
- type RespFunc
- type Response
- type SimpleWrapFunc
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Bech32DelegatorAddressToEvmAddress ¶ added in v0.16.0
func Bech32ValidatorAddressToEvmAddress ¶ added in v0.16.0
func CmpPubKeyToBech32ConsAddress ¶ added in v0.16.0
func CmpPubKeyToBech32ConsAddress(hexCmpPubKey string) (sdk.ConsAddress, error)
func EvmAddressToBech32AccAddress ¶ added in v0.16.0
func EvmAddressToBech32AccAddress(evmAddress string) (sdk.AccAddress, error)
func EvmAddressToBech32ValAddress ¶ added in v0.16.0
func EvmAddressToBech32ValAddress(evmAddress string) (sdk.ValAddress, error)
func QueryMapToVal ¶
QueryMapToVal implements an all-in-one decoder to decode requests' query parameters to structured value.
func WrapTypeAny ¶
func WrapTypeAny[T any](v *codectypes.Any) codectypes.UnpackInterfacesMessage
WrapTypeAny implements a wrap function for variables with type Any to become UnpackInterfacesMessage, which is meant to unpack values packed within Any's using the AnyUnpacker.
Types ¶
type HTTPError ¶
type HTTPError struct {
// contains filtered or unexported fields
}
func NewHTTPError ¶
func WrapHTTPError ¶
func WrapHTTPErrorWithCode ¶
type RespFunc ¶
type RespFunc func(w http.ResponseWriter, r *http.Request)
func AutoWrap ¶
func AutoWrap[T any](codec *codec.LegacyAmino, api AutoSimpleInterfaceWrapFunc[T]) RespFunc
AutoWrap implements a response encoder for requests with query paramenters.
func SimpleWrap ¶
func SimpleWrap(codec *codec.LegacyAmino, api SimpleWrapFunc) RespFunc
SimpleWrap implements a response encoder for requests without any query paramenter.
Click to show internal directories.
Click to hide internal directories.