Documentation ¶
Index ¶
- type Chain
- type ChainClient
- func (c *ChainClient) CreateRandWallet(keyName string) (string, error)
- func (c *ChainClient) CreateWallet(keyName, mnemonic string) (string, error)
- func (c *ChainClient) CustomSendMsg(ctx context.Context, keyName string, msg sdk.Msg, memo string) (*sdk.TxResponse, error)
- func (c *ChainClient) CustomSendMsgs(ctx context.Context, keyName string, msgs []sdk.Msg, memo string) (*sdk.TxResponse, error)
- func (c *ChainClient) GetChainAssets() ([]*pb.ChainAsset, error)
- func (c *ChainClient) GetChainDenom() (string, error)
- func (c *ChainClient) GetChainID() string
- func (c *ChainClient) GetChainKeys() (*pb.Keys, error)
- func (c *ChainClient) GetChainRegistry() (*pb.ChainRegistry, error)
- func (c *ChainClient) GetGenesisMnemonic() (string, error)
- func (c *ChainClient) GetHeight() (int64, error)
- func (c *ChainClient) GetIBCChannel(chain2 string) (*pb.ChannelData, error)
- func (c *ChainClient) GetIBCInfo(chain2 string) (*pb.IBCData, error)
- func (c *ChainClient) GetRPCAddr() string
- func (c *ChainClient) GetStatus() (*coretypes.ResultStatus, error)
- func (c *ChainClient) Initialize() error
- func (c *ChainClient) MustGetChainDenom() string
- func (c *ChainClient) SendMsg(ctx context.Context, msg sdk.Msg, memo string) (*sdk.TxResponse, error)
- func (c *ChainClient) SendMsgs(ctx context.Context, msgs []sdk.Msg, memo string) (*sdk.TxResponse, error)
- type ChainClients
- type Config
- type Feature
- type Port
- type Relayer
- type Upgrade
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Chain ¶
type Chain struct { ID string `name:"id" json:"id" yaml:"id"` Name string `name:"name" json:"name" yaml:"name"` NumValidators int `name:"num-validators" json:"num_validators" yaml:"numValidators"` Ports Port `name:"ports" json:"ports" yaml:"ports"` Upgrade Upgrade `name:"upgrade" json:"upgrade" yaml:"upgrade"` }
func (*Chain) GetRESTAddr ¶
func (*Chain) GetRPCAddr ¶
type ChainClient ¶
type ChainClient struct { Logger *zap.Logger Config *Config Address string ChainID string ChainConfig *lens.ChainClientConfig Client *lens.ChainClient }
func NewChainClient ¶
func (*ChainClient) CreateRandWallet ¶
func (c *ChainClient) CreateRandWallet(keyName string) (string, error)
func (*ChainClient) CreateWallet ¶
func (c *ChainClient) CreateWallet(keyName, mnemonic string) (string, error)
func (*ChainClient) CustomSendMsg ¶
func (c *ChainClient) CustomSendMsg(ctx context.Context, keyName string, msg sdk.Msg, memo string) (*sdk.TxResponse, error)
func (*ChainClient) CustomSendMsgs ¶
func (c *ChainClient) CustomSendMsgs(ctx context.Context, keyName string, msgs []sdk.Msg, memo string) (*sdk.TxResponse, error)
CustomSendMsgs wraps the msgs in a StdTx, signs and sends it. An error is returned if there was an issue sending the transaction. A successfully sent, but failed transaction will not return an error. If a transaction is successfully sent, the result of the execution of that transaction will be logged. A boolean indicating if a transaction was successfully sent and executed successfully is returned.
func (*ChainClient) GetChainAssets ¶
func (c *ChainClient) GetChainAssets() ([]*pb.ChainAsset, error)
GetChainAssets fetches the assets from chain registry at `/chains/{chain-id}/assets` endpoint
func (*ChainClient) GetChainDenom ¶
func (c *ChainClient) GetChainDenom() (string, error)
func (*ChainClient) GetChainID ¶
func (c *ChainClient) GetChainID() string
func (*ChainClient) GetChainKeys ¶
func (c *ChainClient) GetChainKeys() (*pb.Keys, error)
GetChainKeys fetches keys from the chain registry at `/chains/{chain-id}/keys` endpoint
func (*ChainClient) GetChainRegistry ¶
func (c *ChainClient) GetChainRegistry() (*pb.ChainRegistry, error)
GetChainRegistry fetches the chain registry from the registry at `/chains/{chain-id}` endpoint
func (*ChainClient) GetGenesisMnemonic ¶
func (c *ChainClient) GetGenesisMnemonic() (string, error)
GetGenesisMnemonic fetches the mnemonic from GetChainKeys and returns the first mnemonic in genesis list
func (*ChainClient) GetHeight ¶
func (c *ChainClient) GetHeight() (int64, error)
func (*ChainClient) GetIBCChannel ¶
func (c *ChainClient) GetIBCChannel(chain2 string) (*pb.ChannelData, error)
func (*ChainClient) GetIBCInfo ¶
func (c *ChainClient) GetIBCInfo(chain2 string) (*pb.IBCData, error)
func (*ChainClient) GetRPCAddr ¶
func (c *ChainClient) GetRPCAddr() string
func (*ChainClient) GetStatus ¶
func (c *ChainClient) GetStatus() (*coretypes.ResultStatus, error)
func (*ChainClient) Initialize ¶
func (c *ChainClient) Initialize() error
func (*ChainClient) MustGetChainDenom ¶
func (c *ChainClient) MustGetChainDenom() string
func (*ChainClient) SendMsg ¶
func (c *ChainClient) SendMsg(ctx context.Context, msg sdk.Msg, memo string) (*sdk.TxResponse, error)
func (*ChainClient) SendMsgs ¶
func (c *ChainClient) SendMsgs(ctx context.Context, msgs []sdk.Msg, memo string) (*sdk.TxResponse, error)
SendMsgs wraps the msgs in a StdTx, signs and sends it. An error is returned if there was an issue sending the transaction. A successfully sent, but failed transaction will not return an error. If a transaction is successfully sent, the result of the execution of that transaction will be logged. A boolean indicating if a transaction was successfully sent and executed successfully is returned.
type ChainClients ¶
type ChainClients []*ChainClient
func NewChainClients ¶
func NewChainClients(logger *zap.Logger, config *Config) (ChainClients, error)
func (ChainClients) GetChainClient ¶
func (cc ChainClients) GetChainClient(chainID string) (*ChainClient, error)
GetChainClient returns a chain client pointer for the given chain id
type Config ¶
type Config struct { Chains []*Chain `name:"chains" json:"chains" yaml:"chains"` Relayers []*Relayer `name:"relayers" json:"relayers" yaml:"relayers"` Explorer *Feature `name:"explorer" json:"explorer" yaml:"explorer"` Registry *Feature `name:"registry" json:"registry" yaml:"registry"` }
Config is the struct for the config.yaml setup file todo: move this to a more common place, outside just tests todo: can be moved to proto defination
func (*Config) HasChainId ¶
HasChainId returns true if chain id found in list of chains
type Feature ¶
type Feature struct { Enabled bool `name:"enabled" json:"enabled" yaml:"enabled"` Image string `name:"image" json:"image" yaml:"image"` Ports Port `name:"ports" json:"ports" yaml:"ports"` }
func (*Feature) GetRESTAddr ¶
func (*Feature) GetRPCAddr ¶
type Upgrade ¶
type Upgrade struct { Enabled bool `name:"eanbled" json:"enabled" yaml:"enabled"` Type string `name:"type" json:"type" yaml:"type"` Genesis string `name:"genesis" json:"genesis" yaml:"genesis"` Upgrades []struct { Name string `name:"name" json:"name" yaml:"name"` Version string `name:"version" json:"version" yaml:"version"` } `name:"upgrades" json:"upgrades" yaml:"upgrades"` }