OZRelayerResponse
public struct OZRelayerResponse : Decodable, Equatable, Hashable, Sendable
Response from the relayer service.
The relayer wraps user transactions with fee bumps and submits them to Stellar, enabling gasless onboarding for accounts with no XLM balance.
success:truewhen the relayer accepted the transaction.transactionId: relayer-assigned identifier when submission succeeded.hash: Stellar transaction hash returned by the relayer when available.status: transaction status string (for example"PENDING","SUCCESS","ERROR").error: human-readable error message when the request failed. Stored verbatim as returned by the relayer; not individually truncated. Bounded only by the overall response-size limit (OZConstants.maxRelayerResponseBytes), which caps the entire response body before decoding.errorCode: machine-readable error code; one of theOZRelayerErrorCodesconstants when populated.details: additional details JSON forwarded from the relayer body’sdatafield. See the property documentation below for the exact mapping.
-
Undocumented
Declaration
Swift
public let success: Bool -
Undocumented
Declaration
Swift
public let transactionId: String? -
Undocumented
Declaration
Swift
public let hash: String? -
Undocumented
Declaration
Swift
public let status: String? -
Undocumented
Declaration
Swift
public let error: String? -
Undocumented
Declaration
Swift
public let errorCode: String? -
Additional details JSON forwarded from the relayer body’s
datafield. When the relayer emits a JSON object underdata, its keys appear verbatim. When the relayer emits a non-object value (string, number, array, bool, ornull) underdata, the value is wrapped as["value": <wrapped>]so callers always observe a[String: OZJSONValue]shape.nilwhen the relayer omitsdataentirely.Declaration
Swift
public let details: [String : OZJSONValue]? -
Undocumented
Declaration
Swift
public init( success: Bool, transactionId: String? = nil, hash: String? = nil, status: String? = nil, error: String? = nil, errorCode: String? = nil, details: [String: OZJSONValue]? = nil ) -
Decodes from either the wrapped envelope (
{"success": ..., "data": {...}}) or the flat envelope ({"success": ..., "hash": ..., ...}).transactionId,hash, andstatusare read from the nesteddataobject if present, falling back to top-level.erroranderrorCodeuse a fixed lookup order (code→errorCode→ nesteddata.code) and read text fromerrorthenmessage.detailsis sourced from the nesteddataobject; non-objectdatapayloads (string, number, array, bool, null) are wrapped under the key"value"so callers always observe a[String: OZJSONValue].nilmeans the relayer omitteddataentirely.Declaration
Swift
public init(from decoder: Decoder) throws
View on GitHub
Install in Dash