Documentation ¶
Index ¶
- Constants
- type ClientV5
- func (c *ClientV5) BuildTransaction(ctx context.Context, srcTokenAddress common.Address, srcTokenDecimals uint, ...) (Transaction, error)
- func (c *ClientV5) FetchPriceRoute(ctx context.Context, srcTokenAddress common.Address, srcTokenDecimals uint, ...) (Route, error)
- func (c *ClientV5) FetchTokensList(ctx context.Context) ([]Token, error)
- func (c *ClientV5) SetChainID(chainID uint64)
- func (c *ClientV5) SetPartnerAddress(partnerAddress common.Address)
- func (c *ClientV5) SetPartnerFeePcnt(partnerFeePcnt float64)
- type PriceRouteResponse
- type Route
- type SwapSide
- type Token
- type TokensResponse
- type Transaction
Constants ¶
View Source
const ( SellSide = SwapSide("SELL") BuySide = SwapSide("BUY") )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ClientV5 ¶
type ClientV5 struct {
// contains filtered or unexported fields
}
func NewClientV5 ¶
func (*ClientV5) BuildTransaction ¶
func (c *ClientV5) BuildTransaction(ctx context.Context, srcTokenAddress common.Address, srcTokenDecimals uint, srcAmountWei *big.Int, destTokenAddress common.Address, destTokenDecimals uint, destAmountWei *big.Int, slippageBasisPoints uint, addressFrom common.Address, addressTo common.Address, priceRoute json.RawMessage, side SwapSide) (Transaction, error)
func (*ClientV5) FetchPriceRoute ¶
func (*ClientV5) FetchTokensList ¶
func (*ClientV5) SetChainID ¶
func (*ClientV5) SetPartnerAddress ¶ added in v0.182.38
func (*ClientV5) SetPartnerFeePcnt ¶ added in v0.182.38
type PriceRouteResponse ¶
type PriceRouteResponse struct { PriceRoute json.RawMessage `json:"priceRoute"` Error string `json:"error"` }
type Route ¶
type Route struct { GasCost *bigint.BigInt `json:"gasCost"` SrcAmount *bigint.BigInt `json:"srcAmount"` SrcTokenAddress common.Address `json:"srcToken"` SrcTokenDecimals uint `json:"srcDecimals"` DestAmount *bigint.BigInt `json:"destAmount"` DestTokenAddress common.Address `json:"destToken"` DestTokenDecimals uint `json:"destDecimals"` RawPriceRoute json.RawMessage `json:"rawPriceRoute"` Side SwapSide `json:"side"` }
type TokensResponse ¶
Click to show internal directories.
Click to hide internal directories.