velarhelper

package
v1.4.573 Latest Latest
Warning

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

Go to latest
Published: Feb 21, 2025 License: GPL-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DeployerAddress   = "SP1Y5YSTAHZ88XYK1VPDH24GY0HPX5J4JECTMY4A1"
	DeployerAddressV2 = "SP20X3DC5R091J8B6YPQT638J8NR1W83KN6TN5BJY"
	VelarCoreAddress  = DeployerAddress + ".univ2-core"
	VelarURL          = "https://api.velar.co"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type SwapEvent added in v1.4.569

type SwapEvent struct {
	TxID      string
	TickerID  string
	AmountIn  *big.Int
	AmountOut *big.Int
	TokenIn   string
	TokenOut  string
	Timestamp int
}

func DecodeSwapEvents added in v1.4.569

func DecodeSwapEvents(tx stacks.Transaction) ([]SwapEvent, error)

type Ticker

type Ticker struct {
	ID             string  `json:"ticker_id"`
	PoolID         string  `json:"pool_id"`
	BaseCurrency   string  `json:"base_currency"`
	TargetCurrency string  `json:"target_currency"`
	BaseVolume     float64 `json:"base_volume"`
	TargetVolume   float64 `json:"target_volume"`
}

type TokenMetadata

type TokenMetadata struct {
	ContractAddress string `json:"contractAddress"`
	Name            string `json:"name"`
	Symbol          string `json:"symbol"`
	Decimals        string `json:"decimal"`
	DecimalNum      int    `json:"tokenDecimalNum"`
}

type VelarClient

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

func NewVelarClient

func NewVelarClient(logger *logrus.Entry, isDebug bool) *VelarClient

func (*VelarClient) GetAllTickers

func (c *VelarClient) GetAllTickers() ([]Ticker, error)

func (*VelarClient) GetAllTokens

func (c *VelarClient) GetAllTokens() ([]TokenMetadata, error)

Jump to

Keyboard shortcuts

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