relay

package
v2.4.1-scale-20230817 Latest Latest
Warning

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

Go to latest
Published: Aug 17, 2023 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewRelayerAdapter added in v2.2.0

func NewRelayerAdapter(r types.Relayer, e RelayerExt) loop.Relayer

NewRelayerAdapter returns a loop.Relayer adapted from a types.Relayer and RelayerExt.

Types

type ChainID added in v2.5.0

type ChainID string

func (ChainID) Int64 added in v2.5.0

func (c ChainID) Int64() (int64, error)

func (ChainID) String added in v2.5.0

func (c ChainID) String() string

type Identifier

type Identifier struct {
	Network Network
	ChainID ChainID
}

Identifier uniquely identifies a relayer by network and chain id

func (*Identifier) Name

func (i *Identifier) Name() string

func (*Identifier) String

func (i *Identifier) String() string

func (*Identifier) UnmarshalString

func (i *Identifier) UnmarshalString(s string) error

type Network

type Network string
var (
	EVM             Network = "evm"
	Cosmos          Network = "cosmos"
	Solana          Network = "solana"
	StarkNet        Network = "starknet"
	SupportedRelays         = map[Network]struct{}{
		EVM:      {},
		Cosmos:   {},
		Solana:   {},
		StarkNet: {},
	}
)

type RelayerExt added in v2.2.0

type RelayerExt interface {
	services.ServiceCtx

	ChainStatus(ctx context.Context, id string) (types.ChainStatus, error)
	ChainStatuses(ctx context.Context, offset, limit int) ([]types.ChainStatus, int, error)

	NodeStatuses(ctx context.Context, offset, limit int, chainIDs ...string) (nodes []types.NodeStatus, count int, err error)

	SendTx(ctx context.Context, chainID, from, to string, amount *big.Int, balanceCheck bool) error
}

RelayerExt is a subset of loop.Relayer for adapting types.Relayer, typically with a ChainSet. See [relayerAdapter].

Jump to

Keyboard shortcuts

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