txsubmitter

package
v0.2.1 Latest Latest
Warning

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

Go to latest
Published: Oct 13, 2023 License: AGPL-3.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BackendAPI

type BackendAPI interface {
	GetRoundNumber(ctx context.Context) (uint64, error)
	PostTransactions(ctx context.Context, pubKey wallet.PubKey, txs *wallet.Transactions) error
	GetTxProof(ctx context.Context, unitID types.UnitID, txHash wallet.TxHash) (*wallet.Proof, error)
}

type TxSubmission

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

func (*TxSubmission) Confirmed

func (s *TxSubmission) Confirmed() bool

func (*TxSubmission) ToBatch

func (s *TxSubmission) ToBatch(backend BackendAPI, sender wallet.PubKey) *TxSubmissionBatch

type TxSubmissionBatch

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

func NewBatch

func NewBatch(sender wallet.PubKey, backend BackendAPI) *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 added in v0.2.0

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

Jump to

Keyboard shortcuts

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