File tree Expand file tree Collapse file tree 2 files changed +5
-14
lines changed
Expand file tree Collapse file tree 2 files changed +5
-14
lines changed Original file line number Diff line number Diff line change @@ -1469,19 +1469,7 @@ interface Amount {
14691469 f64 to_btc();
14701470};
14711471
1472- interface FeeRate {
1473- [Name=from_sat_per_vb, Throws=FeeRateError]
1474- constructor(u64 sat_per_vb);
1475-
1476- [Name=from_sat_per_kwu]
1477- constructor(u64 sat_per_kwu);
1478-
1479- u64 to_sat_per_vb_ceil();
1480-
1481- u64 to_sat_per_vb_floor();
1482-
1483- u64 to_sat_per_kwu();
1484- };
1472+ typedef interface FeeRate;
14851473
14861474dictionary OutPoint {
14871475 string txid;
Original file line number Diff line number Diff line change @@ -54,10 +54,12 @@ impl From<OutPoint> for BdkOutPoint {
5454 }
5555}
5656
57- #[ derive( Clone , Debug ) ]
57+ #[ derive( Clone , Debug , uniffi :: Object ) ]
5858pub struct FeeRate ( pub BdkFeeRate ) ;
5959
60+ #[ uniffi:: export]
6061impl FeeRate {
62+ #[ uniffi:: constructor]
6163 pub fn from_sat_per_vb ( sat_per_vb : u64 ) -> Result < Self , FeeRateError > {
6264 let fee_rate: Option < BdkFeeRate > = BdkFeeRate :: from_sat_per_vb ( sat_per_vb) ;
6365 match fee_rate {
@@ -66,6 +68,7 @@ impl FeeRate {
6668 }
6769 }
6870
71+ #[ uniffi:: constructor]
6972 pub fn from_sat_per_kwu ( sat_per_kwu : u64 ) -> Self {
7073 FeeRate ( BdkFeeRate :: from_sat_per_kwu ( sat_per_kwu) )
7174 }
You can’t perform that action at this time.
0 commit comments