SendResult

sealed class SendResult

Outcome of sendNight — a typed result so callers can render distinct UX.

Inheritors

Types

Link copied to clipboard
data class Failed(val reason: String, val txHash: String? = null) : MidnightSdk.SendResult

Any other failure (proving, dust fee, node rejection, unexpected error).

Link copied to clipboard
data class InsufficientFunds(val required: BigInteger, val available: BigInteger, val shortfall: BigInteger) : MidnightSdk.SendResult

Not enough NIGHT to cover required; carries the shortfall for the UI.

Link copied to clipboard
data class InvalidAddress(val reason: String) : MidnightSdk.SendResult

Recipient address was malformed or on the wrong network.

Link copied to clipboard
data class Pending(val txHash: String, val reason: String) : MidnightSdk.SendResult

Submitted but finalization timed out — likely confirms shortly after.

Link copied to clipboard
data class Success(val txHash: String, val blockHeight: Long) : MidnightSdk.SendResult

Transfer finalized on chain.