Documentation ¶
Index ¶
- func IsNotFound(err error) bool
- type AddTokenRoundTripper
- type ClientOption
- type ClientOptions
- type ClientProxy
- func (cp *ClientProxy) Balance(ctx context.Context, address string, denom string) (sdktypes.Coin, error)
- func (cp *ClientProxy) Balances(ctx context.Context, address string) (sdktypes.Coins, error)
- func (cp *ClientProxy) BaseAccountInfo(ctx context.Context, address string) (authtypes.BaseAccount, error)
- func (cp *ClientProxy) Block(ctx context.Context, height int64) (*tmctypes.ResultBlock, error)
- func (cp *ClientProxy) BroadcastTx(ctx context.Context, txBytes []byte, mode sdktx.BroadcastMode) (*tx.BroadcastTxResponse, error)
- func (cp *ClientProxy) Close() error
- func (cp *ClientProxy) LatestBlockHeight(ctx context.Context) (int64, error)
- func (cp *ClientProxy) NetworkChainID(ctx context.Context) (string, error)
- func (cp *ClientProxy) Status(ctx context.Context) (*tmctypes.ResultStatus, error)
- func (cp *ClientProxy) SubscribeNewBlocks(subscriber string) (<-chan tmctypes.ResultEvent, context.CancelFunc, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type AddTokenRoundTripper ¶
type AddTokenRoundTripper struct {
// contains filtered or unexported fields
}
type ClientOption ¶
type ClientOption func(*ClientOptions)
func WithBlockHeight ¶
func WithBlockHeight(blockHeight int64) ClientOption
type ClientOptions ¶
type ClientOptions struct {
// contains filtered or unexported fields
}
type ClientProxy ¶
type ClientProxy struct {
// contains filtered or unexported fields
}
ClientProxy is a wrapper for various clients.
func NewClientProxy ¶
func NewClientProxy(rpcURL, rpcToken, grpcURL, grpcToken string, insecure bool) (*ClientProxy, error)
NewClientProxy creates a new Client with the given configuration.
func (*ClientProxy) Balance ¶
func (cp *ClientProxy) Balance(ctx context.Context, address string, denom string) (sdktypes.Coin, error)
Balance returns balance of a given account for staking denom.
func (*ClientProxy) BaseAccountInfo ¶
func (cp *ClientProxy) BaseAccountInfo(ctx context.Context, address string) (authtypes.BaseAccount, error)
BaseAccountInfo returns base account information
func (*ClientProxy) Block ¶
func (cp *ClientProxy) Block(ctx context.Context, height int64) (*tmctypes.ResultBlock, error)
Block returns block information for the height.
func (*ClientProxy) BroadcastTx ¶
func (cp *ClientProxy) BroadcastTx(ctx context.Context, txBytes []byte, mode sdktx.BroadcastMode) (*tx.BroadcastTxResponse, error)
BroadcastTx broadcasts transaction.
func (*ClientProxy) Close ¶
func (cp *ClientProxy) Close() error
Close sloses the node stop execution to the RPC and GRPC clients.
func (*ClientProxy) LatestBlockHeight ¶
func (cp *ClientProxy) LatestBlockHeight(ctx context.Context) (int64, error)
LatestBlockHeight returns the latest block height on the network.
func (*ClientProxy) NetworkChainID ¶
func (cp *ClientProxy) NetworkChainID(ctx context.Context) (string, error)
NetworkChainID returns network chain id.
func (*ClientProxy) Status ¶
func (cp *ClientProxy) Status(ctx context.Context) (*tmctypes.ResultStatus, error)
Status returns the status of the blockchain network.
func (*ClientProxy) SubscribeNewBlocks ¶
func (cp *ClientProxy) SubscribeNewBlocks(subscriber string) (<-chan tmctypes.ResultEvent, context.CancelFunc, error)
SubscribeNewBlocks subscribes to the new block event handler through the RPC client with the given subscriber name. An receiving only channel, context cancel function and an error is returned. It is up to the caller to cancel the context and handle any errors appropriately.