2

I have few doubts regarding pre authorized transaction

  1. As per the tutorial "Signers of this type are automatically removed from the account when a matching transaction is properly applied". What exactly is matching transaction ? Does that mean transaction need to have same operations and if its payment operation does the payment amount also needs to match ?

  2. "In case of error, or when matching transaction is never submitted, the signer remains and must be manually removed using the Set Options operation." I assume, this condition is valid only when the other signers of the account have equal or more weight that preauthTx. Is my understanding correct ?

  3. Assuming sequence number of account is 5, if I need to create a pre auth transaction, then sequence number should be 7. Because sequence number 6 will be taken by the transaction which will add operations.setOptions.signer(preAuthTx). Is my understanding correct ?

1
  1. As per the tutorial "Signers of this type are automatically removed from the account when a matching transaction is properly applied". What exactly is matching transaction ? Does that mean transaction need to have same operations and if its payment operation does the payment amount also needs to match ?

<1> Matching Tx:

When someone wants to do a pre-authorized transaction, he generates a hash and supplies the hash to you beforehand. A matching transaction is a transaction having the same hash as pre-supplied.

The hash changes with every bit of transaction details. Type of operation has to match; all mandatory and optional fields like tx_seq & amount & memo have to match; every operation in one transaction also has to match.

[YES], "transaction need to have same operations"

[YES], "payment operation needs to have payment amount matching"


  1. "In case of error, or when matching transaction is never submitted, the signer remains and must be manually removed using the Set Options operation." I assume, this condition is valid only when the other signers of the account have equal or more weight that preauthTx. Is my understanding correct ?

<2> "condition is valid only when the other signers of the account have equal or more weight that preauthTx"

[Not exactly]. This operation is "Set Options", which requires HIGH threshold. As long as you gain enough threshold to be equal to or more than the high threshold, your operation will be valid.


  1. Assuming sequence number of account is 5, if I need to create a pre auth transaction, then sequence number should be 7. Because sequence number 6 will be taken by the transaction which will add operations.setOptions.signer(preAuthTx). Is my understanding correct ?

<3> Free up some tx_seq #

[YES]. Good that you understand at least one tx_seq has to be reserved for "Set Options"

You may simply try your ideas at Laboratory before coding. This helps to prevent the uncertain errors due to coding bug or it being a Stellar feature.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.