Expand description
lexe-common contains types and functionality shared between most Lexe
crates.
Modules§
- api
- API definitions, errors, clients, and structs sent across the wire.
- byte_
str tokio::Bytesbut must contain a string.- constants
- Application-level constants.
- dotenv
dotenvyextensions.- env
DeployEnv.- ln
- Bitcoin / Lightning Lexe newtypes which can’t go in lexe-ln
Bitcoin / Lightning Lexe newtypes which have to be in
lexe-commonfor some reason, likely because they are referenced in an API definition. - net
- Networking utilities.
- or_env
OrEnvExtutility trait. UseOrEnvExtwhen you have a cli arg (e.g.db_url: Option<String>) that can also be set by a “fallback” env variable (e.g.$DATABASE_URL). Then, when initializing the args, just usedb_url.or_env_mut("DATABASE_URL")?.- releases
- Types related to
releases.json. - rng
- Random number generation.
Lexe
Crngcompatibility hacks to support LDK’sEntropySource. - root_
seed RootSeed.- secp256k1_
ctx - Global
Secp256k1context - time
TimestampMsandDisplayMs.
Macros§
- btc
- Shorthand macro for
Amount::try_from_btc(dec!(___)).unwrap() - debug_
panic_ release_ log panic!(..)s in debug mode,tracing::error!(..)s in release mode- msat
- Shorthand macro for
Amount::from_msat(___) - sat
- Shorthand macro for
Amount::from_sats_u32(___)
Structs§
- Secret
- Wrapper type for values that contains secrets, which attempts to limit accidental exposure and ensure secrets are wiped from memory when dropped. (e.g. passwords, cryptographic keys, access tokens or other credentials)
Traits§
- Byte
Array - A trait for types represented in memory as a byte array. Should NOT be implemented for types that require validation of the byte array contents.
- Expose
Secret - Expose a reference to an inner secret
- RefCast
- Safely cast
&Tto&Uwhere the structUcontains a single field of typeT.
Functions§
- default_
lexe_ data_ dir - Returns the default Lexe data directory (
~/.lexe).
Derive Macros§
- RefCast
- Derive the
RefCasttrait.