Expand description
§Floresta Common
Provides utility functions, macros and modules to be used in other Floresta crates.
Re-exports§
pub use spsc::Channel;
Modules§
- macros
- This module has useful macros for usage on other crates.
- prelude
std - Provides implementation for basic
stdtypes, without assuming we have astdlibrary. - service_
flags - Non-standard service flags that aren’t in rust-bitcoin yet.
- spsc
- A no-std Single Producer, Single Consumer channel for unidirectional message exchange between modules. This module don’t use anything from the standard lib and can be easily used in no-std environments. We only use mem::take from core.
Macros§
- acchashes
- Validates utreexo node hashes at compile time. Requires
FromStrandBitcoinNodeHashin scope. - assert_
err - Panic if the expression is not
Err(_). - assert_
ok - Panic if the expression is not
Ok(_). - bhash
- Validates a block hash at compile time. Requires
FromStrandBlockHashin scope. - impl_
error_ from - Implements the
Fromtrait for converting a specific type into an enum variant or struct field.
Structs§
- Fraction
Avg - A simple fraction struct that allows adding numbers to the numerator and denominator
Functions§
- get_
hash_ from_ u8 - Computes the SHA-256 digest of the byte slice data and returns a Hash from
bitcoin_hashes. - get_
spk_ hash - Computes the SHA-256 digest of a script, reverses its bytes, and returns a Hash from
bitcoin_hashes. - parse_
descriptors descriptors-stdordescriptors-no-std - Takes an array of descriptors as
String, performs sanity checks on each one and returns list of parsed descriptors.