js-stellar-base icon indicating copy to clipboard operation
js-stellar-base copied to clipboard

Option in build to increment account sequence optionally

Open aristidesstaffieri opened this issue 2 years ago • 1 comments

Is your feature request related to a problem? Please describe. When using SorobanClient.Account and passing it a sequence number, it can be confusing to know if this sdk expects the current number or incremented number. I made this mistake of using the incremented number provided by the laboratory while the sdk also expects to do the increment itself. One suggestion in chat was to match what the Go SDK does and allow an optional increment to be a bit more clear.

Describe the solution you'd like An option in tx.build to explicitly increment an account sequence number in order to match expected or matching behavior to the other tools in the ecosystem.

Describe alternatives you've considered We could add extra error handling to check an account's sequence number when this happens and add detail or direction to let the library do the incrementing.

Additional context Link to chat - https://stellarfoundation.slack.com/archives/C030Z9EHVQE/p1675981362546079

aristidesstaffieri avatar Feb 09 '23 23:02 aristidesstaffieri