pub struct Lnd {
pub client: Client,
pub grpc_url: String,
pub rest_url: String,
pub listen_url: Option<String>,
pub admin_macaroon: String,
pub tls_cert: String,
/* private fields */
}Expand description
Struct representing the lnd process with related information
Fields§
§client: ClientLND client connected to the lnd process
grpc_url: StringUrl to connect to the gRPC server
rest_url: StringUrl to connect to the REST server
listen_url: Option<String>Url to connect to p2p network
admin_macaroon: StringAdmin macaroon hex
tls_cert: StringTLS Cert hex
Implementations§
source§impl Lnd
impl Lnd
sourcepub async fn new<S: AsRef<OsStr>>(exe: S, bitcoind: &BitcoinD) -> Result<Lnd>
pub async fn new<S: AsRef<OsStr>>(exe: S, bitcoind: &BitcoinD) -> Result<Lnd>
Create a new lnd process connected with the given bitcoind and default args.
sourcepub fn with_conf<'life0, 'life1, 'async_recursion, S>(
exe: S,
conf: &'life0 LndConf<'_>,
bitcoind: &'life1 BitcoinD
) -> Pin<Box<dyn Future<Output = Result<Lnd>> + 'async_recursion>>
pub fn with_conf<'life0, 'life1, 'async_recursion, S>( exe: S, conf: &'life0 LndConf<'_>, bitcoind: &'life1 BitcoinD ) -> Pin<Box<dyn Future<Output = Result<Lnd>> + 'async_recursion>>
Create a new lnd process using given [Conf] connected with the given bitcoind
sourcepub fn trigger(&self) -> Result<()>
pub fn trigger(&self) -> Result<()>
triggers lnd sync by sending the SIGUSR1 signal, useful to call after a block for example
sourcepub fn admin_macaroon_path(&self) -> PathBuf
pub fn admin_macaroon_path(&self) -> PathBuf
Returns the path to the admin macaroon.
sourcepub fn tls_cert_path(&self) -> PathBuf
pub fn tls_cert_path(&self) -> PathBuf
Returns the path to the tls.cert
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Lnd
impl !RefUnwindSafe for Lnd
impl Send for Lnd
impl Sync for Lnd
impl Unpin for Lnd
impl !UnwindSafe for Lnd
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
source§impl<T> Instrument for T
impl<T> Instrument for T
source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T in a tonic::Request