forked from stellar/go
-
Notifications
You must be signed in to change notification settings - Fork 0
/
tx_response.go
28 lines (23 loc) · 916 Bytes
/
tx_response.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
package stellarcore
const (
// TXStatusError represents the status value returned by stellar-core when an error occurred from
// submitting a transaction
TXStatusError = "ERROR"
// TXStatusPending represents the status value returned by stellar-core when a transaction has
// been accepted for processing
TXStatusPending = "PENDING"
// TXStatusDuplicate represents the status value returned by stellar-core when a submitted
// transaction is a duplicate
TXStatusDuplicate = "DUPLICATE"
)
// TXResponse represents the response returned from a submission request sent to stellar-core's /tx
// endpoint
type TXResponse struct {
Exception string `json:"exception"`
Error string `json:"error"`
Status string `json:"status"`
}
// IsException returns true if the response represents an exception response from stellar-core
func (resp *TXResponse) IsException() bool {
return resp.Exception != ""
}