router

package
v0.186.0 Latest Latest
Warning

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

Go to latest
Published: Sep 11, 2024 License: MPL-2.0 Imports: 39 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrNotEnoughTokenBalance   = &errors.ErrorResponse{Code: errors.ErrorCode("WR-001"), Details: "not enough token balance, token: %s, chainId: %d"}
	ErrNotEnoughNativeBalance  = &errors.ErrorResponse{Code: errors.ErrorCode("WR-002"), Details: "not enough native balance, token: %s, chainId: %d"}
	ErrNativeTokenNotFound     = &errors.ErrorResponse{Code: errors.ErrorCode("WR-003"), Details: "native token not found"}
	ErrTokenNotFound           = &errors.ErrorResponse{Code: errors.ErrorCode("WR-004"), Details: "token not found"}
	ErrNoBestRouteFound        = &errors.ErrorResponse{Code: errors.ErrorCode("WR-005"), Details: "no best route found"}
	ErrCannotCheckBalance      = &errors.ErrorResponse{Code: errors.ErrorCode("WR-006"), Details: "cannot check balance"}
	ErrLowAmountInForHopBridge = &errors.ErrorResponse{Code: errors.ErrorCode("WR-007"), Details: "bonder fee greater than estimated received, a higher amount is needed to cover fees"}
	ErrNoPositiveBalance       = &errors.ErrorResponse{Code: errors.ErrorCode("WR-008"), Details: "no positive balance"}
)

Abbreviation `WR` for the error code stands for Wallet Router

Functions

This section is empty.

Types

type ProcessorError added in v0.182.38

type ProcessorError struct {
	ProcessorName string
	Error         error
}

type Router

type Router struct {
	// contains filtered or unexported fields
}

func NewRouter

func NewRouter(rpcClient *rpc.Client, transactor *transactions.Transactor, tokenManager *token.Manager, marketManager *market.Manager,
	collectibles *collectibles.Service, collectiblesManager *collectibles.Manager, ensService *ens.Service, stickersService *stickers.Service) *Router

func (*Router) AddPathProcessor added in v0.181.31

func (r *Router) AddPathProcessor(processor pathprocessor.PathProcessor)

func (*Router) GetFeesManager

func (r *Router) GetFeesManager() *fees.FeeManager

func (*Router) GetPathProcessors added in v0.179.29

func (r *Router) GetPathProcessors() map[string]pathprocessor.PathProcessor

func (*Router) SetTestBalanceMap added in v0.186.0

func (r *Router) SetTestBalanceMap(balanceMap map[string]*big.Int)

func (*Router) Stop added in v0.181.32

func (r *Router) Stop()

func (*Router) StopSuggestedRoutesAsyncCalculation added in v0.186.0

func (r *Router) StopSuggestedRoutesAsyncCalculation()

func (*Router) StopSuggestedRoutesCalculation added in v0.186.0

func (r *Router) StopSuggestedRoutesCalculation()

func (*Router) SuggestedRoutes

func (r *Router) SuggestedRoutes(ctx context.Context, input *requests.RouteInputParams) (suggestedRoutes *SuggestedRoutes, err error)

func (*Router) SuggestedRoutesAsync added in v0.186.0

func (r *Router) SuggestedRoutesAsync(input *requests.RouteInputParams)

type SuggestedRoutes

type SuggestedRoutes struct {
	Uuid                  string
	Best                  routes.Route
	Candidates            routes.Route
	TokenPrice            float64
	NativeChainTokenPrice float64
}

Directories

Path Synopsis
mock_pathprocessor
Package mock_pathprocessor is a generated GoMock package.
Package mock_pathprocessor is a generated GoMock package.

Jump to

Keyboard shortcuts

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