lnbot 1.0.0

Official Rust SDK for LnBot — Bitcoin for AI Agents. Send and receive sats over Lightning.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
use crate::client::LnBot;
use crate::errors::LnBotError;
use crate::types::*;

/// Wallet-scoped transaction operations.
pub struct TransactionsResource<'a> {
    pub(crate) client: &'a LnBot,
    pub(crate) prefix: &'a str,
}

impl TransactionsResource<'_> {
    /// Lists transactions with optional pagination.
    pub async fn list(&self, params: &ListParams) -> Result<Vec<TransactionResponse>, LnBotError> {
        self.client
            .get_with_params(&format!("{}/transactions", self.prefix), params)
            .await
    }
}