-
Notifications
You must be signed in to change notification settings - Fork 117
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
StaticAddr: Withdraw arbitrary amounts #860
base: static-addr-staging
Are you sure you want to change the base?
StaticAddr: Withdraw arbitrary amounts #860
Conversation
…address StaticAddr: withdrawal destination address and fee rate
d69eda3
to
4f2ff5d
Compare
4f2ff5d
to
f7af7b4
Compare
// The change amount will be sent back to the static address. The client | ||
// ensures that the change amount covers the transaction fee, and that the | ||
// change after fees is at least the dust limit. | ||
int64 change_amount = 5; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I propose to replace client_withdrawal_addr
, withdraw_amount
and change_amount
with a psbt, so the UTXO could be used for whatever purpose, e.g. batch sending, coinjoin/payjoin, channel opening etc.
addressParams, err := m.cfg.AddressManager.GetStaticAddressParameters( | ||
ctx, | ||
// Send change back to the static address. | ||
changeAddress, err := m.cfg.AddressManager.GetTaprootAddress( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why m.cfg.AddressManager.GetStaticAddress(ctx)
can't be used here?
5b68e42
to
fb9562b
Compare
This PR adds an amount field to the withdrawal rpc.
It allows to withdraw a fraction of the sum of selected deposits to withdraw. The change is sent back to the static address.
If the change is below the dust limit it goes towards miner fees, but warns the user beforehand.