rest

package
v1.4.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 14, 2022 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CoinBuyRequestHandlerFn

func CoinBuyRequestHandlerFn(cliCtx context.CLIContext) http.HandlerFunc

func CoinCreateRequestHandlerFn

func CoinCreateRequestHandlerFn(cliCtx context.CLIContext) http.HandlerFunc

func CoinSellAllRequestHandlerFn

func CoinSellAllRequestHandlerFn(cliCtx context.CLIContext) http.HandlerFunc

func CoinSellRequestHandlerFn

func CoinSellRequestHandlerFn(cliCtx context.CLIContext) http.HandlerFunc

func CoinSendRequestHandlerFn

func CoinSendRequestHandlerFn(cliCtx context.CLIContext) http.HandlerFunc

func RegisterRoutes

func RegisterRoutes(cliCtx context.CLIContext, r *mux.Router)

RegisterRoutes registers coin-related REST handlers to a router

Types

type CoinBuyReq

type CoinBuyReq struct {
	BaseReq      rest.BaseReq `json:"base_req" yaml:"base_req"`
	CoinToSell   string       `json:"coin_to_sell" yaml:"coin_to_sell"`
	AmountToSell string       `json:"amount_to_sell" yaml:"amount_to_sell"`
	CoinToBuy    string       `json:"coin_to_buy" yaml:"coin_to_buy"`
}

type CoinCreateReq

type CoinCreateReq struct {
	BaseReq              rest.BaseReq `json:"base_req" yaml:"base_req"`
	Title                string       `json:"title" yaml:"title"`                                   // Full coin title (Bitcoin)
	ConstantReserveRatio string       `json:"constant_reserve_ratio" yaml:"constant_reserve_ratio"` // between 10 and 100
	Symbol               string       `json:"symbol" yaml:"symbol"`                                 // Short coin title (BTC)
	InitialVolume        string       `json:"initial_volume" yaml:"initial_volume"`
	InitialReserve       string       `json:"initial_reserve" yaml:"initial_reserve"`
	LimitVolume          string       `json:"limit_volume" yaml:"limit_volume"` // How many coins can be issued
	Identity             string       `json:"identity" yaml:"identity"`
}

type CoinSellAllReq

type CoinSellAllReq struct {
	BaseReq     rest.BaseReq `json:"base_req" yaml:"base_req"`
	CoinToSell  string       `json:"coin_to_sell" yaml:"coin_to_sell"`
	CoinToBuy   string       `json:"coin_to_buy" yaml:"coin_to_buy"`
	AmountToBuy sdk.Int      `json:"amount_to_buy" yaml:"amount_to_buy"`
}

type CoinSellReq

type CoinSellReq struct {
	BaseReq      rest.BaseReq `json:"base_req" yaml:"base_req"`
	CoinToSell   string       `json:"coin_to_sell" yaml:"coin_to_sell"`
	AmountToSell string       `json:"amount_to_sell" yaml:"amount_to_sell"`
	CoinToBuy    string       `json:"coin_to_buy" yaml:"coin_to_buy"`
}

type CoinSendReq

type CoinSendReq struct {
	BaseReq  rest.BaseReq `json:"base_req" yaml:"base_req"`
	Coin     string       `json:"coin" yaml:"coin"`
	Amount   string       `json:"amount" yaml:"amount"`
	Receiver string       `json:"receiver" yaml:"receiver"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL