Versions in this module Expand all Collapse all v0 v0.44.30 Nov 21, 2021 v0.44.4 Nov 21, 2021 Changes in this version + const DefaultLimit + const DefaultPage + const TxMaxHeightKey + const TxMinHeightKey + func CheckBadRequestError(w http.ResponseWriter, err error) bool + func CheckError(w http.ResponseWriter, status int, err error) bool + func CheckInternalServerError(w http.ResponseWriter, err error) bool + func CheckNotFoundError(w http.ResponseWriter, err error) bool + func GetRequest(url string) ([]byte, error) + func ParseFloat64OrReturnBadRequest(w http.ResponseWriter, s string, defaultIfEmpty float64) (n float64, ok bool) + func ParseHTTPArgs(r *http.Request) (tags []string, page, limit int, err error) + func ParseHTTPArgsWithLimit(r *http.Request, defaultLimit int) (tags []string, page, limit int, err error) + func ParseQueryHeightOrReturnBadRequest(w http.ResponseWriter, clientCtx client.Context, r *http.Request) (client.Context, bool) + func ParseQueryParamBool(r *http.Request, param string) bool + func ParseResponseWithHeight(cdc *codec.LegacyAmino, bz []byte) ([]byte, error) + func ParseUint64OrReturnBadRequest(w http.ResponseWriter, s string) (n uint64, ok bool) + func PostProcessResponse(w http.ResponseWriter, ctx client.Context, resp interface{}) + func PostProcessResponseBare(w http.ResponseWriter, ctx client.Context, body interface{}) + func PostRequest(url string, contentType string, data []byte) ([]byte, error) + func ReadRESTReq(w http.ResponseWriter, r *http.Request, cdc *codec.LegacyAmino, ...) bool + func WriteErrorResponse(w http.ResponseWriter, status int, err string) + func WriteSimulationResponse(w http.ResponseWriter, cdc *codec.LegacyAmino, gas uint64) + type BaseReq struct + AccountNumber uint64 + ChainID string + Fees sdk.Coins + From string + Gas string + GasAdjustment string + GasPrices sdk.DecCoins + Memo string + Sequence uint64 + Simulate bool + TimeoutHeight uint64 + func NewBaseReq(from, memo, chainID string, gas, gasAdjustment string, accNumber, seq uint64, ...) BaseReq + func (br BaseReq) Sanitize() BaseReq + func (br BaseReq) ValidateBasic(w http.ResponseWriter) bool + type ErrorResponse struct + Code int + Error string + func NewErrorResponse(code int, err string) ErrorResponse + type GasEstimateResponse struct + GasEstimate uint64 + type ResponseWithHeight struct + Height int64 + Result json.RawMessage + func NewResponseWithHeight(height int64, result json.RawMessage) ResponseWithHeight v0.44.3-rc Nov 21, 2021