{"modulePath":"github.com/multiversx/mx-chain-go","version":"v1.11.11","isLatest":true,"isStandardLibrary":false,"goos":"all","goarch":"all","docs":"# package transactionAPI\n\n## Variables\n\n```go\nvar ErrCannotRetrieveTransaction = errors.New(\"transaction cannot be retrieved\")\n```\nErrCannotRetrieveTransaction signals that a transaction cannot be retrieved\n\n```go\nvar ErrCannotRetrieveTransactions = errors.New(\"transactions cannot be retrieved\")\n```\nErrCannotRetrieveTransactions signals that transactions cannot be retrieved\n\n```go\nvar ErrDBLookExtensionIsNotEnabled = errors.New(\"db look extension is not enabled\")\n```\nErrDBLookExtensionIsNotEnabled signals that the db look extension is not enabled\n\n```go\nvar ErrInvalidAddress = errors.New(\"invalid address\")\n```\nErrInvalidAddress signals that the address is invalid\n\n```go\nvar ErrNilAPITransactionProcessorArg = errors.New(\"nil api transaction processor arg\")\n```\nErrNilAPITransactionProcessorArg signals that a nil arguments structure has been provided\n\n```go\nvar ErrNilDataFieldParser = errors.New(\"nil data field parser\")\n```\nErrNilDataFieldParser signals that a nil data field parser has been provided\n\n```go\nvar ErrNilFeeComputer = errors.New(\"nil fee computer\")\n```\nErrNilFeeComputer signals that the fee computer is nil\n\n```go\nvar ErrNilLogsFacade = errors.New(\"nil logs facade\")\n```\nErrNilLogsFacade signals that the logs facade is nil\n\n```go\nvar ErrNilStatusComputer = errors.New(\"nil transaction status computer\")\n```\nErrNilStatusComputer signals that the status computer is nil\n\n```go\nvar ErrTransactionNotFound = errors.New(\"transaction not found\")\n```\nErrTransactionNotFound signals that a transaction was not found\n\n## Functions\n\n```go\nfunc NewAPITransactionProcessor(args *ArgAPITransactionProcessor) (*apiTransactionProcessor, error)\n```\nNewAPITransactionProcessor will create a new instance of apiTransactionProcessor\n\n```go\nfunc NewRefundDetector() *refundDetector\n```\nNewRefundDetector will create a new instance of \\*refundDetector\n\n## Types\n\n```go\ntype ArgAPITransactionProcessor struct {\n\tRoundDuration            uint64\n\tGenesisTime              time.Time\n\tMarshalizer              marshal.Marshalizer\n\tAddressPubKeyConverter   core.PubkeyConverter\n\tShardCoordinator         sharding.Coordinator\n\tHistoryRepository        dblookupext.HistoryRepository\n\tStorageService           dataRetriever.StorageService\n\tDataPool                 dataRetriever.PoolsHolder\n\tUint64ByteSliceConverter typeConverters.Uint64ByteSliceConverter\n\tFeeComputer              feeComputer\n\tTxTypeHandler            process.TxTypeHandler\n\tLogsFacade               LogsFacade\n\tDataFieldParser          DataFieldParser\n\tTxMarshaller             marshal.Marshalizer\n\tEnableEpochsHandler      common.EnableEpochsHandler\n}\n```\nArgAPITransactionProcessor is structure that store components that are needed to create an api transaction processor\n\n```go\ntype DataFieldParser interface {\n\tParse(dataField []byte, sender, receiver []byte, numOfShards uint32, epoch uint32) *datafield.ResponseParseData\n}\n```\nDataFieldParser defines what a data field parser should be able to do\n\n```go\ntype FeesProcessorHandler interface {\n\tIsInterfaceNil() bool\n}\n```\nFeesProcessorHandler defines the interface for the transaction fees processor\n\n```go\ntype LogsFacade interface {\n\tGetLog(logKey []byte, epoch uint32) (*transaction.ApiLogs, error)\n\tIsInterfaceNil() bool\n}\n```\nLogsFacade defines the interface of a logs facade\n\n```go\ntype RefundDetectorInput struct {\n\tValue         string\n\tData          []byte\n\tReturnMessage string\n\tGasLimit      uint64\n}\n```\nRefundDetectorInput will contain the needed input\n\n","path":"github.com/multiversx/mx-chain-go/node/external/transactionAPI","name":"transactionAPI","synopsis":"","isRedistributable":true}
