product qr
This commit is contained in:
parent
38241a3266
commit
8b7ab71078
18 changed files with 1752 additions and 1263 deletions
|
|
@ -78,7 +78,6 @@ service LightningPub {
|
|||
option (http_method) = "post";
|
||||
option (http_route) = "/api/lnd/getinfo";
|
||||
};
|
||||
|
||||
rpc AddUser(structs.AddUserRequest)returns (structs.AddUserResponse){
|
||||
option (auth_type) = "Guest";
|
||||
option (http_method) = "post";
|
||||
|
|
@ -96,6 +95,19 @@ service LightningPub {
|
|||
option (nostr) = true;
|
||||
}
|
||||
// USER
|
||||
rpc AddProduct(structs.AddProductRequest) returns (structs.Product){
|
||||
option (auth_type) = "User";
|
||||
option (http_method) = "post";
|
||||
option (http_route) = "/api/user/product/add";
|
||||
option (nostr) = true;
|
||||
};
|
||||
rpc NewProductInvoice(structs.Empty) returns (structs.NewInvoiceResponse){
|
||||
option (auth_type) = "User";
|
||||
option (http_method) = "get";
|
||||
option (http_route) = "/api/user/product/get/invoice";
|
||||
option (query) = {items: ["id"]};
|
||||
option (nostr) = true;
|
||||
};
|
||||
rpc GetUserOperations(structs.GetUserOperationsRequest) returns (structs.GetUserOperationsResponse) {
|
||||
option (auth_type) = "User";
|
||||
option (http_method) = "post";
|
||||
|
|
|
|||
|
|
@ -49,7 +49,7 @@ message NewInvoiceResponse{
|
|||
string invoice = 1;
|
||||
}
|
||||
message DecodeInvoiceRequest{
|
||||
string invoice=1;
|
||||
string invoice = 1;
|
||||
}
|
||||
message DecodeInvoiceResponse{
|
||||
int64 amount=1;
|
||||
|
|
@ -152,4 +152,19 @@ message GetUserOperationsResponse{
|
|||
UserOperations latestIncomingInvoiceOperations=2;
|
||||
UserOperations latestOutgoingTxOperations=3;
|
||||
UserOperations latestIncomingTxOperations=4;
|
||||
}
|
||||
|
||||
message AddProductRequest {
|
||||
string name = 1;
|
||||
int64 price_sats = 2;
|
||||
}
|
||||
|
||||
message Product {
|
||||
string id = 1;
|
||||
string name = 2;
|
||||
int64 price_sats = 3;
|
||||
}
|
||||
|
||||
message GetProductBuyLinkResponse {
|
||||
string link = 1;
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue