relay

package
v0.1.0-test Latest Latest
Warning

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

Go to latest
Published: Sep 11, 2025 License: MIT Imports: 38 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Chain

type Chain interface {
	commontypes.ChainService

	ID() string
	TxManager() TxManager
	LogPoller() logpoller.Service
	GetClient(ctx context.Context) (*ton.APIClient, error)
}

func NewChain

func NewChain(cfg *config.TOMLConfig, opts ChainOpts) (Chain, error)

type ChainOpts

type ChainOpts struct {
	Logger   logger.Logger
	KeyStore core.Keystore
	DS       sqlutil.DataSource
}

type Relayer

type Relayer struct {
	commontypes.UnimplementedRelayer
	services.StateMachine
	// contains filtered or unexported fields
}

func NewRelayer

func NewRelayer(lggr logger.Logger, chain Chain, tonService Service, _ core.CapabilitiesRegistry) *Relayer

func (*Relayer) Close

func (r *Relayer) Close() error

func (*Relayer) GetChainInfo

func (r *Relayer) GetChainInfo(ctx context.Context) (commontypes.ChainInfo, error)

func (*Relayer) GetChainStatus

func (r *Relayer) GetChainStatus(ctx context.Context) (commontypes.ChainStatus, error)

func (*Relayer) HealthReport

func (r *Relayer) HealthReport() map[string]error

func (*Relayer) LatestHead

func (r *Relayer) LatestHead(ctx context.Context) (commontypes.Head, error)

func (*Relayer) ListNodeStatuses

func (r *Relayer) ListNodeStatuses(ctx context.Context, pageSize int32, pageToken string) (stats []commontypes.NodeStatus, nextPageToken string, total int, err error)

func (*Relayer) Name

func (r *Relayer) Name() string

func (*Relayer) NewCCIPProvider

func (*Relayer) Ready

func (r *Relayer) Ready() error

func (*Relayer) Replay

func (r *Relayer) Replay(ctx context.Context, fromBlock string, args map[string]any) error

func (*Relayer) Start

func (r *Relayer) Start(ctx context.Context) error

Start starts the relayer respecting the context provided.

func (*Relayer) TON

func (r *Relayer) TON() (commontypes.TONService, error)

func (*Relayer) Transact

func (r *Relayer) Transact(ctx context.Context, from, to string, amount *big.Int, balanceCheck bool) error

type Service

type Service struct {
	// contains filtered or unexported fields
}

func NewService

func NewService(chain Chain) Service

func (*Service) GetAccountBalance

func (s *Service) GetAccountBalance(ctx context.Context, address string, block *tontypes.BlockIDExt) (*tontypes.Balance, error)

func (*Service) GetBlockData

func (s *Service) GetBlockData(ctx context.Context, block *tontypes.BlockIDExt) (*tontypes.Block, error)

func (*Service) GetMasterchainInfo

func (s *Service) GetMasterchainInfo(ctx context.Context) (*tontypes.BlockIDExt, error)

func (*Service) GetTxExecutionFees

func (s *Service) GetTxExecutionFees(ctx context.Context, lt uint64) (*tontypes.TransactionFee, error)

func (*Service) GetTxStatus

func (*Service) HasFilter

func (s *Service) HasFilter(ctx context.Context, name string) bool

func (*Service) RegisterFilter

func (s *Service) RegisterFilter(ctx context.Context, filter tontypes.LPFilterQuery) error

func (*Service) SendTx

func (s *Service) SendTx(ctx context.Context, msg tontypes.Message) error

func (*Service) UnregisterFilter

func (s *Service) UnregisterFilter(ctx context.Context, name string) error

type TxManager

type TxManager interface {
	services.Service

	Enqueue(request txm.Request) error
	GetTransactionStatus(ctx context.Context, lt uint64) (commontypes.TransactionStatus, tvm.ExitCode, tlb.Coins, error)
	GetClient() tracetracking.SignedAPIClient
	InflightCount() (int, int)
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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