tx_indexer

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Dec 3, 2025 License: MIT Imports: 20 Imported by: 7

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Service

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

func NewService

func NewService(
	logger *logrus.Logger,
	repo storage.TxIndexerRepo,
	chains SupportedChains,
) *Service

func (*Service) CreateTx

func (t *Service) CreateTx(ctx context.Context, req storage.CreateTxDto) (storage.Tx, error)

func (*Service) GetByPolicyID

func (t *Service) GetByPolicyID(
	c context.Context,
	policyID uuid.UUID,
	skip, take uint32,
) ([]storage.Tx, uint32, error)

func (*Service) GetTxByID

func (t *Service) GetTxByID(ctx context.Context, txID uuid.UUID) (storage.Tx, error)

Returns a tracked tx by its ID.

func (*Service) GetTxsInTimeRange

func (t *Service) GetTxsInTimeRange(
	ctx context.Context,
	policyID uuid.UUID,
	from, to time.Time,
) ([]storage.Tx, error)

func (*Service) SetOnChainStatus

func (t *Service) SetOnChainStatus(ctx context.Context, txID uuid.UUID, status rpc.TxOnChainStatus) error

func (*Service) SetSignedAndBroadcasted

func (t *Service) SetSignedAndBroadcasted(
	ctx context.Context,
	chainID common.Chain,
	txID uuid.UUID,
	sigs map[string]tss.KeysignResponse,
) error

func (*Service) SetStatus

func (t *Service) SetStatus(ctx context.Context, txID uuid.UUID, status storage.TxStatus) error

type SupportedChains

type SupportedChains map[common.Chain]chain.Indexer

func Chains

func Chains() (SupportedChains, error)

type SupportedRpcs

type SupportedRpcs map[common.Chain]rpc.Rpc

func Rpcs

type Worker

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

func NewWorker

func NewWorker(
	logger *logrus.Logger,
	interval time.Duration,
	iterationTimeout time.Duration,
	markLostAfter time.Duration,
	concurrency int,
	repo storage.TxIndexerRepo,
	clients SupportedRpcs,
	txMetrics metrics.TxIndexerMetrics,
) *Worker

func (*Worker) Clients

func (w *Worker) Clients() SupportedRpcs

func (*Worker) Concurrency

func (w *Worker) Concurrency() int

func (*Worker) Interval

func (w *Worker) Interval() time.Duration

func (*Worker) IterationTimeout

func (w *Worker) IterationTimeout() time.Duration

func (*Worker) MarkLostAfter

func (w *Worker) MarkLostAfter() time.Duration

func (*Worker) Metrics

func (w *Worker) Metrics() metrics.TxIndexerMetrics

func (*Worker) Run

func (w *Worker) Run() error

func (*Worker) TxIndexerRepo

func (w *Worker) TxIndexerRepo() storage.TxIndexerRepo

func (*Worker) UpdateTxStatus

func (w *Worker) UpdateTxStatus(ctx context.Context, tx storage.Tx) (*rpc.TxOnChainStatus, error)

Directories

Path Synopsis
pkg
rpc

Jump to

Keyboard shortcuts

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