Add docs for Wallet

This commit is contained in:
Alekos Filini
2020-09-04 16:29:25 +02:00
parent eee75219e0
commit ac06e35c49
4 changed files with 117 additions and 5 deletions

View File

@@ -27,10 +27,12 @@ use miniscript::{MiniscriptKey, Satisfier};
// De-facto standard "dust limit" (even though it should change based on the output type)
const DUST_LIMIT_SATOSHI: u64 = 546;
/// Trait to check if a value is below the dust limit
// we implement this trait to make sure we don't mess up the comparison with off-by-one like a <
// instead of a <= etc. The constant value for the dust limit is not public on purpose, to
// encourage the usage of this trait.
pub trait IsDust {
/// Check whether or not a value is below dust limit
fn is_dust(&self) -> bool;
}