LLFourn
0c9c0716a4
[wallet] Fix details.fees being wrong when change is dust
2020-12-29 16:36:35 +11:00
LLFourn
656c9c9da8
Use () to indicate a missing blockchain
...
So that:
1. There are no runtime errors
2. There less type annotations needed
3. Less traits and stuff to document
2020-12-23 14:52:29 +11:00
LLFourn
a578d20282
Fix incredibly annoying cargo-fmt problem
...
I must have a newer version of cargo-fmt which stops me from making
commits every time because of this.
2020-12-22 14:37:53 +11:00
LLFourn
9b31ae9153
Fix doc comment fallout from s/script type/keychain
2020-12-15 08:39:19 +11:00
LLFourn
8dcb75dfa4
Replace UTXO::is_internal with script_type
...
This means less conversion and logic mapping from bool to ScriptType and
back again.
2020-12-04 10:46:25 +11:00
LLFourn
67957a93b9
[wallet] Add wallet.network()
2020-12-01 13:29:20 +11:00
LLFourn
dd35903660
Remove trait bounds on Wallet struct
...
see: https://github.com/rust-lang/api-guidelines/issues/6
2020-11-24 12:40:58 +11:00
LLFourn
acc0ae14ec
[wallet] Eagerly finalize inputs
...
If we know the final witness/scriptsig for an input we should add it
right away to the PSBT. Before, if we couldn't finalize any of them we
finalized none of them.
2020-11-23 16:07:50 +11:00
LLFourn
d2490d9ce3
Fix to at least bitcoin ^0.25.2
...
And fix the fallout.
2020-11-23 15:06:13 +11:00
LLFourn
35579cb216
[wallet] Build output lookup inside complete transaction
...
To avoid the caller having to do it.
2020-11-17 15:11:47 +11:00
LLFourn
fcc408f346
[wallet] Add test that shwpkh populates witness_utxo
2020-11-17 15:11:47 +11:00
LLFourn
004f81b0a8
[wallet] Make coin_select return UTXOs instead of TxIns
...
- We want to keep the metadata in the UTXO around for things later
- It is easier to turn a UTXO into a TxIn outside
2020-11-17 15:11:47 +11:00
LLFourn
796f9f5a70
Make Signer and AddressValidator Send and Sync
2020-11-03 16:16:32 +11:00
LLFourn
3b3659fc0c
Remove redundant Box around signers
2020-11-03 16:06:43 +11:00
LLFourn
5784a95e48
Remove redundant Box around address validators
2020-11-03 16:06:43 +11:00
LLFourn
8d65581825
Incorporate RBF rules into utxo selection function
2020-10-23 13:54:59 +11:00
LLFourn
a6b70af2fb
[wallet] Stop implicitly enforcing manaul selection by .add_utxo
...
This makes it possible to choose a UTXO manually without having to
choose them *all* manually. I introduced the `manually_selected_only`
option to enforce that only manually selected utxos can be used.
To stop the cli semantics changing I made the `utxos` keep the old
behaviour by calling `manually_selected_only`.
2020-10-23 13:54:59 +11:00
LLFourn
b87c7c5dc7
[wallet] Make 'unspendable' into a HashSet
...
to avoid awkwardly later on.
2020-10-23 13:54:59 +11:00
LLFourn
c549281ace
[wallet] Replace ChangeSpendPolicy::filter_utxos with a predicate
...
To make composing it with other filtering conditions easier.
2020-10-23 13:54:59 +11:00
LLFourn
17f7294c8e
[wallet] Make coin_select take may/must use utxo lists
...
so that in the future you can add a UTXO that you *must* spend and let
the coin selection fill in the rest.
This partially addresses #121
2020-10-16 14:28:22 +02:00
LLFourn
64b4cfe308
Use collect to avoid iter unwrapping Options
2020-10-15 13:41:36 +11:00
LLFourn
490c88934e
[keys] Less convoluted entropy generation
...
Since const generics aren't in rust yet you have to find some awkward
workarounds. This improves the workaround for specifying entropy length.
2020-09-30 20:05:17 +10:00
LLFourn
6a2d0db674
Remove assumed "/api" prefix from esplora
...
It is not necessary that esplora is hosted with a /api prefix
2020-09-05 14:00:50 +10:00