InvalidOperationTypeException

class InvalidOperationTypeException(operationType: String, operationIndex: Int) : ChallengeValidationException

Exception thrown when the challenge transaction contains operations other than ManageData.

SEP-10 Security Requirement: ALL operations in a challenge transaction MUST be of type ManageData (also called Manage Data).

This requirement is critical for security because:

  • ManageData operations only set account data entries (harmless metadata)

  • They cannot transfer funds, create trustlines, or modify account settings

  • They cannot be used to damage the account if the challenge is intercepted

Attack scenarios prevented: If other operation types were allowed, a malicious server could include operations like:

  • Payment (stealing funds)

  • SetOptions (changing account signers or thresholds)

  • ChangeTrust (adding unwanted trustlines)

When you sign a challenge transaction, you're only agreeing to set harmless metadata on your account, not to perform any actual blockchain operations.

Parameters

operationType

The invalid operation type found (e.g., "Payment", "SetOptions")

operationIndex

The index of the invalid operation in the transaction

Constructors

Link copied to clipboard
constructor(operationType: String, operationIndex: Int)

Properties

Link copied to clipboard
expect open val cause: Throwable?
Link copied to clipboard
expect open val message: String?