grpc

package
v0.0.0-...-84bac11 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IsNotFound

func IsNotFound(err error) bool

IsNotFound returns not found status.

Types

type Client

type Client struct {
	*grpc.ClientConn
}

Client wraps GRPC client connection.

func NewClient

func NewClient(grpcURL string, timeout int64) (*Client, error)

NewClient creates GRPC client.

func (*Client) BroadcastTx

func (c *Client) BroadcastTx(ctx context.Context, txBytes []byte) (*tx.BroadcastTxResponse, error)

BroadcastTx broadcasts transaction.

func (*Client) GetAllPools

func (c *Client) GetAllPools(ctx context.Context) (liquiditytypes.Pools, error)

GetAllPools returns all existing pools.

func (*Client) GetAuthQueryClient

func (c *Client) GetAuthQueryClient() authtypes.QueryClient

GetAuthQueryClient returns a object of queryClient

func (*Client) GetBalance

func (c *Client) GetBalance(ctx context.Context, address string, denom string) (*sdktypes.Coin, error)

GetBalance returns balance of a given account for staking denom.

func (*Client) GetBankQueryClient

func (c *Client) GetBankQueryClient() banktypes.QueryClient

GetBankQueryClient returns a object of queryClient.

func (*Client) GetBaseAccountInfo

func (c *Client) GetBaseAccountInfo(ctx context.Context, address string) (authtypes.BaseAccount, error)

GetBaseAccountInfo returns base account information

func (*Client) GetLiquidityQueryClient

func (c *Client) GetLiquidityQueryClient() liquiditytypes.QueryClient

GetLiquidityQueryClient returns a object of queryClient

func (*Client) GetPool

func (c *Client) GetPool(ctx context.Context, poolId uint64) (liquiditytypes.Pool, error)

GetPool returns pool information.

func (*Client) GetTxClient

func (c *Client) GetTxClient() tx.ServiceClient

GetTxClient returns an object of ServiceClient.

Jump to

Keyboard shortcuts

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