Documentation ¶
Index ¶
- Constants
- Variables
- func BroadcastTxRequest(clientCtx client.Context) http.HandlerFunc
- func DecodeTxRequestHandlerFn(clientCtx client.Context) http.HandlerFunc
- func EncodeTxRequestHandlerFn(clientCtx client.Context) http.HandlerFunc
- func QueryAccountRequestHandlerFn(storeName string, clientCtx client.Context) http.HandlerFunc
- func QueryTxRequestHandlerFn(clientCtx client.Context) http.HandlerFunc
- func QueryTxsRequestHandlerFn(clientCtx client.Context) http.HandlerFunc
- func RegisterRoutes(clientCtx client.Context, rtr *mux.Router, storeName string)
- func RegisterTxRoutes(clientCtx client.Context, rtr *mux.Router)
- type BroadcastReq
- type DecodeReq
- type DecodeResp
- type EncodeResp
Constants ¶
const (
MethodGet = "GET"
)
REST query and parameter values
Variables ¶
var ErrEncodeDecode error = fmt.Errorf("this endpoint does not support txs that are not serializable"+ " via Amino, such as txs that contain IBC `Msg`s. For more info, please refer to our"+ " REST migration guide at %s", clientrest.DeprecationURL)
ErrEncodeDecode is the error to show when encoding/decoding txs that are not amino-serializable (e.g. IBC txs).
Functions ¶
func BroadcastTxRequest ¶
func BroadcastTxRequest(clientCtx client.Context) http.HandlerFunc
BroadcastTxRequest implements a tx broadcasting handler that is responsible for broadcasting a valid and signed tx to a full node. The tx can be broadcasted via a sync|async|block mechanism.
func DecodeTxRequestHandlerFn ¶
func DecodeTxRequestHandlerFn(clientCtx client.Context) http.HandlerFunc
DecodeTxRequestHandlerFn returns the decode tx REST handler. In particular, it takes base64-decoded bytes, decodes it from the Amino wire protocol, and responds with a json-formatted transaction.
func EncodeTxRequestHandlerFn ¶
func EncodeTxRequestHandlerFn(clientCtx client.Context) http.HandlerFunc
EncodeTxRequestHandlerFn returns the encode tx REST handler. In particular, it takes a json-formatted transaction, encodes it to the Amino wire protocol, and responds with base64-encoded bytes.
func QueryAccountRequestHandlerFn ¶
func QueryAccountRequestHandlerFn(storeName string, clientCtx client.Context) http.HandlerFunc
QueryAccountRequestHandlerFn is the query accountREST Handler.
func QueryTxRequestHandlerFn ¶
func QueryTxRequestHandlerFn(clientCtx client.Context) http.HandlerFunc
QueryTxRequestHandlerFn implements a REST handler that queries a transaction by hash in a committed block.
func QueryTxsRequestHandlerFn ¶
func QueryTxsRequestHandlerFn(clientCtx client.Context) http.HandlerFunc
QueryTxsRequestHandlerFn implements a REST handler that searches for transactions. Genesis transactions are returned if the height parameter is set to zero, otherwise the transactions are searched for by events.
func RegisterRoutes ¶
RegisterRoutes registers the auth module REST routes.
Types ¶
type BroadcastReq ¶
type BroadcastReq struct { Tx legacytx.StdTx `json:"tx" yaml:"tx"` Mode string `json:"mode" yaml:"mode"` }
BroadcastReq defines a tx broadcasting request.
func (BroadcastReq) UnpackInterfaces ¶ added in v0.43.0
func (m BroadcastReq) UnpackInterfaces(unpacker codectypes.AnyUnpacker) error
UnpackInterfaces implements the UnpackInterfacesMessage interface.
type DecodeReq ¶
type DecodeReq struct {
Tx string `json:"tx"`
}
DecodeReq defines a tx decoding request.
type EncodeResp ¶
type EncodeResp struct {
Tx string `json:"tx" yaml:"tx"`
}
EncodeResp defines a tx encoding response.