File tree Expand file tree Collapse file tree 4 files changed +12
-10
lines changed Expand file tree Collapse file tree 4 files changed +12
-10
lines changed Original file line number Diff line number Diff line change @@ -8,7 +8,7 @@ use std::sync::Arc;
88use bdk_chain:: BlockId ;
99use bdk_chain:: ConfirmationBlockTime ;
1010use bdk_chain:: TxUpdate ;
11- use bdk_wallet:: psbt:: params :: { Params , SelectionStrategy :: * } ;
11+ use bdk_wallet:: psbt:: { PsbtParams , SelectionStrategy :: * } ;
1212use bdk_wallet:: test_utils:: * ;
1313use bdk_wallet:: { KeychainKind :: * , Update , Wallet } ;
1414use bitcoin:: FeeRate ;
@@ -49,7 +49,7 @@ fn main() -> anyhow::Result<()> {
4949 . collect :: < HashMap < _ , _ > > ( ) ;
5050
5151 // Build params.
52- let mut params = Params :: default ( ) ;
52+ let mut params = PsbtParams :: default ( ) ;
5353 let addr = Address :: from_str ( SEND_TO ) ?. require_network ( NETWORK ) ?;
5454 let feerate = feerate_unchecked ( FEERATE ) ;
5555 params
Original file line number Diff line number Diff line change @@ -17,8 +17,9 @@ use bitcoin::FeeRate;
1717use bitcoin:: Psbt ;
1818use bitcoin:: TxOut ;
1919
20- #[ allow( unused) ]
21- pub mod params;
20+ mod params;
21+
22+ pub use params:: * ;
2223
2324// TODO upstream the functions here to `rust-bitcoin`?
2425
Original file line number Diff line number Diff line change @@ -8,7 +8,8 @@ use miniscript::plan::Assets;
88
99/// Parameters to create a PSBT.
1010#[ derive( Debug ) ]
11- pub struct Params {
11+ #[ allow( unused) ]
12+ pub struct PsbtParams {
1213 // Inputs
1314 pub ( crate ) utxos : Vec < OutPoint > ,
1415
@@ -29,7 +30,7 @@ pub struct Params {
2930 pub ( crate ) fallback_sequence : Option < Sequence > ,
3031}
3132
32- impl Default for Params {
33+ impl Default for PsbtParams {
3334 fn default ( ) -> Self {
3435 Self {
3536 utxos : Default :: default ( ) ,
@@ -47,8 +48,8 @@ impl Default for Params {
4748 }
4849}
4950
50- // TODO: more setters for Params
51- impl Params {
51+ // TODO: more setters for PsbtParams
52+ impl PsbtParams {
5253 /// Add the spend [`Assets`].
5354 ///
5455 /// Assets are required to create a spending plan for an output controlled by the wallet's
Original file line number Diff line number Diff line change @@ -2639,7 +2639,7 @@ use bdk_tx::{
26392639} ;
26402640use miniscript:: plan:: { Assets , Plan } ;
26412641
2642- use crate :: psbt:: params :: { self as psbt_params , AssetsExt , SelectionStrategy } ;
2642+ use crate :: psbt:: { AssetsExt , SelectionStrategy } ;
26432643
26442644/// Maps a chain position to tx confirmation status, if `pos` is the confirmed
26452645/// variant.
@@ -2687,7 +2687,7 @@ impl Wallet {
26872687 /// Create PSBT with the given `params` and `rng`.
26882688 pub fn create_psbt (
26892689 & self ,
2690- params : psbt_params :: Params ,
2690+ params : crate :: psbt :: PsbtParams ,
26912691 rng : & mut impl RngCore ,
26922692 ) -> Result < ( Psbt , Finalizer ) , CreatePsbtError > {
26932693 // Get spend assets
You can’t perform that action at this time.
0 commit comments