Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var FinalCodes = []xdr.TransactionResultCode{ xdr.TransactionResultCodeTxSuccess, xdr.TransactionResultCodeTxFailed, xdr.TransactionResultCodeTxMissingOperation, xdr.TransactionResultCodeTxInsufficientBalance, xdr.TransactionResultCodeTxBadAuth, xdr.TransactionResultCodeTxBadAuthExtra, xdr.TransactionResultCodeTxMalformed, xdr.TransactionResultCodeTxNotSupported, xdr.TransactionResultCodeTxFeeBumpInnerFailed, xdr.TransactionResultCodeTxFeeBumpInnerSuccess, xdr.TransactionResultCodeTxNoAccount, xdr.TransactionResultCodeTxBadSponsorship, xdr.TransactionResultCodeTxSorobanInvalid, xdr.TransactionResultCodeTxBadMinSeqAgeOrGap, }
View Source
var JitterErrorCodes = []xdr.TransactionResultCode{ xdr.TransactionResultCodeTxInsufficientFee, xdr.TransactionResultCodeTxInternalError, }
View Source
var NonJitterErrorCodes = []xdr.TransactionResultCode{ xdr.TransactionResultCodeTxTooEarly, xdr.TransactionResultCodeTxTooLate, xdr.TransactionResultCodeTxBadSeq, }
Functions ¶
func UnmarshallTransactionResultXDR ¶
func UnmarshallTransactionResultXDR(resultXDR string) (xdr.TransactionResult, error)
Types ¶
type MockChannel ¶
func (*MockChannel) Receive ¶
func (m *MockChannel) Receive(payload Payload)
func (*MockChannel) Send ¶
func (m *MockChannel) Send(payload Payload)
func (*MockChannel) Stop ¶
func (m *MockChannel) Stop()
type OtherCodes ¶
type OtherCodes int32
const ( // Do not use NoCode NoCode OtherCodes = 0 // These values need to not overlap the values in xdr.TransactionResultCode NewCode OtherCodes = 100 RPCFailCode OtherCodes = 101 UnmarshalBinaryCode OtherCodes = 102 EmptyCode OtherCodes = 103 )
type OtherStatus ¶
type OtherStatus string
const ( NewStatus OtherStatus = "NEW" NoStatus OtherStatus = "" SentStatus OtherStatus = "SENT" NotSentStatus OtherStatus = "NOT_SENT" )
type Payload ¶
type Payload struct { WebhookURL string // The hash of the transaction xdr submitted by the client - the id of the transaction submitted by a client TransactionHash string // The xdr of the transaction TransactionXDR string // Relevant fields in an RPC sendTransaction response RpcSubmitTxResponse RPCSendTxResponse // Relevant fields in the transaction list inside the RPC getTransactions response RpcGetIngestTxResponse RPCGetIngestTxResponse }
type RPCGetIngestTxResponse ¶
type RPCGetIngestTxResponse struct { // A status that indicated whether this transaction failed or successly made it to the ledger Status entities.RPCStatus // The error code that is derived by deserialzing the ResultXdr string in the sendTransaction response // list of possible errror codes: https://developers.stellar.org/docs/data/horizon/api-reference/errors/result-codes/transactions Code RPCTXCode // The raw TransactionEnvelope XDR for this transaction EnvelopeXDR string // The raw TransactionResult XDR of the envelopeXdr ResultXDR string // The unix timestamp of when the transaction was included in the ledger CreatedAt int64 }
func ParseToRPCGetIngestTxResponse ¶
func ParseToRPCGetIngestTxResponse(result entities.RPCGetTransactionResult, err error) (RPCGetIngestTxResponse, error)
type RPCSendTxResponse ¶
type RPCSendTxResponse struct { // The hash of the transaction submitted to RPC TransactionHash string TransactionXDR string // The status of an RPC sendTransaction call. Can be one of [PENDING, DUPLICATE, TRY_AGAIN_LATER, ERROR] Status RPCTXStatus // The (optional) error code that is derived by deserialzing the errorResultXdr string in the sendTransaction response // list of possible errror codes: https://developers.stellar.org/docs/data/horizon/api-reference/errors/result-codes/transactions Code RPCTXCode ErrorResultXDR string }
func ParseToRPCSendTxResponse ¶
func ParseToRPCSendTxResponse(transactionXDR string, result entities.RPCSendTransactionResult, err error) (RPCSendTxResponse, error)
type RPCTXCode ¶
type RPCTXCode struct { TxResultCode xdr.TransactionResultCode OtherCodes OtherCodes }
type RPCTXStatus ¶
type RPCTXStatus struct { RPCStatus entities.RPCStatus OtherStatus OtherStatus }
func (RPCTXStatus) Status ¶
func (s RPCTXStatus) Status() string
type TSSResponse ¶
type TransactionResultCode ¶
type TransactionResultCode int32
Click to show internal directories.
Click to hide internal directories.