-
Notifications
You must be signed in to change notification settings - Fork 4
Open
Description
As i'm digging into the lib i'm trying to figure out why the Lnd properties are no directly accessible and exposed through some kind of proxy methods instead.
For example :
Lines 211 to 227 in d1595d1
pub async fn list_invoices( | |
&mut self, | |
pending_only: bool, | |
index_offset: u64, | |
num_max_invoices: u64, | |
reversed: bool, | |
) -> Result<ListInvoiceResponse, Status> { | |
self.lightning | |
.list_invoices(ListInvoiceRequest { | |
pending_only, | |
index_offset, | |
num_max_invoices, | |
reversed, | |
}) | |
.await | |
.map(Response::into_inner) | |
} |
would be exactly the same as writing some kind of :
let list_invoice_request = ListInvoiceRequest{
pending_only: true,
index_offset: 0 as u64,
num_max_invoices: u64,
reversed: false
};
let list_invoice_response = mylndclient.lightning.list_invoices(list_invoice_request).await.unwrap().into_inner();
if the sub-clients were publicly accessible.
I do undestand that the proxy methods unwraps the result of the requests to provide with the inner response directly, however i feel like a limitation to not have access to the direct clients as it makes use of the client impossible for the methods that are not proxified.
Maybe those clients could be made public which does not appear incompatible to providing the proxy methods ?
PR Proposal here : #37
Metadata
Metadata
Assignees
Labels
No labels