hydrationhelper

package
v1.4.560 Latest Latest
Warning

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

Go to latest
Published: Nov 26, 2024 License: GPL-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

View Source
const (
	AssetAddressURI = "AssetRegistry:Assets"
	Blockchain      = "polkadot"
	GetAssetsPath   = "assets"
)
View Source
const (
	DefaultRefreshDelay              = 400 // millisec
	DefaultSleepBetweenContractCalls = 300 // millisec
	DefaultEventsLimit               = 100
	DefaultSwapContractsLimit        = 100
)

Variables

This section is empty.

Functions

This section is empty.

Types

type HydrationAssetMetadata

type HydrationAssetMetadata struct {
	Id                 string `json:"id"`
	Name               string `json:"name"`
	Symbol             string `json:"symbol"`
	Decimals           uint   `json:"decimals"`
	Icon               string `json:"icon"`
	Type               string `json:"type"`
	IsSufficient       bool   `json:"isSufficient"`
	ExistentialDeposit string `json:"existentialDeposit"`
	Origin             int    `json:"origin"`
}

type HydrationClient

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

func NewHydrationClient

func NewHydrationClient(logger *logrus.Entry, sleepBetweenCalls time.Duration, isDebug bool) *HydrationClient

type HydrationPoolMetada

type HydrationPoolMetada struct {
	Address         string                     `json:"address"`
	Type            string                     `json:"type"`
	Tokens          []HydrationPoolTokenMetada `json:"tokens"`
	MaxInRatio      int                        `json:"maxInRatio"`
	MaxOutRatio     int                        `json:"maxOutRatio"`
	MinTradingLimit int                        `json:"minTradingLimit"`
}

type HydrationPoolTokenMetada

type HydrationPoolTokenMetada struct {
	ID                 string `json:"id"`
	Balance            string `json:"balance"`
	Name               string `json:"name"`
	Symbol             string `json:"symbol"`
	Decimals           int    `json:"decimals"`
	Icon               string `json:"icon"`
	Type               string `json:"type"`
	IsSufficient       bool   `json:"isSufficient"`
	ExistentialDeposit string `json:"existentialDeposit"`
	Origin             int    `json:"origin,omitempty"`
	UsdBalance         string `json:"usdBalance"`
	Index              int    `json:"index"`
}

type HydrationPoolUsdBalanceMetadata

type HydrationPoolUsdBalanceMetadata struct {
	Amount   string `json:"amount"`
	Decimals int    `json:"decimals"`
}

type HydrationSwapEvent

type HydrationSwapEvent struct {
	TxID      string `json:"txId"`
	Timestamp int64  `json:"timestamp"`
	BlockHash string `json:"blockHash"`
	AssetIn   string `json:"assetIn"`
	AssetOut  string `json:"assetOut"`
	AmountIn  string `json:"amountIn"`
	AmountOut string `json:"amountOut"`
}

Jump to

Keyboard shortcuts

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