channeldb: save outgoing payments
Add structure for outgoing payments. Saving payment in DB after successful payment send. Add RPC call for listing all payments.
This commit is contained in:
1 parent
343cd7779f
commit
eb4d0e035e
12 files changed
+1117
-168
No files matched your search
@@ -113,6 +113,18 @@ service Lightning {
|
||||
}
|
||||
|
||||
rpc ShowRoutingTable(ShowRoutingTableRequest) returns (ShowRoutingTableResponse);
|
||||
|
||||
rpc ListPayments(ListPaymentsRequest) returns (ListPaymentsResponse){
|
||||
option (google.api.http) = {
|
||||
get: "/v1/payments"
|
||||
};
|
||||
};
|
||||
|
||||
rpc DeleteAllPayments(DeleteAllPaymentsRequest) returns (DeleteAllPaymentsResponse) {
|
||||
option (google.api.http) = {
|
||||
delete: "/v1/payments"
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
@@ -396,3 +408,27 @@ message ListInvoiceResponse {
|
||||
}
|
||||
|
||||
message InvoiceSubscription {}
|
||||
|
||||
|
||||
message Payment {
|
||||
string r_hash = 1;
|
||||
|
||||
int64 value = 2;
|
||||
|
||||
int64 creation_date = 3;
|
||||
repeated string path = 4;
|
||||
int64 fee = 5;
|
||||
}
|
||||
|
||||
message ListPaymentsRequest {
|
||||
}
|
||||
|
||||
message ListPaymentsResponse {
|
||||
repeated Payment payments = 1;
|
||||
}
|
||||
|
||||
message DeleteAllPaymentsRequest {
|
||||
}
|
||||
|
||||
message DeleteAllPaymentsResponse {
|
||||
}
|
||||
Reference in new issue
Block a user