Documentation ¶
Index ¶
- type Client
- func (c *Client) GetAccount(address string) (account models.Account, err error)
- func (c *Client) GetAccountTxs(address string, page int, rows int) (txs models.AccountTxs, err error)
- func (c *Client) GetAsset(assetName string) (asset models.Asset, err error)
- func (c *Client) GetAssetHolders(asset string, page int, rows int) (holders models.AssetHolders, err error)
- func (c *Client) GetAssetTxs(txAsset string, page int, rows int) (txs models.AssetTxs, err error)
- func (c *Client) GetAssets(page int, rows int) (assets models.AssetInfo, err error)
- func (c *Client) GetBlock(height int64) (*ctypes.ResultBlock, error)
- func (c *Client) GetCoinMarketChartData(id string, from string, to string) (data models.CoinGeckoMarketChart, err error)
- func (c *Client) GetCoinMarketData(id string) (data models.CoinGeckoMarket, err error)
- func (c *Client) GetLatestBlockHeight() (int64, error)
- func (c *Client) GetMiniTokens(page int, rows int) (assets models.AssetInfo, err error)
- func (c *Client) GetOrder(id string) (order models.Order, err error)
- func (c *Client) GetStatus() (*ctypes.ResultStatus, error)
- func (c *Client) GetTokens(limit int, offset int) (tokens []models.Token, err error)
- func (c *Client) GetTxMsgFees() (fees []*models.TxMsgFee, err error)
- func (c *Client) GetValidatorSet(height int64) (*ctypes.ResultValidators, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client wraps for both Tendermint RPC and other API clients that are needed for this project
func NewClient ¶
func NewClient(cfg config.NodeConfig, marketCfg config.MarketConfig) *Client
NewClient creates a new client with the given config
func (*Client) GetAccount ¶
GetAccount returns account information given an account address.
func (*Client) GetAccountTxs ¶
func (c *Client) GetAccountTxs(address string, page int, rows int) (txs models.AccountTxs, err error)
GetAccountTxs retuns tranctions involving in an account based upon params.
func (*Client) GetAssetHolders ¶
func (c *Client) GetAssetHolders(asset string, page int, rows int) (holders models.AssetHolders, err error)
GetAssetHolders returns all asset holders information based upon params.
func (*Client) GetAssetTxs ¶
GetAssetTxs returns asset transactions given an asset name based upon params.
func (*Client) GetBlock ¶
func (c *Client) GetBlock(height int64) (*ctypes.ResultBlock, error)
GetBlock queries for a block by height. An error is returned if the query fails.
func (*Client) GetCoinMarketChartData ¶
func (c *Client) GetCoinMarketChartData(id string, from string, to string) (data models.CoinGeckoMarketChart, err error)
GetCoinMarketChartData returns current market chart data from CoinGecko API based upon params.
func (*Client) GetCoinMarketData ¶
func (c *Client) GetCoinMarketData(id string) (data models.CoinGeckoMarket, err error)
GetCoinMarketData returns market data from CoinGecko API based upon params.
func (*Client) GetLatestBlockHeight ¶
GetLatestBlockHeight returns the latest block height on the active chain.
func (*Client) GetMiniTokens ¶
GetMiniTokens returns a list of available mini tokens.
func (*Client) GetStatus ¶
func (c *Client) GetStatus() (*ctypes.ResultStatus, error)
GetStatus returns status info on the active chain.
func (*Client) GetTxMsgFees ¶
GetTxMsgFees returns fees for different transaciton message types.
func (*Client) GetValidatorSet ¶
func (c *Client) GetValidatorSet(height int64) (*ctypes.ResultValidators, error)
GetValidatorSet returns all the known Tendermint validators for a given block height. An error is returned if the query fails.