Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge #1048: Remove TransactionDetails from Wallet API
5fb5061 ci: fix msrv dependency versions for rustls (Steve Myers) dd5b8d7 test(wallet): add check_fee!(wallet,psbt) macro and use it in place of psbt.fee_amount() (Steve Myers) 465d53c docs(wallet): update docs for calculate_fee/fee_rate and add_foreign_utxo (Steve Myers) 0362998 feat(wallet): add Wallet::insert_txout function and updated docs for fee functions (Steve Myers) d443fe7 feat(tx_graph)!: change TxGraph::calculate_fee to return Result<u64,CalculateFeeError> (Steve Myers) b4c31cd feat(wallet)!: remove TransactionDetails from bdk::Wallet API (Steve Myers) Pull request description: ### Description Removed `TransactionDetails` and changed `Wallet::get_tx` to return a `CanonicalTx`, and `TxBuilder::finish` to return only a `PartiallySignedTransaction`. This should fix #922 and fix #1015. I also added `Wallet` functions to get a `Transaction` send and receive amounts, fee, and `FeeRate`. see: #922 (comment) ### Notes to the reviewers Alot of wallet tests had to change since `TxBuilder::finish` only returns a PSBT now. I added a new `CalculateFeeError` which follows changes coming in #1028. ### Changelog notice Added - Wallet::sent_and_received function - Wallet::calculate_fee and Wallet::calculate_fee_rate functions - Wallet::error::CalculateFeeError - Wallet::insert_txout function to allow inserting foreign TxOuts BREAKING CHANGES: Removed - TransactionDetails struct Changed - Wallet::get_tx now returns CanonicalTx instead of TransactionDetails - TxBuilder::finish now returns only a PartiallySignedTransaction ### 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 #### New Features: * [x] I've added tests for the new feature * [x] I've added docs for the new feature ACKs for top commit: evanlinjin: ACK 5fb5061 Tree-SHA512: 1a0be1c229b8871e5ee23ba6874ff40370170477a0a8bb104c0197e7fd97765d84854285f863dd1b38a34c3b71815e75e4db5b25288c81caea99a14ddaa78254
- Loading branch information