File tree Expand file tree Collapse file tree 1 file changed +5
-0
lines changed Expand file tree Collapse file tree 1 file changed +5
-0
lines changed Original file line number Diff line number Diff line change @@ -125,6 +125,7 @@ pub struct FeeRate(pub BdkFeeRate);
125125
126126#[ uniffi:: export]
127127impl FeeRate {
128+ // Constructs `FeeRate` from satoshis per virtual bytes.
128129 #[ uniffi:: constructor]
129130 pub fn from_sat_per_vb ( sat_vb : u64 ) -> Result < Self , FeeRateError > {
130131 let fee_rate: Option < BdkFeeRate > = BdkFeeRate :: from_sat_per_vb ( sat_vb) ;
@@ -134,19 +135,23 @@ impl FeeRate {
134135 }
135136 }
136137
138+ // Constructs `FeeRate` from satoshis per 1000 weight units.
137139 #[ uniffi:: constructor]
138140 pub fn from_sat_per_kwu ( sat_kwu : u64 ) -> Self {
139141 FeeRate ( BdkFeeRate :: from_sat_per_kwu ( sat_kwu) )
140142 }
141143
144+ /// Converts to sat/vB rounding up.
142145 pub fn to_sat_per_vb_ceil ( & self ) -> u64 {
143146 self . 0 . to_sat_per_vb_ceil ( )
144147 }
145148
149+ /// Converts to sat/vB rounding down.
146150 pub fn to_sat_per_vb_floor ( & self ) -> u64 {
147151 self . 0 . to_sat_per_vb_floor ( )
148152 }
149153
154+ /// Returns raw fee rate.
150155 pub fn to_sat_per_kwu ( & self ) -> u64 {
151156 self . 0 . to_sat_per_kwu ( )
152157 }
You can’t perform that action at this time.
0 commit comments