Documentation ¶
Overview ¶
Package codes is a helper package to help convert to transaction and operation result codes to strings used in horizon.
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" // OpNoTrust occurs when there is no trust line to a given asset OpNoTrust = "op_no_trust" // OpNotAuthorized occurs when a trust line is not authorized OpNotAuthorized = "op_not_authorized" // OpDoesNotExist occurs when claimable balance or sponsorship does not exist OpDoesNotExist = "op_does_not_exist" )
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 representation used by horizon for the error code `opr`
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.