Documentation ¶
Index ¶
- Constants
- type AddressType
- type Chain
- type ChainConfig
- type ChannelAndPortId
- type ChannelEnd
- type ChannelOutputResult
- type ChannelResult
- type Channels
- type ClientCreationResponse
- type ClientQueryResult
- type ClientResult
- type Clients
- type Config
- type ConnectionEnd
- type ConnectionQueryResult
- type ConnectionResponse
- type ConnectionResult
- type ConnectionSide
- type Connections
- type Counterparty
- type CreateClient
- type CreateClientResult
- type DelayPeriod
- type GasPrice
- type Global
- type Mode
- type Packets
- type Relayer
- func (r *Relayer) AddChainConfiguration(ctx context.Context, rep ibc.RelayerExecReporter, chainConfig ibc.ChainConfig, ...) error
- func (r *Relayer) CreateChannel(ctx context.Context, rep ibc.RelayerExecReporter, pathName string, ...) error
- func (r *Relayer) CreateClients(ctx context.Context, rep ibc.RelayerExecReporter, pathName string, ...) error
- func (r *Relayer) CreateConnections(ctx context.Context, rep ibc.RelayerExecReporter, pathName string) error
- func (r *Relayer) Flush(ctx context.Context, rep ibc.RelayerExecReporter, pathName string, ...) error
- func (r *Relayer) GeneratePath(ctx context.Context, rep ibc.RelayerExecReporter, ...) error
- func (r *Relayer) LinkPath(ctx context.Context, rep ibc.RelayerExecReporter, pathName string, ...) error
- func (r *Relayer) RestoreKey(ctx context.Context, rep ibc.RelayerExecReporter, cfg ibc.ChainConfig, ...) error
- func (r *Relayer) UpdateClients(ctx context.Context, rep ibc.RelayerExecReporter, pathName string) error
- type Rest
- type Result
- type Telemetry
- type TrustThreshold
- type Versions
- type Wallet
- type WalletModel
Constants ¶
const (
DefaultContainerVersion = "1.4.0"
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AddressType ¶
type AddressType struct {
Derivation string `toml:"derivation"`
}
type Chain ¶
type Chain struct { ID string `toml:"id"` RPCAddr string `toml:"rpc_addr"` GrpcAddr string `toml:"grpc_addr"` WebsocketAddr string `toml:"websocket_addr"` RPCTimeout string `toml:"rpc_timeout"` AccountPrefix string `toml:"account_prefix"` KeyName string `toml:"key_name"` AddressType AddressType `toml:"address_type"` StorePrefix string `toml:"store_prefix"` DefaultGas int `toml:"default_gas"` MaxGas int `toml:"max_gas"` GasPrice GasPrice `toml:"gas_price"` GasMultiplier float64 `toml:"gas_multiplier"` MaxMsgNum int `toml:"max_msg_num"` MaxTxSize int `toml:"max_tx_size"` ClockDrift string `toml:"clock_drift"` MaxBlockTime string `toml:"max_block_time"` TrustingPeriod string `toml:"trusting_period"` TrustThreshold TrustThreshold `toml:"trust_threshold"` MemoPrefix string `toml:"memo_prefix,omitempty"` }
type ChainConfig ¶
type ChainConfig struct {
// contains filtered or unexported fields
}
ChainConfig holds all values required to write an entry in the "chains" section in the hermes config file.
type ChannelAndPortId ¶
type ChannelEnd ¶
type ChannelEnd struct { ConnectionHops []string `json:"connection_hops"` Ordering string `json:"ordering"` State string `json:"state"` Version string `json:"version"` Remote ChannelAndPortId `json:"remote"` }
type ChannelOutputResult ¶
type ChannelOutputResult struct {
Result []ChannelResult `json:"result"`
}
ChannelOutputResult contains the minimum required channel values.
type ChannelResult ¶
type ChannelResult struct { ChannelEnd ChannelEnd `json:"channel_end"` CounterPartyChannelEnd ChannelEnd `json:"counterparty_channel_end"` }
type ClientCreationResponse ¶
type ClientCreationResponse struct {
Result CreateClientResult `json:"result"`
}
ClientCreationResponse contains the minimum required values to extract the client id from the hermes response.
type ClientQueryResult ¶
type ClientQueryResult struct {
ClientResult []ClientResult `json:"result"`
}
type ClientResult ¶
type Config ¶
type Config struct { Global Global `toml:"global"` Mode Mode `toml:"mode"` Rest Rest `toml:"rest"` Telemetry Telemetry `toml:"telemetry"` Chains []Chain `toml:"chains"` }
func NewConfig ¶
func NewConfig(chainConfigs ...ChainConfig) Config
NewConfig returns a hermes Config with an entry for each of the provided ChainConfigs. The defaults were adapted from the sample config file found here: https://github.com/informalsystems/hermes/blob/master/config.toml
type ConnectionEnd ¶
type ConnectionEnd struct { ClientID string `json:"client_id"` Counterparty Counterparty `json:"counterparty"` DelayPeriod DelayPeriod `json:"delay_period"` State string `json:"state"` Versions []Versions `json:"versions"` }
type ConnectionQueryResult ¶
type ConnectionResponse ¶
type ConnectionResponse struct {
Result ConnectionResult `json:"result"`
}
ConnectionResponse contains the minimum required values to extract the connection id from both sides.
type ConnectionResult ¶
type ConnectionResult struct { ASide ConnectionSide `json:"a_side"` BSide ConnectionSide `json:"b_side"` }
type ConnectionSide ¶
type ConnectionSide struct {
ConnectionID string `json:"connection_id"`
}
type Connections ¶
type Connections struct {
Enabled bool `toml:"enabled"`
}
type Counterparty ¶
type CreateClient ¶
type CreateClientResult ¶
type CreateClientResult struct {
CreateClient CreateClient `json:"CreateClient"`
}
type DelayPeriod ¶
type Mode ¶
type Mode struct { Clients Clients `toml:"clients"` Connections Connections `toml:"connections"` Channels Channels `toml:"channels"` Packets Packets `toml:"packets"` }
type Relayer ¶
type Relayer struct { *relayer.DockerRelayer // contains filtered or unexported fields }
Relayer is the ibc.Relayer implementation for hermes.
func NewHermesRelayer ¶
func NewHermesRelayer(log *zap.Logger, testName string, cli *client.Client, networkID string, options ...relayer.RelayerOption) *Relayer
NewHermesRelayer returns a new hermes relayer.
func (*Relayer) AddChainConfiguration ¶
func (r *Relayer) AddChainConfiguration(ctx context.Context, rep ibc.RelayerExecReporter, chainConfig ibc.ChainConfig, keyName, rpcAddr, grpcAddr string) error
AddChainConfiguration is called once per chain configuration, which means that in the case of hermes, the single config file is overwritten with a new entry each time this function is called.
func (*Relayer) CreateChannel ¶
func (r *Relayer) CreateChannel(ctx context.Context, rep ibc.RelayerExecReporter, pathName string, opts ibc.CreateChannelOptions) error
func (*Relayer) CreateClients ¶
func (r *Relayer) CreateClients(ctx context.Context, rep ibc.RelayerExecReporter, pathName string, opts ibc.CreateClientOptions) error
CreateClients creates clients on both chains. Note: in the go relayer this can be done with a single command using the path reference, however in Hermes this needs to be done as two separate commands.
func (*Relayer) CreateConnections ¶
func (*Relayer) GeneratePath ¶
func (r *Relayer) GeneratePath(ctx context.Context, rep ibc.RelayerExecReporter, srcChainID, dstChainID, pathName string) error
GeneratePath establishes an in memory path representation. The concept does not exist in hermes, so it is handled at the interchain test level.
func (*Relayer) LinkPath ¶
func (r *Relayer) LinkPath(ctx context.Context, rep ibc.RelayerExecReporter, pathName string, channelOpts ibc.CreateChannelOptions, clientOpts ibc.CreateClientOptions) error
LinkPath performs the operations that happen when a path is linked. This includes creating clients, creating connections and establishing a channel. This happens across multiple operations rather than a single link path cli command.
func (*Relayer) RestoreKey ¶
func (r *Relayer) RestoreKey(ctx context.Context, rep ibc.RelayerExecReporter, cfg ibc.ChainConfig, keyName, mnemonic string) error
RestoreKey restores a key from a mnemonic. In hermes, you must provide a file containing the mnemonic. We need to copy the contents of the mnemonic into a file on disk and then reference the newly created file.
func (*Relayer) UpdateClients ¶
type Result ¶
type Result struct { ConnectionEnd ConnectionEnd `json:"connection_end"` ConnectionID string `json:"connection_id"` }
type TrustThreshold ¶
type Wallet ¶
type Wallet struct {
// contains filtered or unexported fields
}