client

package
v0.0.0-...-7c8ce1f Latest Latest
Warning

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

Go to latest
Published: Aug 2, 2021 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

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

func (c *Client) GetAccount(address string) (account models.Account, err error)

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) GetAsset

func (c *Client) GetAsset(assetName string) (asset models.Asset, err error)

GetAsset returns particular asset information given an asset name.

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

func (c *Client) GetAssetTxs(txAsset string, page int, rows int) (txs models.AssetTxs, err error)

GetAssetTxs returns asset transactions given an asset name based upon params.

func (*Client) GetAssets

func (c *Client) GetAssets(page int, rows int) (assets models.AssetInfo, err error)

GetAssets returns information of all assets existing in an active chain.

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

func (c *Client) GetLatestBlockHeight() (int64, error)

GetLatestBlockHeight returns the latest block height on the active chain.

func (*Client) GetMiniTokens

func (c *Client) GetMiniTokens(page int, rows int) (assets models.AssetInfo, err error)

GetMiniTokens returns a list of available mini tokens.

func (*Client) GetOrder

func (c *Client) GetOrder(id string) (order models.Order, err error)

GetOrder returns order information with given order id.

func (*Client) GetStatus

func (c *Client) GetStatus() (*ctypes.ResultStatus, error)

GetStatus returns status info on the active chain.

func (*Client) GetTokens

func (c *Client) GetTokens(limit int, offset int) (tokens []models.Token, err error)

GetTokens returns information about existing tokens in active chain

func (*Client) GetTxMsgFees

func (c *Client) GetTxMsgFees() (fees []*models.TxMsgFee, err error)

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.

Jump to

Keyboard shortcuts

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