Skip to content

Is it possible to "send all" with SingleWalletAddress ? #425

Answered by mkazlauskas
pitersky asked this question in Q&A
Discussion options

You must be logged in to vote

Hi, unfortunately this use case is currently unsupported. We're planning to add it in the future, but it's currently low priority.

This feature is more complicated than it might look as

  • there is an edge case where it can only be done with multiple transactions (could exceed max transaction size)
  • preserving utxo distribution is desired

In your case (sending coin only, no assets) it is not as complicated. You could try to re-implement initializeTx by referencing SDK code and replacing the call to input selection with a simpler implementation that selects all utxo and balances the output(s) with fee in a a way that doesn't need any change.

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@pitersky
Comment options

@mkazlauskas
Comment options

Answer selected by pitersky
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants