observer

package
v0.0.0-...-9d299f0 Latest Latest
Warning

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

Go to latest
Published: Nov 18, 2024 License: MIT Imports: 25 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type LiteClient

type LiteClient interface {
	zetaton.ConfigGetter
	GetMasterchainInfo(ctx context.Context) (liteclient.LiteServerMasterchainInfoC, error)
	GetBlockHeader(ctx context.Context, blockID ton.BlockIDExt, mode uint32) (tlb.BlockInfo, error)
	GetTransactionsSince(ctx context.Context, acc ton.AccountID, lt uint64, hash ton.Bits256) ([]ton.Transaction, error)
	GetFirstTransaction(ctx context.Context, acc ton.AccountID) (*ton.Transaction, int, error)
	GetTransaction(ctx context.Context, acc ton.AccountID, lt uint64, hash ton.Bits256) (ton.Transaction, error)
}

LiteClient represents a TON client see https://github.com/ton-blockchain/ton/blob/master/tl/generate/scheme/tonlib_api.tl

type Observer

type Observer struct {
	*base.Observer
	// contains filtered or unexported fields
}

Observer is a TON observer.

func New

func New(bo *base.Observer, client LiteClient, gateway *toncontracts.Gateway) (*Observer, error)

New constructor for TON Observer.

func (*Observer) Start

func (ob *Observer) Start(ctx context.Context)

Start starts the observer. This method is NOT blocking. Note that each `watch*` method has a ticker that will stop as soon as baseObserver.Stop() was called (ticker.WithStopChan)

func (*Observer) VoteOutboundIfConfirmed

func (ob *Observer) VoteOutboundIfConfirmed(ctx context.Context, cctx *cc.CrossChainTx) (bool, error)

VoteOutboundIfConfirmed checks outbound status and returns (continueKeysign, error)

Jump to

Keyboard shortcuts

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