types

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: 8 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BlockRange

type BlockRange struct {
	Prev *ton.BlockIDExt // previous block (nil for genesis)
	To   *ton.BlockIDExt // target block to process up to
}

BlockRange represents a range of blocks to process

type Filter

type Filter struct {
	ID            int64            // ID is a unique identifier for the filter.
	Name          string           // Name is a human-readable name for the filter, used for identification purposes.
	Address       *address.Address // specifies the source address for which logs are being filtered.
	MsgType       tlb.MsgType      // Message type to determine how to index
	EventSig      uint32           // EventSig is a identifier for the event log(topic in external out messages, opcode in internal messages).
	StartingSeqNo uint32           // StartingSeqNo defines the starting sequence number for log polling.
}

internal types for processing, DB schema should be separated

type Log

type Log struct {
	ID               int64            // Unique identifier for the log entry.
	FilterID         int64            // Identifier of the filter that matched this log.
	ChainID          string           // ChainID of the blockchain where the log was generated.
	Address          *address.Address // Source contract address associated with the log entry.
	EventSig         uint32           // EventSig is a identifier for the event log(topic in external out messages, opcode in internal messages).
	Data             *cell.Cell       // Event msg body containing the log data.
	TxHash           TxHash           // Transaction hash for uniqueness within the blockchain.
	TxLT             uint64           // Logical time (LT) of the transaction, used for ordering and uniqueness.
	TxTimestamp      time.Time        // Timestamp of the transaction that generated the log.
	Block            *ton.BlockIDExt  // Shard block metadata
	MasterBlockSeqno uint32           // Masterchain block sequence number
	Error            error            // Optional error associated with the log entry.
}

func (Log) String

func (l Log) String() string

type TxHash

type TxHash [32]byte

type TxWithBlock

type TxWithBlock struct {
	Tx    *tlb.Transaction
	Block *ton.BlockIDExt
}

internal types for indexing

type TypedLog

type TypedLog[T any] struct {
	Log
	TypedData T // Parsed event data from the log's cell data(on query execution)
}

TypedLog represents a log entry with its parsed data.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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