relayer

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Dec 23, 2024 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	RtyAttNum = uint(5)
	RtyAtt    = retry.Attempts(RtyAttNum)
	RtyDel    = retry.Delay(time.Millisecond * 400)
	RtyErr    = retry.LastErrorOnly(true)
)

Functions

func ParseChannelIDFromEvents

func ParseChannelIDFromEvents(events []provider.RelayerEvent) (string, error)

ParseChannelIDFromEvents parses events emitted from a MsgChannelOpenInit or MsgChannelOpenTry and returns the channel identifier.

func ParseClientIDFromEvents

func ParseClientIDFromEvents(events []provider.RelayerEvent) (string, error)

ParseClientIDFromEvents parses events emitted from a MsgCreateClient and returns the client identifier.

func ParseConnectionIDFromEvents

func ParseConnectionIDFromEvents(events []provider.RelayerEvent) (string, error)

ParseConnectionIDFromEvents parses events emitted from a MsgConnectionOpenInit or MsgConnectionOpenTry and returns the connection identifier.

Types

type Chain

type Chain struct {
	ChainProvider provider.ChainProvider
	Chainid       string `yaml:"chain-id" json:"chain-id"`
	// contains filtered or unexported fields
}

Chain represents the necessary data for connecting to and identifying a chain and its counterparties TODO revise Chain struct

func NewChain

func NewChain(log *zap.Logger, prov provider.ChainProvider, debug bool) *Chain

func (*Chain) ChainID

func (c *Chain) ChainID() string

func (*Chain) CreateTestKey

func (c *Chain) CreateTestKey() error

CreateTestKey creates a key for test chain

func (*Chain) GetSelfVersion

func (c *Chain) GetSelfVersion() uint64

GetSelfVersion returns the version of the given chain

func (*Chain) GetTimeout

func (c *Chain) GetTimeout() (time.Duration, error)

GetTimeout returns the chain's configured timeout

func (*Chain) GetTrustingPeriod

func (c *Chain) GetTrustingPeriod(ctx context.Context, overrideUnbondingPeriod time.Duration, percentage int64) (time.Duration, error)

GetTrustingPeriod returns the trusting period for the chain

func (*Chain) String

func (c *Chain) String() string

type Chains

type Chains map[string]*Chain

Chains is a collection of Chain (mapped by chain_name)

func (Chains) Get

func (c Chains) Get(chainID string) (*Chain, error)

Get returns the configuration for a given chain

func (Chains) Gets

func (c Chains) Gets(chainIDs ...string) (map[string]*Chain, error)

Gets returns a map chainIDs to their chains

func (Chains) MustGet

func (c Chains) MustGet(chainID string) *Chain

MustGet returns the chain and panics on any error

type ClientStateInfo

type ClientStateInfo struct {
	ChainID        string
	TrustingPeriod time.Duration
	LatestHeight   ibcexported.Height
	UnbondingTime  time.Duration
}

func ClientInfoFromClientState

func ClientInfoFromClientState(clientState *codectypes.Any) (ClientStateInfo, error)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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