relayerset

package
v0.9.7 Latest Latest
Warning

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

Go to latest
Published: Feb 11, 2026 License: MIT Imports: 27 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {
	*net.BrokerExt
	*goplugin.ServiceClient
	// contains filtered or unexported fields
}

func NewRelayerSetClient

func NewRelayerSetClient(log logger.Logger, b *net.BrokerExt, conn grpc.ClientConnInterface) *Client

func (*Client) CloseRelayer

func (k *Client) CloseRelayer(ctx context.Context, relayID types.RelayID) error

func (*Client) EVM added in v0.7.1

func (k *Client) EVM(relayID types.RelayID) (types.EVMService, error)

EVM creates an EVM Relayer Set client which is a wrapper over the regular EVM client that attaches the Relayer ID to every request. This wrapper is then returned as a regular EVMClient .

func (*Client) Get

func (k *Client) Get(ctx context.Context, relayID types.RelayID) (core.Relayer, error)

func (*Client) List

func (k *Client) List(ctx context.Context, relayIDs ...types.RelayID) (map[types.RelayID]core.Relayer, error)

func (*Client) NewContractReader added in v0.2.2

func (k *Client) NewContractReader(ctx context.Context, relayID types.RelayID, contractReaderConfig []byte) (types.ContractReader, error)

func (*Client) NewContractWriter added in v0.4.0

func (k *Client) NewContractWriter(ctx context.Context, relayID types.RelayID, contractWriterConfig []byte) (uint32, error)

func (*Client) NewPluginProvider

func (k *Client) NewPluginProvider(ctx context.Context, relayID types.RelayID, relayArgs core.RelayArgs, pluginArgs core.PluginArgs) (uint32, error)

func (*Client) RelayerGetChainInfo added in v0.7.1

func (k *Client) RelayerGetChainInfo(ctx context.Context, relayID types.RelayID) (types.ChainInfo, error)

func (*Client) RelayerHealthReport

func (k *Client) RelayerHealthReport(ctx context.Context, relayID types.RelayID) (map[string]error, error)

func (*Client) RelayerLatestHead added in v0.2.2

func (k *Client) RelayerLatestHead(ctx context.Context, relayID types.RelayID) (types.Head, error)

func (*Client) RelayerName

func (k *Client) RelayerName(ctx context.Context, relayID types.RelayID) (string, error)

func (*Client) RelayerReady

func (k *Client) RelayerReady(ctx context.Context, relayID types.RelayID) error

func (*Client) Solana added in v0.9.7

func (k *Client) Solana(relayID types.RelayID) (types.SolanaService, error)

func (*Client) StartRelayer

func (k *Client) StartRelayer(ctx context.Context, relayID types.RelayID) error

func (*Client) TON added in v0.8.0

func (k *Client) TON(relayID types.RelayID) (types.TONService, error)

type Server

type Server struct {
	relayerset.UnimplementedRelayerSetServer

	Name string
	// contains filtered or unexported fields
}

func NewRelayerSetServer

func NewRelayerSetServer(log logger.Logger, underlying core.RelayerSet, broker *net.BrokerExt) (*Server, net.Resource)

func (*Server) Close

func (s *Server) Close() error

func (*Server) CloseRelayer

func (s *Server) CloseRelayer(ctx context.Context, relayID *relayerset.RelayerId) (*emptypb.Empty, error)

func (*Server) ContractReaderClose added in v0.7.1

func (s *Server) ContractReaderClose(ctx context.Context, _ *emptypb.Empty) (*emptypb.Empty, error)

func (*Server) ContractReaderServer added in v0.9.7

func (s *Server) ContractReaderServer() pb.ContractReaderServer

func (*Server) ContractReaderStart added in v0.7.1

func (s *Server) ContractReaderStart(ctx context.Context, _ *emptypb.Empty) (*emptypb.Empty, error)

func (*Server) EVMServer added in v0.9.7

func (s *Server) EVMServer() evmpb.EVMServer

func (*Server) NewContractReader added in v0.2.2

RelayerSet is supposed to serve relayers, which then hold a ContractReader and ContractWriter. Serving NewContractReader and NewContractWriter from RelayerSet is a way to save us from instantiating an extra server for the Relayer. Without this approach, the calls we would make normally are

  • RelayerSet.Get -> Relayer
  • Relayer.NewContractReader -> ContractReader

We could translate this to the GRPC world by having each call to RelayerSet.Get wrap the returned relayer in a server and register that to the GRPC server. However this is actually pretty inefficient since a relayer object on its own is not useful. Users will always want to use the relayer to instantiate a contractreader or contractwriter. So we can avoid the intermediate server for the relayer by just storing a reference to the relayerSet client and the relayer we want to fetch. I.e. the calls described above instead would become:

  • RelayerSet.Get -> (RelayerSetClient, RelayerID). Effectively this call just acts as check that Relayer exists

RelayerClient.NewContractReader -> This is a call to RelayerSet.NewContractReader with (relayerID, []contractReaderConfig); The implementation will then fetch the relayer and call NewContractReader on it

func (*Server) NewContractWriter added in v0.4.0

RelayerSet is supposed to serve relayers, which then hold a ContractReader and ContractWriter. Serving NewContractWriter and NewContractWriter from RelayerSet is a way to save us from instantiating an extra server for the Relayer. Without this approach, the calls we would make normally are

  • RelayerSet.Get -> Relayer
  • Relayer.NewContractWriter -> ContractWriter

We could translate this to the GRPC world by having each call to RelayerSet.Get wrap the returned relayer in a server and register that to the GRPC server. However this is actually pretty inefficient since a relayer object on its own is not useful. Users will always want to use the relayer to instantiate a contractreader or contractwriter. So we can avoid the intermediate server for the relayer by just storing a reference to the relayerSet client and the relayer we want to fetch. I.e. the calls described above instead would become:

  • RelayerSet.Get -> (RelayerSetClient, RelayerID). Effectively this call just acts as check that Relayer exists

RelayerClient.NewContractWriter -> This is a call to RelayerSet.NewContractWriter with (relayerID, []contractWriterConfig); The implementation will then fetch the relayer and call NewContractWriter on it

func (*Server) RelayerGetChainInfo added in v0.7.1

func (s *Server) RelayerGetChainInfo(ctx context.Context, req *relayerset.GetChainInfoRequest) (*pb.GetChainInfoReply, error)

func (*Server) RelayerHealthReport

func (s *Server) RelayerHealthReport(ctx context.Context, relayID *relayerset.RelayerId) (*relayerset.RelayerHealthReportResponse, error)

func (*Server) RelayerLatestHead added in v0.2.2

func (*Server) RelayerName

func (s *Server) RelayerName(ctx context.Context, relayID *relayerset.RelayerId) (*relayerset.RelayerNameResponse, error)

func (*Server) RelayerReady

func (s *Server) RelayerReady(ctx context.Context, relayID *relayerset.RelayerId) (*emptypb.Empty, error)

func (*Server) SolanaServer added in v0.9.7

func (s *Server) SolanaServer() solpb.SolanaServer

func (*Server) StartRelayer

func (s *Server) StartRelayer(ctx context.Context, relayID *relayerset.RelayerId) (*emptypb.Empty, error)

func (*Server) TONServer added in v0.9.7

func (s *Server) TONServer() tonpb.TONServer

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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