Documentation ¶
Index ¶
- func SignTx(tx *Tx, txCfg sdkclient.TxConfig, privKey *secp256k1.PrivKey) ([]byte, error)
- type GRPCClient
- func (c *GRPCClient) BroadcastTx(ctx context.Context, txBytes []byte, mode sdktx.BroadcastMode) (*sdktx.BroadcastTxResponse, error)
- func (c *GRPCClient) Close() error
- func (c *GRPCClient) GetAccount(ctx context.Context, addr string) (authtypes.BaseAccount, error)
- func (c *GRPCClient) QueryBalances(ctx context.Context, addr string) (*banktypes.QueryAllBalancesResponse, error)
- type RPCClient
- func (c *RPCClient) Block(ctx context.Context, height int64) (*tmctypes.ResultBlock, error)
- func (c *RPCClient) LatestBlockHeight(ctx context.Context) (int64, error)
- func (c *RPCClient) NetworkChainID(ctx context.Context) (string, error)
- func (c *RPCClient) Status(ctx context.Context) (*tmctypes.ResultStatus, error)
- type Tx
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type GRPCClient ¶
type GRPCClient struct {
// contains filtered or unexported fields
}
func ConnectGRPC ¶
func ConnectGRPC(ctx context.Context, addr string, useTLS bool, opts ...grpc.DialOption) (*GRPCClient, error)
func ConnectGRPCWithTimeout ¶
func ConnectGRPCWithTimeout(ctx context.Context, addr string, useTLS bool, timeout time.Duration, opts ...grpc.DialOption) (*GRPCClient, error)
func (*GRPCClient) BroadcastTx ¶
func (c *GRPCClient) BroadcastTx(ctx context.Context, txBytes []byte, mode sdktx.BroadcastMode) (*sdktx.BroadcastTxResponse, error)
func (*GRPCClient) Close ¶
func (c *GRPCClient) Close() error
func (*GRPCClient) GetAccount ¶
func (c *GRPCClient) GetAccount(ctx context.Context, addr string) (authtypes.BaseAccount, error)
func (*GRPCClient) QueryBalances ¶
func (c *GRPCClient) QueryBalances(ctx context.Context, addr string) (*banktypes.QueryAllBalancesResponse, error)
type RPCClient ¶
type RPCClient struct {
// contains filtered or unexported fields
}
func ConnectRPCWithTimeout ¶
ConnectRPCWithTimeout connects RPC client connection with timeout.
func (*RPCClient) LatestBlockHeight ¶
LatestBlockHeight returns the latest block height on the network.
func (*RPCClient) NetworkChainID ¶
NetworkChainID returns network chain id.
Click to show internal directories.
Click to hide internal directories.