relay

package
v2.5.3-clf-20230919 Latest Latest
Warning

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

Go to latest
Published: Sep 19, 2023 License: MIT Imports: 8 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. Unlike NewRelayerServerAdapter which is used to adapt non-LOOPP relayers, this is used to adapt LOOPP-based relayer which are then server over GRPC (by the relayerServer).

func NewRelayerServerAdapter added in v2.6.0

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

NewRelayerServerAdapter returns a loop.Relayer adapted from a types.Relayer and RelayerExt. Unlike NewRelayerAdapter, this behaves like the loop `RelayerServer` and dispatches calls to `NewPluginProvider` according to the passed in `RelayArgs.ProviderType`. This should only be used to adapt relayers not running via GRPC in a LOOPP.

nolint:staticcheck // SA1019

Types

type ChainID added in v2.5.0

type ChainID = string

type ID added in v2.5.0

type ID struct {
	Network Network
	ChainID ChainID
}

ID uniquely identifies a relayer by network and chain id

func NewID added in v2.5.0

func NewID(n Network, c ChainID) ID

func (*ID) Name added in v2.5.0

func (i *ID) Name() string

func (*ID) String added in v2.5.0

func (i *ID) String() string

func (*ID) UnmarshalString added in v2.5.0

func (i *ID) 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 {
	types.ChainService
	ID() string
}

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

Jump to

Keyboard shortcuts

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