http

package
v21.2.1 Latest Latest
Warning

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

Go to latest
Published: Jan 3, 2024 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewRouterHandler

func NewRouterHandler(e *echo.Echo, us mvc.RouterUsecase, logger log.Logger)

NewRouterHandler will initialize the pools/ resources endpoint

Types

type ResponseError

type ResponseError struct {
	Message string `json:"message"`
}

ResponseError represent the response error struct

type RouterHandler

type RouterHandler struct {
	RUsecase mvc.RouterUsecase
	// contains filtered or unexported fields
}

RouterHandler represent the httphandler for the router

func (*RouterHandler) GetBestSingleRouteQuote

func (a *RouterHandler) GetBestSingleRouteQuote(c echo.Context) error

GetBestSingleRouteQuote returns the best single route quote to be done directly without a split.

func (*RouterHandler) GetCachedCandidateRoutes

func (a *RouterHandler) GetCachedCandidateRoutes(c echo.Context) error

GetCandidateRoutes returns the candidate routes for a given tokenIn and tokenOutDenom from cache. If no routes present in cache, it does not attempt to recompute them.

func (*RouterHandler) GetCandidateRoutes

func (a *RouterHandler) GetCandidateRoutes(c echo.Context) error

GetCandidateRoutes returns the candidate routes for a given tokenIn and tokenOutDenom

func (*RouterHandler) GetCustomQuote

func (a *RouterHandler) GetCustomQuote(c echo.Context) error

GetCustomQuote returns a direct custom quote. It ensures that the route contains all the pools listed in the specific order, returns error if such route is not found.

func (*RouterHandler) GetOptimalQuote

func (a *RouterHandler) GetOptimalQuote(c echo.Context) error

GetOptimalQuote will determine the optimal quote for a given tokenIn and tokenOutDenom Return the optimal quote.

func (*RouterHandler) GetTakerFee

func (a *RouterHandler) GetTakerFee(c echo.Context) error

func (*RouterHandler) StoreRouterStateInFiles

func (a *RouterHandler) StoreRouterStateInFiles(c echo.Context) error

TODO: authentication for the endpoint and enable only in dev mode.

Jump to

Keyboard shortcuts

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