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);
125
125
126
126
#[ uniffi:: export]
127
127
impl FeeRate {
128
+ // Constructs `FeeRate` from satoshis per virtual bytes.
128
129
#[ uniffi:: constructor]
129
130
pub fn from_sat_per_vb ( sat_vb : u64 ) -> Result < Self , FeeRateError > {
130
131
let fee_rate: Option < BdkFeeRate > = BdkFeeRate :: from_sat_per_vb ( sat_vb) ;
@@ -134,19 +135,23 @@ impl FeeRate {
134
135
}
135
136
}
136
137
138
+ // Constructs `FeeRate` from satoshis per 1000 weight units.
137
139
#[ uniffi:: constructor]
138
140
pub fn from_sat_per_kwu ( sat_kwu : u64 ) -> Self {
139
141
FeeRate ( BdkFeeRate :: from_sat_per_kwu ( sat_kwu) )
140
142
}
141
143
144
+ /// Converts to sat/vB rounding up.
142
145
pub fn to_sat_per_vb_ceil ( & self ) -> u64 {
143
146
self . 0 . to_sat_per_vb_ceil ( )
144
147
}
145
148
149
+ /// Converts to sat/vB rounding down.
146
150
pub fn to_sat_per_vb_floor ( & self ) -> u64 {
147
151
self . 0 . to_sat_per_vb_floor ( )
148
152
}
149
153
154
+ /// Returns raw fee rate.
150
155
pub fn to_sat_per_kwu ( & self ) -> u64 {
151
156
self . 0 . to_sat_per_kwu ( )
152
157
}
You can’t perform that action at this time.
0 commit comments