hyperspace

package
v8.2.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 8, 2024 License: Apache-2.0 Imports: 20 Imported by: 0

Documentation

Overview

Package hyperspace provides an interface to the hyperspace relayer running in a Docker container.

Package hyperspace provides an interface to the hyperspace relayer running in a Docker container.

Index

Constants

View Source
const (
	HyperspaceDefaultContainerImage   = "hyperspace"
	HyperspaceDefaultContainerVersion = "local"
)

Variables

This section is empty.

Functions

func ChainConfigToHyperspaceRelayerChainConfig

func ChainConfigToHyperspaceRelayerChainConfig(chainConfig ibc.ChainConfig, keyName, rpcAddr, grpcAddr string) interface{}

func HyperspaceCapabilities

func HyperspaceCapabilities() map[relayer.Capability]bool

HyperspaceCapabilities returns the set of capabilities of the Cosmos relayer.

Note, this API may change if the rly package eventually needs to distinguish between multiple rly versions.

Types

type ChannelsOutput

type ChannelsOutput struct {
	Channels [][]string `toml:"channel_whitelist"`
}

type ClientOutput

type ClientOutput struct {
	ChainID  string `toml:"chain_id"`
	ClientID string `toml:"client_id"`
}

type ConnectionsOutput

type ConnectionsOutput struct {
	ConnectionID string `toml:"connection_id"`
	ClientID     string `toml:"client_id"`
}

type HyperspaceRelayer

type HyperspaceRelayer struct {
	// Embedded DockerRelayer so commands just work.
	*relayer.DockerRelayer
}

HyperspaceRelayer is the ibc.Relayer implementation for github.com/ComposableFi/hyperspace.

func NewHyperspaceRelayer

func NewHyperspaceRelayer(log *zap.Logger, testName string, cli *client.Client, networkID string, options ...relayer.RelayerOpt) *HyperspaceRelayer

func (*HyperspaceRelayer) GetRelayerChainConfig

func (r *HyperspaceRelayer) GetRelayerChainConfig(
	ctx context.Context,
	filePath string,
	chainType string,
) (interface{}, error)

func (*HyperspaceRelayer) LinkPath

func (r *HyperspaceRelayer) 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. Parachains need a Polkadot epoch/session before starting, do not link in interchain.Build()

func (*HyperspaceRelayer) PrintConfigs

func (r *HyperspaceRelayer) PrintConfigs(ctx context.Context, rep ibc.RelayerExecReporter, chainID string) error

func (*HyperspaceRelayer) PrintCoreConfig

func (r *HyperspaceRelayer) PrintCoreConfig(ctx context.Context, rep ibc.RelayerExecReporter) error

func (*HyperspaceRelayer) RestoreKey

func (r *HyperspaceRelayer) RestoreKey(ctx context.Context, rep ibc.RelayerExecReporter, cfg ibc.ChainConfig, keyName, mnemonic string) error

func (*HyperspaceRelayer) SetClientContractHash

func (r *HyperspaceRelayer) SetClientContractHash(ctx context.Context, rep ibc.RelayerExecReporter, cfg ibc.ChainConfig, hash string) error

func (*HyperspaceRelayer) SetRelayerChainConfig

func (r *HyperspaceRelayer) SetRelayerChainConfig(
	ctx context.Context,
	filePath string,
	config interface{},
) error

type HyperspaceRelayerCoreConfig

type HyperspaceRelayerCoreConfig struct {
	PrometheusEndpoint string
}

type HyperspaceRelayerCosmosChainConfig

type HyperspaceRelayerCosmosChainConfig struct {
	Type             string   `toml:"type"`
	Name             string   `toml:"name"`
	RPCUrl           string   `toml:"rpc_url"`
	GRPCUrl          string   `toml:"grpc_url"`
	WebsocketUrl     string   `toml:"websocket_url"`
	ChainID          string   `toml:"chain_id"`
	AccountPrefix    string   `toml:"account_prefix"`
	FeeDenom         string   `toml:"fee_denom"`
	FeeAmount        string   `toml:"fee_amount"`
	GasLimit         uint64   `toml:"gas_limit"`
	StorePrefix      string   `toml:"store_prefix"`
	MaxTxSize        uint64   `toml:"max_tx_size"`
	WasmChecksum     string   `toml:"wasm_checksum"`
	Mnemonic         string   `toml:"mnemonic"`
	ChannelWhitelist []string `toml:"channel_whitelist"`
}

type HyperspaceRelayerSubstrateChainConfig

type HyperspaceRelayerSubstrateChainConfig struct {
	Type             string   `toml:"type"`
	Name             string   `toml:"name"`
	ParaID           uint32   `toml:"para_id"`
	ParachainRPCURL  string   `toml:"parachain_rpc_url"`
	RelayChainRPCURL string   `toml:"relay_chain_rpc_url"`
	BeefyActivation  uint32   `toml:"beefy_activation_block"`
	CommitmentPrefix string   `toml:"commitment_prefix"`
	PrivateKey       string   `toml:"private_key"`
	SS58Version      uint8    `toml:"ss58_version"`
	FinalityProtocol string   `toml:"finality_protocol"`
	KeyType          string   `toml:"key_type"`
	ChannelWhitelist []string `toml:"channel_whitelist"`
}

type HyperspaceWallet

type HyperspaceWallet struct {
	// contains filtered or unexported fields
}

func NewWallet

func NewWallet(keyname string, address string, mnemonic string) *HyperspaceWallet

func (*HyperspaceWallet) Address

func (w *HyperspaceWallet) Address() []byte

Get Address

func (*HyperspaceWallet) FormattedAddress

func (w *HyperspaceWallet) FormattedAddress() string

func (*HyperspaceWallet) KeyName

func (w *HyperspaceWallet) KeyName() string

func (*HyperspaceWallet) Mnemonic

func (w *HyperspaceWallet) Mnemonic() string

Get mnemonic, only used for relayer wallets

type KeyEntry

type KeyEntry struct {
	PublicKey  string `toml:"public_key"`
	PrivateKey string `toml:"private_key"`
	Account    string `toml:"account"`
	Address    []byte `toml:"address"`
}

func GenKeyEntry

func GenKeyEntry(bech32Prefix, coinType, mnemonic string) KeyEntry

type WalletModel

type WalletModel struct {
	Mnemonic string `json:"mnemonic"`
	Address  string `json:"address"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL