relay

package
v2.2.0-clf-20230606 Latest Latest
Warning

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

Go to latest
Published: Jun 6, 2023 License: MIT Imports: 8 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 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].

Directories

Path Synopsis
evm

Jump to

Keyboard shortcuts

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