TransactionRejected

class TransactionRejected(val reason: String, val txHash: String? = null, val customErrorCode: Int? = null) : NodeRpcException

Transaction rejected by node (validation failed).

Reasons:

  • Invalid signature

  • Double-spend (UTXO already spent)

  • Insufficient balance

  • TTL expired

  • Invalid format

Custom Error Codes (authoritative, from midnight-node):

  • 115: InvalidProof (the ZK proof failed verification — regenerate the proof / check the proving-key & contract verifier-key versions match)

  • 186: EffectsCheckFailure

  • 195: InputNotInUtxos (an unshielded UTXO input is already spent or missing)

Recovery: Don't retry (fix transaction)

Constructors

Link copied to clipboard
constructor(reason: String, txHash: String? = null, customErrorCode: Int? = null)

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard
open val cause: Throwable?
Link copied to clipboard
val customErrorCode: Int? = null
Link copied to clipboard

True if the node rejected the transaction's ZK proof (node error 115).

Link copied to clipboard

True if an unshielded UTXO input was already spent / missing (node error 195).

Link copied to clipboard
open val message: String?
Link copied to clipboard
Link copied to clipboard
val txHash: String? = null