relay

package
v2.5.1-clf-20230831 Latest Latest
Warning

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

Go to latest
Published: Aug 31, 2023 License: MIT Imports: 10 Imported by: 4

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 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, error)

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
	// TODO remove after BFC-2441
	ID() string
	GetChainStatus(ctx context.Context) (types.ChainStatus, error)
	ListNodeStatuses(ctx context.Context, pageSize int32, pageToken string) (stats []types.NodeStatus, nextPageToken string, total int, err error)
	// choose different name than SendTx to avoid collison during refactor.
	Transact(ctx context.Context, from, to string, amount *big.Int, balanceCheck bool) error
}

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