2019-11-25 19:46:02 +00:00
|
|
|
package rest
|
|
|
|
|
|
|
|
import (
|
|
|
|
"github.com/gorilla/mux"
|
|
|
|
|
|
|
|
"github.com/cosmos/cosmos-sdk/client/context"
|
2020-05-25 02:27:11 +00:00
|
|
|
sdk "github.com/cosmos/cosmos-sdk/types"
|
|
|
|
"github.com/cosmos/cosmos-sdk/types/rest"
|
|
|
|
)
|
|
|
|
|
|
|
|
// REST Variable names
|
|
|
|
// nolint
|
|
|
|
const (
|
|
|
|
RestType = "type"
|
|
|
|
RestDenom = "denom"
|
|
|
|
RestPhase = "phase"
|
2019-11-25 19:46:02 +00:00
|
|
|
)
|
|
|
|
|
|
|
|
// RegisterRoutes - Central function to define routes that get registered by the main application
|
|
|
|
func RegisterRoutes(cliCtx context.CLIContext, r *mux.Router) {
|
|
|
|
registerQueryRoutes(cliCtx, r)
|
|
|
|
registerTxRoutes(cliCtx, r)
|
|
|
|
}
|
2020-05-25 02:27:11 +00:00
|
|
|
|
|
|
|
// placeBidReq defines the properties of a bid request's body
|
|
|
|
type placeBidReq struct {
|
|
|
|
BaseReq rest.BaseReq `json:"base_req"`
|
|
|
|
Amount sdk.Coin `json:"amount"`
|
|
|
|
}
|