2022-03-22 21:13:27 +00:00
|
|
|
package rest
|
|
|
|
|
|
|
|
import (
|
|
|
|
"github.com/gorilla/mux"
|
|
|
|
|
|
|
|
"github.com/cosmos/cosmos-sdk/client"
|
2022-03-23 14:34:23 +00:00
|
|
|
sdk "github.com/cosmos/cosmos-sdk/types"
|
|
|
|
"github.com/cosmos/cosmos-sdk/types/rest"
|
2022-03-22 21:13:27 +00:00
|
|
|
)
|
|
|
|
|
|
|
|
// RegisterRoutes - Central function to define routes that get registered by the main application
|
|
|
|
func RegisterRoutes(cliCtx client.Context, r *mux.Router) {
|
|
|
|
registerQueryRoutes(cliCtx, r)
|
|
|
|
registerTxRoutes(cliCtx, r)
|
|
|
|
}
|
2022-03-23 14:34:23 +00:00
|
|
|
|
|
|
|
// PostCreateDepositReq defines the properties of a deposit create request's body
|
|
|
|
type PostCreateDepositReq struct {
|
|
|
|
BaseReq rest.BaseReq `json:"base_req" yaml:"base_req"`
|
|
|
|
From sdk.AccAddress `json:"from" yaml:"from"`
|
|
|
|
Amount sdk.Coins `json:"amount" yaml:"amount"`
|
|
|
|
}
|