Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FormatEventSig ¶
FormatEventSig formats an event signature as a hex string for better readability in logs
func ValidateBlockIDExt ¶
func ValidateBlockIDExt(block *ton.BlockIDExt) error
ValidateBlockIDExt validates that BlockIDExt hashes have the expected length.
Types ¶
type BlockRange ¶
type BlockRange struct {
Prev *ton.BlockIDExt // previous block (nil for unspecified:likely the first block in localnet)
To *ton.BlockIDExt // target block to process up to
}
BlockRange represents a range of blocks to process
func (*BlockRange) FromSeqNo ¶
func (br *BlockRange) FromSeqNo() uint32
func (*BlockRange) ToSeqNo ¶
func (br *BlockRange) ToSeqNo() uint32
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.
LogRetention time.Duration // LogRetention period for logs. 0 = keep forever.
MaxLogsKept int64 // Maximum logs to retain per filter. 0 = unlimited.
}
internal types for processing
type FilterIndex ¶
FilterIndex maps filter key strings to matching Filter objects for efficient O(1) lookup. This pattern matches Solana's filtersByID approach, enabling direct property access (e.g., filter.LogRetention) without a separate retention map.
type FilterKey ¶
FilterKey uniquely identifies a filter by address, message type, and event signature
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
MCBlockSeqno uint32 // Masterchain block sequence number
MsgLT uint64 // Message logical time for ordering
MsgIndex int64 // Index of the message within the transaction (0, 1, 2, ...)
ExpiresAt *time.Time // Pre-computed expiration time (tx_timestamp + retention). nil = no expiry.
}
type RawLog ¶
RawLog contains raw log data + metadata that can be transformed by consumers as needed (eg. o11y)
type ReplayStatus ¶
type ReplayStatus int
ReplayStatus represents the current state of a replay operation
const ( ReplayStatusNoRequest ReplayStatus = iota ReplayStatusRequested ReplayStatusPending ReplayStatusComplete )
func (ReplayStatus) String ¶
func (rs ReplayStatus) String() string
type Tx ¶
type Tx struct {
Transaction *tlb.Transaction // raw TON transaction from blockchain
Block *ton.BlockIDExt // shard block metadata (workchain 0)
MCBlockSeqno uint32 // masterchain block seqno that finalized this shard block
}