relayerconf

package
v0.27.2 Latest Latest
Warning

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

Go to latest
Published: Oct 18, 2023 License: Apache-2.0 Imports: 5 Imported by: 3

Documentation

Index

Constants

View Source
const SupportVersion = "2"

Variables

View Source
var (
	ErrChainCannotBeFound = errors.New("chain cannot be found")
	ErrPathCannotBeFound  = errors.New("path cannot be found")
)

Functions

func Delete

func Delete() error

func Save

func Save(c Config) error

Types

type Chain

type Chain struct {
	ID            string `json:"id" yaml:"id"`
	Account       string `json:"account" yaml:"account"`
	AddressPrefix string `json:"address_prefix" yaml:"address_prefix"`
	RPCAddress    string `json:"rpc_address" yaml:"rpc_address"`
	GasPrice      string `json:"gas_price" yaml:"gas_price,omitempty"`
	GasLimit      int64  `json:"gas_limit" yaml:"gas_limit,omitempty"`
	ClientID      string `json:"client_id" yaml:"client_id,omitempty"`
}

type Config

type Config struct {
	Version string  `json:"version" yaml:"version"`
	Chains  []Chain `json:"chains" yaml:"chains,omitempty"`
	Paths   []Path  `json:"paths" yaml:"paths,omitempty"`
}

func Get

func Get() (Config, error)

func (Config) ChainByID

func (c Config) ChainByID(id string) (Chain, error)

func (Config) PathByID

func (c Config) PathByID(id string) (Path, error)

func (Config) UpdatePath

func (c Config) UpdatePath(path Path) error

type Path

type Path struct {
	ID       string  `json:"id" yaml:"id"`
	Ordering string  `json:"ordering" yaml:"ordering,omitempty"`
	Src      PathEnd `json:"src" yaml:"src"`
	Dst      PathEnd `json:"dst" yaml:"dst"`
}

type PathEnd

type PathEnd struct {
	ChainID      string `json:"chain_id" yaml:"chain_id"`
	ConnectionID string `json:"connection_id" yaml:"connection_id,omitempty"`
	ChannelID    string `json:"channel_id" yaml:"channel_id,omitempty"`
	PortID       string `json:"port_id" yaml:"port_id"`
	Version      string `json:"version" yaml:"version,omitempty"`
	PacketHeight int64  `json:"packet_height" yaml:"packet_height,omitempty"`
	AckHeight    int64  `json:"ack_height" yaml:"ack_height,omitempty"`
}

Jump to

Keyboard shortcuts

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