ChallengeValidationErrorInvalidMemoValue class
Validation error thrown when the challenge transaction's memo value does not match expected.
According to SEP-10, if a memo was provided when requesting the challenge, the challenge transaction's memo must match that exact value.
Memo matching requirements:
- If memo was provided in challenge request: transaction must contain that exact memo value
- If no memo was provided in request: transaction should have no memo (MEMO_NONE)
- Memo values must match exactly (same unsigned 64-bit integer)
This validation ensures:
- The challenge is bound to the specific sub-account or user identifier
- Server correctly incorporated the requested memo
- Challenge cannot be used for a different sub-account
Common scenarios requiring memos:
- Exchange or custodial wallets using pooled accounts
- Services that map multiple users to a single Stellar account
- Systems using memos to identify individual users or accounts
Invalid memo value indicates:
- Server returned a challenge with wrong memo
- Challenge is for a different sub-account
- Server processing error
Example handling:
int expectedMemo = 12345;
try {
webAuth.validateChallenge(challenge, accountId, null, null, expectedMemo);
} on ChallengeValidationErrorInvalidMemoValue catch (e) {
print('Challenge memo does not match expected value: $expectedMemo');
// Request a new challenge with correct memo
}
- Inheritance
-
- Object
- ChallengeValidationError
- ChallengeValidationErrorInvalidMemoValue
Constructors
- ChallengeValidationErrorInvalidMemoValue(String message)
- Creates a ChallengeValidationErrorInvalidMemoValue with error message.
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
Returns a string representation of this instance for debugging.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited