txsubmitter

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Apr 4, 2024 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type RpcClient added in v0.4.0

type RpcClient interface {
	GetRoundNumber(ctx context.Context) (uint64, error)
	SendTransaction(ctx context.Context, tx *types.TransactionOrder) ([]byte, error)
	GetTransactionProof(ctx context.Context, txHash types.Bytes) (*types.TransactionRecord, *types.TxProof, error)
}

type TxSubmission

type TxSubmission struct {
	UnitID      types.UnitID
	TxHash      types.Bytes
	Transaction *types.TransactionOrder
	Proof       *wallet.Proof
}

func (*TxSubmission) Confirmed

func (s *TxSubmission) Confirmed() bool

func (*TxSubmission) ToBatch

func (s *TxSubmission) ToBatch(backend RpcClient, sender wallet.PubKey, log *slog.Logger) *TxSubmissionBatch

type TxSubmissionBatch

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

func NewBatch

func NewBatch(sender wallet.PubKey, rpcClient RpcClient, log *slog.Logger) *TxSubmissionBatch

func (*TxSubmissionBatch) Add

func (t *TxSubmissionBatch) Add(sub *TxSubmission)

func (*TxSubmissionBatch) SendTx

func (t *TxSubmissionBatch) SendTx(ctx context.Context, confirmTx bool) error

func (*TxSubmissionBatch) Submissions

func (t *TxSubmissionBatch) Submissions() []*TxSubmission

Jump to

Keyboard shortcuts

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