- Add typedefs to model the result of functions `planned_utxos`
and `init`
- Add new struct `CreateTxChange` to hold any change info
resulting from `create_tx`
These changes help resolve clippy::type_complexity
These lints either resolved themselves, or the code has changed such that
they no longer apply, hence they can be removed with no further changes.
`clippy::derivable_impls`
`clippy::needless_collect`
`clippy::almost_swapped`
c4d5f2ccd8435b9c424eec5ba35ba44a3383b04d doc(example_cli): add missing cli docs (vmammal)
Pull request description:
### Checklists
#### All Submissions:
* [x] I've signed all my commits
* [x] I followed the [contribution guidelines](https://github.com/bitcoindevkit/bdk/blob/master/CONTRIBUTING.md)
* [x] I ran `cargo fmt` and `cargo clippy` before committing
ACKs for top commit:
evanlinjin:
ACK c4d5f2ccd8435b9c424eec5ba35ba44a3383b04d
Tree-SHA512: 43684abbb32570f07e0dc05ed07062bc7969cbe7c4fefe8ae7ebe41ac28aedfbba76ffc801bc4ddb3bf08a940ca81c128376dc3f6c76a04f1391e43c18e0d50b
In the example_cli we were not always committing (seemingly by mistake).
This then caused all the examples to have to compensate by manually
committing.
Previously `SpkTxOutIndex` methods can be called from
`KeychainTxOutIndex` due to the `DeRef` implementation. However, the
internal `SpkTxOut` will also contain lookahead spks resulting in an
error-prone API.
`SpkTxOutIndex` methods are now not directly callable from
`KeychainTxOutIndex`. Methods of `KeychainTxOutIndex` are renamed for
clarity. I.e. methods that return an unbounded spk iter are prefixed
with `unbounded`.
`PersistBackend::is_empty` is removed. Instead, `load_from_persistence`
returns an option of the changeset. `None` means persistence is empty.
This is a better API than a separate method. We can now differentiate
between a persisted single changeset and nothing persisted.
`Store::aggregate_changeset` is refactored to return a `Result` instead
of a tuple. A new error type (`AggregateChangesetsError`) is introduced
to include the partially-aggregated changeset in the error. This is a
more idiomatic API.
Instead of inserting anchors and seen_at timestamp in the same method,
we have three separate methods. This makes the API easier to understand
and makes `IndexedTxGraph` more consistent with the `TxGraph` API.
Other changes:
* The `async-https` feature of `bdk_esplora` is no longer default.
* Rename `ObservedAs` to `ChainPosition`.
* Set temporary MSRV to 1.60.0 to compile all workspace members will all
features.
This corresponds to `keychain::KeychainChangeSet` but for the redesigned
structures with `LocalChain`.
This structure is now used in `Wallet` as well as the examples.