@@ -19,7 +19,6 @@ use bdk_wallet::bitcoin::secp256k1::Secp256k1;
1919use bdk_wallet:: bitcoin:: Amount as BdkAmount ;
2020use bdk_wallet:: bitcoin:: BlockHash as BitcoinBlockHash ;
2121use bdk_wallet:: bitcoin:: FeeRate as BdkFeeRate ;
22- use bdk_wallet:: bitcoin:: Network ;
2322use bdk_wallet:: bitcoin:: OutPoint as BdkOutPoint ;
2423use bdk_wallet:: bitcoin:: Psbt as BdkPsbt ;
2524use bdk_wallet:: bitcoin:: ScriptBuf as BdkScriptBuf ;
@@ -39,6 +38,7 @@ use std::str::FromStr;
3938use std:: sync:: { Arc , Mutex } ;
4039
4140pub ( crate ) type DescriptorType = bdk_wallet:: miniscript:: descriptor:: DescriptorType ;
41+ pub type Network = bdk_wallet:: bitcoin:: Network ;
4242
4343/// A reference to an unspent output by TXID and output index.
4444#[ derive( Debug , Clone , Eq , PartialEq , std:: hash:: Hash , uniffi:: Record ) ]
@@ -76,6 +76,24 @@ impl From<OutPoint> for BdkOutPoint {
7676 }
7777}
7878
79+ /// The cryptocurrency network to act on.
80+ ///
81+ /// This is an exhaustive enum, meaning that we cannot add any future networks without defining a
82+ /// new, incompatible version of this type. If you are using this type directly and wish to support
83+ /// the new network, this will be a breaking change to your APIs and likely require changes in your
84+ /// code.
85+ ///
86+ /// If you are concerned about forward compatibility, consider using T: Into<Params> instead of this
87+ /// type as a parameter to functions in your public API, or directly using the Params type.
88+ #[ uniffi:: remote( Enum ) ]
89+ pub enum Network {
90+ Bitcoin ,
91+ Testnet ,
92+ Testnet4 ,
93+ Signet ,
94+ Regtest ,
95+ }
96+
7997/// An [`OutPoint`] used as a key in a hash map.
8098///
8199/// Due to limitations in generating the foreign language bindings, we cannot use [`OutPoint`] as a
0 commit comments