Documentation ¶
Overview ¶
Package codes is a helper package to help convert to transaction and operation result codes to strings used in orbit.
Index ¶
Constants ¶
View Source
const ( // OpSuccess is the string code used to specify the operation was successful OpSuccess = "op_success" // OpMalformed is the string code used to specify the operation was malformed // in some way. OpMalformed = "op_malformed" // OpUnderfunded is the string code used to specify the operation failed // due to a lack of funds. OpUnderfunded = "op_underfunded" // OpLowReserve is the string code used to specify the operation failed // because the account in question does not have enough balance to satisfy // what their new minimum balance would be. OpLowReserve = "op_low_reserve" // OpLineFull occurs when a payment would cause a destination account to // exceed their declared trust limit for the asset being sent. OpLineFull = "op_line_full" // OpNoIssuer occurs when a operation does not correctly specify an issuing // asset OpNoIssuer = "op_no_issuer" )
Variables ¶
View Source
var ErrUnknownCode = errors.New("Unknown result code")
ErrUnknownCode is returned when an unexepcted value is provided to `String`
Functions ¶
func ForOperationResult ¶
func ForOperationResult(opr xdr.OperationResult) (string, error)
ForOperationResult returns the strong represtation used by orbit for the error code `opr`
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.