relayer

package
v0.0.3 Latest Latest
Warning

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

Go to latest
Published: Aug 7, 2026 License: MIT Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Relayer

type Relayer struct {
	relaytypes.UnimplementedRelayer
	// contains filtered or unexported fields
}

Relayer wraps the Stellar chain and exposes it as loop.Relayer.

func NewRelayer

func NewRelayer(lggr logger.Logger, chainService chain.Chain) *Relayer

NewRelayer constructs a Relayer from an already-built chain.

func (*Relayer) Close

func (r *Relayer) Close() error

func (*Relayer) FinalizedHead

func (r *Relayer) FinalizedHead(ctx context.Context) (relaytypes.Head, error)

func (*Relayer) GetChainInfo

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

func (*Relayer) GetChainStatus

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

func (*Relayer) GetEvents added in v0.0.3

func (*Relayer) GetLatestLedger

func (s *Relayer) GetLatestLedger(ctx context.Context) (stellartypes.GetLatestLedgerResponse, error)

func (*Relayer) GetLedgerEntries

func (*Relayer) GetLedgers added in v0.0.3

GetLedgers fetches ledgers starting at StartLedger (or Pagination.Cursor). Pagination is optional; when nil, the RPC uses its default page size.

func (*Relayer) GetSigningAccount added in v0.0.3

func (s *Relayer) GetSigningAccount(ctx context.Context) (stellartypes.GetSigningAccountResponse, error)

func (*Relayer) GetTransaction added in v0.0.3

func (*Relayer) HealthReport

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

func (*Relayer) Healthy

func (r *Relayer) Healthy() error

func (*Relayer) LatestHead

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

func (*Relayer) ListNodeStatuses

func (r *Relayer) ListNodeStatuses(ctx context.Context, pageSize int32, pageToken string) ([]relaytypes.NodeStatus, string, int, error)

func (*Relayer) Name

func (r *Relayer) Name() string

func (*Relayer) Ready

func (r *Relayer) Ready() error

func (*Relayer) SimulateTransaction added in v0.0.3

SimulateTransaction performs a Soroban InvokeHostFunction simulation.

It builds an unsigned InvokeHostFunction transaction, sends it to Stellar RPC's simulateTransaction endpoint, and maps the simulation response into the domain response. Host-function failures are represented in the response Error field with a nil Go error.

func (*Relayer) Start

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

func (*Relayer) Stellar

func (r *Relayer) Stellar() (relaytypes.StellarService, error)

func (*Relayer) SubmitTransaction added in v0.0.3

SubmitTransaction invokes a Soroban contract via the TXM pipeline. It converts the high-level domain request into an InvokeHostFunction operation, enqueues it through the TXM, and maps the terminal status into a response.

func (*Relayer) Transact

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

type StellarTxManager added in v0.0.3

type StellarTxManager interface {
	EnqueueAndWait(ctx context.Context, req txm.TxRequest) (*txm.TxResult, error)
}

StellarTxManager is the subset of txm.StellarTxm used by SubmitTransaction.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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