bitflowhelper

package
v1.4.569 Latest Latest
Warning

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

Go to latest
Published: Jan 31, 2025 License: GPL-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	StableSwapDeployer = "SPQC38PW542EQJ5M11CR25P7BS1CA6QT4TBXGB3M"
	XykDeployer        = "SM1793C4R5PZ4NS4VQ4WMP7SKKYVH8JZEWSZ9HCCR"
)

Variables

View Source
var SwapContracts = [...]SwapContract{
	{
		DeployerAddress:  StableSwapDeployer,
		ContractRegistry: "stableswap-stx-ststx-v-1-2",
		ContractType:     0,
	},
	{
		DeployerAddress:  StableSwapDeployer,
		ContractRegistry: "stableswap-usda-susdt-v-1-2",
		ContractType:     0,
	},
	{
		DeployerAddress:  StableSwapDeployer,
		ContractRegistry: "stableswap-aeusdc-susdt-v-1-2",
		ContractType:     0,
	},
	{
		DeployerAddress:  StableSwapDeployer,
		ContractRegistry: "stableswap-usda-aeusdc-v-1-2",
		ContractType:     0,
	},
	{
		DeployerAddress:  StableSwapDeployer,
		ContractRegistry: "stableswap-usda-aeusdc-v-1-4",
		ContractType:     0,
	},
	{
		DeployerAddress:  StableSwapDeployer,
		ContractRegistry: "stableswap-abtc-xbtc-v-1-2",
		ContractType:     0,
	},
	{
		DeployerAddress:  XykDeployer,
		ContractRegistry: "xyk-core-v-1-2",
		ContractType:     1,
	},
}

Functions

This section is empty.

Types

type BitflowClient

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

func NewBitflowClient

func NewBitflowClient(apiHost, apiKey string, logger *logrus.Entry, isDebug bool) *BitflowClient

func (*BitflowClient) GetAllTokens

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

type GetAllTokensResponse

type GetAllTokensResponse struct {
	Tokens []TokenMetadata `json:"tokens"`
}

type SwapContract added in v1.4.566

type SwapContract struct {
	DeployerAddress  string
	ContractRegistry string
	ContractType     int
}

type TokenMetadata

type TokenMetadata struct {
	TokenID       string               `json:"token-id"`
	Name          string               `json:"name"`
	Symbol        string               `json:"symbol"`
	TokenDecimals uint                 `json:"tokenDecimals"`
	TokenContract string               `json:"tokenContract"`
	WrapTokens    map[string]WrapToken `json:"wrapTokens"`
}

type WrapToken added in v1.4.566

type WrapToken struct {
	TokenDecimals uint   `json:"tokenDecimals"`
	TokenContract string `json:"tokenContract"`
	Name          string `json:"tokenName"`
}

Jump to

Keyboard shortcuts

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