pub struct LightningSendFees {
pub min_fee: Amount,
pub base_fee: Amount,
pub ppm_expiry_table: Vec<PpmExpiryFeeEntry>,
}Expand description
Fees for lightning send operations.
Fields§
§min_fee: AmountMinimum fee to charge.
base_fee: AmountA fee applied to every transaction regardless of value.
ppm_expiry_table: Vec<PpmExpiryFeeEntry>A table mapping how soon a VTXO will expire to a PPM (parts per million) fee rate.
The table should be sorted by each expiry_blocks_threshold value in ascending order.
Implementations§
Source§impl LightningSendFees
impl LightningSendFees
Sourcepub fn calculate(
&self,
amount: Amount,
vtxos: impl IntoIterator<Item = VtxoFeeInfo>,
) -> Option<Amount>
pub fn calculate( &self, amount: Amount, vtxos: impl IntoIterator<Item = VtxoFeeInfo>, ) -> Option<Amount>
Calculate the total fee for a lightning send operation.
Returns None if an overflow occurs.
Trait Implementations§
Source§impl Clone for LightningSendFees
impl Clone for LightningSendFees
Source§fn clone(&self) -> LightningSendFees
fn clone(&self) -> LightningSendFees
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for LightningSendFees
impl Debug for LightningSendFees
Source§impl<'de> Deserialize<'de> for LightningSendFees
impl<'de> Deserialize<'de> for LightningSendFees
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Hash for LightningSendFees
impl Hash for LightningSendFees
Source§impl PartialEq for LightningSendFees
impl PartialEq for LightningSendFees
Source§impl Serialize for LightningSendFees
impl Serialize for LightningSendFees
impl Eq for LightningSendFees
impl StructuralPartialEq for LightningSendFees
Auto Trait Implementations§
impl Freeze for LightningSendFees
impl RefUnwindSafe for LightningSendFees
impl Send for LightningSendFees
impl Sync for LightningSendFees
impl Unpin for LightningSendFees
impl UnsafeUnpin for LightningSendFees
impl UnwindSafe for LightningSendFees
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more