2020-04-24 15:20:34 +00:00
|
|
|
package rest
|
|
|
|
|
|
|
|
import (
|
|
|
|
"github.com/gorilla/mux"
|
|
|
|
|
|
|
|
"github.com/cosmos/cosmos-sdk/client/context"
|
2021-04-02 21:34:42 +00:00
|
|
|
sdk "github.com/cosmos/cosmos-sdk/types"
|
|
|
|
"github.com/cosmos/cosmos-sdk/types/rest"
|
|
|
|
)
|
|
|
|
|
|
|
|
// REST variable names
|
|
|
|
// nolint
|
|
|
|
const (
|
|
|
|
RestDenom = "denom"
|
2020-04-24 15:20:34 +00:00
|
|
|
)
|
|
|
|
|
|
|
|
// RegisterRoutes registers incentive-related REST handlers to a router
|
|
|
|
func RegisterRoutes(cliCtx context.CLIContext, r *mux.Router) {
|
|
|
|
registerQueryRoutes(cliCtx, r)
|
|
|
|
registerTxRoutes(cliCtx, r)
|
|
|
|
}
|
2021-04-02 21:34:42 +00:00
|
|
|
|
|
|
|
// PostClaimReq defines the properties of claim transaction's request body.
|
|
|
|
type PostClaimReq struct {
|
|
|
|
BaseReq rest.BaseReq `json:"base_req" yaml:"base_req"`
|
|
|
|
Sender sdk.AccAddress `json:"sender" yaml:"sender"`
|
|
|
|
MultiplierName string `json:"multiplier_name" yaml:"multiplier_name"`
|
|
|
|
}
|
2021-06-07 14:04:32 +00:00
|
|
|
|
|
|
|
// PostClaimReq defines the properties of claim transaction's request body.
|
|
|
|
type PostClaimVVestingReq struct {
|
|
|
|
BaseReq rest.BaseReq `json:"base_req" yaml:"base_req"`
|
|
|
|
Sender sdk.AccAddress `json:"sender" yaml:"sender"`
|
|
|
|
Receiver sdk.AccAddress `json:"receiver" yaml:"receiver"`
|
|
|
|
MultiplierName string `json:"multiplier_name" yaml:"multiplier_name"`
|
|
|
|
}
|