transactionAPI

package
v1.6.13 Latest Latest
Warning

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

Go to latest
Published: Jan 16, 2024 License: GPL-3.0 Imports: 27 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrCannotRetrieveTransaction = errors.New("transaction cannot be retrieved")

ErrCannotRetrieveTransaction signals that a transaction cannot be retrieved

View Source
var ErrCannotRetrieveTransactions = errors.New("transactions cannot be retrieved")

ErrCannotRetrieveTransactions signals that transactions cannot be retrieved

View Source
var ErrInvalidAddress = errors.New("invalid address")

ErrInvalidAddress signals that the address is invalid

View Source
var ErrNilAPITransactionProcessorArg = errors.New("nil api transaction processor arg")

ErrNilAPITransactionProcessorArg signals that a nil arguments structure has been provided

View Source
var ErrNilDataFieldParser = errors.New("nil data field parser")

ErrNilDataFieldParser signals that a nil data field parser has been provided

View Source
var ErrNilFeeComputer = errors.New("nil fee computer")

ErrNilFeeComputer signals that the fee computer is nil

View Source
var ErrNilLogsFacade = errors.New("nil logs facade")

ErrNilLogsFacade signals that the logs facade is nil

View Source
var ErrNilStatusComputer = errors.New("nil transaction status computer")

ErrNilStatusComputer signals that the status computer is nil

View Source
var ErrTransactionNotFound = errors.New("transaction not found")

ErrTransactionNotFound signals that a transaction was not found

Functions

func NewAPITransactionProcessor

func NewAPITransactionProcessor(args *ArgAPITransactionProcessor) (*apiTransactionProcessor, error)

NewAPITransactionProcessor will create a new instance of apiTransactionProcessor

func NewRefundDetector added in v1.6.0

func NewRefundDetector() *refundDetector

NewRefundDetector will create a new instance of *refundDetector

Types

type ArgAPITransactionProcessor

type ArgAPITransactionProcessor struct {
	RoundDuration            uint64
	GenesisTime              time.Time
	Marshalizer              marshal.Marshalizer
	AddressPubKeyConverter   core.PubkeyConverter
	ShardCoordinator         sharding.Coordinator
	HistoryRepository        dblookupext.HistoryRepository
	StorageService           dataRetriever.StorageService
	DataPool                 dataRetriever.PoolsHolder
	Uint64ByteSliceConverter typeConverters.Uint64ByteSliceConverter
	FeeComputer              feeComputer
	TxTypeHandler            process.TxTypeHandler
	LogsFacade               LogsFacade
	DataFieldParser          DataFieldParser
}

ArgAPITransactionProcessor is structure that store components that are needed to create an api transaction processor

type DataFieldParser

type DataFieldParser interface {
	Parse(dataField []byte, sender, receiver []byte, numOfShards uint32) *datafield.ResponseParseData
}

DataFieldParser defines what a data field parser should be able to do

type FeesProcessorHandler added in v1.4.5

type FeesProcessorHandler interface {
	IsInterfaceNil() bool
}

FeesProcessorHandler defines the interface for the transaction fees processor

type LogsFacade

type LogsFacade interface {
	GetLog(logKey []byte, epoch uint32) (*transaction.ApiLogs, error)
	IsInterfaceNil() bool
}

LogsFacade defines the interface of a logs facade

type RefundDetectorInput added in v1.6.0

type RefundDetectorInput struct {
	Value         string
	Data          []byte
	ReturnMessage string
	GasLimit      uint64
}

RefundDetectorInput will contain the needed input

Jump to

Keyboard shortcuts

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