Documentation ¶
Index ¶
- Constants
- type BankClient
- type BaseClient
- type CosmosClient
- func (c *CosmosClient) BlockTxsByHeight(ctx context.Context, blk *big.Int) ([]*sdk.TxResponse, error)
- func (c *CosmosClient) GetValidatorDetail(ctx context.Context, valAddress string) (*stakingTypes.Validator, error)
- func (c *CosmosClient) LatestBlockHeight(ctx context.Context) (*big.Int, error)
- func (c *CosmosClient) ListenToTxs(ctx context.Context, txResult chan interface{}, startBlk *big.Int)
- func (c *CosmosClient) ParseCosmosMsgReceiver(msg sdk.Msg) string
- func (c *CosmosClient) ParseCosmosMsgSender(msg sdk.Msg) string
- func (c *CosmosClient) ParseCosmosMsgValue(msg sdk.Msg) float64
- func (c *CosmosClient) TxByHash(hash string) (*sdk.TxResponse, error)
- type CosmosClientConfig
- type StakingClient
Constants ¶
View Source
const (
Denom = "aastra"
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BankClient ¶
type BankClient struct { bankTypes.QueryClient bankTypes.MsgClient }
func NewBankClient ¶
func NewBankClient(conn grpc.ClientConn) BankClient
type BaseClient ¶
type CosmosClient ¶
type CosmosClient struct { *BaseClient BankClient StakingClient // contains filtered or unexported fields }
func NewCosmosClient ¶
func NewCosmosClient(cfg CosmosClientConfig, store *store.Store, log logger.Logger) (*CosmosClient, error)
NewCosmosClient creates a new cosmos client.
func (*CosmosClient) BlockTxsByHeight ¶
func (c *CosmosClient) BlockTxsByHeight(ctx context.Context, blk *big.Int) ([]*sdk.TxResponse, error)
BlockTxsByHeight retrieves the receipts of all transaction in a block given its height.
func (*CosmosClient) GetValidatorDetail ¶
func (c *CosmosClient) GetValidatorDetail(ctx context.Context, valAddress string) (*stakingTypes.Validator, error)
func (*CosmosClient) LatestBlockHeight ¶
LatestBlockHeight returns the latest block height from the current chain.
func (*CosmosClient) ListenToTxs ¶
func (c *CosmosClient) ListenToTxs(ctx context.Context, txResult chan interface{}, startBlk *big.Int)
func (*CosmosClient) ParseCosmosMsgReceiver ¶
func (c *CosmosClient) ParseCosmosMsgReceiver(msg sdk.Msg) string
ParseCosmosMsgReceiver returns the recipients of the given Cosmos message.
func (*CosmosClient) ParseCosmosMsgSender ¶
func (c *CosmosClient) ParseCosmosMsgSender(msg sdk.Msg) string
ParseCosmosMsgSender returns the sender of the given Cosmos message.
func (*CosmosClient) ParseCosmosMsgValue ¶
func (c *CosmosClient) ParseCosmosMsgValue(msg sdk.Msg) float64
ParseCosmosMsgValue returns the value of the given Cosmos message.
func (*CosmosClient) TxByHash ¶
func (c *CosmosClient) TxByHash(hash string) (*sdk.TxResponse, error)
type CosmosClientConfig ¶
type CosmosClientConfig struct { Endpoint string `json:"Endpoint"` TendermintPort string `json:"TendermintPort"` Prefix string `json:"Prefix"` ChainID string `json:"ChainID"` Enabled bool `json:"Enabled"` }
func DefaultConfig ¶
func DefaultConfig() CosmosClientConfig
func (CosmosClientConfig) IsValid ¶
func (cfg CosmosClientConfig) IsValid() (bool, error)
IsValid checks if the current CosmosClientConfig is valid.
type StakingClient ¶
type StakingClient struct {
stakingTypes.QueryClient
}
func NewStakingClient ¶
func NewStakingClient(conn grpc.ClientConn) StakingClient
Click to show internal directories.
Click to hide internal directories.