Skip to content

Commit

Permalink
feat: add send_coins method (#53)
Browse files Browse the repository at this point in the history
  • Loading branch information
lorenzolfm authored Mar 14, 2024
1 parent a386419 commit 993a506
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ use gen::{
ForwardingHistoryResponse, GetInfoRequest, GetInfoResponse, Invoice, ListChannelsRequest,
ListChannelsResponse, ListInvoiceRequest, ListInvoiceResponse, ListPaymentsRequest,
ListPaymentsResponse, NewAddressRequest, NewAddressResponse, PayReq, PayReqString, Payment,
PaymentHash, PendingChannelsRequest, PendingChannelsResponse, SendRequest, SendResponse,
WalletBalanceRequest, WalletBalanceResponse,
PaymentHash, PendingChannelsRequest, PendingChannelsResponse, SendCoinsRequest,
SendCoinsResponse, SendRequest, SendResponse, WalletBalanceRequest, WalletBalanceResponse,
},
routerrpc::{router_client::RouterClient, SendPaymentRequest, TrackPaymentRequest},
};
Expand Down Expand Up @@ -355,6 +355,14 @@ impl Lnd {
.await
.map(Response::into_inner)
}

pub async fn send_coins(&mut self, req: SendCoinsRequest) -> Result<SendCoinsResponse, Status> {
self.lightning
.send_coins(req)
.instrument(span!("lnrpc". "Lightning" / "SendCoins"))
.await
.map(Response::into_inner)
}
}

impl Lnd {
Expand Down

0 comments on commit 993a506

Please sign in to comment.