provider

package
v1.0.2 Latest Latest
Warning

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

Go to latest
Published: Oct 14, 2024 License: GPL-3.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AlgalonConfig

type AlgalonConfig struct {
	Blockchains []string   `json:"blockchains"`
	Tron        TronConfig `json:"tron"`
}

type Providerer

type Providerer interface {
	GenerateWallet() (Wallet, error)

	GetTRXBalance(string) (decimal.Decimal, error)

	SendTRX(Wallet, string, decimal.Decimal) (string, error)

	GetTRC20Balance(string, string) (decimal.Decimal, error)

	SendTRC20(Wallet, string, decimal.Decimal, string) (string, error)
}

type TronConfig

type TronConfig struct {
	Timeout  int `json:"timeout"`
	Interval int `json:"interval"`
	Tries    int `json:"tries"`

	Works  int `json:"works"`
	ChSize int `json:"chsize"`

	FullNodeurl         string `json:"fullNodeurl"`
	SolidityNodeurl     string `json:"solidityNodeurl"`
	RestFullNodeurl     string `json:"restFullNodeurl"`
	RestSolidityNodeurl string `json:"restSolidityNodeurl"`
	NodeRPS             int    `json:"nodeRPS"`

	TronGridNodeurl string `json:"tronGridNodeurl"`
	TronGridApiKey  string `json:"tronGridApiKey"`
	TronGridRPS     int    `json:"tronGridRPS"`

	Contracts []TronContract
}

type TronContract

type TronContract struct {
	Coin    string `json:"coin"`
	Address string `json:"address"`
	Fee     string `json:"fee"`
}

type Wallet

type Wallet struct {
	PrivKey string `json:"private_key"`
	Address string `json:"address"`
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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