We leverage the change logic for this. By making it possible to set the
change address to an external address, one can send all the value from
the inputs to this address.
When creating a new spend, if coin outpoints are not provided,
then coins will be selected automatically.
This automatic selection is such that the transaction fee is
minimized, taking into account the cost of creating any
change output now and the cost of spending it in the future.
If change is added, it must reduce the transaction waste and
be above the dust threshold. This same policy is applied also
in the case of manual coin selection, replacing the previous
logic for determining the change amount. This ensures that
creating a spend with auto-selection and another with manual
selection using the same auto-selected coins will give the
same change amount.
2660b77487d63218019413a4ca33b3a9629fbfc8 implement listadresses (pythcoiner)
Pull request description:
address #681
todo:
- [x] implement tests
- [x] update docs
edit: i'm really new to rust, don't hesitate to kick my ass when i write stupid code
ACKs for top commit:
darosior:
ACK 2660b77487d63218019413a4ca33b3a9629fbfc8 -- my requests are addressed in followup #808.
Tree-SHA512: a5fdfb4516dc0379bfec1be535e752795dec75d28cbc5b9fa4fe9898fa00b1cfaa9cee3b95f4dfd68365f4585426e1b4457a8366cc4f783600704994f879526f
This reverts commit 71056982636b408485ab24dab6628a555a6e7924, reversing
changes made to 03c37bd378f4f6bf11d90b224ed1db74b3596eaf.
This reverts PR #722. It turns out the Ledger Bitcoin app needs the
BIP32 derivation for all the keys in the Script, not only for the
spending path used. Therefore always create PSBT with all the BIP32
derivations. We'll add a way to prune them for talking to the Bitbox in
a future commit.
7f3b0b021858cfb2fe914f3ba6b30a39e3ae05ff qa: test a PSBT has only the BIP32 derivations for a single spending path (Antoine Poinsot)
b71bd693d6ea4c1c3567194fc82be43fb70c05bb qa: don't use a static dummy origin for descriptor xpubs (Antoine Poinsot)
a81d39c81a89cdf5e70b9888cbeb3abaf290a365 commands: do not include BIP32 derivations for other spending paths (Antoine Poinsot)
Pull request description:
ACKs for top commit:
edouardparis:
ACK 7f3b0b021858cfb2fe914f3ba6b30a39e3ae05ff
Tree-SHA512: f0e132edf8d653c5575f843b1e85d995f155a2435a6e6257564dc945562df70ec2049c29d77f7580858d9e4a58290b0798f298f77c18255415c4cf26ccc07f33
When creating a PSBT, only include the BIP32 derivations in each input
for the spending path this PSBT was created for.
This is to workaround Bitbox only providing a single signature per
input. Most likely other signing devices will have this behaviour too in
the future. See
https://github.com/wizardsardine/liana/pull/706#issuecomment-1744705808.
fcfad2de348a7d8b362631cf787599c284242aad import descriptor w/o replacing hardened identifier (pythcoiner)
eb1e0131222893981ce58965881c62c847d54372 recover walkthrough (pythcoiner)
Pull request description:
xref #375
ACKs for top commit:
darosior:
ACK fcfad2de348a7d8b362631cf787599c284242aad. I'll have a second pass for the syntax and expliciting a couple things. Thanks!
Tree-SHA512: c2713d0db8240b844c3a4cf3d97044a5846bba903c1209f08ce903475525d5145b9555fa693eed326e3d4a8e85577922adfb366664ec162303cb0bf3a4aae2a0
11a280bfe4e46031b55259d1ba4963ed4b6f2b8b doc(api): fix order of params for `createspend` (jp1ac4)
Pull request description:
This fixes the documented order of parameters for the `createspend` command.
I also added a full stop to the `destinations` description for consistency.
ACKs for top commit:
darosior:
Thanks! ACK 11a280bfe4e46031b55259d1ba4963ed4b6f2b8b.
Tree-SHA512: bb8778fcb25bb31f883825142e102741592593db22ccfad467b6704767055c67f135b39a5d8b2e3ba9f1e9bf53a422bd82423212c546882a5d302e512718beab
4dcac426a941dd62b27d4df1379ef836e394a789 add udev dependency to TRY.md (pythcoiner)
Pull request description:
i just found out that on ubuntu 22.04, libudev-dev cannot be installed if udev is not installed first
ACKs for top commit:
darosior:
Thanks. utACK 4dcac426a941dd62b27d4df1379ef836e394a789.
Tree-SHA512: 916e00ba5679573692913272d9d827562c14742b7e4e5f08b8b3f4bbd88577b2361a5b74683d7865de4e279e26365a163edb8cbc13daef4485ae7d18065deb30