NoMemoForMuxedAccountsException

class NoMemoForMuxedAccountsException(message: String = "Muxed accounts (M...) cannot be used with a separate memo parameter. " + "The memo ID is already embedded in the muxed account address.") : WebAuthException

Exception thrown when attempting to use a memo parameter with a muxed account.

Muxed accounts (M... addresses) have their ID embedded in the address itself, so they cannot be used with a separate memo parameter. This is a validation error that prevents conflicting identification methods.

Context:

  • Muxed accounts (M...) encode the account ID and a 64-bit memo ID in the address

  • Traditional accounts (G...) can use separate memo parameters for sub-accounts

  • These two approaches are mutually exclusive

Example - Correct usage:

// Option 1: Use muxed account (no memo parameter)
val challenge = webAuth.getChallenge(
clientAccountId = "MABC...XYZ" // Muxed account (M...)
)

// Option 2: Use traditional account with memo
val challenge = webAuth.getChallenge(
clientAccountId = "GABC...XYZ", // Traditional account (G...)
memo = 12345
)

Example - Incorrect usage (throws this exception):

// WRONG: Cannot combine M... address with memo parameter
val challenge = webAuth.getChallenge(
clientAccountId = "MABC...XYZ", // Muxed account
memo = 12345 // ERROR: Redundant/conflicting identification
)

See also:

Parameters

message

Description of the validation error

Constructors

Link copied to clipboard
constructor(message: String = "Muxed accounts (M...) cannot be used with a separate memo parameter. " + "The memo ID is already embedded in the muxed account address.")

Properties

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