list offer ops

This commit is contained in:
boufni95 2024-12-06 19:24:02 +00:00
parent babce0d4da
commit 299f5d86b6
13 changed files with 307 additions and 7 deletions

View file

@ -481,6 +481,12 @@ service LightningPub {
option (http_route) = "/api/user/offer/get";
option (nostr) = true;
}
rpc GetUserOfferInvoices(structs.GetUserOfferInvoicesReq) returns (structs.OfferInvoices){
option (auth_type) = "User";
option (http_method) = "post";
option (http_route) = "/api/user/offer/get/invoices";
option (nostr) = true;
}
rpc UpdateUserOffer(structs.OfferConfig) returns (structs.Empty){
option (auth_type) = "User";

View file

@ -641,4 +641,21 @@ message OfferConfig {
message UserOffers {
repeated OfferConfig offers = 1;
}
message GetUserOfferInvoicesReq {
string offer_id = 1;
bool include_unpaid = 2;
}
message OfferInvoices {
repeated OfferInvoice invoices = 1;
}
message OfferInvoice {
string invoice = 1;
string offer_id = 2;
int64 paid_at_unix = 3;
int64 amount = 4;
map<string,string> data = 5;
}