OZTransactionResult
public struct OZTransactionResult : Sendable, Equatable, Hashable
Outcome of a smart-account transaction submission.
Carries the success flag, the transaction hash (when one was assigned at the network boundary), the ledger sequence the transaction landed in (when known), and a human-readable error description for failure paths.
Example:
let result = try await txOps.transfer(
tokenContract: "C...",
recipient: "G...",
amount: "10"
)
if result.success {
print("Confirmed in ledger \(result.ledger ?? 0)")
} else {
print("Failed: \(result.error ?? "unknown")")
}
-
truewhen the transaction was accepted by the network and confirmed successfully on-chain;falsefor every other outcome (simulation failure, network rejection, polling timeout, on-chainFAILEDstatus).Declaration
Swift
public let success: Bool -
Stellar transaction hash assigned at submission.
nilonly when submission failed before a hash could be assigned (for example, simulation failure).Declaration
Swift
public let hash: String? -
Ledger sequence number that included the transaction. Present only after successful confirmation polling.
Declaration
Swift
public let ledger: UInt32? -
Human-readable failure description.
nilon success.Declaration
Swift
public let error: String? -
Undocumented
Declaration
Swift
public init( success: Bool, hash: String? = nil, ledger: UInt32? = nil, error: String? = nil )
View on GitHub
Install in Dash