Add remaining missing endpoints to Cli#95
Conversation
|
I've assigned @jkczyz as a reviewer! |
ldk-server-cli/src/types.rs
Outdated
| /// CLI-specific wrapper for ListForwardedPaymentsResponse that formats the page token | ||
| /// as "token:idx" instead of a JSON object. | ||
| #[derive(Debug, Clone, Serialize)] | ||
| pub struct CliListForwardedPaymentsResponse { |
There was a problem hiding this comment.
Could this be DRY'ed up by adding type parameters to CliListPaymentsResponse? Likewise in the CLI code?
There was a problem hiding this comment.
good call, done
0ac8775 to
b43402f
Compare
ldk-server-cli/src/main.rs
Outdated
| |pt| { | ||
| client.list_forwarded_payments(ListForwardedPaymentsRequest { | ||
| page_token: pt, | ||
| }) | ||
| }, | ||
| |r| (r.forwarded_payments, r.next_page_token), |
There was a problem hiding this comment.
Feel free to punt on this. I feel defining an internal trait for this (implemented by each request type) would be cleaner than passing two closures. But maybe async makes it grosser?
There was a problem hiding this comment.
We can't really do that because all the request and response types are auto generated from the proto files. Maybe we could somehow add it to that system but I feel that is more complicated than it is worth
There was a problem hiding this comment.
IIRC, the module defining the trait can implement it for any type. That is, it doesn't need to be implemented where the type is defined.
b43402f to
ec6d62a
Compare
|
Is "connect to peer" missing? |
This is adding cli commands to endpoints we had in the backend. We can add more rpc endpoints in the future though |
ec6d62a to
d701b3d
Compare
d701b3d to
5902ff4
Compare
We were missing
GetPaymentDetailsandListForwardedPayments