AccountRequiresMemoException
extends Exception
in package
Exception thrown when a destination account requires a memo the transaction does not carry
SEP-0029 lets an account declare that incoming payments must carry a memo by storing the data entry "config.memo_required" with the value 1. The check runs on the sending side: the SDK refuses to submit a memo-less transaction that pays, path pays or merges into such an account. This exception names the destination that requires the memo and the zero-based index of the operation that first sends to it, so the caller can rebuild the transaction with a memo or address the operation in question.
Tags
Table of Contents
Methods
- __construct() : mixed
- Creates a new exception for the given destination account and operation
- getAccountId() : string
- Gets the account id of the destination that requires a memo
- getOperationIndex() : int
- Gets the index of the operation that sends to the destination requiring a memo
Methods
__construct()
Creates a new exception for the given destination account and operation
public
__construct(string $accountId, int $operationIndex) : mixed
Parameters
- $accountId : string
-
The account id (G-address) of the destination requiring a memo
- $operationIndex : int
-
The zero-based index of the operation sending to that account
getAccountId()
Gets the account id of the destination that requires a memo
public
getAccountId() : string
Return values
string —The account id (G-address) of the destination
getOperationIndex()
Gets the index of the operation that sends to the destination requiring a memo
public
getOperationIndex() : int
The index is zero-based and counts all operations of the checked transaction, including those that name no destination.
Return values
int —The zero-based index of the operation