swap

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Feb 5, 2026 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type RelaySwapTransaction

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

func NewRelaySwapTransaction

func NewRelaySwapTransaction(service *SwapService, quoteResponse *relaylink.QuoteResponse, signer string) *RelaySwapTransaction

func (*RelaySwapTransaction) OutAmount

func (tx *RelaySwapTransaction) OutAmount() *big.Int

func (*RelaySwapTransaction) Signer

func (tx *RelaySwapTransaction) Signer() string

func (*RelaySwapTransaction) SlippageBps

func (tx *RelaySwapTransaction) SlippageBps() int

func (*RelaySwapTransaction) Swap

type SwapService

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

func NewSwapService

func NewSwapService(svcCtx *svc.ServiceContext, userId int64) *SwapService

func (*SwapService) Quote

func (s *SwapService) Quote(ctx context.Context, inputToken, outputToken string, amount *big.Int, exit ...bool) (SwapTransaction, error)

type SwapTransaction

type SwapTransaction interface {
	Signer() string
	OutAmount() *big.Int
	SlippageBps() int
	Swap(ctx context.Context) (string, uint64, error)
}

Jump to

Keyboard shortcuts

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